(self)
| 35 | return self.db.get_full_details() |
| 36 | |
| 37 | def MainMenu(self): |
| 38 | # This will give you the nice prompt you like so much |
| 39 | if len(self.currentmodule) > 0: |
| 40 | g = int(self.currentmodule) - 1 |
| 41 | just_print = self.modules[ |
| 42 | int(g)][int(globals.vars.column_for_name)] |
| 43 | cmd = raw_input( |
| 44 | globals.bcolors.GREEN + 'mdb ' + globals.bcolors.RED + str( |
| 45 | just_print) + globals.bcolors.GREEN + '#> ' + globals.bcolors.WHITE).strip() |
| 46 | else: |
| 47 | cmd = raw_input( |
| 48 | globals.bcolors.GREEN + 'mdb ' + globals.bcolors.GREEN + '#> ' + globals.bcolors.WHITE).strip() |
| 49 | try: |
| 50 | while cmd == "": |
| 51 | # print 'no cmd' |
| 52 | self.MainMenu() |
| 53 | |
| 54 | if cmd == 'help': |
| 55 | print " Available commands:\n" |
| 56 | for (cmd, desc) in self.commands: |
| 57 | print "\t%s\t%s" % ('{0: <12}'.format(cmd), desc) |
| 58 | print '' |
| 59 | self.MainMenu() |
| 60 | |
| 61 | # Checks if normal or freestyle search |
| 62 | if re.match('^search', cmd): |
| 63 | manySearch = manysearches.MuchSearch() |
| 64 | num_args = len(cmd.rsplit(' ')) |
| 65 | if num_args > 1: |
| 66 | args = cmd.rsplit(' ')[1:] |
| 67 | num_args = len(args) |
| 68 | if num_args > 0: |
| 69 | manySearch.sort(args) |
| 70 | else: |
| 71 | print "Uh oh, Invalid search query" |
| 72 | self.MainMenu() |
| 73 | |
| 74 | if cmd == 'exit': |
| 75 | sys.exit(1) |
| 76 | |
| 77 | if cmd == 'update-db': |
| 78 | updateHandler = Updater() |
| 79 | updateHandler.get_maldb_ver() |
| 80 | self.MainMenu() |
| 81 | |
| 82 | if cmd == 'report-mal': |
| 83 | rprt_name = raw_input("Name of malware: ") |
| 84 | rprt_type = raw_input("Type of malware: ") |
| 85 | rprt_version = raw_input("Version: ") |
| 86 | rprt_lang = raw_input("Language: ") |
| 87 | rprt_src = raw_input("Source / Binary (s/b): ") |
| 88 | rprt_arch = raw_input("Win32, ARM etc. ? ") |
| 89 | rprt_reporter = raw_input( |
| 90 | "Your name for a thank you note on theZoo.\n" |
| 91 | "Please notice that this will be public!\n\nName: ") |
| 92 | rprt_comments = raw_input("Comments? ") |
| 93 | |
| 94 | report = ("//%s//\n" % rprt_name) |
no test coverage detected