This commit is contained in:
Administrator
2025-11-19 17:59:51 +08:00
parent 6000303f30
commit f276d7ab02
2 changed files with 50 additions and 37 deletions

View File

@@ -349,6 +349,9 @@ if __name__ == '__main__':
x_id=x_token_info.id,
)
if xstart_info.start == "1":
continue
hun_web = Hub_Web(x_info=x_token_info, xstart_info=xstart_info)
executor.submit(hun_web.action)

View File

@@ -1,47 +1,57 @@
from urllib.parse import urlparse
from bit_tools import deleteBrowser
from models import ips
from models.ips import Ips
from models.xstart import Xstart
if __name__ == '__main__':
with open('ip.txt', 'r', encoding='utf-8') as f:
content = f.read()
# with open('ip.txt', 'r', encoding='utf-8') as f:
# content = f.read()
#
# tasks = [] # 创建任务列表
# lines = content.split('\n')
#
# n = 0
# for _, line in enumerate(lines):
# # print(line)
# # 解析代理 URL
# parsed = urlparse(line)
# # 获取代理用户名和密码
# username = parsed.username
# password = parsed.password
#
# # 获取代理主机和端口
# proxy_host = parsed.hostname
# proxy_port = parsed.port
#
# # host = netloc_parts[0]
# # port = int(netloc_parts[1])
# #
# # # 提取用户名和密码
# # username = netloc_parts[2]
# # password = netloc_parts[3]
#
# # # 输出解析结果
# # print(f"协议: {scheme}")
# # print(f"主机: {host}")
# # print(f"端口: {port}")
# # print(f"用户名: {username}")
# # print(f"密码: {password}")
#
# Ips.get_or_create(
# host=proxy_host,
# port=proxy_port,
# username=username,
# password=password,
# )
tasks = [] # 创建任务列表
lines = content.split('\n')
n = 0
for _, line in enumerate(lines):
# print(line)
# 解析 URL
parsed_url = urlparse(line)
# 获取协议
scheme = parsed_url.scheme
# 提取主机和端口信息
netloc_parts = parsed_url.netloc.split(':')
host = netloc_parts[0]
port = int(netloc_parts[1])
# 提取用户名和密码
username = netloc_parts[2]
password = netloc_parts[3]
# 输出解析结果
print(f"协议: {scheme}")
print(f"主机: {host}")
print(f"端口: {port}")
print(f"用户名: {username}")
print(f"密码: {password}")
Ips.get_or_create(
host=host,
port=port,
username=username,
password=password,
)
for i in Xstart.select().where(
Xstart.start == "0"
):
print(i.x_id)
deleteBrowser(id=i.bit_id)
i.delete_instance()