filter out privileged payloads used with non-privileged exploits

git-svn-id: file:///home/svn/framework3/trunk@3869 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Matt Miller 2006-09-12 05:58:07 +00:00
parent 0b438ae5b4
commit d11604cca9
1 changed files with 4 additions and 0 deletions

View File

@ -555,6 +555,10 @@ class Exploit < Msf::Module
# what not?
next if (compatible?(framework.payloads.instance(name)) == false)
# If the payload is privileged but the exploit does not give
# privileged access, then fail it.
next if (self.privileged == false and framework.payloads.instance(name).privileged == true)
# This one be compatible!
payloads << [ name, mod ]
}