Example #1
0
    def exportClick(self, clickState):
      rect = self.timeline.ploter.selectionRect.rect()
      exportSelDateMin = self.timeline.draw.findXTime(rect.x())
      exportSelDateMax = self.timeline.draw.findXTime(rect.x() + rect.width())

      for family in self.configuration:
        for time in family[1]:
          if time[1][0][1]:
            nodes = []
            everyNodes = self.timeline.elementsInRangeToNodeList(time[1][5][1], self.timeline.toUSec(exportSelDateMin), self.timeline.toUSec(exportSelDateMax))
            for oneGroupNode in everyNodes:
                for node in oneGroupNode:
                    nodes.append(node)
            if len(nodes):
              if not self.exportedNode:
# Create /timeline if needed
                  root = vfs.vfs().getnode('/Bookmarks')
                  baseNode = Node('timeline', 0, root)
	          baseNode.__disown__()
                  baseNode.setDir()
                  e = event()
                  e.thisown = False
                  e.value = RCVariant(Variant(baseNode))
                  self.VFS.notify(e)

# Create /timeline/<ParentName>
                  self.exportedNode = Node(self.timeline.node.name(), 0, baseNode)
                  self.exportedNode.__disown__()
                  self.exportedNode.setDir()
              timeBaseName = self.exportedNode.absolute() + '/' + str(exportSelDateMin.strftime('%d.%m.%Y %H:%M:%S')) + ' to ' + str(exportSelDateMax.strftime('%d.%m.%Y %H:%M:%S'))
              timeBaseNode = vfs.vfs().getnode(timeBaseName)
              if not timeBaseNode:
# Create /timeline/<ParentName>/dateStart to dateEnd/<Module:FullTimestampAttributePath>/
                  timeBaseNode = Node(str(exportSelDateMin.strftime('%d.%m.%Y %H:%M:%S')) + ' to ' + str(exportSelDateMax.strftime('%d.%m.%Y %H:%M:%S')), 0, self.exportedNode)
                  timeBaseNode.__disown__()
                  timeBaseNode.setDir()

              baseFamilyName = timeBaseNode.absolute() + '/' + ':'.join([family[0]] + time[0])
              baseFamilyNode = vfs.vfs().getnode(baseFamilyName)
              if not baseFamilyNode:
# Create /timeline/<ParentName>/dateStart to dateEnd//<Module:FullTimestampAttributePath> if needed
                  baseFamilyNode = Node(':'.join([family[0]] + time[0]), 0, timeBaseNode)
		  baseFamilyNode.__disown__()
                  baseFamilyNode.setDir()

              for node in nodes:
# Add each node in array as child
		  l = VLink(node, baseFamilyNode)
		  l.__disown__()
Example #2
0
File: shell.py Project: vertrex/DFF
    def __init__(self, parent=None, log=''):
        QTextEdit.__init__(self, parent)
        self.setupUi(self)
        self.name = self.windowTitle()
        self.hookTermSize()
        Console.__init__(self, sigstp=False)
        self.completion = completion.Completion(self)
        taskmanager = TaskManager()
        self.vfs = vfs.vfs()
        self.log = log or ''
        if parent is None:
            self.eofKey = Qt.Key_D
        else:
            self.eofKey = None
        self.line    = QString()
        self.lines   = []
        self.point   = 0
        self.more    = 0
        self.reading = 0
        self.pointer = 0
        self.cursor_pos   = 0

        self.fgcolor = QColor("white")
        self.selcolor = QColor("green")

        self.preloop()
        self.redirect = RedirectIO()
        self.sig = "SSputtext(QString)"
        self.connect(self, SIGNAL(self.sig), self.puttext)
        self.connect(self, SIGNAL("Sputtext(QString)"), self.puttext)
        self.redirect.addparent(self, ["dff.ui.gui.widget.shell", "dff.ui.console.console", "dff.ui.console.completion", "dff.ui.console.line_to_arguments", "dff.api.taskmanager.taskmanager", "dff.api.taskmanager.scheduler", "dff.api.taskmanager.processus"], True)
        self.writePrompt()
