#!/usr/bin/env python # -*- coding: utf-8 -*- # https://github.com/r3nt0n/bopscrk # bopscrk - init script """ Before Outset PaSsword CRacKing is a tool to assist in the previous process of cracking passwords. """ name = 'bopscrk.py' __author__ = 'r3nt0n' __version__ = '2.3.1' __status__ = 'Development' from modules.args import Arguments from modules.config import Config args = Arguments() Config = Config(args.cfg_file) Config.setup() if __name__ == '__main__': from modules import main as bopscrk bopscrk.run()
import sys from pathlib import Path BASEDIR = Path(__file__).parent.parent sys.path.append(str(BASEDIR)) from modules import main if __name__ == "__main__": main.run()
logFile = os.path.join(log_path, 'server.log') if scriptDir: logging.debug("Setting root dir to " + scriptDir) os.chdir(scriptDir) logging.info("Opening log-file: " + logFile) # Enable + configure logging logging.getLogger().setLevel(logging.INFO) logFormatter = logging.Formatter("%(asctime)s [%(threadName)-5.5s] [%(levelname)-5.5s] %(funcName)s : %(message)s") rootLogger = logging.getLogger() # Set the default logger to use our format for handler in rootLogger.handlers: handler.setFormatter(logFormatter) fileHandler = handlers.RotatingFileHandler(logFile, maxBytes=1024*1024*20, backupCount=1) fileHandler.setFormatter(logFormatter) rootLogger.addHandler(fileHandler) if not check_python(): logging.info("Python 3.4 or newer is required to run this application.") sys.exit() if not check_cherrypy(): sys.exit() from modules import main main.run()