简单的metasploit程序

本程序是在《Metasoloit pentration tester user guide》p31的程序做来一定的修改,原书程序在BT5下无法运行。报“metasploit_the_pentration_tester_guide”,经过与

/opt/framework3/msf3/modules/auxiliary/scanner/http/open_proxy.rb 的程序进行对比后修改而成。
 

 

#Metasploit
require 'msf/core'

class Metasploit3 < Msf::Auxiliary

        include Msf::Exploit::Remote::Tcp
        include Msf::Auxiliary::Scanner

        def initialize(info = {})
                super(update_info(info,
                        'Name'          => 'My custom TCP scan',
                        'Version'       => '$Revision:1 $',
                        'Description'   => 'My quick scanner',
                        'Author'        => 'Metazhou',
                        'License'       => MSF_LICENSE
                ))

                register_options(
                        [
                                Opt::RPORT(12345)
                        ],self.class)
        end

        def run_host(ip)
                        connect()
                        sock.puts('HELLO SERVER')
                        data = sock.recv(1024)
                        print_status("Received: #{data} from #{ip}")
                        disconnect()
        end
end

 

你可能感兴趣的:(职场,休闲,bt5,metasploit)