Example #3
0
 def __init__(self, parent):
     QLineEdit.__init__(self)
     self.navigation = parent
     self.vfs = vfs()
     QObject.connect(self, SIGNAL("textEdited(const QString &)"),
                     self.updatePath)
     self.connect(self, SIGNAL("editingFinished()"), self.focusOut)
Example #4
0
 def __init__(self, inheritfromvfsname, filename, flags):
     self.filename = filename
     self.vfile = None
     self.vfs = vfs()
     self.node = self.vfs.getnode(filename)
     if self.node:
         self.vfile = self.node.open()
Example #5
0
    def __init__(self, parent):
        QWidget.__init__(self)
        self.parent = parent
        self.vfs = vfs()
        self.history = ["/"]
        self.currentPathId = -1
        self.currentNode = self.vfs.getnode("/")
        # Create navigation buttons
        self.maintoolbar = QToolBar(self)
        self.maintoolbar.setIconSize(QSize(24, 24))
        self.setPreviousButton()
        self.setNextButton()
        self.setTopButton()
        self.setHomeButton()

        self.pathbar = ToolButtonBar(self)
        self.editbar = ToolEditBar(self)

        self.navbars = QStackedWidget()
        self.navbars.setMaximumHeight(25)
        self.navbars.addWidget(self.pathbar)
        self.navbars.addWidget(self.editbar)

        self.maintoolbar.addWidget(self.navbars)

        self.connect(self.editbar, SIGNAL("changeDirectory"),
                     self.pathbarchanged)
        self.connect(self.pathbar, SIGNAL("actionTriggered(QAction*)"),
                     self.pathbarchanged)
Example #6
0
 def __init__(self, app, debug=False):
     super(MainWindow, self).__init__()
     # Tab management private attributes, modify at own risk
     self.__tabMoved = False
     self.__tabAreaInformation = (-1, -1, [])
     self.__tabConnections = set()
     self.app = app
     self.debug = debug
     self.sched = scheduler.sched
     self.vfs = vfs.vfs()
     self.createRootNodes()
     self.dialog = Dialog(self)
     self.initCallback()
     self.setupUi(self)
     self.translation()
     self.setWindowModality(QtCore.Qt.ApplicationModal)
     self.resize(
         QtCore.QSize(QtCore.QRect(0, 0, 1014, 693).size()).expandedTo(
             self.minimumSizeHint()))
     self.shellActions = ShellActions(self)
     self.interpreterActions = InterpreterActions(self)
     self.setCentralWidget(None)
     self.setDockNestingEnabled(True)
     self.init()
     self.status = QStackedWidget()
     sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
     sizePolicy.setHorizontalStretch(1)
     sizePolicy.setVerticalStretch(1)
     self.status.setSizePolicy(sizePolicy)
     self.statusBar().addWidget(self.status)
Example #7
0
    def g_display(self):
        self.name = "timeline " + QString(self.node.name())
        if not self.node.hasChildren():
            self.setStateInfo(self.node.absolute() + " doesn't have any children.")
        else:
            self.vfs = vfs.vfs()

            self.vlayout = QVBoxLayout()
            self.vlayout.setMargin(0)
            self.vlayout.setSpacing(0)

            self.hsplitter = QSplitter()
            self.ploter = PaintArea(self)
            self.options = OptionsLayout(self)

            self.hsplitter.addWidget(self.ploter)
            self.hsplitter.addWidget(self.options)
            self.vlayout.addWidget(self.hsplitter)
            self.setLayout(self.vlayout)
            self.draw = Drawer(self)

            # CountThread compute node amount
            self.countThread = CountThread(self, self.countThreadOver)
            self.populateThread = DataThread(self, self.dataThreadOver)
            self.maxOccThread = MaxOccThread(self, self.maxOccThreadOver)
            self.workerThread = WorkerThread(self)

            # comment it to avoid redraw everytime painter is resized
            self.connect(self.workerThread, SIGNAL("refresh"), self.reDraw)
