예제 #1
0
    def setUp(self):
        """ Set up the tests """

        essid = dot11.Dot11Elt(ID='SSID', info="")
        rates = dot11.Dot11Elt(ID='Rates',
                               info="\x03\x12\x96\x18\x24\x30\x48\x60")
        dsset = dot11.Dot11Elt(ID='DSset', info='\x06')
        self.packet = dot11.RadioTap() / dot11.Dot11() / essid / rates / dsset

        custom_tuple = collections.namedtuple(
            "test", ("target_ap_bssid target_ap_channel rogue_ap_mac args "
                     "target_ap_essid is_freq_hop_allowed"))

        self.target_channel = "6"
        self.target_bssid = "BB:BB:BB:BB:BB:BB"
        self.rogue_mac = "CC:CC:CC:CC:CC:CC"
        self.target_essid = "Evil"
        self.args = mock.Mock()
        self.args.deauth_essid = False
        self.args.channel_monitor = False

        data0 = custom_tuple(self.target_bssid, self.target_channel,
                             self.rogue_mac, self.args, self.target_essid,
                             True)
        data1 = custom_tuple(None, self.target_channel, self.rogue_mac,
                             self.args, self.target_essid, True)

        self.deauth_obj0 = deauth.Deauth(data0)
        self.deauth_obj1 = deauth.Deauth(data1)

        # test for --deauth-essid
        self.deauth_obj0._deauth_bssids = dict()
        self.deauth_obj1._deauth_bssids = dict()
예제 #2
0
    def setUp(self):
        """ Set up the tests """

        essid = dot11.Dot11Elt(ID='SSID', info="")
        rates = dot11.Dot11Elt(ID='Rates',
                               info="\x03\x12\x96\x18\x24\x30\x48\x60")
        dsset = dot11.Dot11Elt(ID='DSset', info='\x06')
        self.packet = dot11.RadioTap() / dot11.Dot11() / essid / rates / dsset

        custom_tuple = collections.namedtuple(
            "test", "target_ap_bssid target_ap_channel rogue_ap_mac")

        self.target_channel = "6"
        self.target_bssid = "BB:BB:BB:BB:BB:BB"
        self.rogue_mac = "CC:CC:CC:CC:CC:CC"

        data0 = custom_tuple(self.target_bssid, self.target_channel,
                             self.rogue_mac)
        data1 = custom_tuple(None, self.target_channel, self.rogue_mac)

        self.deauth_obj0 = deauth.Deauth(data0)
        self.deauth_obj1 = deauth.Deauth(data1)