default to first architecture in architecture array for egghunter, fixes #148

git-svn-id: file:///home/svn/framework3/trunk@5131 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Matt Miller 2007-10-02 03:24:21 +00:00
parent aebfc6cffa
commit dc23f5b8dc
2 changed files with 6 additions and 2 deletions

View File

@ -31,6 +31,9 @@ module Exploit::Egghunter
# If we found a platform list, then take the first platform
los = los.names[0] if (los.kind_of?(Msf::Module::PlatformList))
# Use the first architecture if one was specified
larch = larch[0] if (larch.kind_of?(Array))
if los.nil?
raise RuntimeError, "No platform restrictions were specified -- cannot select egghunter"
end

View File

@ -84,7 +84,8 @@ class Aggressive < Msf::Exploit::Remote
register_options(
[
OptBool.new('WaitForInput', [ false, "Wait for user input before returning from exploit", false ])
OptBool.new('WaitForInput', [ false, "Wait for user input before returning from exploit", false ]),
OptInt.new('TestInteger', [ false, "Testing an integer value", nil ])
])
end
@ -100,7 +101,7 @@ class Aggressive < Msf::Exploit::Remote
connect
print_status("Sending #{payload.encoded.length} byte payload...")
print_status("Sending #{payload.encoded.length} byte payload...[#{datastore['TestInteger']}]")
sock.put(payload.encoded)