Example #8
0
    def __init__(self):
        Module.__init__(self, "gen_nodes", GenNodes)
        self.conf.addArgument(
            {
                "input": Argument.Optional | Argument.Single | typeId.Node,
                "name": "parent",
                "description": "files or folders will be added as child(ren) of this node or as the root node by default",
                "parameters": {"type": Parameter.Editable, "predefined": [vfs().getnode("/")]},
            }
        )
        self.conf.addArgument(
            {
                "input": Argument.Optional | Argument.Single | typeId.UInt64,
                "name": "count",
                "description": "number of nodes to create",
                "parameters:": {
                    "type": Parameter.Editable,
                    "predefined": [1000, 5000, 10000, 25000, 50000, 70000, 100000, 500000, 1000000, 2 ** 64 - 1],
                },
            }
        )

        # self.conf.addArgument({"input": Argument.Required|Argument.Single|typeId.UInt64,
        # "name": "start_offset",
        # "description": "Address start of the new node"
        # })

        self.tags = "Node"
Example #9
0
    def __init__(self, parent=None, log=''):
        QTextEdit.__init__(self, parent)
        Console.__init__(self, sigstp=False)
        self.setupUi(self)
        self.name = self.windowTitle()
	self.completion = completion.Completion(self)
        self.hookTermSize()
	taskmanager = TaskManager()
        self.vfs = vfs.vfs()
        self.log = log or ''
        if parent is None:
            self.eofKey = Qt.Key_D
        else:
            self.eofKey = None
        self.line    = QString()
        self.lines   = []
        self.point   = 0
        self.more    = 0
        self.reading = 0
        self.pointer = 0
        self.cursor_pos   = 0

        self.fgcolor = QColor("white")
        self.selcolor = QColor("green")

        self.preloop()
	self.redirect = RedirectIO()
	self.sig = "Sputtext"
	self.connect(self, SIGNAL(self.sig), self.puttext)
	self.redirect.addparent(self, ["dff.ui.gui.widget.shell", "dff.ui.console.console", "dff.ui.console.completion", "dff.ui.console.line_to_arguments", "dff.api.taskmanager.taskmanager", "dff.api.taskmanager.scheduler", "dff.api.taskmanager.processus"], True)
        self.writePrompt()
Example #10
0
 def __init__(self, manager):
   super(QDialog, self).__init__()
   self.vfs = vfs()
   self.VFS = VFS.Get()
   self.setupUi(self)
   self.manager = manager
   self.initShape()
Example #11
0
File: menu.py Project: kzwkt/dff
 def __init__(self, manager):
     super(QDialog, self).__init__()
     self.vfs = vfs()
     self.VFS = VFS.Get()
     self.setupUi(self)
     self.manager = manager
     self.initShape()
Example #12
0
 def __init__(self):
   Script.__init__(self, "viewerimage")
   self.type = "imageview"
   self.icon = None
   self.vfs = vfs.vfs()
   self.reg_viewer = re.compile(".*(JPEG|JPG|jpg|jpeg|GIF|gif|bmp|png|PNG|pbm|PBM|pgm|PGM|ppm|PPM|xpm|XPM|xbm|XBM|TIFF|tiff).*", re.IGNORECASE)
   self.sceneWidth = 0
Example #13
0
    def g_display(self):
        self.name = 'timeline ' + QString(self.node.name())
        if not self.node.hasChildren():
            self.setStateInfo(self.node.absolute() +
                              ' doesn\'t have any children.')
        else:
            self.vfs = vfs.vfs()

            self.vlayout = QVBoxLayout()
            self.vlayout.setMargin(0)
            self.vlayout.setSpacing(0)

            self.hsplitter = QSplitter()
            self.ploter = PaintArea(self)
            self.options = OptionsLayout(self)

            self.hsplitter.addWidget(self.ploter)
            self.hsplitter.addWidget(self.options)
            self.vlayout.addWidget(self.hsplitter)
            self.setLayout(self.vlayout)
            self.draw = Drawer(self)

            # CountThread compute node amount
            self.countThread = CountThread(self, self.countThreadOver)
            self.populateThread = DataThread(self, self.dataThreadOver)
            self.maxOccThread = MaxOccThread(self, self.maxOccThreadOver)
            self.workerThread = WorkerThread(self)

            #comment it to avoid redraw everytime painter is resized
            self.connect(self.workerThread, SIGNAL('refresh'), self.reDraw)
