From e8b267753defb69d5b40d01fe74717ee80314164 Mon Sep 17 00:00:00 2001 From: brotoskyj Date: Wed, 20 Aug 2025 14:54:31 -0400 Subject: [PATCH 1/2] Checkpoint Stomper --- utils/__pycache__/allowlist.cpython-313.pyc | Bin 1837 -> 2666 bytes .../getdeviceevents.cpython-313.pyc | Bin 3012 -> 3012 bytes utils/allowlist.py | 24 ++++++++++++++++-- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/utils/__pycache__/allowlist.cpython-313.pyc b/utils/__pycache__/allowlist.cpython-313.pyc index f029c4b9dc17a515bd978c618585a58a0ec30fd9..3f3e0380652072ed39756defd178e79fd83f757e 100644 GIT binary patch delta 1096 zcmaJ=O>7cD6rN?5WuZX%t(0Qfn%J^!Qc9r}T5UWS^`K4chS=DHQdkSv0-0TnO*Awf z4Dn*g#)P96O*nYayC<(6B$C=}duU8N;7N-|56_FS(_G% z36Ztud7XZ0C|f<$RC#P7Aktoh^=p*CG(fwUq=0l5M<`8plcC=#?)Y&8;%%tS(~kt(e*%4R{*Ov$vAyjRF)a*DP9yZ){Sl%zM)`VOg@}Cu%|e&3j<8m*ib{aM#J#oPkdc;irLdv0K-Enba(MvsmXw z_Bl%_wLMp}4%a#VKMp&b|Imo+(IyFuk_=#H^}6CB^?h-?w#OS@AJSw#aF_%aSUf;T`?p(F@WK%Wvz0{^wanV7a_2Ylsr&2F0w%8u!5fvKTt8@v aqV`aK>+9QdAmbt9r}*Y2%1lkP-2VW%x!&^t delta 334 zcmaDQvX+nUGcPX}0}u$kSd!7sGLcV$QEQ^QHcL9ACiBD?8Kw==k3h6Th3kEVq zWU&HO>N5rl=`l^VV>+xW$iR@t6U_+H4+5b)!6G0PrceQ-wX|fb?1J%7`0ugK=f*nX`GTmY+sVqpHoW~;0bBilEBQ-g@AU`v&Wbz7@ z8a9x!BF@QLtb4iiflLs$IBfDq)~BM6_$6)#D_j)TxFDqYk(F75t-C%vZ!_?N5%+Bd&d)5;j7ngA0Db{Vr2qf` diff --git a/utils/__pycache__/getdeviceevents.cpython-313.pyc b/utils/__pycache__/getdeviceevents.cpython-313.pyc index a7fc47120640b6378923c88b1fc28fff7e1a299f..f039bb8a4172372fc09e9dfe1dd8fabc544dc6c9 100644 GIT binary patch delta 20 acmX>ieng!6GcPX}0}$vwS-O#XCpQ2;S_TgQ delta 20 acmX>ieng!6GcPX}0}!y>S+bFPCpQ2-1_j*! diff --git a/utils/allowlist.py b/utils/allowlist.py index c8bbbdb..edb3c6f 100644 --- a/utils/allowlist.py +++ b/utils/allowlist.py @@ -22,7 +22,8 @@ def allowlistexechistories(url): choice = int(choice) - 1 endpoint = url + '/v1/logging/exechistories' payload_dict = { - "type":[1,2,6,7], + "type":[1], + "checkpoint":"68a153c23963989b484541b4", "policy": [policiesnames[choice]] } payload = json.dumps(payload_dict) @@ -30,4 +31,23 @@ def allowlistexechistories(url): response = requests.request("POST", endpoint, headers=headers, data=payload, verify=False) parse_text = json.loads(response.text) for item in parse_text['response']['exechistories']: - print(item['checkpoint']) \ No newline at end of file + print(item['checkpoint']) + print(item['datetime']) + print(item['hostname']) + print(item['filename']) + # checkpoint_stomper(item['checkpoint'], endpoint, headers, policiesnames[choice]) + +def checkpoint_stomper(checkpoint, endpoint, headers, policyname): + print(checkpoint) + payload_dict = { + "type":[1,2,6,7], + "checkpoint": checkpoint, + "policy":[policyname] + } + payload = json.dumps(payload_dict) + response = requests.request("POST", endpoint, headers=headers, data=payload, verify=False) + parse_text = json.loads(response.text) + # Send Whole JSON Response + for item in parse_text['response']['exechistories']: + filenametest.add(item['filename']) + From df75658bfb27db5fd5e7e7f44504acdd689f7e84 Mon Sep 17 00:00:00 2001 From: brotoskyj Date: Wed, 20 Aug 2025 14:55:56 -0400 Subject: [PATCH 2/2] Fixed Error --- utils/allowlist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/allowlist.py b/utils/allowlist.py index edb3c6f..bb4d75a 100644 --- a/utils/allowlist.py +++ b/utils/allowlist.py @@ -49,5 +49,5 @@ def checkpoint_stomper(checkpoint, endpoint, headers, policyname): parse_text = json.loads(response.text) # Send Whole JSON Response for item in parse_text['response']['exechistories']: - filenametest.add(item['filename']) + print("test")