From b1d5c2a2d7c1cbe9b755d4ecbcb186bbdcc654ff Mon Sep 17 00:00:00 2001 From: 11tools Date: Wed, 9 Jan 2019 18:47:21 +0800 Subject: [PATCH] add a -r to Scan random ip address add -r to scan random ip address Signed-off-by: 11tools --- hydra.sh | 5 +++++ 1 file changed, 5 insertions(+) mode change 100644 => 100755 hydra.sh diff --git a/hydra.sh b/hydra.sh old mode 100644 new mode 100755 index 75d28c8..900fc9c --- a/hydra.sh +++ b/hydra.sh @@ -4,6 +4,7 @@ if [ $# -lt 4 ] then echo "usage: ./hydra.sh -p ./password.txt -f ./iplist.txt" echo "usage: ./hydra.sh -p ./password.txt -l 192.168.9.0/24" + echo "usage: ./hydra.sh -p ./password.txt -r 10000" exit 1 fi @@ -23,6 +24,10 @@ do nmap -vv -n -sS -sU -p22 $2 | grep "Discovered open port" | awk {'print $6'} | awk -F/ {'print $1'} > ./22-output.txt shift ;; + -r) + nmap -vv -n -sS -sU -p22 -iR $2 | grep "Discovered open port" | awk {'print $6'} | awk -F/ {'print $1'} > ./22-output.txt + shift + ;; *) echo "$1 is not an option" echo "usage: ./hydra.sh -p ./password.txt -f ./iplist.txt"