Example #14
0
  def __init__(self, parent):
    QWidget.__init__(self)
    self.parent = parent
    self.vfs = vfs()
    self.history = ["/"]
    self.currentPathId = -1
    self.currentNode = self.vfs.getnode("/")
    # Create navigation buttons
    self.maintoolbar = QToolBar(self)
    self.maintoolbar.setIconSize(QSize(24,24))
    self.setPreviousButton()
    self.setNextButton()
    self.setTopButton()
    self.setHomeButton()

    self.pathbar = ToolButtonBar(self)
    self.editbar = ToolEditBar(self)

    self.navbars = QStackedWidget()
    self.navbars.setMaximumHeight(25)
    self.navbars.addWidget(self.pathbar)
    self.navbars.addWidget(self.editbar)

    self.maintoolbar.addWidget(self.navbars)

    self.connect(self.editbar, SIGNAL("changeDirectory"), self.pathbarchanged)
    self.connect(self.pathbar, SIGNAL("actionTriggered(QAction*)"), self.pathbarchanged)
Example #15
0
    def start(self, args):
        self.vfs = vfs.vfs()
        self.dumpnumber = 1
        try:
            self.nor = args['nor'].value()
            self.nand = args['nand'].value()
        except IndexError:
            return
        try:
            self.spareSize = args["spare-size"].value()
        except IndexError:
            self.spareSize = 16
        try:
            self.pageSize = args["page-size"].value()
        except IndexError:
            self.pageSize = 512
        self.k800n = Node("k800-base")
        self.k800n.__disown__()
        self.boot = SEBootBlock(self.nor, self.pageSize)
        self.blockSize = self.boot.blockSize
        self.nandClean = SpareNode(self, self.nand, "nandfs", self.pageSize,
                                   self.spareSize, self.k800n)
        self.norFs = NorFs(self, self.k800n, self.nor, "norfs", self.boot)
        self.fullFs = FullFs(self, self.k800n, self.norFs, self.nandClean,
                             "fullfs", self.boot)
        self.gdfs = GDFS(self, self.k800n, self.nor, "gdfs", self.boot)
        self.firmware = Firmware(self, self.k800n, self.nor, "firmware",
                                 self.boot.norfsoffset)

        self.tables = Tables(self.fullFs, self.blockSize)
        self.registerTree(self.nand, self.k800n)
Example #16
0
    def start(self, args):
        self.vfs = vfs.vfs()
        self.dumpnumber = 1
        try :
          self.nor = args['nor'].value()
          self.nand = args['nand'].value()
        except IndexError:
	  return
        try:
          self.spareSize = args["spare-size"].value()
        except IndexError:
          self.spareSize = 16
        try:
          self.pageSize = args["page-size"].value()
        except IndexError:
	  self.pageSize = 512
        self.k800n = Node("k800-base")
        self.k800n.__disown__()
        self.boot = SEBootBlock(self.nor, self.pageSize) 
        self.blockSize = self.boot.blockSize
        self.nandClean = SpareNode(self,  self.nand, "nandfs", self.pageSize, self.spareSize, self.k800n)
        self.norFs = NorFs(self, self.k800n,  self.nor, "norfs", self.boot)
        self.fullFs = FullFs(self, self.k800n, self.norFs, self.nandClean, "fullfs", self.boot)
        self.gdfs = GDFS(self, self.k800n, self.nor, "gdfs", self.boot)
        self.firmware = Firmware(self, self.k800n,  self.nor, "firmware", self.boot.norfsoffset)

        self.tables = Tables(self.fullFs, self.blockSize)
        self.registerTree(self.nand, self.k800n)
