Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
derv82
GitHub Repository: derv82/wifite2
Path: blob/master/tests/test_Airmon.py
410 views
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
import sys
5
sys.path.insert(0, '..')
6
7
from wifite.tools.airmon import Airmon
8
9
import unittest
10
11
class TestAirmon(unittest.TestCase):
12
def test_airmon_start(self):
13
# From https://github.com/derv82/wifite2/issues/67
14
stdout = '''
15
PHY Interface Driver Chipset
16
17
phy0 wlan0 iwlwifi Intel Corporation Centrino Ultimate-N 6300 (rev 3e)
18
19
(mac80211 monitor mode vif enabled for [phy0]wlan0 on [phy0]wlan0mon)
20
(mac80211 station mode vif disabled for [phy0]wlan0)
21
'''
22
mon_iface = Airmon._parse_airmon_start(stdout)
23
assert mon_iface == 'wlan0mon', 'Expected monitor-mode interface to be "wlan0mon" but got "{}"'.format(mon_iface)
24
25
26