Skip to content

Commit 7e0c0e0

Browse files
committed
Formating
1 parent 1e12cad commit 7e0c0e0

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

nxc/protocols/winrm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(self, args, db, host):
3838
connection.__init__(self, args, db, host)
3939

4040
def proto_logger(self):
41-
# For more details, please check the function "print_host_info"
41+
# For more details, please check the function "print_host_info"
4242
logging.getLogger("pypsrp").disabled = True
4343
logging.getLogger("pypsrp.wsman").disabled = True
4444
self.logger = NXCAdapter(

nxc/protocols/winrm/winrm_ntlm_parser.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ def decoder(byte_string, decode_type):
99
else:
1010
return int.from_bytes(byte_string, "little")
1111

12-
def parse_version(version_bytes):
12+
13+
def parse_version(version_bytes):
1314
major_version = version_bytes[0]
1415
minor_version = version_bytes[1]
1516
product_build = decoder(version_bytes[2:4], "int")
1617
return f"{major_version}.{minor_version} Build {product_build}"
1718

19+
1820
def parse_target_info(target_info_bytes):
1921
MsvAvEOL = 0x0000
2022
MsvAvNbComputerName = 0x0001
@@ -38,9 +40,9 @@ def parse_target_info(target_info_bytes):
3840
av_id = decoder(target_info_bytes[info_offset:info_offset + 2], "int")
3941
av_len = decoder(target_info_bytes[info_offset + 2:info_offset + 4], "int")
4042
av_value = target_info_bytes[info_offset + 4:info_offset + 4 + av_len]
41-
43+
4244
info_offset = info_offset + 4 + av_len
43-
45+
4446
if av_id == MsvAvEOL:
4547
pass
4648
elif av_id == MsvAvNbComputerName:
@@ -68,6 +70,7 @@ def parse_target_info(target_info_bytes):
6870
target_info["MsvAvChannelBindings"] = av_value
6971
return target_info
7072

73+
7174
def parse_challenge(challenge_message):
7275
# TargetNameFields
7376
target_name_fields = challenge_message[12:20]
@@ -97,4 +100,4 @@ def parse_challenge(challenge_message):
97100
"target_name": target_name,
98101
"version": version,
99102
"target_info": target_info
100-
}
103+
}

0 commit comments

Comments
 (0)