Skip to content

Commit 7e22063

Browse files
committed
?
2 parents c5d14a0 + 8db818f commit 7e22063

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pxethief.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ def find_pxe_server():
193193
else:
194194
print("[-] No DHCP responses received with PXE boot options")
195195
sys.exit(-1)
196-
196+
if not tftp_server:
197+
print("[-] No PXE boot server found in DHCP response")
198+
sys.exit(-1)
197199
tftp_server = validate_ip_or_resolve_hostname(tftp_server.strip())
198200

199201
print("")
@@ -815,7 +817,7 @@ def make_all_http_requests_and_retrieve_sensitive_policies(CCMClientID,CCMClient
815817
allPoliciesURLs[policy.get("PolicyCategory")] = policy.find("PolicyLocation").text.replace("http://<mp>",sccm_base_url)
816818
else:
817819
if policy.get("PolicyCategory") is None:
818-
allPoliciesURLs["".join(i for i in policy.get("PolicyID") if i not in "\/:*?<>|")] = policy.find("PolicyLocation").text.replace("http://<mp>",sccm_base_url)
820+
allPoliciesURLs["".join(i for i in policy.get("PolicyID") if i not in r"\/:*?<>|")] = policy.find("PolicyLocation").text.replace("http://<mp>",sccm_base_url)
819821
else:
820822
allPoliciesURLs[policy.get("PolicyCategory") + str(dedup)] = policy.find("PolicyLocation").text.replace("http://<mp>",sccm_base_url)
821823
dedup = dedup + 1
@@ -902,7 +904,7 @@ def write_default_config_file():
902904
print("%s 4 <variables-file-name> <policy-file-path> <password> - Attempt to decrypt a saved media variables file and Task Sequence XML file retrieved from a full TS media" % sys.argv[0])
903905
print("%s 5 <variables-file-name> - Print the hash corresponding to a specified media variables file for cracking in hashcat" % sys.argv[0])
904906
print("%s 6 <identityguid> <identitycert-file-name> - Retrieve task sequences using the values obtained from registry keys on a DP" % sys.argv[0])
905-
print("%s 7 <Reserved1-value> - Decrypt stored PXE password from SCCM DP registry key (reg query HKLM\software\microsoft\sms\dp /v Reserved1)" % sys.argv[0])
907+
print(r"%s 7 <Reserved1-value> - Decrypt stored PXE password from SCCM DP registry key (reg query HKLM\software\microsoft\sms\dp /v Reserved1)" % sys.argv[0])
906908
print("%s 8 - Write new default settings.ini file in PXEThief directory" % sys.argv[0])
907909
print("%s 10 - Print Scapy interface table to identify interface indexes for use in 'settings.ini'" % sys.argv[0])
908910

0 commit comments

Comments
 (0)