Beispiel #1
0
    def run(self):
        print_info("""
            _ _              ___  ______
           (_) |            / _ \ | ___ \\
  _ __ ___  _| |_ _ __ ___ / /_\ \| |_/ /
 | '_ ` _ \| | __| '_ ` _ \|  _  ||  __/
 | | | | | | | |_| | | | | | | | || |
 |_| |_| |_|_|\__|_| |_| |_\_| |_/\_|
 """)
        print_info("Starting process...")
        if self.args.get("dnsspoof", False):
            dns_num = self.dns()
            i = 0
            while dns_num != i:
                dns_num_temp = i + 1
                dns_domain = input("[?] " + str(dns_num_temp) +
                                   ". domain to spoof: ")
                dns_ip = input("[?] Fake IP for domain '" + dns_domain + "': ")
                dns_line_ssl = dns_domain + " " + dns_ip + "\n"
                dns_line_no_ssl = "address=/" + dns_domain + "/" + dns_ip + "\n"
                self.all_dns["ssl"].append(dns_line_ssl)
                self.all_dns["no_ssl"].append(dns_line_no_ssl)
                i = i + 1

        new_process_function(self.setup_ap,
                             name=f"AP_{self.args.get('ssid')}",
                             seconds_to_wait=4)
        seconds = 12
        print_info(f"Wait {seconds} seconds")
        sleep(seconds)
Beispiel #2
0
 def run(self):
     print_info(f"Xiamoi {self.args['device']} Advertisement...")
     new_process_function(self.setup_ap,
                          name=f"AP_{self.args.get('ssid')}",
                          seconds_to_wait=4)
     seconds = 12
     print_info(f"Wait {seconds} seconds")
     sleep(seconds)
Beispiel #3
0
    def run(self):
        try:
            self.args["count"] = int(self.args["count"])
        except:
            self.args["count"] = 5

        # Run in background
        new_process_function(self._deauth,
                             name=f"Deauth_{self.args['client']}")
Beispiel #4
0
 def run(self):
     try:
         self.file_to_save = open(self.args["file"], "w+")
     except Exception as e:
         print_error(e)
         print_error("Module has not been launched")
         return
     print_info(
         f'Trying to get information from {self.args["rhost"]}. The data is saved in {self.args["file"]}d'
     )
     new_process_function(self.__start,
                          name="mqtt_subscribe",
                          seconds_to_wait=1)
Beispiel #5
0
 def run(self):
     if VERSION <= "2.4.2":
         print_error("You need a 2.4.3 or higher version of scapy")
         return
     try:
         int(self.args["iface"])
     except:
         print_error(
             "iface must be an integer... check your interface with hciconfig"
         )
         return
     print_info("Starting to capture Bluetooth packets")
     new_process_function(self._start_capture,
                          name="blueScapy",
                          seconds_to_wait=1)
Beispiel #6
0
def test_tasks():
    task = Task()
    assert task.count == 1
    assert len(task.get_tasks()) == 0
    new_process_function(to_test_th)
    assert task.count == 2
    assert len(task.get_tasks()) == 1
    task.kill_task(1)
    assert task.count == 2
    assert len(task.get_tasks()) == 0
    new_process_function(to_test_th)
    task.kill_task(1)
    assert task.count == 3
    assert len(task.get_tasks()) == 1
    task.kill_task(2)
    assert len(task.get_tasks()) == 0
Beispiel #7
0
    def run(self):
        hci = self.args["iface"]
        name = "DirtytoothSpeaker"
        if self.args['name']:
            name = self.args['name']
        if Task.get_instance().exist_task("dirtyagent"):
            print_info("A dirtyagent is running... Kill it first")
            return
        tool = "hciconfig"
        options =  [f"{hci} name {name}", f"{hci} reset", f"{hci} class {self.args['class']}",f"{hci} noauth", f"{hci} piscan"]

        for op in options:
            system(tool + " " +  op)
        new_process_function(run_agent, name="dirtyagent")
        #new_process_command("./utils/dirtytooth/dirtyagent", name="dirtyagent")
        
Beispiel #8
0
 def run(self):
     new_process_function(self._subscribe, name="Subscribe_ble")