摘要: #!/usr/bin/python#coding:utf-8import rex=open('access1.log')abc={}for i in x: m=re.search('firefox',i) if m: key=m.group() abc[key]=abc.get(key,0)+1pr 阅读全文
posted @ 2018-03-23 18:57 virlix 阅读(787) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/pythonimport paramikohost='192.168.4.101'ssh = paramiko.SSHClient()ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())ssh.connect(hos 阅读全文
posted @ 2018-03-23 18:55 virlix 阅读(327) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding:utf-8 import subprocess //调用shell命令的一个模块 import threading //导入线程模块 def myping(ip): s=subprocess.call('ping -c2 -i0.1 -W1 %s 阅读全文
posted @ 2018-03-23 18:54 virlix 阅读(305) 评论(0) 推荐(0) 编辑