1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-27 19:04:15 +01:00

Fixed some typos and missing imports

This commit is contained in:
Caleb Stewart 2021-05-19 19:12:02 -04:00
parent 0cab19835e
commit f8f7b61f0d
3 changed files with 8 additions and 3 deletions

View File

@ -38,7 +38,7 @@ class Tamper(Fact):
if self.reverted:
return f"{title} ([green]reverted[/green])"
if self.data is not None:
if self.revertable:
target_user = session.find_user(uid=self.uid)
return f"{title} ([yellow]revertable[/yellow] as [blue]{target_user.name}[/blue])"
@ -115,6 +115,8 @@ class CreatedFile(Tamper):
try:
session.platform.Path(self.path).unlink()
except FileNotFoundError:
pass
except PermissionError:
raise ModuleFailed("permission error")

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3
from pwncat.modules import Status, Argument, BaseModule
from pwncat.modules import Status, Argument, BaseModule, ModuleFailed
class Module(BaseModule):
@ -23,7 +23,7 @@ class Module(BaseModule):
continue
if current_user.id != tamper.uid:
session.log(
f"[yellow]warning[/yellow]: {tamper.title(session)}: incorrect uid to rever"
f"[yellow]warning[/yellow]: {tamper.title(session)}: incorrect uid to revert"
)
continue

View File

@ -55,6 +55,9 @@ class PamImplant(Implant):
# Track the log file separately now
session.register_fact(CreatedFile(self.source, 0, self.log))
def title(self, session: "pwncat.manager.Session"):
return f"""pam backdoor implant (logging to [cyan]{self.log}[/cyan])"""
class Module(ImplantModule):
"""