Advertisement
Googleinurl

Port scanner simples feito em LUA

Nov 28th, 2013
575
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.73 KB | None | 0 0
  1. !/usr/bin/lua
  2. require('socket')
  3.  
  4. print([[
  5.  / \ / \ / \   / \ / \ / \
  6. ( P ) E ) I ) ( P ) E ) I )
  7.  \_/ \_/ \_/   \_/ \_/ \_/
  8. ESTUDANDO LUA.....
  9. BLOG.INURL.COM.BR
  10.  
  11. ]])
  12. seu_alvo = (arg[1]) or os.exit()
  13.  
  14. local ip = socket.dns.toip(alvo)
  15.  
  16. local host = socket.dns.tohostname(seu_alvo)
  17.  
  18.  
  19. print('PORTAS ON [',seu_alvo,']')
  20. print('-------------------------------------/')
  21. print('Host: [',host,']')
  22. print('IP:   [',ip,']')
  23. print('-------------------------------------/')
  24.  
  25. portas = 0
  26. while 1000 do
  27. portas = portas + 1;
  28.  
  29. local scan = socket.connect(seu_alvo,portas)
  30. if scan then
  31. print('-------------------------------------')
  32. print('ABERTO: ',seu_alvo,'PORTA:', portas)
  33. print('-------------------------------------')
  34. end end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement