needle.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:needle 作者: mwrlabs 项目源码 文件源码
def launch_ui(args):
    # Setup tab completion
    try:
        import readline
    except ImportError:
        print('%s[!] Module \'readline\' not available. Tab complete disabled.%s' % (Colors.R, Colors.N))
    else:
        import rlcompleter
        if 'libedit' in readline.__doc__:
            readline.parse_and_bind('bind ^I rl_complete')
        else:
            readline.parse_and_bind('tab: complete')
            readline.set_completer_delims(re.sub('[/-]', '', readline.get_completer_delims()))
    # Instantiate the UI object
    x = cli.CLI(cli.Mode.CONSOLE)
    # check for and run version check
    if args.check:
        if not x.version_check(): return
    # Check for and run script session
    if args.script_file:
        x.do_resource(args.script_file)
    # Run the UI
    try: 
        x.cmdloop()
    except KeyboardInterrupt: 
        print('')


# ======================================================================================================================
# MAIN
# ======================================================================================================================
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号