Add a better autofilter() / check()
git-svn-id: file:///home/svn/framework3/trunk@5950 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
9a2d5aa9c4
commit
3266bd9ecd
|
@ -197,11 +197,28 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||||
], self.class)
|
], self.class)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Need to perform target detection
|
||||||
|
def autofilter
|
||||||
|
begin
|
||||||
|
connect()
|
||||||
|
smb_login()
|
||||||
|
disconnect()
|
||||||
|
if (smb_peer_lm() =~ /Samba/i)
|
||||||
|
true
|
||||||
|
else
|
||||||
|
false
|
||||||
|
end
|
||||||
|
rescue ::Exception
|
||||||
|
false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def check
|
||||||
|
autofilter() ? CheckCode::Detected : CheckCode::Safe
|
||||||
|
end
|
||||||
|
|
||||||
def brute_exploit(target_addrs)
|
def brute_exploit(target_addrs)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(not @nops)
|
if(not @nops)
|
||||||
if (target['Nops'] > 0)
|
if (target['Nops'] > 0)
|
||||||
|
@ -318,4 +335,4 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue