#!/system/bin/sh #set PORTS ports=(80 21 22 23) #set colors bold=`echo -en "\e[1m"` red=`echo -en "\e[31m"` normal=`echo -en "\e[0m"` dev="wlan0" myip=$(busybox ifconfig wlan0 |\ grep "inet addr"|\ busybox awk '{print $2}'|\ cut -d\: -f2) range=$(echo $myip|cut -d\. -f1,2,3) echo "Your IP is $myip" echo "Range is $range" echo "Quick Ping" for i in `seq 1 254`; do busybox arping -q -c1 -I $dev $range.$i & echo "pinging $range.$i" done echo "Resting for 5 seconds..." sleep 5 ips=$(busybox arp -a|grep -v incomplete|cut -d\( -f2|cut -d\) -f1) echo "Current computers online" echo "$ips" echo "Scanning Ports on found computers" for ip in $ips do for p in "${ports[@]}" do busybox pscan $ip -p $p -P $p|\ #sed "s/$ip/${red}${bold}${ip}$normal/g"|\ #sed "s/open/${red}${bold}open$normal/g"|\ grep tcp > /dev/null && echo "${red}${bold}${ip}$normal Port ${red}${bold}$p$normal is OPEN" done done