コード例 #1
0
ファイル: cli.py プロジェクト: niuyuxuan/pocset
def main():
    """
    @function Main function of pocsuite when running from command line.
    """
    try:
        check_environment()
        set_paths(module_path())
        banner()

        init_options(cmd_line_parser().__dict__)

        data_to_stdout("[*] starting at {0}\n\n".format(time.strftime("%X")))
        init()
        try:
            start()
        except threading.ThreadError:
            raise

    except PocsuiteUserQuitException:
        pass

    except PocsuiteShellQuitException:
        pass

    except PocsuiteSystemException:
        pass

    except KeyboardInterrupt:
        pass

    except EOFError:
        pass

    except SystemExit:
        pass

    except Exception:
        exc_msg = traceback.format_exc()
        data_to_stdout(exc_msg)
        raise SystemExit

    finally:
        data_to_stdout("\n[*] shutting down at {0}\n\n".format(
            time.strftime("%X")))
コード例 #2
0
def init_pocsuite(options):
	init_options(options)
	init()
コード例 #3
0
def main():
    check_environment()
    set_paths(module_path())
    init_options()
    poc = PocsuiteInterpreter()
    poc.start()