Exemple #1
0
def hosts():
	fl= open('hosts.txt', 'w')
	sys.stdout= fl
	show_hosts()
	#Information of Client#
	c= console()
	obj= c.do_client(client)
	fl.close()
Exemple #2
0
    # If chosen just to dump files and exit
    if (args.dump is not None):
        try:
            CTCore.ungzip_all()
            CTCore.dump_all_files(args.dump[0],True)
        except Exception, ed:
            print ed
    # If chosen to create a report
    elif (args.report is not None):
        report = Report(CTCore.hosts, CTCore.conversations, CTCore.VERSION + " b" + CTCore.BUILD)
        report.CreateReport(args.report[0])
    else:
        try:
            CTPlugin.init_plugins()
            
            interpreter = console()
            interpreter.cmdloop()
        except:
            print (CTCore.newLine + 'Exiting CapTipper')
            if (CTCore.web_server_turned_on):
                CTCore.web_server.shutdown()

if __name__ == "__main__":
    try:
        print CTCore.ABOUT
        colorama.init()

        parser = argparse.ArgumentParser(usage=CTCore.USAGE, add_help=False)
        parser.add_argument("-h", "--help", action='help', help='Print this help message and exit')
        parser.add_argument('-p','--port', metavar='PORT', help='Set web server port', required=False, default=80, type=int)
        parser.add_argument('-d','--dump', nargs=1, metavar='FOLDER PATH', help='Dump all files and exit', required=False)
Exemple #3
0
    if (args.dump is not None):
        try:
            CTCore.ungzip_all()
            CTCore.dump_all_files(args.dump[0], True)
        except Exception, ed:
            print ed
    # If chosen to create a report
    elif (args.report is not None):
        report = Report(CTCore.hosts, CTCore.conversations,
                        CTCore.VERSION + " b" + CTCore.BUILD)
        report.CreateReport(args.report[0])
    else:
        try:
            CTPlugin.init_plugins()

            interpreter = console()
            interpreter.cmdloop()
        except:
            print(CTCore.newLine + 'Exiting CapTipper')
            if (CTCore.web_server_turned_on):
                CTCore.web_server.shutdown()


if __name__ == "__main__":
    try:
        print CTCore.ABOUT
        colorama.init()

        parser = argparse.ArgumentParser(usage=CTCore.USAGE, add_help=False)
        parser.add_argument("-h",
                            "--help",
Exemple #4
0
    try:
        from ThugAPI import *
        import PyV8
        THUG =  "jsrun(x, ua=x, l=y)  run conversation x through JS evaluation\n"
        THUG += "                     with ua=user agent (default to ua in request) "
        THUG += "and l=log length (0 = print all)\n"
        THUG += "                     retains window object and JS context\n"
        THUG += "jw(x)                handle the window object, eg jw('location')\n"
        THUG += "jseval(x )           evaluate x with PyV8 with new or existing context"
    except ImportError:
        THUG = ""

    from CTCore import *
    from CTConsole import *
    from pydoc import pipepager
    c = console()
    _pager = lambda text: pipepager(text, 'less -R -X -F')
    def pager(text):
        if len(text.splitlines()) > 20:
            _pager(text)
        else:
            print text

    import readline, rlcompleter
    readline.parse_and_bind('tab:complete')

    import sys
    import re

    HEADERREGEX1 = 'GET (?P<path>[^ ]+) .+?\n(?:.+\n)*(?:^Referer: (?P<referer>.+)\n)(?:.+\n)*(?:^Host: (?P<host>.+))'
    HEADERREGEX2 = 'GET (?P<path>[^ ]+) .+?\n(?:.+\n)*(?:.+\n)*(?:^Host: (?P<host>.+))'
Exemple #5
0
    try:
        from ThugAPI import *
        import PyV8
        THUG = "jsrun(x, ua=x, l=y)  run conversation x through JS evaluation\n"
        THUG += "                     with ua=user agent (default to ua in request) "
        THUG += "and l=log length (0 = print all)\n"
        THUG += "                     retains window object and JS context\n"
        THUG += "jw(x)                handle the window object, eg jw('location')\n"
        THUG += "jseval(x )           evaluate x with PyV8 with new or existing context"
    except ImportError:
        THUG = ""

    from CTCore import *
    from CTConsole import *
    from pydoc import pipepager
    c = console()
    _pager = lambda text: pipepager(text, 'less -R -X -F')

    def pager(text):
        if len(text.splitlines()) > 20:
            _pager(text)
        else:
            print text

    import readline, rlcompleter
    readline.parse_and_bind('tab:complete')

    import sys
    import re

    HEADERREGEX1 = 'GET (?P<path>[^ ]+) .+?\n(?:.+\n)*(?:^Referer: (?P<referer>.+)\n)(?:.+\n)*(?:^Host: (?P<host>.+))'