From 04bb2ca4fe5453fcf422bf9efbc4716a74c0ff0d Mon Sep 17 00:00:00 2001 From: acidvegas Date: Sat, 17 Jun 2023 18:48:42 -0400 Subject: [PATCH] Added distributed masscan helper script --- dmsh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 dmsh diff --git a/dmsh b/dmsh new file mode 100755 index 0000000..ae4a76c --- /dev/null +++ b/dmsh @@ -0,0 +1,13 @@ +#!/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 + 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 808900.00 --excludefile exclude.conf --open-only -oB mass.log --shard $i/$TOTAL" + i=$((i+1)) +done < $1 \ No newline at end of file