n0va_sa

Hping3_Fin_Scanner

May 11th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1. #just a basic Script to scan all alive host with FIN Flag
  2. #you can use other Flags like URG flag or any other flag to perform a scan (possibilities with these are endless)
  3.  
  4. responsedHost = []
  5. for i in range(1,255):
  6.         ip = "192.168.0"
  7.         ip = ip + '.' + str(i)
  8.         command = "hping3 -c 3 -F "
  9.         command += ip
  10.         print("checking host = " + ip)
  11.         res = os.system(command)
  12.         if res is 0:
  13.                 print("Host :" + ip + " Responded\n\n")
  14.                 responsedHost.append(ip)
  15.                 os.system("clear")
  16.         else:
  17.                 pass
  18.                 os.system("clear")
  19. print("Host that Responded are:")
  20. for host in responsedHost:
  21.         print(host)
Add Comment
Please, Sign In to add comment