예제 #1
0
파일: controller.py 프로젝트: Lab41/Redwood
 def cmdloop(self):
     try:
         if not filter_list:
             core.import_filters("./Filters", self.cnx)
         return cmd.Cmd.cmdloop(self)
     except KeyboardInterrupt:
         sys.stdout.write('\n')
         return self.cmdloop()
예제 #2
0
 def cmdloop(self):
     try:
         if not filter_list:
             core.import_filters("./Filters", self.cnx)
         return cmd.Cmd.cmdloop(self)
     except KeyboardInterrupt:
         sys.stdout.write('\n')
         return self.cmdloop()
예제 #3
0
파일: controller.py 프로젝트: Lab41/Redwood
 def do_import_filters(self, line):
     '''[*] import_filters <path>\n\t|-[path]   - path to the directory containing the filters'''
     new_filters = core.import_filters(line, self.cnx)
     
     if new_filters is not None:
         print "Importing the following filters: "
         for f in new_filters:
             print "{}".format(f.name)
     else:
         print "No filters found"
예제 #4
0
    def do_import_filters(self, line):
        '''[*] import_filters <path>\n\t|-[path]   - path to the directory containing the filters'''
        new_filters = core.import_filters(line, self.cnx)

        if new_filters is not None:
            print "Importing the following filters: "
            for f in new_filters:
                print "{}".format(f.name)
        else:
            print "No filters found"
예제 #5
0
    def run(self):
        
        print "...running with {} cores".format(multiprocessing.cpu_count())
        
        print "...loading filters from ./Filters directory if exists"
        core.import_filters("./Filters", self.cnx)

        while True:
            mode = self.mode_stack[len(self.mode_stack) - 1] 
            command = raw_input(mode.prompt)
            command = string.strip(command)
            args = string.split(command)
           
            if(len(args) == 0):
                mode.do_help()
                continue
           

            mode.execute(*args)
예제 #6
0
파일: modes.py 프로젝트: cglewis/Redwood
 def do_import_filters(self, path):
     '''[*] import_filters <path>\n\t|-[path]   - path to the directory containing the filters'''
     new_filters = core.import_filters(path, self.cnx)
     print "New Filters: "
     print new_filters