Compare commits

...

3 Commits

Author SHA1 Message Date
Jordan ERNST 18eaa61dda Update README 2022-05-20 12:58:03 +02:00
Jordan ERNST 5144bf6c79 Add: --update --help 2022-05-20 12:54:44 +02:00
Jordan ERNST bd5d7a2647 Fix: is_gz 2022-05-06 15:43:13 +02:00
3 changed files with 28 additions and 6 deletions

View File

@ -6,8 +6,11 @@ This too has several functions:
## To-Do
* Add chisel x64
* Integrate msfvenom
* Add Webshells sync
* Ability to add comments or description
* Prettier code
* Only update once per day, except if `-u` `--update`
* Adding more services to listen to ?
## Pre-requisites
@ -28,7 +31,16 @@ This too has several functions:
}
```
`python pendora-box.py`
```
user@wow$ python pendora-box.py -h
usage: pendora-box.py [-h] [-u]
Sync your files and starts a listener on HTTP, SMB or SMB2.
options:
-h, --help show this help message and exit
-u, --update update your files (described in config.json)
```
## Adding a file to track

View File

@ -21,7 +21,7 @@
},
"githubreleasesync": {
"carlospolop/PEASS-ng": {
"local_version": "20220424",
"local_version": "20220515",
"files": [
"linpeas.sh",
"winPEAS.bat",

View File

@ -1,3 +1,4 @@
import argparse
import json
from pathlib import Path
import hashlib
@ -99,8 +100,6 @@ def githubreleasesync(reponame, repoinfo, credz):
filename = filename['filename']
filename = filename.replace('{last_version}', last_version).replace('{short_version}', short_version)
localfile = Path('files').joinpath(Path(binpath).name)
if filename.endswith('.gz'):
is_gz = True
print(f" * {localfile} ", end='')
else:
@ -108,6 +107,11 @@ def githubreleasesync(reponame, repoinfo, credz):
localfile = Path('files').joinpath(Path(filename).name)
print(f" * {localfile} ", end='')
if filename.endswith('.gz'):
is_gz = True
else:
is_gz = False
urldl = f'https://github.com/{reponame}/releases/download/{last_version}/{filename}'
if not localfile.exists():
@ -429,10 +433,16 @@ def menu_choice(menu_options):
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Sync your files and starts a listener on HTTP, SMB or SMB2.')
parser.add_argument('-u', '--update', action='store_true', help='update your files (described in config.json)')
args = parser.parse_args()
with open("config.json", "r") as jsonfile:
config = json.load(jsonfile)
update(config)
if args.update:
update(config)
tmp = Path('files/tmp')
is_empty = not any(tmp.iterdir())
if not is_empty: