Browse Source

解决弹窗问题

master
zhanglei 3 months ago
parent
commit
d0b059f560
  1. BIN
      SnailSend.exe
  2. 3906
      build/SnailSend/Analysis-00.toc
  3. 3822
      build/SnailSend/EXE-00.toc
  4. 3820
      build/SnailSend/PKG-00.toc
  5. BIN
      build/SnailSend/SnailSend.pkg
  6. BIN
      build/SnailSend/base_library.zip
  7. BIN
      dist/SnailSend.exe
  8. 16
      main.py
  9. 4
      service.ini

BIN
SnailSend.exe

Binary file not shown.

3906
build/SnailSend/Analysis-00.toc

File diff suppressed because it is too large

3822
build/SnailSend/EXE-00.toc

File diff suppressed because it is too large

3820
build/SnailSend/PKG-00.toc

File diff suppressed because it is too large

BIN
build/SnailSend/SnailSend.pkg

Binary file not shown.

BIN
build/SnailSend/base_library.zip

Binary file not shown.

BIN
dist/SnailSend.exe

Binary file not shown.

16
main.py

@ -1129,7 +1129,8 @@ bind_port = {bport}
if os.name == 'nt': # Windows系统
return self._get_processes_windows(port)
else: # Linux/Mac系统
return self._get_processes_linux(port)
self.append_send_output(f"linux系统")
return []
except Exception as e:
self.append_send_output(f"[错误] 获取端口信息时出错: {e}\n")
return []
@ -1141,7 +1142,7 @@ bind_port = {bport}
# 方法1: 使用netstat命令
result = subprocess.run(
['netstat', '-ano', '-p', 'tcp'],
capture_output=True, text=True, encoding='gbk'
capture_output=True, text=True, encoding='gbk',creationflags=subprocess.CREATE_NO_WINDOW # 不创建窗口
)
lines = result.stdout.split('\n')
@ -1169,7 +1170,7 @@ bind_port = {bport}
ps_command = f"Get-NetTCPConnection -LocalPort {port} | Select-Object OwningProcess, @{{Name='ProcessName'; Expression={{ (Get-Process -Id $_.OwningProcess).Name }} }}"
result = subprocess.run(
['powershell', '-Command', ps_command],
capture_output=True, text=True, timeout=10
capture_output=True, text=True, timeout=10,creationflags=subprocess.CREATE_NO_WINDOW # 不创建窗口
)
if result.returncode == 0:
@ -1193,7 +1194,7 @@ bind_port = {bport}
try:
result = subprocess.run(
['tasklist', '/fi', f'pid eq {pid}', '/fo', 'csv', '/nh'],
capture_output=True, text=True, encoding='gbk'
capture_output=True, text=True, encoding='gbk',creationflags=subprocess.CREATE_NO_WINDOW # 不创建窗口
)
if result.returncode == 0 and result.stdout.strip():
@ -1286,13 +1287,14 @@ local_port = {bport}
except Exception as e:
self.append_output(f"创建配置文件失败: {e}\n")
return False
# 在所有的 subprocess.Popen 调用中添加 CREATE_NO_WINDOW 标志
def execute_frpc(self):
"""执行frpc命令"""
try:
self.current_stage = "frpc"
self.update_status("正在启动NATC客户端...")
self.frpc_process = subprocess.Popen(
['.\\gc.exe', '-c', '.\\service.ini'],
stdout=subprocess.PIPE,
@ -1360,7 +1362,7 @@ local_port = {bport}
try:
self.current_stage = "p2p"
self.update_status("正在启动P2P文件接收...")
# 获取用户选择的保存路径
save_path = self.receive_path_var.get().strip()
if not save_path:

4
service.ini

@ -3,8 +3,8 @@ server_addr = 47.97.6.201
server_port = 7100
token = ENbOUMvXJGWuA623@@@
[M0BUnkgzPxR0Ebdp9NQ4VUtm4EpTDvPR]
[JjTTRBiq89o9Lm4Zg6bgjpeXc9NBU5tz]
type = xtcp
sk = aw1fohFnPcZEjRcRogENJzBbgPsNqjV3
sk = 2E8UaE0qQm8bVtAFqzUhXJWMbPjBh8Gq
local_ip = 127.0.0.1
local_port = 6000

Loading…
Cancel
Save