mirror of
https://github.com/calebstewart/pwncat.git
synced 2024-11-27 19:04:15 +01:00
Added support for domain users for ssh connections
This commit is contained in:
parent
82207c9405
commit
c5e5be8e97
@ -84,7 +84,7 @@ class Command(CommandDefinition):
|
|||||||
}
|
}
|
||||||
LOCAL = True
|
LOCAL = True
|
||||||
CONNECTION_PATTERN = re.compile(
|
CONNECTION_PATTERN = re.compile(
|
||||||
r"""^(?P<protocol>[-a-zA-Z0-9_]*://)?((?P<user>[^:@]*)?(?P<password>:(\\@|[^@])*)?@)?(?P<host>[^:]*)?(?P<port>:[0-9]*)?$"""
|
r"""^(?P<protocol>[-a-zA-Z0-9_]*://)?((?P<user>[^:]*)?(?P<password>:(\\@|[^@])*)?@)?(?P<host>[^:]*)?(?P<port>:[0-9]*)?$"""
|
||||||
)
|
)
|
||||||
|
|
||||||
def run(self, args):
|
def run(self, args):
|
||||||
|
@ -2017,11 +2017,15 @@ class Victim:
|
|||||||
for _ in range(5):
|
for _ in range(5):
|
||||||
try:
|
try:
|
||||||
id_output = self.run("id").decode("utf-8")
|
id_output = self.run("id").decode("utf-8")
|
||||||
pieces = id_output.split(" ")
|
pieces = id_output.split(") ")
|
||||||
props = {}
|
props = {}
|
||||||
for p in pieces:
|
for p in pieces:
|
||||||
segments = p.split("=")
|
segments = p.split("=")
|
||||||
props[segments[0]] = segments[1]
|
try:
|
||||||
|
props[segments[0]] = segments[1] + ")"
|
||||||
|
except IndexError:
|
||||||
|
console.log(segments)
|
||||||
|
continue
|
||||||
|
|
||||||
id_properties = {}
|
id_properties = {}
|
||||||
for key, value in props.items():
|
for key, value in props.items():
|
||||||
|
Loading…
Reference in New Issue
Block a user