
Untitled
By: a guest on
May 9th, 2012 | syntax:
None | size: 0.55 KB | hits: 23 | expires: Never
Metasploit Remote API: module.execute fails after 2nd exploit
modules = rpc.call("module.exploits")
modules["modules"].each do | exploit |
# filter the exploits I want
# set the payload and other required options
running = rpc.call("module.execute", "exploit", exploit, args)
if (running["job_id"].nil?)
puts "#{exploit} is NOT running"
else
puts "#{exploit} is running"
# ....
rpc.call("job.stop", running["job_id"])
puts rpc.call("job.list")
sleep 1
end
end