摘要: f= open('bbb')result=f.read()user_list=result.split('\n')#读取文件内容,以换行符分隔user_dic={}for user in user_list: # 'abc,123' username=user.split(',')[0] passw 阅读全文
posted @ 2019-01-10 20:01 徐儿 阅读(133) 评论(0) 推荐(0) 编辑
摘要: import timepoint=0 #第一次开始读取时从0开始while True: #服务器一直再运行所以写个死循环 ips={}#定义一个空字典存放IP用,放在循环下边是因为每次读取时都会重新定义 f = open('access.log',encoding='utf-8') f.seek(p 阅读全文
posted @ 2019-01-10 11:07 徐儿 阅读(178) 评论(0) 推荐(0) 编辑