Beispiel #1
0
class PCAPImporterPlugin(FileImporterPlugin):
    """PCAPImporter: Provide the possibility to import messages
       from PCAP network capture files"""

    __plugin_name__ = "PCAPImporter"
    __plugin_version__ = "1.0"
    __plugin_description__ = _(
        "Provide the possibility to import messages from PCAP network capture files"
    )
    __plugin_author__ = "Georges Bossert <*****@*****.**>"
    __plugin_copyright__ = "Georges Bossert and Frédéric Guihéry"
    __plugin_license__ = "GPLv3+"

    FILE_TYPE_DESCRIPTION = "PCAP File"

    def __init__(self, netzob):
        super(PCAPImporterPlugin, self).__init__(netzob)
        self.entryPoints = []

    def getEntryPoints(self):
        return self.entryPoints

    def canHandleFile(self, filePath):
        return fnmatch.fnmatch(filePath, "*.pcap")

    def getFileTypeDescription(self):
        return self.FILE_TYPE_DESCRIPTION

    def importFile(self, filePathList):
        self.controller = PCAPImporterController(self.getNetzob(), self)
        self.controller.setSourceFiles(filePathList)
        self.controller.run()
class PCAPImporterPlugin(FileImporterPlugin):
    """PCAPImporter: Provide the possibility to import messages
       from PCAP network capture files"""

    __plugin_name__ = "PCAPImporter"
    __plugin_version__ = "1.0"
    __plugin_description__ = _("Provide the possibility to import messages from PCAP network capture files")
    __plugin_author__ = "Georges Bossert <*****@*****.**>"
    __plugin_copyright__ = "Georges Bossert and Frédéric Guihéry"
    __plugin_license__ = "GPLv3+"

    FILE_TYPE_DESCRIPTION = "PCAP File"

    def __init__(self, netzob):
        super(PCAPImporterPlugin, self).__init__(netzob)
        self.entryPoints = []

    def getEntryPoints(self):
        return self.entryPoints

    def canHandleFile(self, filePath):
        return fnmatch.fnmatch(filePath, "*.pcap")

    def getFileTypeDescription(self):
        return self.FILE_TYPE_DESCRIPTION

    def importFile(self, filePathList):
        self.controller = PCAPImporterController(self.getNetzob(), self)
        self.controller.setSourceFiles(filePathList)
        self.controller.run()
Beispiel #3
0
 def importFile(self, filePathList):
     self.controller = PCAPImporterController(self.getNetzob(), self)
     self.controller.setSourceFiles(filePathList)
     self.controller.run()
 def importFile(self, filePathList):
     self.controller = PCAPImporterController(self.getNetzob(), self)
     self.controller.setSourceFiles(filePathList)
     self.controller.run()