Beispiel #1
0
 def __init__(self):
     Cmd.__init__(self)
     prompt = "NSS >"
     self.prompt = prompt
     self.tools = tools()
     self.banner = banner()
     self.db = DB()
     self.SHOW_ARG = ["all","mongodb","multi"]
Beispiel #2
0
            self.db.showPlugins(arg)
        else:
            self.tools.usage('show')

    def complete_show(self,text,line,begidx,endidx):
        if not text:
            completions = self.SHOW_ARG[:]
        else:
            completions = [i for i in self.SHOW_ARG if i.startswith(text)]
        return completions

    
    def do_search(self,arg):
        if arg == "":
            self.tools.usage('search')
        else:
            self.db.searchPlugin(arg)

    def do_banner(self,arg):
        self.banner.main()

if __name__ == '__main__':
    tool = tools()
    try:
        nss = NSS()
        nss.cmdloop()
    except KeyboardInterrupt:
        tool.mainExit()
    except Exception,e:
        tool.errmsg(e)