Exemple #1
0
    def main(self, parent, iface, canvas, target):
        self.parent = parent
        # assign  Wireless Interface
        self.iface = iface

        # assign scan target
        self.target = target

        # initiate a global variable networks to store obtained networks
        global networks
        networks = []

        # Making sure that our wireless interface isn't down.
        try:
            os.system("sudo ifconfig %s up" % self.iface)
        except OSError:
            pass

        # Create the queue
        self.queue = Queue.Queue()

        # Set up Gui part
        self.gui = Gui(parent, self.queue, self.endApplication, canvas)

        self.running = True
        self.multiThreader()

        signal.signal(signal.SIGINT, self.stop_channel_hop)
        # Start the periodic call in the GUI to check the queue
        self.periodicCall()