fixes and better handling of version

This commit is contained in:
zblurx 2023-12-11 11:51:28 +01:00
parent 7c2444e6f3
commit 81ee86b9bb
3 changed files with 13 additions and 8 deletions

View File

@ -17,6 +17,7 @@
# @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)
import importlib.metadata
import argparse
import json
import logging
@ -33,10 +34,12 @@ from donpapi.lib.toolbox import split_targets
global assets
assets={}
BANNER = """
VERSION = importlib.metadata.version("donpapi")
,
, V1.2.0 - Refresh Token Edition \U0001F480
BANNER = f"""
, version: {VERSION}
, Refresh Token Edition \U0001F480
(
. by Touf & Zblurx @ Login Sécurité
&&&&&&

View File

@ -1,4 +1,5 @@
import hashlib
import logging
import ntpath,copy
import os
from typing import Any, Dict, List, Literal, Tuple
@ -410,9 +411,11 @@ class CertificatesTriage():
pkey = self.decrypt_privatekey(key=masterkey['key'], privatekey_bytes=data)
pkeys[hashlib.md5(pkey.public_key().export_key('DER')).hexdigest()] = (pkey_guid,pkey)
except Exception as e:
import traceback
traceback.print_exc()
self.logging.debug(str(e))
if self.logging.getLogger().level == logging.DEBUG:
import traceback
traceback.print_exc()
self.logging.debug(str(e))
pass
return pkeys
def loot_certificates(self, certificates_paths: List[str]) -> Dict[str, x509.Certificate]:

View File

@ -432,8 +432,7 @@ class Reporting:
data += f"""({len(results)})</a></td></tr>"""
for index, cred in enumerate(results):
_, 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_info = f"{computer_ip} | {hostname}"
if pillaged_from_userid is not None: