DarkProgrammer000

GhostPing

Nov 28th, 2025
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.63 KB | None | 0 0
  1. #!/bin/bash
  2. arq="site.txt"
  3.  
  4. if [ $# -gt 0 ]
  5. then
  6.         echo $* | sed 's/ /\n/g' > $arq
  7.  
  8.         for i in $(cat $arq)
  9.         do
  10.                 nmap -sn $i > temp.txt 2>&1
  11.  
  12.                 if cat temp.txt | grep "1 host up" 1>/dev/null 2>&1
  13.                 then
  14.                         echo -e "\033[01;32m# $i: Host Ativo\033[00;00m"
  15.                 else
  16.                         echo -e "\033[01;33m# $i: Host Inativo\033[00;00m"
  17.                 fi
  18.  
  19.                 rm $arq 2>/dev/null
  20.         done
  21.  
  22. else
  23.  
  24.         echo -e "\033[01;34m* Usage: $0 <domain>"
  25.         echo -e "\033[01;32m* Usage: $0 <domain> <domain> ..."
  26. fi
Advertisement
Add Comment
Please, Sign In to add comment