Example #17
0
 def __init__(self, arguments):
     UI.__init__(self, arguments)
     self.taskManager = TaskManager()
     self.reportManager = ReportManager()
     self.registryManager = ModuleProcessusManager().get("winreg")
     self.evtxManager = ModuleProcessusManager().get("evtx")
     self.sqliteManager = ModuleProcessusManager().get('SqliteDB')
     self.root = vfs().getnode("/")
Example #18
0
    def __init__(self, console, DEBUG = False, VERBOSITY = 0):
        self.DEBUG = DEBUG
        self.VERBOSITY = VERBOSITY
	self.console = console
        self.lp = LineParser(self.DEBUG, self.VERBOSITY - 1)
        self.confmanager = ConfigManager.Get()
        self.loader = loader()
        self.vfs = vfs()
Example #19
0
 def __init__(self):
     Analyse.__init__(self, "Windows logs")
     self.__chunk = {}
     self.node = None
     self.name = "Event logs"
     self.viewer = []
     self.w = None
     self.vfs = vfs()
Example #20
0
 def __init__(self, console, DEBUG=False, VERBOSITY=0):
     self.DEBUG = DEBUG
     self.VERBOSITY = VERBOSITY
     self.console = console
     self.lp = LineParser(self.DEBUG, self.VERBOSITY - 1)
     self.confmanager = ConfigManager.Get()
     self.loader = loader()
     self.vfs = vfs()
Example #21
0
 def findNodes(self, query):
     v = vfs.vfs()
     rootnode = v.getnode("/")
     filters = Filter("")
     #        query = 'name matches re("^global_history.dat")'
     filters.compile(query)
     filters.process(rootnode, True)
     result = filters.matchedNodes()
     return result
Example #22
0
 def __init__(self):
     Script.__init__(self, "viewerimage")
     self.type = "imageview"
     self.icon = None
     self.vfs = vfs.vfs()
     self.reg_viewer = re.compile(
         ".*(JPEG|JPG|jpg|jpeg|GIF|gif|bmp|png|PNG|pbm|PBM|pgm|PGM|ppm|PPM|xpm|XPM|xbm|XBM|TIFF|tiff).*",
         re.IGNORECASE)
     self.sceneWidth = 0
Example #23
0
  def __init__(self):
    Module.__init__(self, "huge_node", HugeNodes)
    self.conf.addArgument({"input": Argument.Optional|Argument.Single|typeId.Node, 
	                   "name": "parent", 
	                   "description": "files or folders will be added as child(ren) of this node or as the root node by default",
                           "parameters": {"type": Parameter.Editable,
                                          "predefined": [vfs().getnode("/")]}
                          })
    self.tags = "Node"
Example #24
0
 def __init__(self):
     self.vfs = vfs()
     self.totalCount = 0
     self.totalCounts = 0
     self.count = 0
     self.fileSplit = 1  #current splitted file
     self.csvfile = None
     self.outputpath = None
     self.split = False
Example #25
0
File: hash.py Project: kzwkt/dff
    def __init__(self):
        Script.__init__(self, "hash")   
        self.vfs = vfs.vfs()
        self.attributeHash = AttributeHash(self, "hash") 
	self.hashSets = HashSets()
        self.knownBadFiles = 0
        self.knownGoodFiles = 0
        self.errorFiles = 0
	self.skippedFiles = 0
        self.setResults() 
Example #26
0
File: unzip.py Project: kzwkt/dff
 def __init__(self):
   fso.__init__(self, "unzip")
   self.name = "unzip"
   self.VFS = VFS.Get()
   self.vfs = vfs.vfs()
   self.fdm = FdManager()
   self.origin = None
   self.zipcontent = None
   self.file = None
   self.mapped_files = {}
Example #27
0
 def __init__(self, base, config, **kwargs):
     addrspace.BaseAddressSpace.__init__(self, base, config, **kwargs)
     self.as_assert(base == None or layered, 'Must be first Address Space')
     self.path = config.LOCATION[7:]
     self.vfs = vfs()
     self.name = self.path
     self.fname = self.path
     self.node = self.vfs.getnode(self.path)
     self.fhandle = self.node.open()
     self.fsize = self.node.size()
     self.offset = 0
