h4-debug 0.2.1__tar.gz → 0.2.2__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.4
2
2
  Name: h4-debug
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Advanced application proxy debugger and F12-style web console
5
5
  Author-email: h4 <h4@example.com>
6
6
  Requires-Python: >=3.8
@@ -228,7 +228,14 @@ def debug_process(command, client):
228
228
  if not kernel32.CreateProcessW(
229
229
  None, ctypes.c_wchar_p(cmd_str), None, None, True, # bInheritHandles=True
230
230
  creation_flags, None, None, ctypes.byref(si), ctypes.byref(pi)):
231
- client.send("System", "error", {"text": f"Failed to CreateProcess: {ctypes.GetLastError()}"})
231
+ err = ctypes.GetLastError()
232
+ err_msg = f"Failed to CreateProcess: {err}"
233
+ if err == 5:
234
+ err_msg += " (Access Denied). The executable may require Administrator privileges, or it may be blocked by Windows Defender/DRM. Try running h4-debug from an Administrator terminal."
235
+ elif err == 740:
236
+ err_msg += " (Elevation Required). The executable requires Administrator privileges. Please run h4-debug from an Administrator terminal."
237
+ client.send("System", "error", {"text": err_msg})
238
+ print(f"[h4-debug] {err_msg}")
232
239
  if hWritePipe:
233
240
  kernel32.CloseHandle(hReadPipe)
234
241
  kernel32.CloseHandle(hWritePipe)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: h4-debug
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Advanced application proxy debugger and F12-style web console
5
5
  Author-email: h4 <h4@example.com>
6
6
  Requires-Python: >=3.8
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "h4-debug"
7
- version = "0.2.1"
7
+ version = "0.2.2"
8
8
  description = "Advanced application proxy debugger and F12-style web console"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes