Example #1
0
     geoloc = ''
 collection = args.collection
 attr = args.attr
 msg = db + ' ' + ' ' + args.action + ' ' + criteria
 h.register(msg)
 act = Actions(db)
 if args.action == 'reset':
     act.reset()
 elif args.action == 'metasearch':
     if criteria and scriptsJS and db and geoloc:
         criteria = criteria.split(',')
         act.metasearch(criteria, scriptsJS, geoloc)
 elif args.action == 'search_ip':
     act.search_ip(geoloc, scriptsJS, args.range)
 elif args.action == 'create_network':
     act.create_network()
 elif args.action == 'metadata':
     act.metadata_exctract()
 elif args.action == 'create_result':
     if not criteria and not db:
         parser.print_help()
     else:
         if collection:
             act.create_result(collection, criteria)
 elif args.action == 'dnstree':
     if db:
         act.dnstree(db)
 elif args.action == 'crawl' and args.domains:
     if db:
         act.crawl(args.domains)
 elif args.action == 'cleandb':
Example #2
0
     geoloc = ''
 collection = args.collection
 attr = args.attr
 msg = db + ' ' + ' ' + args.action + ' ' + criteria
 h.register(msg)
 act = Actions(db)
 if args.action == 'reset':
     act.reset()
 elif args.action == 'metasearch':
     if criteria and scriptsJS and db and geoloc:
         criteria = criteria.split(',')
         act.metasearch(criteria, scriptsJS, geoloc)
 elif args.action == 'search_ip':
     act.search_ip(geoloc, scriptsJS, args.range)
 elif args.action == 'create_network':
     act.create_network()
 elif args.action == 'metadata':
     act.metadata_exctract()
 elif args.action == 'create_result':
     if not criteria and not db:
         parser.print_help()
     else:
         if collection:
             act.create_result(collection, criteria)
 elif args.action == 'dnstree':
     if db:
         act.dnstree(db)
 elif args.action == 'crawl' and args.domains:
     if db:
         act.crawl(args.domains)
 elif args.action == 'cleandb':