leonteale

check for services on port 443

Nov 12th, 2012
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.75 KB | None | 0 0
  1. root@bt:~# for ip in `cat ips.txt`; do echo $ip;  nmap $ip -p 443 -o /dev/null | egrep open; done | grep -B 1 open > temp.txt ; cat temp.txt  | grep '[^\.][0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}[^\.]' > ips443.txt ; for ip in `cat ips443.txt`; do  curl -k -sL -w "%{http_code} %{url_effective}\\n" "https://$ip" -o /dev/null; done | grep '200'
  2.  
  3.  
  4.  
  5. ------------------------
  6. #!/bin/bash
  7. clear
  8. for ip in `cat ips.txt`;
  9. do echo "$ip";
  10. nmap $ip -p 443 -o /dev/null | egrep open; done | grep -B 1 open > temp.txt; cat temp.txt | grep '[^\.][0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}[^\.]' > ips443.txt;
  11. for ip in `cat ips443.txt | sort -u`; do  curl -k -sL -w "%{http_code} %{url_effective}\\n" "https://$ip"; done | grep "200 https"
Advertisement
Add Comment
Please, Sign In to add comment