Add a better autofilter() / check()

git-svn-id: file:///home/svn/framework3/trunk@5950 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore 2008-11-18 20:15:20 +00:00
parent 9a2d5aa9c4
commit 3266bd9ecd
1 changed files with 20 additions and 3 deletions

View File

@ -197,11 +197,28 @@ class Metasploit3 < Msf::Exploit::Remote
], self.class)
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)
if(not @nops)
if (target['Nops'] > 0)
@ -318,4 +335,4 @@ class Metasploit3 < Msf::Exploit::Remote
end
end
end