def crimedb(): crimeflaredb.dl_crimeflare()
type=str, help="Set config file") # Add a optional switch argp.add_argument("-d", "--down", dest='dl', action='store_true', required=False, help="Download crimeflare db") # Parse command line args = argp.parse_args() if args.dl: crimeflaredb.dl_crimeflare() exit() here = os.path.realpath('.') if args.config_file: config_file = args.config_file else: config_file = 'config.cfg' logging.info('Reading configuration from %s' % (config_file)) config = configparser.ConfigParser(defaults={'here': here}) config.read(config_file) try: shodan_api_key = config.get('API_KEYS', 'shodan_api_key')