Пример #1
0
    def __init__(self, completekey='tab', stdin=None, stdout=None, sigstp=True, arguments=None):
        Cmd.__init__(self, completekey, stdin, stdout)
        UI.__init__(self, arguments)
        self.arguments = arguments
        self.cm = ConfigManager.Get()
        self.history = history()
        self.api = ApiManager()
        self.vfs = self.api.vfs()
        self.taskmanager = self.api.TaskManager()
	self.line_to_arguments = line_to_arguments.Line_to_arguments()
        self.old_completer = ""
        self.prompt = "dff / > "
        self.intro = "\n##########################################\n\
# Welcome on Digital Forensics Framework #\n\
##########################################\n"
	self.stdin = self
	self.completekey = '\t'
	self.comp_raw = complete_raw_input(self)
        if self.arguments:
            print arguments.verbosity
            self.completion = completion.Completion(self.comp_raw, arguments.debug, arguments.verbosity)
        else:
            self.completion = completion.Completion(self.comp_raw, False, 0)
	self.proc = None
	if os.name == 'posix' and sigstp:
  	  signal.signal(signal.SIGTSTP, self.bg)
Пример #2
0
 def __init__(self):
     Script.__init__(self, "batch")
     self.tm = TaskManager()
     self.DEBUG = False
     self.VERBOSITY = 0
     self.lp = LineParser(self.DEBUG, self.VERBOSITY - 1)
     self.cm = ConfigManager.Get()
Пример #3
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()
Пример #4
0
        def __init__(self):
            self.cm = ConfigManager.Get()
            self.vfs = VFS.Get()
            self.cmodules = {}
            self.scripts = {}
            self.builtins = {}
	    self.modules = {}
	    self.tags = {}
            self.loadedPaths = []
            self.__modulesPaths = []       
Пример #5
0
Файл: utils.py Проект: kzwkt/dff
 def hasOneNodeArg(module, type):
     configs = ConfigManager.Get()
     mconf = configs.configByName(str(module))
     if len(mconf.arguments()) > 1:
         return None
     argsnode = mconf.argumentsByType(typeId.Node)
     required = mconf.argumentsByRequirementType(Argument.Required)
     if len(argsnode) == 0:
         return None
     if len(argsnode) == 1:
         return argsnode[0].name()
     return None
Пример #6
0
 def __init__(self, parent):
     Request.__init__(self, parent)
     self.configs = ConfigManager.Get()
     self.selectedModules = []
     self.content = QLineEdit(self)
     self.connect(self.content, SIGNAL("textChanged(const QString &)"),
                  self.updateQuery)
     self.connect(self.content, SIGNAL("textEdited(const QString &)"),
                  self.updateQuery)
     self.content.setReadOnly(True)
     self.selectButton = QPushButton(self.tr("Select ..."))
     self.connect(self.selectButton, SIGNAL("clicked()"),
                  self.selectModuleDialog)
     self.layout().addWidget(self.content, 50)
     self.layout().addWidget(self.selectButton)
     self.selectedModules = []
Пример #7
0
Файл: utils.py Проект: kzwkt/dff
 def execModule(name, type, nameArg, listNode):
     tm = TaskManager()
     configs = ConfigManager.Get()
     mconf = configs.configByName(str(name))
     arg = mconf.argumentByName(nameArg)
     if isinstance(listNode, Node):
         args = mconf.generate({arg.name(): listNode})
         tm.add(str(name), args, ["thread", "gui"])
     else:
         if arg.inputType() == Argument.List:
             args = mconf.generate({arg.name(): listNode})
             tm.add(str(name), args, ["thread", "gui"])
         else:
             for i in listNode:
                 args = mconf.generate({arg.name(): i})
                 tm.add(str(name), args, ["thread", "gui"])
Пример #8
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 = []
Пример #9
0
 def __init__(self):
     Script.__init__(self, "info")
     VariantTreePrinter.__init__(self)
     self.loader = loader.loader()
     self.processusManager = ProcessusManager()
     self.cm = ConfigManager.Get()
Пример #10
0
 def __init__(self):
     Script.__init__(self, "man")
     self.type = "man"
     self.loader = loader()
     self.cm = ConfigManager.Get()
Пример #11
0
 def __init__(self):
     Script.__init__(self, "show_db")
     self.cm = ConfigManager.Get()
     self.processusManager = ProcessusManager()
     self.ti = typeId.Get()
     self.vtreeprinter = VariantTreePrinter()