def testShellShock(target_host, cgi_path, command):
    try:
        status1 = reason1 = delay1 = res1= status2 = reason2 = delay2 = res2 = None
        command2 = command
        headers = {"Content-type": "application/x-www-form-urlencoded",
            "User-Agent": USER_AGENT,
            }
        status1, reason1, delay1, res1 = request(target_host, cgi_path, headers)
        status2, reason2, delay2, res2 = exploit(target_host, cgi_path, command2)
        res1.close()
        res2.close()
        # warning = delay2 > SLEEP_TIME
        # vulnerable = warning and delay2-delay1>DELAY_TIME
        return {'host': target_host,
                'cgi_path': cgi_path,
                'requests': [('normal request', status1,reason1,delay1,res1), (command2,status2,reason2,delay2,res2)],
                # 'vulnerable' : vulnerable,
                # 'warning' : warning,
                'vulnerable' : None,
                'warning' : None,
                'error': False,
                'delay_diff' : delay1-delay2
                }
    except Exception as e:
        # print e.__class__, e
        # Probably exception with the connection
        return {'host': target_host,
                'cgi_path': cgi_path,
                'requests': [('normal request',status1,reason1,delay1), (command2,status2,reason2,delay2)],
                'vulnerable' : False,
                'warning' : False,
                'error': True,
                'delay_diff' : None
                }
dataset/ETHPy150Open gry/shellshock-scanner/shellshock_scanner.py/testShellShock/swapped operands of `-`