Skip to content

Commit b22f005

Browse files
committed
Add scanr.sh helper script
1 parent 6e1e447 commit b22f005

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

scanr.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
in=$1
4+
out=masscan.$in
5+
6+
while read line; do
7+
echo $line >> $out
8+
ip=$(echo $line | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | head -1)
9+
10+
if [ -z "$ip" ];
11+
then
12+
continue
13+
else
14+
echo "" && \
15+
echo "Scanning IP: " $ip && \
16+
echo "" && \
17+
masscan -p1-65535 --rate 5000 $ip -oL $ip.txt && \
18+
cat $ip.txt >> $out && rm $ip.txt &&\
19+
echo "" >> $out && \
20+
sleep $[($RANDOM %3)]
21+
fi
22+
done < $in

0 commit comments

Comments
 (0)