From b9790c7d9f9daeb104e812684917cb6baf5a2e62 Mon Sep 17 00:00:00 2001 From: Jordan ERNST Date: Tue, 9 Aug 2022 14:07:02 +0200 Subject: [PATCH] Fix download method --- config.json | 8 ++++++-- pendora-box.py | 15 +++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/config.json b/config.json index e2eb199..b484e29 100644 --- a/config.json +++ b/config.json @@ -29,15 +29,19 @@ ], "InitRoot/SweetPotato": [ "SweetPotato.exe" + ], + "PowerShellMafia/PowerSploit": [ + "Recon/PowerView.ps1" ] }, "githubreleasesync": { "carlospolop/PEASS-ng": { - "local_version": "20220731", + "local_version": "20220807", "files": [ "linpeas.sh", "winPEAS.bat", - "winPEASany.exe" + "winPEASany.exe", + "winPEASany_ofs.exe" ] }, "jpillora/chisel": { diff --git a/pendora-box.py b/pendora-box.py index ac3f486..8a21dd7 100755 --- a/pendora-box.py +++ b/pendora-box.py @@ -5,7 +5,6 @@ import json from pathlib import Path import hashlib import requests -import base64 import sys from os import geteuid, chdir import subprocess @@ -29,8 +28,8 @@ def get_master_info(repo, filepath, credz): url = f"https://api.github.com/repos/{repo}/contents/{filepath}" r = requests.get(url, auth=credz) sha = r.json()['sha'] - content = r.json()['content'] - return sha, content + dlurl = r.json()['download_url'] + return sha, dlurl def get_last_release_info(repo, credz): @@ -69,12 +68,12 @@ def githubmastersync(reponame, filepaths, credz): for filepath in filepaths: localfile = Path('files').joinpath(Path(filepath).name) print(f" * {localfile} ", end='') - lastsha, content = get_master_info(reponame, filepath, credz) + lastsha, dlurl = get_master_info(reponame, filepath, credz) if not localfile.exists(): - content = base64.b64decode(content) + r = requests.get(dlurl) with open(localfile, 'wb') as f: - f.write(content) + f.write(r.content) print('-> Installed! ;)') else: @@ -83,9 +82,9 @@ def githubmastersync(reponame, filepaths, credz): if sha == lastsha: print('-> Up-to-date.') else: - content = base64.b64decode(content) + r = requests.get(dlurl) with open(localfile, 'wb') as f: - f.write(content) + f.write(r.content) print('-> Updated!')