Skip to content

Instantly share code, notes, and snippets.

@dzaczek
Last active September 25, 2019 14:24
Show Gist options
  • Save dzaczek/54a8d5e3c0833bf01fc04dfa272751d7 to your computer and use it in GitHub Desktop.
Save dzaczek/54a8d5e3c0833bf01fc04dfa272751d7 to your computer and use it in GitHub Desktop.
#!/bin/bash
#ulstrafast lan scanner
#https://consolechars.wordpress.com/2017/03/27/devtcp-forgotten-linux-delicacy/
iph="192.168.8."
scan (){
timeout 3 bash -c "echo >/dev/tcp/$iph$2/$1" 2>/dev/null && echo "$iph$2 $1"
}
echo "PORT HOST"
for ihost in {1..254}; do
for port in {22,80,8080,3389,443,53,67,68}; do
scan $port $ihost &
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment