[Python][自己写的杀病毒脚本]
来源:互联网 发布:php 获取pathinfo 编辑:程序博客网 时间:2024/06/06 10:55
电脑里的HTML都插入了一段VB病毒代码..只能自己手动清除了..发现Python确实好用
import osimport re;Root = ["H:"];for root in Root: for rt, dirs, files in os.walk(root): for f in files: fname = os.path.splitext(f) if fname[1]=='.html' : fileString=rt+'\\'+f print(fileString) htmlfile=open(fileString,"r+"); Filecontent=htmlfile.read(); Filecontent=str(Filecontent); NewFilecontent=re.sub("<SCRIPT Language=VBScript>[\s\S]*","",Filecontent); htmlfile.close(); htmlfile=open(fileString,"w+"); htmlfile.write(NewFilecontent); htmlfile.close();
0 0
- [Python][自己写的杀病毒脚本]
- 自己用Python写的iOS项目自动打包脚本
- 自己用Python写的iOS项目自动打包脚本
- linux脚本自己写的
- 自己写的第一个病毒(仿的)
- python写的打包脚本
- python写的投票脚本
- python写的翻译脚本
- 自己python写的程序
- 分享一个自己写的用python比对数据库表数据的脚本
- 自己写的备份服务器的脚本
- 源码:自己用Python写的iOS项目自动打包脚本
- 自己写的Python脚本 用于文件按照小时合并且单个文件不超过200M
- 偶自己写的javascript脚本
- 自己写的捉图脚本
- 自己写的每日自动备份脚本
- 自己写的ajax通用 脚本
- 自己写的第一个shell脚本
- log4j基本配置
- CGAL--No rule to make target `/usr/lib/x86_64-linux-gnu/libGL.so'
- SDAU课程练习2 1015
- Problem A: 函数---求两个整数的最大公约数
- 最新的全球78707个主要城市数据库,包含经纬度坐标值国家省份
- [Python][自己写的杀病毒脚本]
- URLConnection Demo
- ife-task2:零基础HTML及CSS编码--被忽略的属性
- Android Add Logo
- js表单的各种验证
- java事务
- iOS 停止计时器计时
- Problem B: 函数---判断素数
- 错题记录(1)-数理统计(含概率)