def testCGIList(target_host, cgi_list):
    test_list = []
    errors = 0
    for cgi_path in cgi_list:
        if 1 in ATTACKS:
            cgitest = testSleep(target_host, cgi_path)
            test_list.append(cgitest)
            if cgitest['error'] is True:
                errors +=1;
            else:
                errors = 0
            if errors >= ERRORS_TO_ABORT:
                print "%s aborted due to %s consecutive connection errors" %(cgitest['host'], ERRORS_TO_ABORT)
                break;

        if 2 in ATTACKS:
            cgitest = testPing(target_host, cgi_path)
            test_list.append(cgitest)
            if cgitest['error'] is True:
                errors +=1;
            else:
                errors = 0
            if errors >= ERRORS_TO_ABORT:
                print "%s aborted due to %s consecutive connection errors" %(cgitest['host'], ERRORS_TO_ABORT)
                break;

        if 3 in ATTACKS:
            cgitest = testString(target_host, cgi_path)
            test_list.append(cgitest)
            if cgitest['error'] is True:
                errors +=1;
            else:
                errors = 0
            if errors >= ERRORS_TO_ABORT:
                print "%s aborted due to %s consecutive connection errors" %(cgitest['host'], ERRORS_TO_ABORT)
                break;
    return test_list
dataset/ETHPy150Open gry/shellshock-scanner/shellshock_scanner.py/testCGIList/original