cm_connection.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:CManager 作者: fachrioktavian 项目源码 文件源码
def show_profile(self):
        indent = ' '
        header = indent + 'List of profiles saved by system:\n'
        table = [['Profile name', 'Connection type', 'SSID', 'Passphrase']]
        list_profile = os.listdir(self.profile_path)
        for fileconf in list_profile:
            of_file = open(self.profile_path + fileconf, 'r')
            of = of_file.read().split('\n')
            if of[0][1::] == 'Open':
                table.append([fileconf[:-5:], 'Open', of[2][7:-1:], '-'])
            elif of[0][1::] == 'WPA':
                table.append([fileconf[:-5:], 'WPA', of[2][7:-1:], of[3][7:-1:]])
            of_file.close()
        print (Fore.YELLOW + Style.DIM + header + AsciiTable(table).table)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号