Example #28
0
 def __init__(self):
   Script.__init__(self, "hash")   
   self.vfs = vfs.vfs()
   self.__lock = threading.Lock()
   self.__cacheSize = 0
   self.__hashSets = HashSets()
   self.__knownBadFiles = 0
   self.__knownGoodFiles = 0
   self.__errorFiles = 0
   self.__skippedFiles = 0
   self.attributeHash = AttributeHash(self, "hash")
Example #29
0
 def findMorkFiles(self):
     # For Firefox < version 3
     filesname = ["formhistory.dat", "history.dat"]
     v = vfs.vfs()
     rootnode = v.getnode("/")
     filters = Filter("")
     query = 'type == "database/mork"'
     filters.compile(query)
     filters.process(rootnode, True)
     result = filters.matchedNodes()
     return result
Example #30
0
 def __init__(self, mainWindow):
     QDialog.__init__(self, mainWindow)
     Ui_applyModule.__init__(self)
     self.setupUi(self)
     self.labActivate.setVisible(False)
     self.labType.setVisible(False)
     self.labDescription.setVisible(False)
     self.connect(self.buttonBox, SIGNAL("accepted()"), self.validateModule)
     self.__mainWindow = mainWindow
     self.loader = loader.loader()
     self.vfs = vfs()
     self.valueArgs = {}
     self.translation()
Example #31
0
 def __init__(self,  mainWindow):
     QDialog.__init__(self, mainWindow)
     Ui_applyModule.__init__(self)
     self.setupUi(self)
     self.labActivate.setVisible(False)
     self.labType.setVisible(False)
     self.labDescription.setVisible(False)
     self.connect(self.buttonBox,SIGNAL("accepted()"), self.validateModule)
     self.__mainWindow = mainWindow
     self.loader = loader.loader()
     self.vfs = vfs()
     self.valueArgs = {}
     self.translation()
Example #32
0
def splitPath(ipath, ctype):
    if ipath == "":
        if ctype != typeId.Node:
            ipath = toPosixPath(os.path.abspath(""))
            ipath = unicode(
                ipath, 'utf-8',
                'replace') if type(ipath) != types.UnicodeType else ipath
            return ipath, u""
        else:
            return unicode(vfs().getcwd().absolute(), 'utf-8', 'replace'), u""
    if ctype == typeId.Node:
        ipath = posixpath.join(vfs().getcwd().absolute(),
                               ipath) if ipath[0] != "/" else ipath
    else:
        ipath = toPosixPath(ipath)
        if os.name == "nt":
            if ipath[0] != "/" and os.path.splitdrive(ipath)[0] == "":
                ipath = posixpath.join(toPosixPath(os.path.abspath("")), ipath)
        elif not posixpath.isabs(ipath):
            ipath = posixpath.join(posixpath.abspath(""), ipath)
    rpath, supplied = posixpath.split(ipath)
    if rpath != "/":
        rpath = posixpath.normpath(removeEscape(rpath)) + "/"
    return rpath, supplied
Example #33
0
    def __init__(self, parent, searchview):
        super(QWidget, self).__init__(parent)
        self.setupUi(self)
        self.filters = CustomFiltersTable(self)
        self.searchFiltersLayout.addWidget(self.filters)
        self.browser = parent
        self.vfs = vfs.vfs()
        self.model = searchview.model
        self.searchview = searchview

        self.matched = 0
        self.searchTH = SearchThread(self)

        self.qmode = {0: "$", 1: "/", 2: "~", 3: "\""}
        self.configure()
Example #34
0
 def __init__(self, eproc, offset, parent, fsobj):
     WinMapper.__init__(self, str(eproc.ImageFileName), 0, parent, fsobj)
     self.v = vfs()
     self.__offset = offset
     self.__pefile = None
     self.eproc = eproc
     self._aspace = self.eproc.get_process_address_space()
     self.__suspicious = False
     if self._aspace is not None and self.eproc.Peb is not None and self._aspace.is_valid_address(
             self.eproc.Peb.ImageBaseAddress):
         self._baseaddr = self.eproc.Peb.ImageBaseAddress
     else:
         self._baseaddr = -1
     self._setHandles()
     self._fileMapping()
     self.setSize(self._fm.maxOffset())
     self.__attrs = self.__attributes()
