2023-06-17 22:48:42 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# distributed masscan helper - developed by acidvegas (https://git.acid.vegas/random)
|
|
|
|
TOTAL=$(wc -l $1)
|
|
|
|
i=1
|
|
|
|
while IFS= read -r line; do
|
|
|
|
user=$(echo "$line" | cut -d':' -f1)
|
|
|
|
pass=$(echo "$line" | cut -d':' -f2)
|
|
|
|
host=$(echo "$line" | cut -d':' -f3)
|
|
|
|
port=$(echo "$line" | cut -d':' -f4)
|
|
|
|
sshpass -p $pass ssh $user@$host -p $port
|
2024-01-31 18:35:41 +00:00
|
|
|
ssh $line sh -c "wget https://raw.githubusercontent.com/robertdavidgraham/masscan/master/data/exclude.conf && masscan --range 0.0.0.0/0 -p $2 --banners --rate 50000 --excludefile exclude.conf --open-only -oJ $port.json --shard $i/$TOTAL"
|
2023-06-17 22:48:42 +00:00
|
|
|
i=$((i+1))
|
2024-01-31 18:35:41 +00:00
|
|
|
done < $1
|