Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. require 'msf/core'
  2. class Metasploit3 < Msf::Auxiliary
  3. include Msf::Exploit::Remote::Tcp
  4. include Msf::Auxiliary::Scanner
  5. def initialize
  6. super(
  7. 'Name' => 'My custom TCP scan',
  8. 'Version' => '$Revision: 1 $',
  9. 'Description' => 'My quick scanner',
  10. 'Author' => 'Your name here',
  11. 'License' => MSF_LICENSE
  12. )
  13. register_options(
  14. [
  15. Opt::RPORT(12345)
  16. ], self.class)
  17. end
  18.  
  19. def run_host(ip)
  20. connect()
  21. sock.puts('HELLO SERVER') #when I comment this line (disable it) the script works
  22. data = sock.recv(1024)
  23. print_status("Received: #{data} from #{ip}")
  24. disconnect()
  25. end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement