File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
modules/exploits/multi/http Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ def query_serverinfo
236
236
237
237
# Try to autodetect the target platform
238
238
def detect_platform ( res )
239
- if ( res . body =~ /<td.*?OSName.*?(Linux|FreeBSD|Windows).*?<\/ td>/m )
239
+ if res && res . body =~ /<td.*?OSName.*?(Linux|FreeBSD|Windows).*?<\/ td>/m
240
240
os = $1
241
241
if ( os =~ /Linux/i )
242
242
return 'linux'
@@ -252,7 +252,7 @@ def detect_platform(res)
252
252
253
253
# Try to autodetect the target architecture
254
254
def detect_architecture ( res )
255
- if ( res . body =~ /<td.*?OSArch.*?(x86|i386|i686|x86_64|amd64).*?<\/ td>/m )
255
+ if res && res . body =~ /<td.*?OSArch.*?(x86|i386|i686|x86_64|amd64).*?<\/ td>/m
256
256
arch = $1
257
257
if ( arch =~ /(x86|i386|i686)/i )
258
258
return ARCH_X86
You can’t perform that action at this time.
0 commit comments