Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #by light, very bored. lol
- if [ $# != 2 ]; then
- echo "Usage: bash $0 <ip_list> <port>"
- exit 0
- fi
- while IFS='' read -r line || [[ -n "$line" ]]; do
- if [[ $(nc -v -z $line $2 | grep succeeded) != "" ]]
- then
- echo "Host: $line | Port: $2" && echo $line >>open.txt #prints ip w/ open port and sends ip to an active ip list
- fi
- done < "$1"
- #educational purposes only ;)
Advertisement
Add Comment
Please, Sign In to add comment