File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed
modules/exploits/linux/http Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -62,27 +62,30 @@ def uri
62
62
63
63
64
64
def check
65
- # Check version
66
65
vprint_status ( "#{ peer } - Trying to detect installed version" )
67
66
67
+ version = nil
68
68
res = send_request_cgi ( {
69
69
'method' => 'GET' ,
70
70
'uri' => normalize_uri ( uri , 'index.php' )
71
71
} )
72
72
73
- if res && res . code == 200 && res . body =~ /Pandora FMS - the Flexible Monitoring System/ && res . body =~ /(?<=xx-small;">v)(.*?)(?=< \/ td>)/
74
- version = $1
75
- vprint_status ( " #{ peer } - Pandora FMS version #{ version } detected" )
76
- else
77
- vprint_status ( " #{ peer } - Unable to access Pandora FMS" )
78
- return Exploit :: CheckCode :: Unknown
73
+ if res && res . code == 200 && res . body =~ /Pandora FMS - the Flexible Monitoring System/
74
+ if res . body =~ /<div id="ver_num">v(.*?)< \/ div>/
75
+ version = $1
76
+ else
77
+ return Exploit :: CheckCode :: Detected
78
+ end
79
79
end
80
80
81
- if version && version <= '4.1.1'
82
- return Exploit ::CheckCode ::Appears
83
- else
84
- return Exploit ::CheckCode ::Safe
81
+ unless version . nil?
82
+ vprint_status ( "#{ peer } - Pandora FMS #{ version } found" )
83
+ if Gem ::Version . new ( version ) <= Gem ::Version . new ( '5.0SP2' )
84
+ return Exploit ::CheckCode ::Appears
85
+ end
85
86
end
87
+
88
+ Exploit ::CheckCode ::Safe
86
89
end
87
90
88
91
You can’t perform that action at this time.
0 commit comments