def main(): """ Main function of sqlmap when running from command line. """ try: paths.SQLMAP_ROOT_PATH = modulePath() setPaths() banner() dataToStdout("[!] legal disclaimer: %s\n\n" % LEGAL_DISCLAIMER, forceOutput=True) dataToStdout("[*] starting at %s\n\n" % time.strftime("%X"), forceOutput=True) # Store original command line options for possible later restoration cmdLineOptions.update(cmdLineParser().__dict__) init(cmdLineOptions) if conf.profile: profile() elif conf.smokeTest: smokeTest() elif conf.liveTest: liveTest() else: start() except sqlmapUserQuitException: errMsg = "user quit" logger.error(errMsg) closeDumper(False, errMsg) except sqlmapSilentQuitException: closeDumper(False) except exceptionsTuple, e: e = getUnicode(e) logger.critical(e) closeDumper(False, e)
def main(): """ Main function of sqlmap when running from command line. """ paths.SQLMAP_ROOT_PATH = modulePath() setPaths() banner() # Store original command line options for possible later restoration cmdLineOptions.update(cmdLineParser().__dict__) dataToStdout("[*] starting at: %s\n\n" % time.strftime("%X"), forceOutput=True) try: init(cmdLineOptions) if conf.profile: profile() elif conf.smokeTest: smokeTest() elif conf.liveTest: liveTest() else: start() except sqlmapUserQuitException: errMsg = "user quit" logger.error(errMsg) closeDumper(False, errMsg) except sqlmapSilentQuitException: closeDumper(False) except exceptionsTuple, e: e = getUnicode(e) logger.critical(e) closeDumper(False, e)
def main(): """ Main function of sqlmap when running from command line. """ paths.SQLMAP_ROOT_PATH = modulePath() setPaths() banner() cmdLineOptions = cmdLineParser() dataToStdout("[*] starting at: %s\n\n" % time.strftime("%X"), forceOutput=True) try: init(cmdLineOptions) if conf.profile: profile() elif conf.smokeTest: smokeTest() elif conf.liveTest: liveTest() else: start() except sqlmapUserQuitException: errMsg = "user quit" logger.error(errMsg) closeDumper(False, errMsg) except sqlmapSilentQuitException: closeDumper(False) except exceptionsTuple, e: e = getUnicode(e) logger.critical(e) closeDumper(False, e)
logger.error(errMsg) closeDumper(False, errMsg) except sqlmapSilentQuitException: closeDumper(False) except exceptionsTuple, e: e = getUnicode(e) logger.critical(e) closeDumper(False, e) except KeyboardInterrupt, _: print errMsg = "user aborted" logger.error(errMsg) closeDumper(False, errMsg) except EOFError, _: print errMsg = "exit" logger.error(errMsg) closeDumper(False, errMsg) except: print errMsg = unhandledException() logger.critical(errMsg) traceback.print_exc() closeDumper(False, errMsg) else:
logger.error(errMsg) closeDumper(False, errMsg) except sqlmapSilentQuitException: closeDumper(False) except exceptionsTuple, e: e = getUnicode(e) logger.critical(e) closeDumper(False, e) except KeyboardInterrupt, _: print errMsg = "user aborted" logger.error(errMsg) closeDumper(False, errMsg) except EOFError, _: print errMsg = "exit" logger.error(errMsg) closeDumper(False, errMsg) except: print errMsg = unhandledExceptionMessage() logger.critical(errMsg) traceback.print_exc() closeDumper(False, errMsg) else: