forked from LoRexxar/Feigong
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeigong.py
More file actions
61 lines (48 loc) · 1.34 KB
/
feigong.py
File metadata and controls
61 lines (48 loc) · 1.34 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import re
from lib.log import log
from lib.log import logger
from sqlier.techniques.content import SqliContent
__author__ = "LoRexxar"
def main():
s = SqliContent()
# 处理下url,作为logname
name = re.findall("[\w\.-]+", s.url)
del name[0]
try:
url_name = "%2f".join(name)
except IndexError:
print "url matching fail!"
exit(0)
log(s.loglevel, url_name)
logger.info('start sqli...')
if s.len == 0:
s.test( output=0)
if s.wtest:
if s.testmethod['test']:
s.test(output=1)
if s.testmethod['database']:
s.get_now_database()
if s.testmethod['version']:
s.get_version()
if s.testmethod['user']:
s.get_user()
elif s.wsqli:
if s.sqlilocation['content']:
s.run_content()
elif s.sqlilocation['columns']:
s.get_columns()
elif s.sqlilocation['tables']:
s.get_tables()
elif s.sqlilocation['database']:
s.get_database()
else:
logger.error("Sqlilocation error, Not choose any injection pattern")
exit(0)
else:
logger.error("Did not select any mode")
exit(0)
# print ExpandFunction.crack_code('593e')
if __name__ == '__main__':
main()