Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def api_test():
'''
get verified with zoomeye
'''
amnt = int(
console.input_check(
"[*] How many results do you want? (10 IPs on each page) ",
check_type=int).strip())
threads = []
api = ZoomEyeAPI('zoomeye.conf')
access_token = api.login()
headers = {
'Authorization': 'JWT ' + access_token,
}
status = threading.Thread(target=progress, args=(ZoomEyeAPI.OUTFILE,))
status.setDaemon(True)
status.start()
limit = 0
for page in range(1, int(amnt / 10)):
thd = threading.Thread(
target=crawler, args=(ZoomEyeAPI.QRY, amnt, page, headers,))
threads.append(thd)
for job in threads:
job.setDaemon(True)
job.start()
if limit == 0 or limit == 10: