diff --git a/pwncat/data/loader.dll b/pwncat/data/loader.dll index 46bb97d..90539aa 100644 Binary files a/pwncat/data/loader.dll and b/pwncat/data/loader.dll differ diff --git a/pwncat/data/stagetwo.dll b/pwncat/data/stagetwo.dll index 7e1c69d..5704604 100644 Binary files a/pwncat/data/stagetwo.dll and b/pwncat/data/stagetwo.dll differ diff --git a/pwncat/platform/__init__.py b/pwncat/platform/__init__.py index 52fea0c..f306bee 100644 --- a/pwncat/platform/__init__.py +++ b/pwncat/platform/__init__.py @@ -433,6 +433,18 @@ class Platform: def __str__(self): return str(self.channel) + @property + def interactive_input(self): + if not self.interactive: + raise RuntimeError("interactive_input not valid outside interactive mode") + return self.channel + + @property + def interactive_output(self): + if not self.interactive: + raise RuntimeError("interactive_input not valid outside interactive mode") + return self.channel + def process_output(self, data): """Process output from the terminal when in interactive mode. This is mainly used to check if the user exited the interactive terminal, diff --git a/pwncat/platform/windows.py b/pwncat/platform/windows.py index cf388b3..ca82635 100644 --- a/pwncat/platform/windows.py +++ b/pwncat/platform/windows.py @@ -466,6 +466,13 @@ class Windows(Platform): gz.write(stagetwo_dll) encoded = base64.b64encode(compressed.getvalue()) + # for i in range(0, len(encoded), 128): + # self.channel.sendline(encoded[i : i + 128]) + # self.session.manager.log(self.channel.recvline().strip().decode("utf-8")) + # self.channel.sendline(b"") + + # self.session.manager.log(self.channel.recvline().strip().decode("utf-8")) + self.channel.sendline(encoded) self.channel.recvuntil(b"READY") self.channel.recvuntil(b"\n") diff --git a/test.py b/test.py index e6e3ae2..9045bc2 100755 --- a/test.py +++ b/test.py @@ -9,9 +9,8 @@ import time manager = pwncat.manager.Manager("data/pwncatrc") # Establish a session -session = manager.create_session("windows", host="192.168.122.11", port=4444) - -# manager.interactive() +session = manager.create_session("windows", host="192.168.56.10", port=4444) +# session = manager.create_session("windows", host="192.168.122.11", port=4444) hosts = ( session.platform.Path("C:\\") / "Windows" / "System32" / "drivers" / "etc" / "hosts"