Example #35
0
 def __init__(self, DEBUG = False, VERBOSITY = 0):
     self.DEBUG = DEBUG
     self.VERBOSITY = VERBOSITY
     self.confmanager = ConfigManager.Get()
     self.config = None
     self.keylessarg = None
     self.currentArgument = None
     self.parsedArgument = None
     self.providedArguments = {}
     self.remainingArguments = []
     self.threaded = False
     self.currentStr = ""
     self.vfs = vfs()
     self.currentStrScope = 0
     self.paramsplit = re.compile('(?<!\\\)\,')
     self.badargs = []
     self.tokens = []
Example #36
0
 def __init__(self, DEBUG=False, VERBOSITY=0):
     self.DEBUG = DEBUG
     self.VERBOSITY = VERBOSITY
     self.confmanager = ConfigManager.Get()
     self.config = None
     self.keylessarg = None
     self.currentArgument = None
     self.parsedArgument = None
     self.providedArguments = {}
     self.remainingArguments = []
     self.threaded = False
     self.currentStr = ""
     self.vfs = vfs()
     self.currentStrScope = 0
     self.paramsplit = re.compile('(?<!\\\)\,')
     self.badargs = []
     self.tokens = []
Example #37
0
 def __init__(self, parent, request):
     QNetworkReply.__init__(self, parent)
     self.qbuffer = None
     self.connect(self, SIGNAL('abouteToClose()'), self.__close)
     self.byteArray = QByteArray()
     self.qbuffer = QBuffer(self.byteArray)
     self.node = vfs().getnode(str(request.url().path().toUtf8()))
     self.thumbnailer = Thumbnailer()
     self.connect(self.thumbnailer, SIGNAL("ThumbnailUpdate"),
                  self.updateThumbnail)
     self.setRequest(request)
     self.setOperation(QNetworkAccessManager.GetOperation)
     mime = "image/jpg"
     self.setHeader(QNetworkRequest.ContentTypeHeader, QVariant(mime))
     self.open()
     self.setUrl(request.url())
     self.connect(parent, SIGNAL("ready"), self.ready)
     self.ready()
Example #38
0
  def __init__(self, parent, searchview):
    super(QWidget, self).__init__(parent)
    self.setupUi(self)
    self.filters = CustomFiltersTable(self)
    self.searchFiltersLayout.addWidget(self.filters)
    self.browser = parent
    self.vfs = vfs.vfs()
    self.model = searchview.model
    self.searchview = searchview

    self.matched = 0
    self.searchTH = SearchThread(self)

    self.qmode = {0: "$",
                  1: "/",
                  2: "~",
                  3: "\""}
    self.configure()
Example #39
0
    def start(self, args):
        try:
            node = args['node'].value()
        except:
            node = vfs().getnode("/")
        try:
            indexName = args['index_name'].value().lower()
        except IndexError:
            indexName = "dff"

        self.indexedTag = TagsManager.get().tag("indexed").id()
        self.es = Elasticsearch()
        self.es.indices.create(indexName, ignore=400)
        self.elasticConnection = ElasticConnection(self.es, indexName)

        self.total = node.totalChildrenCount() + 1
        self.currentCount = 0
        self.walk(node)
Example #40
0
 def __init__(self, mod, pid, args, exec_flags):
     self.vfs = vfs.vfs()
     self.mod = mod
     self.inst = mod.create()
     self.exec_flags = exec_flags
     self.state = "wait"
     self.pid = pid
     self.args = args
     self.stream = Queue()
     self.event = threading.Event()
     self.vtreeprinter = VariantTreePrinter()
     self.timestart = 0
     self.timeend = 0
     self.streamOut = None
     self.error_result = ''
     self.lock = threading.Lock()
     self.lock.acquire()
     self.launchCount = 0
     self.lock.release()
