Prints a folder in a JSON format
python main.py <path> > <output_file.json>| #!/usr/bin/env python3 | |
| # encoding: utf-8 | |
| """Use instead of `python3 -m http.server` when you need CORS""" | |
| from http.server import HTTPServer, SimpleHTTPRequestHandler | |
| import sys | |
| class CORSRequestHandler(SimpleHTTPRequestHandler): | |
| def end_headers(self): |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| import logging | |
| import os | |
| from logging.handlers import RotatingFileHandler | |
| class LogManager: | |
| def __init__(self, log_name, |
| import argparse | |
| if __name__ == '__main__': | |
| # construct the argument parser and parse the arguments | |
| ap = argparse.ArgumentParser() | |
| ap.add_argument("-i", "--image", required=False, | |
| help="Path to the image to be scanned") | |
| args = vars(ap.parse_args()) | |
| if args["image"] == None: |
| # -*- coding: utf-8 -*- | |
| #!/usr/bin/env python3 | |
| import sys | |
| # Print iterations progress | |
| def printProgressBar(iteration, total, prefix='Progress', suffix='complete', decimals=1, length=30, fill='█'): | |
| """ | |
| Call in a loop to create terminal progress bar | |
| @params: | |
| iteration - Required : current iteration (Int) |