Exemplo n.º 1
0
class OSpyImporterPlugin(FileImporterPlugin):
    """OSpyImporter: Provides the possibility to import messages from
       OSpy project file."""

    __plugin_name__ = "OSpyImporter"
    __plugin_version__ = "1.0"
    __plugin_description__ = _("Provides the possibility to import messages from OSpy project file.")
    __plugin_author__ = "Georges Bossert <*****@*****.**>"
    __plugin_copyright__ = "Georges Bossert and Frédéric Guihéry"
    __plugin_license__ = "GPLv3+"

    FILE_TYPE_DESCRIPTION = "oSpy File"

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

    def getEntryPoints(self):
        return self.entryPoints

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

    def getFileTypeDescription(self):
        return self.FILE_TYPE_DESCRIPTION

    def importFile(self, filePathList):
        self.controller = OSpyImporterController(self.getNetzob(), self)
        self.controller.setSourceFiles(filePathList)
        self.controller.run()
Exemplo n.º 2
0
class OSpyImporterPlugin(FileImporterPlugin):
    """OSpyImporter: Provides the possibility to import messages from
       OSpy project file."""

    __plugin_name__ = "OSpyImporter"
    __plugin_version__ = "1.0"
    __plugin_description__ = _(
        "Provides the possibility to import messages from OSpy project file.")
    __plugin_author__ = "Georges Bossert <*****@*****.**>"
    __plugin_copyright__ = "Georges Bossert and Frédéric Guihéry"
    __plugin_license__ = "GPLv3+"

    FILE_TYPE_DESCRIPTION = "oSpy File"

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

    def getEntryPoints(self):
        return self.entryPoints

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

    def getFileTypeDescription(self):
        return self.FILE_TYPE_DESCRIPTION

    def importFile(self, filePathList):
        self.controller = OSpyImporterController(self.getNetzob(), self)
        self.controller.setSourceFiles(filePathList)
        self.controller.run()
Exemplo n.º 3
0
 def importFile(self, filePathList):
     self.controller = OSpyImporterController(self.getNetzob(), self)
     self.controller.setSourceFiles(filePathList)
     self.controller.run()
Exemplo n.º 4
0
 def importFile(self, filePathList):
     self.controller = OSpyImporterController(self.getNetzob(), self)
     self.controller.setSourceFiles(filePathList)
     self.controller.run()