Example #41
0
 def __init__(self, app, debug=False):
     super(MainWindow, self).__init__()
     self.app = app
     self.debug = debug
     self.sched = scheduler.sched
     self.vfs = vfs.vfs()
     self.allTabs = None
     self.createRootNodes()
     self.dialog = Dialog(self)
     self.initCallback()
     self.setupUi(self)
     self.translation()
     self.setWindowModality(QtCore.Qt.ApplicationModal)
     self.resize(
         QtCore.QSize(QtCore.QRect(0, 0, 1014, 693).size()).expandedTo(
             self.minimumSizeHint()))
     self.shellActions = ShellActions(self)
     self.interpreterActions = InterpreterActions(self)
     self.setCentralWidget(None)
     self.init()
Example #42
0
 def __init__(self, mod, pid, args, exec_flags):
   #ProcessusManager().add(self) done elswere
   self.vfs = vfs.vfs()
   self.mod = mod
   self.inst = mod.create()
   self.exec_flags = exec_flags
   self.state = "wait"
   self.pid =  pid 
   self.args = args
   self.stream = Queue()
   self.event = threading.Event()
   self.vtreeprinter = VariantTreePrinter()
   self.timestart = 0
   self.timeend = 0
   self.streamOut = None
   #XXX test for singleton module that could be launch multiple time foder locker/
   self.error_result = '' 
   self.lock = threading.Lock()
   self.lock.acquire()
   self.launchCount = 0  
   self.lock.release()
Example #43
0
 def __init__(self, mod, pid, args, exec_flags):
     #ProcessusManager().add(self) done elswere
     self.vfs = vfs.vfs()
     self.mod = mod
     self.inst = mod.create()
     self.exec_flags = exec_flags
     self.state = "wait"
     self.pid = pid
     self.args = args
     self.stream = Queue()
     self.event = threading.Event()
     self.vtreeprinter = VariantTreePrinter()
     self.timestart = 0
     self.timeend = 0
     self.streamOut = None
     #XXX test for singleton module that could be launch multiple time foder locker/
     self.error_result = ''
     self.lock = threading.Lock()
     self.lock.acquire()
     self.launchCount = 0
     self.lock.release()
Example #44
0
 def __init__(self):
   Script.__init__(self, "thumbnailvideo")
   self.icon = None
   self.vfs = vfs.vfs()
Example #45
0
 def __init__(self, parent):
   QLineEdit.__init__(self)
   self.navigation = parent
   self.vfs = vfs()
   QObject.connect(self, SIGNAL("textEdited(const QString &)"), self.updatePath)
   self.connect(self, SIGNAL("editingFinished()"), self.focusOut)
Example #46
0
    def gotolink(self, path):
      if path:
	p = str(path.toUtf8())
        v = vfs()
        n = v.getnode(str(path.toUtf8()))
        self.mainwindow.addNodeBrowser(rootpath=n)
Example #47
0
 def __init__(self):
   Script.__init__(self, "cat")
   self.vfs = vfs.vfs()
   self.type = "cat"
   self.icon = None
   self.currentCodec = "UTF-8"
Example #48
0
 def __init__(self):
   Script.__init__(self, "Registry viewer")
   self.name = "Registry viewer"
   self.vfs = vfs()
   self.icon = None
Example #49
0
 def __init__(self, vfsname="dff-vfs", basevfs=""):
   self.vfsname = vfsname
   self.basevfs = basevfs
   self.vfs = vfs()
   apsw.VFS.__init__(self, self.vfsname, self.basevfs)
Example #50
0
 def __init__(self, inheritfromvfsname, filename, flags):
   self.vfile = None
   self.vfs = vfs()
   self.node = self.vfs.getnode(filename)
   if self.node: 
     self.vfile = self.node.open()
Example #51
0
 def __init__(self, mountpoint):
     self.vfs = vfs()
     self.mountpoint = mountpoint
     self.hives = []
Example #52
0
 def __init__(self, model):
   self.model = model
   self.vfs = vfs()
   self.rootNode = self.vfs.getnode('/Bookmarks/')