当前位置: 首页>>代码示例>>Python>>正文


Python Cell.encryption_type方法代码示例

本文整理汇总了Python中wifi.Cell.encryption_type方法的典型用法代码示例。如果您正苦于以下问题:Python Cell.encryption_type方法的具体用法?Python Cell.encryption_type怎么用?Python Cell.encryption_type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wifi.Cell的用法示例。


在下文中一共展示了Cell.encryption_type方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_wpa

# 需要导入模块: from wifi import Cell [as 别名]
# 或者: from wifi.Cell import encryption_type [as 别名]
    def test_wpa(self):
        cell = Cell()
        cell.ssid = 'SSID'
        cell.encrypted = True
        cell.encryption_type = 'wpa'

        scheme = Scheme.for_cell('wlan0', 'test', cell, 'passkey')

        self.assertEqual(scheme.options, {
            'wpa-ssid': 'SSID',
            'wpa-psk': 'ea1548d4e8850c8d94c5ef9ed6fe483981b64c1436952cb1bf80c08a68cdc763',
            'wireless-channel': 'auto',
        })
开发者ID:Evanito,项目名称:wifi,代码行数:15,代码来源:test_schemes.py

示例2: test_wep_ascii

# 需要导入模块: from wifi import Cell [as 别名]
# 或者: from wifi.Cell import encryption_type [as 别名]
    def test_wep_ascii(self):
        cell = Cell()
        cell.ssid = 'SSID'
        cell.encrypted = True
        cell.encryption_type = 'wep'

        # ascii key lengths: 5, 13, 16, 29
        ascii_keys = ('a' * 5, 'a' * 13, 'a' * 16, 'a' * 29)
        for key in ascii_keys:
            scheme = Scheme.for_cell('wlan0', 'test', cell, key)

            self.assertEqual(scheme.options, {
                'wireless-essid': 'SSID',
                'wireless-key': 's:' + key
            })
开发者ID:Evanito,项目名称:wifi,代码行数:17,代码来源:test_schemes.py

示例3: test_wep_hex

# 需要导入模块: from wifi import Cell [as 别名]
# 或者: from wifi.Cell import encryption_type [as 别名]
    def test_wep_hex(self):
        cell = Cell()
        cell.ssid = 'SSID'
        cell.encrypted = True
        cell.encryption_type = 'wep'

        # hex key lengths: 10, 26, 32, 58
        hex_keys = ("01234567ab", "0123456789abc" * 2, "0123456789abcdef" * 2, "0123456789abc" * 2 + "0123456789abcdef" * 2)
        for key in hex_keys:
            scheme = Scheme.for_cell('wlan0', 'test', cell, key)

            self.assertEqual(scheme.options, {
                'wireless-essid': 'SSID',
                'wireless-key': key
            })
开发者ID:Evanito,项目名称:wifi,代码行数:17,代码来源:test_schemes.py


注:本文中的wifi.Cell.encryption_type方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。