We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 744188f commit c9e0c71Copy full SHA for c9e0c71
modules/exploits/linux/http/pivotx_index_php_overwrite.rb
@@ -144,13 +144,18 @@ def restore
144
vprint_error('Failed to restore original content') unless res&.code == 200 && res.body.include?('Wrote contents to file index.php')
145
end
146
147
+ def cleanup
148
+ super
149
+ # original content can be any string, it cannot be nil
150
+ restore if @original_value.nil?
151
+ end
152
+
153
def exploit
154
vprint_status('Logging in PivotX')
155
login
156
vprint_status('Modifying file and injecting payload')
157
modify_file
158
vprint_status('Triggering payload')
159
trigger_payload
- restore
160
161
0 commit comments