def run(self, config, args): self.parse_args(args) # trim off "amass.commands.list" list_command = self.__module__.replace(DjangoListCommand.__module__, "").split(".") # capitalize and join to make class name of django object classname = "".join([cmd.capitalize() for cmd in list_command]) [listclass] = self.get_django_models(config, classname) rows = [] for listobject in listclass.objects.all(): rows.append(listobject.to_array()) amass.print_table(listclass.headers(), rows)
def run(self, config, args): arg_vals = self.parse_args(args) features = amass.features.Features(config) table, unmatched_errors = features.list_cached_feature_errors( arg_vals["features"],arg_vals["gateway"], arg_vals["printerror"]) if arg_vals["printerror"] != "": amass.print_table(["ERROR"], table) else: amass.print_table(["ERROR TYPE", "ERROR", "COUNT"], table) if len(unmatched_errors) > 0: print "\nThe following errors are unmatched:" for error in unmatched_errors: print error
def run(self, config, args): arg_vals = self.parse_args(args) features = amass.features.Features(config) table = features.list_cached_features() if not self.is_arg_true(arg_vals["names"]): amass.print_table( ["FEATURES", "GATEWAY", "COUNT", "START DATE", "END DATE"], table) sys.exit(0) new_table = [] for row in table: feature_names = features.list_feature_names(row[0], row[1]) for i, feature_name in enumerate(feature_names): new_table.append([row[0], row[1], str(i), feature_name]) amass.print_table(["FEATURES", "GATEWAY", "INDEX", "NAME"], new_table)
def run(self, config, args): self.parse_args(args) features = amass.features.Features(config) table = features.list_features() amass.print_table(["FEATURE SET NAME", "FEATURE NAMES"], table)
def run(self, config, args): arg_vals = self.parse_args(args) features = amass.features.Features(config) table = features.list_cached_sources() amass.print_table(["SOURCE", "COUNT", "START DATE", "END DATE"], table)