forked from lanmaster53/sqli-exploiter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sqli-exploiter.py
37 lines (34 loc) · 1.14 KB
/
sqli-exploiter.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
32
33
34
35
36
37
#
# WARNING! Do not edit this file.
#
from config import *
from injector import Injector, InjectorException
import logging
def main():
# configure logging
loglevel = getattr(logging, LOGLEVEL.upper())
logging.basicConfig(format='%(levelname)s %(message)s', level=loglevel)
logging.addLevelName(logging.INFO, '[-]')
logging.addLevelName(logging.WARN, '[*]')
logging.addLevelName(logging.ERROR, '[!]')
# configure debug logging for requests
if loglevel == logging.DEBUG:
# debug HTTP requests
import http.client as http_client
http_client.HTTPConnection.debuglevel = 1
# initialize logging, otherwise you'll not see debug output
requests_log = logging.getLogger("requests.packages.urllib3")
requests_log.setLevel(loglevel)
requests_log.propagate = True
i = Injector()
try:
i.set_attack(ATTACKS, ATTACK, PAYLOADS)
i.condition = condition
i.success = success
i.exploit(URL, PARAMS, DATA, HEADERS)
except InjectorException as e:
logging.error(e)
except KeyboardInterrupt:
pass
if __name__ == '__main__':
main()