I have wrote a wrapper script to enumerate contents of an 'IP'
. The tool works fine,But I wanted to launch multiple requests at a time and get the content.
#Test.sh
#!/usr/bin/env bash
#DATE=$(date +"%Y-%m-%d %H:%M")
#DAY=$(date +"%m_%d")
while IFS=, read -r n a ;do
OUTPUT=$(./Scanner.sh $a 443 | grep "YES" | sed "s/^\(.\)/$a,\1/")
echo "$OUTPUT"
done < $1
Run Command : $./Tesh.sh Input.txt
#Input.txt
1,2.2.2.2
2,3.3.3.3
4,10.10.10.10
The output has three fields such as IP,Validation and Enumerated content.
#Output
2.2.2.2,YES,Vulnerable-1
2.2.2.2,YES,Vulnerable-2
Now for each IPs
it takes around 30Secs
to scan and get the result. I have around 100,000
IPs to get scanned. Is that anything that i can do in my code to launch multiple requests when read from Input.txt
and minimize the time ? Thoughts ?
FYI: I'm in bash learning mode.