added check function
parent
e9ad5a7dca
commit
85152b5f1e
|
@ -51,6 +51,19 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
deregister_options('CMDSTAGER::DECODER', 'CMDSTAGER::FLAVOR')
|
||||
end
|
||||
|
||||
def check
|
||||
s1 = connect(global = false)
|
||||
buf1 = s1.get_once(-1).to_s
|
||||
#parse out the bpd port returned
|
||||
bpd_port = buf1[-8..-3].to_i
|
||||
|
||||
#check if it's a valid port number (1-65534)
|
||||
if bpd_port && bpd_port >= 1 && bpd_port <= 65535
|
||||
Exploit::CheckCode::Detected
|
||||
else
|
||||
Exploit::CheckCode::Safe
|
||||
end
|
||||
end
|
||||
|
||||
def execute_command(cmd, opts = {})
|
||||
|
||||
|
|
Loading…
Reference in New Issue