当前位置: 首页>>代码示例>>Python>>正文


Python CTCore.dump_all_files方法代码示例

本文整理汇总了Python中CTCore.dump_all_files方法的典型用法代码示例。如果您正苦于以下问题:Python CTCore.dump_all_files方法的具体用法?Python CTCore.dump_all_files怎么用?Python CTCore.dump_all_files使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CTCore的用法示例。


在下文中一共展示了CTCore.dump_all_files方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

# 需要导入模块: import CTCore [as 别名]
# 或者: from CTCore import dump_all_files [as 别名]
def main(args, pcap_file):
    CTCore.pcap_file = pcap_file[0]
    print("[A] Analyzing PCAP: " + CTCore.pcap_file)

    CTCore.b_use_short_uri = args.short_url # Display short URI paths
    CTCore.b_auto_ungzip = args.ungzip

    if(args.report is not None):
        CTCore.b_auto_ungzip = True

    parse_pcap.run(CTCore.pcap_file)

    if not CTCore.conversations:
        sys.exit("No HTTP conversations were found in PCAP file")

    print(CTCore.newLine + "[+] Traffic Activity Time: "),
    try:
        print(CTCore.activity_date_time)
    except:
        print "Couldn't retrieve time"

    print("[+] Conversations Found:" + CTCore.newLine)
    print CTCore.show_conversations()

    # 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
开发者ID:execgit,项目名称:CapTipper,代码行数:33,代码来源:CapTipper.py

示例2: main

# 需要导入模块: import CTCore [as 别名]
# 或者: from CTCore import dump_all_files [as 别名]
def main(args, pcap_file):
    if not os.path.exists(args.dump[0]):
        os.makedirs(args.dump[0])
    CTCore.pcap_file = pcap_file[0]
    if(args.report is not None):
        CTCore.b_auto_ungzip = True
    parse_pcap.run(CTCore.pcap_file)
    # 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
开发者ID:chrisjd20,项目名称:streamcarver,代码行数:16,代码来源:scct2.py

示例3: do_dump

# 需要导入模块: import CTCore [as 别名]
# 或者: from CTCore import dump_all_files [as 别名]
    def do_dump(self,line):
        try:
            l = line.split(" ")
            if len(l) < 2:
                self.help_dump()
            else:
                if l[0].lower() == "all":
                    dump_exe = True
                    if len(l) > 2 and l[2].lower() == "-e":
                        dump_exe = False
                    CTCore.dump_all_files(l[1], dump_exe)
                else:
                    id = l[0]
                    path = l[1]
                    if check_path(path, type="file"):
                        CTCore.dump_file(id,path)

        except Exception,e:
            print str(e)
开发者ID:JiounDai,项目名称:CapTipper,代码行数:21,代码来源:CTConsole.py

示例4: str

# 需要导入模块: import CTCore [as 别名]
# 或者: from CTCore import dump_all_files [as 别名]
            CTCore.web_server_turned_on = True
        except Exception,e:
            CTCore.alert_message("Error starting Web Server:", CTCore.msg_type.ERROR)

            if str(e).find("Errno 1004") > 0 or str(e).find("Errno 98") > 0:
                print " Port " + str(CTCore.PORT) + " is already taken."
                print " Change the port using 'CapTipper.py <pcap_file> -p <port=80>' or use '-s' to disable web server"
                print " Proceeding without starting the web server..." + CTCore.newLine
            else:
                print " " + str(e)

    # 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):
开发者ID:4n6strider,项目名称:CapTipper,代码行数:33,代码来源:CapTipper.py


注:本文中的CTCore.dump_all_files方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。