WinSystemShell 0.0.1__tar.gz → 0.0.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.1
2
2
  Name: WinSystemShell
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: A local privilege escalation utility that allows elevating from an administrator context to the SYSTEM account on Windows to perform high-privilege operations.
5
5
  Home-page: https://github.com/mauricelambert/WinSystemShell
6
6
  Author: Maurice Lambert
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: WinSystemShell
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: A local privilege escalation utility that allows elevating from an administrator context to the SYSTEM account on Windows to perform high-privilege operations.
5
5
  Home-page: https://github.com/mauricelambert/WinSystemShell
6
6
  Author: Maurice Lambert
@@ -142,7 +142,7 @@ class PipeClient:
142
142
 
143
143
  self.executable = executable
144
144
  self.server_path = server_path
145
- self.use_schtasks = use_schtasks
145
+ self.schtasks = schtasks
146
146
  self.pipe_in = PIPEDIR + (pipein or self._gen_random_name())
147
147
  self.pipe_out = PIPEDIR + (pipeout or self._gen_random_name())
148
148
 
@@ -175,14 +175,17 @@ class PipeClient:
175
175
 
176
176
  server_cmd = f'"\"{executable}\" \"{self.server_path}\" \"{self.executable}\" \"{self.pipe_in}\" \"{self.pipe_out}\"'
177
177
 
178
- if self.schtasks:
178
+ if self.schtasks is None:
179
179
  schtasks = r"C:\Windows\System32\schtasks.exe"
180
180
  task_cmd = (
181
181
  f'"{CMD}" /c '
182
182
  + server_cmd +
183
- f'& \"{schtasks}\" /delete /tn RunOnceSystem /f"'
183
+ f' & \"{schtasks}\" /delete /tn RunOnceSystem /f"'
184
184
  )
185
185
 
186
+ if len(task_cmd) > 255:
187
+ task_cmd = server_cmd
188
+
186
189
  Popen(
187
190
  [
188
191
  schtasks,
@@ -364,7 +367,7 @@ def valid_windows_path(path: str) -> str:
364
367
  """
365
368
 
366
369
  path = abspath(path)
367
- if not match(r"^[a-zA-Z]:\\\\", path):
370
+ if not match("^[a-zA-Z]:\\\\", path):
368
371
  raise ArgumentTypeError(f"Invalid Windows path: {path}")
369
372
  return path
370
373
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  [project]
6
6
  name = "WinSystemShell"
7
- version = "0.0.1"
7
+ version = "0.0.2"
8
8
  dependencies = []
9
9
  authors = [
10
10
  {name = "Maurice Lambert", email = "mauricelambert434@gmail.com"},
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = WinSystemShell
3
- version = 0.0.1
3
+ version = 0.0.2
4
4
  author = Maurice Lambert
5
5
  author_email = mauricelambert434@gmail.com
6
6
  maintainer = Maurice Lambert
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='WinSystemShell',
5
- version='0.0.1',
5
+ version="0.0.2",
6
6
  py_modules=['SystemShellServer', 'WinSystemShell'],
7
7
  packages=find_packages(include=[]),
8
8
  install_requires=[],
File without changes