fixes and better handling of version
This commit is contained in:
parent
7c2444e6f3
commit
81ee86b9bb
|
@ -17,6 +17,7 @@
|
||||||
# @Byt3bl3d33r for CME (lots of inspiration and code comes from CME : https://github.com/byt3bl33d3r/CrackMapExec )
|
# @Byt3bl3d33r for CME (lots of inspiration and code comes from CME : https://github.com/byt3bl33d3r/CrackMapExec )
|
||||||
# All the Team of @LoginSecurite for their help in debugging my shity code (special thanks to @layno & @HackAndDo for that)
|
# All the Team of @LoginSecurite for their help in debugging my shity code (special thanks to @layno & @HackAndDo for that)
|
||||||
|
|
||||||
|
import importlib.metadata
|
||||||
import argparse
|
import argparse
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
@ -33,10 +34,12 @@ from donpapi.lib.toolbox import split_targets
|
||||||
global assets
|
global assets
|
||||||
assets={}
|
assets={}
|
||||||
|
|
||||||
BANNER = """
|
VERSION = importlib.metadata.version("donpapi")
|
||||||
|
|
||||||
|
BANNER = f"""
|
||||||
|
|
||||||
,
|
, version: {VERSION}
|
||||||
, V1.2.0 - Refresh Token Edition \U0001F480
|
, Refresh Token Edition \U0001F480
|
||||||
(
|
(
|
||||||
. by Touf & Zblurx @ Login Sécurité
|
. by Touf & Zblurx @ Login Sécurité
|
||||||
&&&&&&
|
&&&&&&
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import logging
|
||||||
import ntpath,copy
|
import ntpath,copy
|
||||||
import os
|
import os
|
||||||
from typing import Any, Dict, List, Literal, Tuple
|
from typing import Any, Dict, List, Literal, Tuple
|
||||||
|
@ -410,9 +411,11 @@ class CertificatesTriage():
|
||||||
pkey = self.decrypt_privatekey(key=masterkey['key'], privatekey_bytes=data)
|
pkey = self.decrypt_privatekey(key=masterkey['key'], privatekey_bytes=data)
|
||||||
pkeys[hashlib.md5(pkey.public_key().export_key('DER')).hexdigest()] = (pkey_guid,pkey)
|
pkeys[hashlib.md5(pkey.public_key().export_key('DER')).hexdigest()] = (pkey_guid,pkey)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
import traceback
|
if self.logging.getLogger().level == logging.DEBUG:
|
||||||
traceback.print_exc()
|
import traceback
|
||||||
self.logging.debug(str(e))
|
traceback.print_exc()
|
||||||
|
self.logging.debug(str(e))
|
||||||
|
pass
|
||||||
return pkeys
|
return pkeys
|
||||||
|
|
||||||
def loot_certificates(self, certificates_paths: List[str]) -> Dict[str, x509.Certificate]:
|
def loot_certificates(self, certificates_paths: List[str]) -> Dict[str, x509.Certificate]:
|
||||||
|
|
|
@ -432,8 +432,7 @@ class Reporting:
|
||||||
data += f"""({len(results)})</a></td></tr>"""
|
data += f"""({len(results)})</a></td></tr>"""
|
||||||
for index, cred in enumerate(results):
|
for index, cred in enumerate(results):
|
||||||
_, pfx_filepath, guid, issuer, subject, \
|
_, pfx_filepath, guid, issuer, subject, \
|
||||||
client_auth, pillaged_from_computerid, pillaged_from_userid = cred[7]
|
client_auth, pillaged_from_computerid, pillaged_from_userid = cred
|
||||||
|
|
||||||
computer_ip, hostname = list(self.get_computer_infos(pillaged_from_computerid))[0]
|
computer_ip, hostname = list(self.get_computer_infos(pillaged_from_computerid))[0]
|
||||||
computer_info = f"{computer_ip} | {hostname}"
|
computer_info = f"{computer_ip} | {hostname}"
|
||||||
if pillaged_from_userid is not None:
|
if pillaged_from_userid is not None:
|
||||||
|
|
Loading…
Reference in New Issue