예제 #1
0
async def display_status(char=cycle('/|\-')):
    count = 0
    while not all_done:
        groups_count = 0
        for c in queue_size_array:
            groups_count += c
        msg = '[%s] %s found, %s scanned in %.1f seconds, %s groups left' % (
            next(char), found_count.value, scan_count.value,
            time.time() - start_time, groups_count)
        print_msg(msg)
        count += 1
        await asyncio.sleep(.3)
예제 #2
0
            all_process.append(p)
            p.start()

        char_set = ['\\', '|', '/', '-']
        count = 0
        while all_process:
            for p in all_process:
                if not p.is_alive():
                    all_process.remove(p)
            groups_count = 0
            for c in queue_size_array:
                groups_count += c
            msg = '[+] [%s] %s found, %s scanned in %.1f seconds, %s groups left' % (
                char_set[count % 4], found_count.value, scan_count.value,
                time.time() - start_time, groups_count)
            print_msg(msg)
            count += 1
            time.sleep(0.3)
    except KeyboardInterrupt as e:
        print('[ERROR] User aborted the scan!')
        for p in all_process:
            p.terminate()
    except Exception as e:
        import traceback
        traceback.print_exc()
        print('[ERROR] %s' % str(e))

    out_file_name = get_out_file_name(domain, options)
    all_domains = set()
    domain_count = 0
    with open(out_file_name, 'w') as f: