def brute_names(self): while self.in_queue.qsize() > 0: try: url = self.in_queue.get() response = requests.get(url) if response.status_code == 200: cprint(url + ' ' + str(response.status_code)) # else: # cprint(url + ' ' + str(response.status_code), 'red') # sys.stdout.write(url + ' ' + response.status_code) # sys.stdout.write('\r' + ' ' * 100 + str(self.found_count) + ' found | ' + # str(self.in_queue.qsize()) + ' remaining') # sys.stdout.flush() except Exception, e: cprint(e, 'red')
#!/usr/bin/env python # encoding: utf-8 import sys sys.path.append('../') import os from thirdparty.termcolor.termcolor import cprint if __name__ == '__main__': os.system('clear') cprint('test', 'red') cprint('test', 'white')