FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sqlmap/lib/core/option.py at master · getcode2git/sqlmap · GitHub
getcode2git
/
sqlmap
Public
forked from
sqlmapproject/sqlmap
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
sqlmap
/
lib
/
core
/
option.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
2584 lines (2076 loc) · 88.9 KB
Breadcrumbs
sqlmap
/
lib
/
core
/
option.py
Copy path
File metadata and controls
2584 lines (2076 loc) · 88.9 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env python
"""
Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import
cookielib
import
glob
import
inspect
import
logging
import
httplib
import
os
import
random
import
re
import
socket
import
string
import
sys
import
tempfile
import
threading
import
time
import
urllib2
import
urlparse
import
lib
.
controller
.
checks
import
lib
.
core
.
common
import
lib
.
core
.
threads
import
lib
.
core
.
convert
import
lib
.
request
.
connect
import
lib
.
utils
.
search
from
lib
.
controller
.
checks
import
checkConnection
from
lib
.
core
.
common
import
Backend
from
lib
.
core
.
common
import
boldifyMessage
from
lib
.
core
.
common
import
checkFile
from
lib
.
core
.
common
import
dataToStdout
from
lib
.
core
.
common
import
getPublicTypeMembers
from
lib
.
core
.
common
import
getSafeExString
from
lib
.
core
.
common
import
extractRegexResult
from
lib
.
core
.
common
import
filterStringValue
from
lib
.
core
.
common
import
findPageForms
from
lib
.
core
.
common
import
getConsoleWidth
from
lib
.
core
.
common
import
getFileItems
from
lib
.
core
.
common
import
getFileType
from
lib
.
core
.
common
import
getUnicode
from
lib
.
core
.
common
import
isListLike
from
lib
.
core
.
common
import
normalizePath
from
lib
.
core
.
common
import
ntToPosixSlashes
from
lib
.
core
.
common
import
openFile
from
lib
.
core
.
common
import
parseTargetDirect
from
lib
.
core
.
common
import
parseTargetUrl
from
lib
.
core
.
common
import
paths
from
lib
.
core
.
common
import
randomStr
from
lib
.
core
.
common
import
readCachedFileContent
from
lib
.
core
.
common
import
readInput
from
lib
.
core
.
common
import
resetCookieJar
from
lib
.
core
.
common
import
runningAsAdmin
from
lib
.
core
.
common
import
safeExpandUser
from
lib
.
core
.
common
import
setOptimize
from
lib
.
core
.
common
import
setPaths
from
lib
.
core
.
common
import
singleTimeWarnMessage
from
lib
.
core
.
common
import
UnicodeRawConfigParser
from
lib
.
core
.
common
import
urldecode
from
lib
.
core
.
convert
import
base64unpickle
from
lib
.
core
.
data
import
conf
from
lib
.
core
.
data
import
kb
from
lib
.
core
.
data
import
logger
from
lib
.
core
.
data
import
mergedOptions
from
lib
.
core
.
data
import
queries
from
lib
.
core
.
datatype
import
AttribDict
from
lib
.
core
.
datatype
import
InjectionDict
from
lib
.
core
.
defaults
import
defaults
from
lib
.
core
.
dicts
import
DBMS_DICT
from
lib
.
core
.
dicts
import
DUMP_REPLACEMENTS
from
lib
.
core
.
enums
import
ADJUST_TIME_DELAY
from
lib
.
core
.
enums
import
AUTH_TYPE
from
lib
.
core
.
enums
import
CUSTOM_LOGGING
from
lib
.
core
.
enums
import
DUMP_FORMAT
from
lib
.
core
.
enums
import
HTTP_HEADER
from
lib
.
core
.
enums
import
HTTPMETHOD
from
lib
.
core
.
enums
import
MOBILES
from
lib
.
core
.
enums
import
OPTION_TYPE
from
lib
.
core
.
enums
import
PAYLOAD
from
lib
.
core
.
enums
import
PRIORITY
from
lib
.
core
.
enums
import
PROXY_TYPE
from
lib
.
core
.
enums
import
REFLECTIVE_COUNTER
from
lib
.
core
.
enums
import
WIZARD
from
lib
.
core
.
exception
import
SqlmapConnectionException
from
lib
.
core
.
exception
import
SqlmapFilePathException
from
lib
.
core
.
exception
import
SqlmapGenericException
from
lib
.
core
.
exception
import
SqlmapInstallationException
from
lib
.
core
.
exception
import
SqlmapMissingDependence
from
lib
.
core
.
exception
import
SqlmapMissingMandatoryOptionException
from
lib
.
core
.
exception
import
SqlmapMissingPrivileges
from
lib
.
core
.
exception
import
SqlmapNoneDataException
from
lib
.
core
.
exception
import
SqlmapSilentQuitException
from
lib
.
core
.
exception
import
SqlmapSyntaxException
from
lib
.
core
.
exception
import
SqlmapSystemException
from
lib
.
core
.
exception
import
SqlmapUnsupportedDBMSException
from
lib
.
core
.
exception
import
SqlmapUserQuitException
from
lib
.
core
.
log
import
FORMATTER
from
lib
.
core
.
optiondict
import
optDict
from
lib
.
core
.
settings
import
BURP_REQUEST_REGEX
from
lib
.
core
.
settings
import
BURP_XML_HISTORY_REGEX
from
lib
.
core
.
settings
import
CODECS_LIST_PAGE
from
lib
.
core
.
settings
import
CRAWL_EXCLUDE_EXTENSIONS
from
lib
.
core
.
settings
import
CUSTOM_INJECTION_MARK_CHAR
from
lib
.
core
.
settings
import
DBMS_ALIASES
from
lib
.
core
.
settings
import
DEFAULT_PAGE_ENCODING
from
lib
.
core
.
settings
import
DEFAULT_TOR_HTTP_PORTS
from
lib
.
core
.
settings
import
DEFAULT_TOR_SOCKS_PORT
from
lib
.
core
.
settings
import
DUMMY_URL
from
lib
.
core
.
settings
import
IGNORE_SAVE_OPTIONS
from
lib
.
core
.
settings
import
INJECT_HERE_MARK
from
lib
.
core
.
settings
import
IS_WIN
from
lib
.
core
.
settings
import
KB_CHARS_BOUNDARY_CHAR
from
lib
.
core
.
settings
import
KB_CHARS_LOW_FREQUENCY_ALPHABET
from
lib
.
core
.
settings
import
LOCALHOST
from
lib
.
core
.
settings
import
MAX_CONNECT_RETRIES
from
lib
.
core
.
settings
import
MAX_NUMBER_OF_THREADS
from
lib
.
core
.
settings
import
NULL
from
lib
.
core
.
settings
import
PARAMETER_SPLITTING_REGEX
from
lib
.
core
.
settings
import
PROBLEMATIC_CUSTOM_INJECTION_PATTERNS
from
lib
.
core
.
settings
import
SITE
from
lib
.
core
.
settings
import
SOCKET_PRE_CONNECT_QUEUE_SIZE
from
lib
.
core
.
settings
import
SQLMAP_ENVIRONMENT_PREFIX
from
lib
.
core
.
settings
import
SUPPORTED_DBMS
from
lib
.
core
.
settings
import
SUPPORTED_OS
from
lib
.
core
.
settings
import
TIME_DELAY_CANDIDATES
from
lib
.
core
.
settings
import
UNION_CHAR_REGEX
from
lib
.
core
.
settings
import
UNKNOWN_DBMS_VERSION
from
lib
.
core
.
settings
import
URI_INJECTABLE_REGEX
from
lib
.
core
.
settings
import
VERSION_STRING
from
lib
.
core
.
settings
import
WEBSCARAB_SPLITTER
from
lib
.
core
.
threads
import
getCurrentThreadData
from
lib
.
core
.
update
import
update
from
lib
.
parse
.
configfile
import
configFileParser
from
lib
.
parse
.
payloads
import
loadBoundaries
from
lib
.
parse
.
payloads
import
loadPayloads
from
lib
.
parse
.
sitemap
import
parseSitemap
from
lib
.
request
.
basic
import
checkCharEncoding
from
lib
.
request
.
connect
import
Connect
as
Request
from
lib
.
request
.
dns
import
DNSServer
from
lib
.
request
.
basicauthhandler
import
SmartHTTPBasicAuthHandler
from
lib
.
request
.
httpshandler
import
HTTPSHandler
from
lib
.
request
.
pkihandler
import
HTTPSPKIAuthHandler
from
lib
.
request
.
rangehandler
import
HTTPRangeHandler
from
lib
.
request
.
redirecthandler
import
SmartRedirectHandler
from
lib
.
request
.
templates
import
getPageTemplate
from
lib
.
utils
.
crawler
import
crawl
from
lib
.
utils
.
deps
import
checkDependencies
from
lib
.
utils
.
search
import
search
from
lib
.
utils
.
purge
import
purge
from
thirdparty
.
colorama
.
initialise
import
init
as
coloramainit
from
thirdparty
.
keepalive
import
keepalive
from
thirdparty
.
oset
.
pyoset
import
oset
from
thirdparty
.
socks
import
socks
from
xml
.
etree
.
ElementTree
import
ElementTree
authHandler
=
urllib2
.
BaseHandler
()
httpsHandler
=
HTTPSHandler
()
keepAliveHandler
=
keepalive
.
HTTPHandler
()
proxyHandler
=
urllib2
.
ProxyHandler
()
redirectHandler
=
SmartRedirectHandler
()
rangeHandler
=
HTTPRangeHandler
()
def
_feedTargetsDict
(
reqFile
,
addedTargetUrls
):
"""
Parses web scarab and burp logs and adds results to the target URL list
"""
def
_parseWebScarabLog
(
content
):
"""
Parses web scarab logs (POST method not supported)
"""
reqResList
=
content
.
split
(
WEBSCARAB_SPLITTER
)
for
request
in
reqResList
:
url
=
extractRegexResult
(
r"URL: (?P<result>.+?)\n"
,
request
,
re
.
I
)
method
=
extractRegexResult
(
r"METHOD: (?P<result>.+?)\n"
,
request
,
re
.
I
)
cookie
=
extractRegexResult
(
r"COOKIE: (?P<result>.+?)\n"
,
request
,
re
.
I
)
if
not
method
or
not
url
:
logger
.
debug
(
"not a valid WebScarab log data"
)
continue
if
method
.
upper
()
==
HTTPMETHOD
.
POST
:
warnMsg
=
"POST requests from WebScarab logs aren't supported "
warnMsg
+=
"as their body content is stored in separate files. "
warnMsg
+=
"Nevertheless you can use -r to load them individually."
logger
.
warning
(
warnMsg
)
continue
if
not
(
conf
.
scope
and
not
re
.
search
(
conf
.
scope
,
url
,
re
.
I
)):
if
not
kb
.
targets
or
url
not
in
addedTargetUrls
:
kb
.
targets
.
add
((
url
,
method
,
None
,
cookie
,
None
))
addedTargetUrls
.
add
(
url
)
def
_parseBurpLog
(
content
):
"""
Parses burp logs
"""
if
not
re
.
search
(
BURP_REQUEST_REGEX
,
content
,
re
.
I
|
re
.
S
):
if
re
.
search
(
BURP_XML_HISTORY_REGEX
,
content
,
re
.
I
|
re
.
S
):
reqResList
=
[]
for
match
in
re
.
finditer
(
BURP_XML_HISTORY_REGEX
,
content
,
re
.
I
|
re
.
S
):
port
,
request
=
match
.
groups
()
request
=
request
.
decode
(
"base64"
)
_
=
re
.
search
(
r"%s:.+"
%
re
.
escape
(
HTTP_HEADER
.
HOST
),
request
)
if
_
:
host
=
_
.
group
(
0
).
strip
()
if
not
re
.
search
(
r":\d+\Z"
,
host
):
request
=
request
.
replace
(
host
,
"%s:%d"
%
(
host
,
int
(
port
)))
reqResList
.
append
(
request
)
else
:
reqResList
=
[
content
]
else
:
reqResList
=
re
.
finditer
(
BURP_REQUEST_REGEX
,
content
,
re
.
I
|
re
.
S
)
for
match
in
reqResList
:
request
=
match
if
isinstance
(
match
,
basestring
)
else
match
.
group
(
0
)
request
=
re
.
sub
(
r"\A[^\w]+"
,
""
,
request
)
schemePort
=
re
.
search
(
r"(http[\w]*)\:\/\/.*?\:([\d]+).+?={10,}"
,
request
,
re
.
I
|
re
.
S
)
if
schemePort
:
scheme
=
schemePort
.
group
(
1
)
port
=
schemePort
.
group
(
2
)
else
:
scheme
,
port
=
None
,
None
if
not
re
.
search
(
r"^[\n]*(%s).*?\sHTTP\/"
%
"|"
.
join
(
getPublicTypeMembers
(
HTTPMETHOD
,
True
)),
request
,
re
.
I
|
re
.
M
):
continue
if
re
.
search
(
r"^[\n]*%s.*?\.(%s)\sHTTP\/"
%
(
HTTPMETHOD
.
GET
,
"|"
.
join
(
CRAWL_EXCLUDE_EXTENSIONS
)),
request
,
re
.
I
|
re
.
M
):
continue
getPostReq
=
False
url
=
None
host
=
None
method
=
None
data
=
None
cookie
=
None
params
=
False
newline
=
None
lines
=
request
.
split
(
'
\n
'
)
headers
=
[]
for
index
in
xrange
(
len
(
lines
)):
line
=
lines
[
index
]
if
not
line
.
strip
()
and
index
==
len
(
lines
)
-
1
:
break
newline
=
"
\r
\n
"
if
line
.
endswith
(
'
\r
'
)
else
'
\n
'
line
=
line
.
strip
(
'
\r
'
)
match
=
re
.
search
(
r"\A(%s) (.+) HTTP/[\d.]+\Z"
%
"|"
.
join
(
getPublicTypeMembers
(
HTTPMETHOD
,
True
)),
line
)
if
not
method
else
None
if
len
(
line
.
strip
())
==
0
and
method
and
method
!=
HTTPMETHOD
.
GET
and
data
is
None
:
data
=
""
params
=
True
elif
match
:
method
=
match
.
group
(
1
)
url
=
match
.
group
(
2
)
if
any
(
_
in
line
for
_
in
(
'?'
,
'='
,
CUSTOM_INJECTION_MARK_CHAR
)):
params
=
True
getPostReq
=
True
# POST parameters
elif
data
is
not
None
and
params
:
data
+=
"%s%s"
%
(
line
,
newline
)
# GET parameters
elif
"?"
in
line
and
"="
in
line
and
": "
not
in
line
:
params
=
True
# Headers
elif
re
.
search
(
r"\A\S+:"
,
line
):
key
,
value
=
line
.
split
(
":"
,
1
)
value
=
value
.
strip
().
replace
(
"
\r
"
,
""
).
replace
(
"
\n
"
,
""
)
# Cookie and Host headers
if
key
.
upper
()
==
HTTP_HEADER
.
COOKIE
.
upper
():
cookie
=
value
elif
key
.
upper
()
==
HTTP_HEADER
.
HOST
.
upper
():
if
'://'
in
value
:
scheme
,
value
=
value
.
split
(
'://'
)[:
2
]
splitValue
=
value
.
split
(
":"
)
host
=
splitValue
[
0
]
if
len
(
splitValue
)
>
1
:
port
=
filterStringValue
(
splitValue
[
1
],
"[0-9]"
)
# Avoid to add a static content length header to
# headers and consider the following lines as
# POSTed data
if
key
.
upper
()
==
HTTP_HEADER
.
CONTENT_LENGTH
.
upper
():
params
=
True
# Avoid proxy and connection type related headers
elif
key
not
in
(
HTTP_HEADER
.
PROXY_CONNECTION
,
HTTP_HEADER
.
CONNECTION
):
headers
.
append
((
getUnicode
(
key
),
getUnicode
(
value
)))
if
CUSTOM_INJECTION_MARK_CHAR
in
re
.
sub
(
PROBLEMATIC_CUSTOM_INJECTION_PATTERNS
,
""
,
value
or
""
):
params
=
True
data
=
data
.
rstrip
(
"
\r
\n
"
)
if
data
else
data
if
getPostReq
and
(
params
or
cookie
):
if
not
port
and
isinstance
(
scheme
,
basestring
)
and
scheme
.
lower
()
==
"https"
:
port
=
"443"
elif
not
scheme
and
port
==
"443"
:
scheme
=
"https"
if
conf
.
forceSSL
:
scheme
=
"https"
port
=
port
or
"443"
if
not
host
:
errMsg
=
"invalid format of a request file"
raise
SqlmapSyntaxException
,
errMsg
if
not
url
.
startswith
(
"http"
):
url
=
"%s://%s:%s%s"
%
(
scheme
or
"http"
,
host
,
port
or
"80"
,
url
)
scheme
=
None
port
=
None
if
not
(
conf
.
scope
and
not
re
.
search
(
conf
.
scope
,
url
,
re
.
I
)):
if
not
kb
.
targets
or
url
not
in
addedTargetUrls
:
kb
.
targets
.
add
((
url
,
method
,
data
,
cookie
,
tuple
(
headers
)))
addedTargetUrls
.
add
(
url
)
checkFile
(
reqFile
)
try
:
with
openFile
(
reqFile
,
"rb"
)
as
f
:
content
=
f
.
read
()
except
(
IOError
,
OSError
,
MemoryError
),
ex
:
errMsg
=
"something went wrong while trying "
errMsg
+=
"to read the content of file '%s' ('%s')"
%
(
reqFile
,
ex
)
raise
SqlmapSystemException
(
errMsg
)
if
conf
.
scope
:
logger
.
info
(
"using regular expression '%s' for filtering targets"
%
conf
.
scope
)
_parseBurpLog
(
content
)
_parseWebScarabLog
(
content
)
if
not
addedTargetUrls
:
errMsg
=
"unable to find usable request(s) "
errMsg
+=
"in provided file ('%s')"
%
reqFile
raise
SqlmapGenericException
(
errMsg
)
def
_loadQueries
():
"""
Loads queries from 'xml/queries.xml' file.
"""
def
iterate
(
node
,
retVal
=
None
):
class
DictObject
(
object
):
def
__init__
(
self
):
self
.
__dict__
=
{}
def
__contains__
(
self
,
name
):
return
name
in
self
.
__dict__
if
retVal
is
None
:
retVal
=
DictObject
()
for
child
in
node
.
findall
(
"*"
):
instance
=
DictObject
()
retVal
.
__dict__
[
child
.
tag
]
=
instance
if
child
.
attrib
:
instance
.
__dict__
.
update
(
child
.
attrib
)
else
:
iterate
(
child
,
instance
)
return
retVal
tree
=
ElementTree
()
try
:
tree
.
parse
(
paths
.
QUERIES_XML
)
except
Exception
,
ex
:
errMsg
=
"something seems to be wrong with "
errMsg
+=
"the file '%s' ('%s'). Please make "
%
(
paths
.
QUERIES_XML
,
ex
)
errMsg
+=
"sure that you haven't made any changes to it"
raise
SqlmapInstallationException
,
errMsg
for
node
in
tree
.
findall
(
"*"
):
queries
[
node
.
attrib
[
'value'
]]
=
iterate
(
node
)
def
_setMultipleTargets
():
"""
Define a configuration parameter if we are running in multiple target
mode.
"""
initialTargetsCount
=
len
(
kb
.
targets
)
addedTargetUrls
=
set
()
if
not
conf
.
logFile
:
return
debugMsg
=
"parsing targets list from '%s'"
%
conf
.
logFile
logger
.
debug
(
debugMsg
)
if
not
os
.
path
.
exists
(
conf
.
logFile
):
errMsg
=
"the specified list of targets does not exist"
raise
SqlmapFilePathException
(
errMsg
)
if
os
.
path
.
isfile
(
conf
.
logFile
):
_feedTargetsDict
(
conf
.
logFile
,
addedTargetUrls
)
elif
os
.
path
.
isdir
(
conf
.
logFile
):
files
=
os
.
listdir
(
conf
.
logFile
)
files
.
sort
()
for
reqFile
in
files
:
if
not
re
.
search
(
"([\d]+)\-request"
,
reqFile
):
continue
_feedTargetsDict
(
os
.
path
.
join
(
conf
.
logFile
,
reqFile
),
addedTargetUrls
)
else
:
errMsg
=
"the specified list of targets is not a file "
errMsg
+=
"nor a directory"
raise
SqlmapFilePathException
(
errMsg
)
updatedTargetsCount
=
len
(
kb
.
targets
)
if
updatedTargetsCount
>
initialTargetsCount
:
infoMsg
=
"sqlmap parsed %d "
%
(
updatedTargetsCount
-
initialTargetsCount
)
infoMsg
+=
"(parameter unique) requests from the "
infoMsg
+=
"targets list ready to be tested"
logger
.
info
(
infoMsg
)
def
_adjustLoggingFormatter
():
"""
Solves problem of line deletition caused by overlapping logging messages
and retrieved data info in inference mode
"""
if
hasattr
(
FORMATTER
,
'_format'
):
return
def
format
(
record
):
message
=
FORMATTER
.
_format
(
record
)
message
=
boldifyMessage
(
message
)
if
kb
.
get
(
"prependFlag"
):
message
=
"
\n
%s"
%
message
kb
.
prependFlag
=
False
return
message
FORMATTER
.
_format
=
FORMATTER
.
format
FORMATTER
.
format
=
format
def
_setRequestFromFile
():
"""
This function checks if the way to make a HTTP request is through supplied
textual file, parses it and saves the information into the knowledge base.
"""
if
not
conf
.
requestFile
:
return
addedTargetUrls
=
set
()
conf
.
requestFile
=
safeExpandUser
(
conf
.
requestFile
)
infoMsg
=
"parsing HTTP request from '%s'"
%
conf
.
requestFile
logger
.
info
(
infoMsg
)
if
not
os
.
path
.
isfile
(
conf
.
requestFile
):
errMsg
=
"the specified HTTP request file "
errMsg
+=
"does not exist"
raise
SqlmapFilePathException
(
errMsg
)
_feedTargetsDict
(
conf
.
requestFile
,
addedTargetUrls
)
def
_setCrawler
():
if
not
conf
.
crawlDepth
:
return
if
not
any
((
conf
.
bulkFile
,
conf
.
sitemapUrl
)):
crawl
(
conf
.
url
)
else
:
if
conf
.
bulkFile
:
targets
=
getFileItems
(
conf
.
bulkFile
)
else
:
targets
=
parseSitemap
(
conf
.
sitemapUrl
)
for
i
in
xrange
(
len
(
targets
)):
try
:
target
=
targets
[
i
]
crawl
(
target
)
if
conf
.
verbose
in
(
1
,
2
):
status
=
"%d/%d links visited (%d%%)"
%
(
i
+
1
,
len
(
targets
),
round
(
100.0
*
(
i
+
1
)
/
len
(
targets
)))
dataToStdout
(
"
\r
[%s] [INFO] %s"
%
(
time
.
strftime
(
"%X"
),
status
),
True
)
except
Exception
,
ex
:
errMsg
=
"problem occurred while crawling at '%s' ('%s')"
%
(
target
,
ex
)
logger
.
error
(
errMsg
)
def
_doSearch
():
"""
This function performs search dorking, parses results
and saves the testable hosts into the knowledge base.
"""
if
not
conf
.
googleDork
:
return
kb
.
data
.
onlyGETs
=
None
def
retrieve
():
links
=
search
(
conf
.
googleDork
)
if
not
links
:
errMsg
=
"unable to find results for your "
errMsg
+=
"search dork expression"
raise
SqlmapGenericException
(
errMsg
)
for
link
in
links
:
link
=
urldecode
(
link
)
if
re
.
search
(
r"(.*?)\?(.+)"
,
link
):
kb
.
targets
.
add
((
link
,
conf
.
method
,
conf
.
data
,
conf
.
cookie
,
None
))
elif
re
.
search
(
URI_INJECTABLE_REGEX
,
link
,
re
.
I
):
if
kb
.
data
.
onlyGETs
is
None
and
conf
.
data
is
None
and
not
conf
.
googleDork
:
message
=
"do you want to scan only results containing GET parameters? [Y/n] "
test
=
readInput
(
message
,
default
=
"Y"
)
kb
.
data
.
onlyGETs
=
test
.
lower
()
!=
'n'
if
not
kb
.
data
.
onlyGETs
or
conf
.
googleDork
:
kb
.
targets
.
add
((
link
,
conf
.
method
,
conf
.
data
,
conf
.
cookie
,
None
))
return
links
while
True
:
links
=
retrieve
()
if
kb
.
targets
:
infoMsg
=
"sqlmap got %d results for your "
%
len
(
links
)
infoMsg
+=
"search dork expression, "
if
len
(
links
)
==
len
(
kb
.
targets
):
infoMsg
+=
"all "
else
:
infoMsg
+=
"%d "
%
len
(
kb
.
targets
)
infoMsg
+=
"of them are testable targets"
logger
.
info
(
infoMsg
)
break
else
:
message
=
"sqlmap got %d results "
%
len
(
links
)
message
+=
"for your search dork expression, but none of them "
message
+=
"have GET parameters to test for SQL injection. "
message
+=
"Do you want to skip to the next result page? [Y/n]"
test
=
readInput
(
message
,
default
=
"Y"
)
if
test
[
0
]
in
(
"n"
,
"N"
):
raise
SqlmapSilentQuitException
else
:
conf
.
googlePage
+=
1
def
_setBulkMultipleTargets
():
if
not
conf
.
bulkFile
:
return
conf
.
bulkFile
=
safeExpandUser
(
conf
.
bulkFile
)
infoMsg
=
"parsing multiple targets list from '%s'"
%
conf
.
bulkFile
logger
.
info
(
infoMsg
)
if
not
os
.
path
.
isfile
(
conf
.
bulkFile
):
errMsg
=
"the specified bulk file "
errMsg
+=
"does not exist"
raise
SqlmapFilePathException
(
errMsg
)
found
=
False
for
line
in
getFileItems
(
conf
.
bulkFile
):
if
re
.
match
(
r"[^ ]+\?(.+)"
,
line
,
re
.
I
)
or
CUSTOM_INJECTION_MARK_CHAR
in
line
:
found
=
True
kb
.
targets
.
add
((
line
.
strip
(),
conf
.
method
,
conf
.
data
,
conf
.
cookie
,
None
))
if
not
found
and
not
conf
.
forms
and
not
conf
.
crawlDepth
:
warnMsg
=
"no usable links found (with GET parameters)"
logger
.
warn
(
warnMsg
)
def
_setSitemapTargets
():
if
not
conf
.
sitemapUrl
:
return
infoMsg
=
"parsing sitemap '%s'"
%
conf
.
sitemapUrl
logger
.
info
(
infoMsg
)
found
=
False
for
item
in
parseSitemap
(
conf
.
sitemapUrl
):
if
re
.
match
(
r"[^ ]+\?(.+)"
,
item
,
re
.
I
):
found
=
True
kb
.
targets
.
add
((
item
.
strip
(),
None
,
None
,
None
,
None
))
if
not
found
and
not
conf
.
forms
and
not
conf
.
crawlDepth
:
warnMsg
=
"no usable links found (with GET parameters)"
logger
.
warn
(
warnMsg
)
def
_findPageForms
():
if
not
conf
.
forms
or
conf
.
crawlDepth
:
return
if
conf
.
url
and
not
checkConnection
():
return
infoMsg
=
"searching for forms"
logger
.
info
(
infoMsg
)
if
not
any
((
conf
.
bulkFile
,
conf
.
googleDork
,
conf
.
sitemapUrl
)):
page
,
_
=
Request
.
queryPage
(
content
=
True
)
findPageForms
(
page
,
conf
.
url
,
True
,
True
)
else
:
if
conf
.
bulkFile
:
targets
=
getFileItems
(
conf
.
bulkFile
)
elif
conf
.
sitemapUrl
:
targets
=
parseSitemap
(
conf
.
sitemapUrl
)
elif
conf
.
googleDork
:
targets
=
[
_
[
0
]
for
_
in
kb
.
targets
]
kb
.
targets
.
clear
()
for
i
in
xrange
(
len
(
targets
)):
try
:
target
=
targets
[
i
]
page
,
_
,
_
=
Request
.
getPage
(
url
=
target
.
strip
(),
crawling
=
True
,
raise404
=
False
)
findPageForms
(
page
,
target
,
False
,
True
)
if
conf
.
verbose
in
(
1
,
2
):
status
=
'%d/%d links visited (%d%%)'
%
(
i
+
1
,
len
(
targets
),
round
(
100.0
*
(
i
+
1
)
/
len
(
targets
)))
dataToStdout
(
"
\r
[%s] [INFO] %s"
%
(
time
.
strftime
(
"%X"
),
status
),
True
)
except
KeyboardInterrupt
:
break
except
Exception
,
ex
:
errMsg
=
"problem occurred while searching for forms at '%s' ('%s')"
%
(
target
,
ex
)
logger
.
error
(
errMsg
)
def
_setDBMSAuthentication
():
"""
Check and set the DBMS authentication credentials to run statements as
another user, not the session user
"""
if
not
conf
.
dbmsCred
:
return
debugMsg
=
"setting the DBMS authentication credentials"
logger
.
debug
(
debugMsg
)
match
=
re
.
search
(
"^(.+?):(.*?)$"
,
conf
.
dbmsCred
)
if
not
match
:
errMsg
=
"DBMS authentication credentials value must be in format "
errMsg
+=
"username:password"
raise
SqlmapSyntaxException
(
errMsg
)
conf
.
dbmsUsername
=
match
.
group
(
1
)
conf
.
dbmsPassword
=
match
.
group
(
2
)
def
_setMetasploit
():
if
not
conf
.
osPwn
and
not
conf
.
osSmb
and
not
conf
.
osBof
:
return
debugMsg
=
"setting the takeover out-of-band functionality"
logger
.
debug
(
debugMsg
)
msfEnvPathExists
=
False
if
IS_WIN
:
try
:
import
win32file
except
ImportError
:
errMsg
=
"sqlmap requires third-party module 'pywin32' "
errMsg
+=
"in order to use Metasploit functionalities on "
errMsg
+=
"Windows. You can download it from "
errMsg
+=
"'http://sourceforge.net/projects/pywin32/files/pywin32/'"
raise
SqlmapMissingDependence
(
errMsg
)
if
not
conf
.
msfPath
:
def
_
(
key
,
value
):
retVal
=
None
try
:
from
_winreg
import
ConnectRegistry
,
OpenKey
,
QueryValueEx
,
HKEY_LOCAL_MACHINE
_
=
ConnectRegistry
(
None
,
HKEY_LOCAL_MACHINE
)
_
=
OpenKey
(
_
,
key
)
retVal
=
QueryValueEx
(
_
,
value
)[
0
]
except
:
logger
.
debug
(
"unable to identify Metasploit installation path via registry key"
)
return
retVal
conf
.
msfPath
=
_
(
r"SOFTWARE\Rapid7\Metasploit"
,
"Location"
)
if
conf
.
msfPath
:
conf
.
msfPath
=
os
.
path
.
join
(
conf
.
msfPath
,
"msf3"
)
if
conf
.
osSmb
:
isAdmin
=
runningAsAdmin
()
if
not
isAdmin
:
errMsg
=
"you need to run sqlmap as an administrator "
errMsg
+=
"if you want to perform a SMB relay attack because "
errMsg
+=
"it will need to listen on a user-specified SMB "
errMsg
+=
"TCP port for incoming connection attempts"
raise
SqlmapMissingPrivileges
(
errMsg
)
if
conf
.
msfPath
:
for
path
in
(
conf
.
msfPath
,
os
.
path
.
join
(
conf
.
msfPath
,
"bin"
)):
if
any
(
os
.
path
.
exists
(
normalizePath
(
os
.
path
.
join
(
path
,
_
)))
for
_
in
(
"msfcli"
,
"msfconsole"
)):
msfEnvPathExists
=
True
if
all
(
os
.
path
.
exists
(
normalizePath
(
os
.
path
.
join
(
path
,
_
)))
for
_
in
(
"msfvenom"
,)):
kb
.
oldMsf
=
False
elif
all
(
os
.
path
.
exists
(
normalizePath
(
os
.
path
.
join
(
path
,
_
)))
for
_
in
(
"msfencode"
,
"msfpayload"
)):
kb
.
oldMsf
=
True
else
:
msfEnvPathExists
=
False
conf
.
msfPath
=
path
break
if
msfEnvPathExists
:
debugMsg
=
"provided Metasploit Framework path "
debugMsg
+=
"'%s' is valid"
%
conf
.
msfPath
logger
.
debug
(
debugMsg
)
else
:
warnMsg
=
"the provided Metasploit Framework path "
warnMsg
+=
"'%s' is not valid. The cause could "
%
conf
.
msfPath
warnMsg
+=
"be that the path does not exists or that one "
warnMsg
+=
"or more of the needed Metasploit executables "
warnMsg
+=
"within msfcli, msfconsole, msfencode and "
warnMsg
+=
"msfpayload do not exist"
logger
.
warn
(
warnMsg
)
else
:
warnMsg
=
"you did not provide the local path where Metasploit "
warnMsg
+=
"Framework is installed"
logger
.
warn
(
warnMsg
)
if
not
msfEnvPathExists
:
warnMsg
=
"sqlmap is going to look for Metasploit Framework "
warnMsg
+=
"installation inside the environment path(s)"
logger
.
warn
(
warnMsg
)
envPaths
=
os
.
environ
.
get
(
"PATH"
,
""
).
split
(
";"
if
IS_WIN
else
":"
)
for
envPath
in
envPaths
:
envPath
=
envPath
.
replace
(
";"
,
""
)
if
any
(
os
.
path
.
exists
(
normalizePath
(
os
.
path
.
join
(
envPath
,
_
)))
for
_
in
(
"msfcli"
,
"msfconsole"
)):
msfEnvPathExists
=
True
if
all
(
os
.
path
.
exists
(
normalizePath
(
os
.
path
.
join
(
envPath
,
_
)))
for
_
in
(
"msfvenom"
,)):
kb
.
oldMsf
=
False
elif
all
(
os
.
path
.
exists
(
normalizePath
(
os
.
path
.
join
(
envPath
,
_
)))
for
_
in
(
"msfencode"
,
"msfpayload"
)):
kb
.
oldMsf
=
True
else
:
msfEnvPathExists
=
False
if
msfEnvPathExists
:
infoMsg
=
"Metasploit Framework has been found "
infoMsg
+=
"installed in the '%s' path"
%
envPath
logger
.
info
(
infoMsg
)
conf
.
msfPath
=
envPath
break
if
not
msfEnvPathExists
:
errMsg
=
"unable to locate Metasploit Framework installation. "
errMsg
+=
"You can get it at 'http://www.metasploit.com/download/'"
raise
SqlmapFilePathException
(
errMsg
)
def
_setWriteFile
():
if
not
conf
.
wFile
:
return
debugMsg
=
"setting the write file functionality"
logger
.
debug
(
debugMsg
)
if
not
os
.
path
.
exists
(
conf
.
wFile
):
errMsg
=
"the provided local file '%s' does not exist"
%
conf
.
wFile
raise
SqlmapFilePathException
(
errMsg
)
if
not
conf
.
dFile
:
errMsg
=
"you did not provide the back-end DBMS absolute path "
errMsg
+=
"where you want to write the local file '%s'"
%
conf
.
wFile
raise
SqlmapMissingMandatoryOptionException
(
errMsg
)
conf
.
wFileType
=
getFileType
(
conf
.
wFile
)
def
_setOS
():
"""
Force the back-end DBMS operating system option.
"""
if
not
conf
.
os
:
return
if
conf
.
os
.
lower
()
not
in
SUPPORTED_OS
:
errMsg
=
"you provided an unsupported back-end DBMS operating "
errMsg
+=
"system. The supported DBMS operating systems for OS "
errMsg
+=
"and file system access are %s. "
%
', '
.
join
([
o
.
capitalize
()
for
o
in
SUPPORTED_OS
])
errMsg
+=
"If you do not know the back-end DBMS underlying OS, "
errMsg
+=
"do not provide it and sqlmap will fingerprint it for "
errMsg
+=
"you."
raise
SqlmapUnsupportedDBMSException
(
errMsg
)
debugMsg
=
"forcing back-end DBMS operating system to user defined "
debugMsg
+=
"value '%s'"
%
conf
.
os
logger
.
debug
(
debugMsg
)
Backend
.
setOs
(
conf
.
os
)
def
_setTechnique
():
validTechniques
=
sorted
(
getPublicTypeMembers
(
PAYLOAD
.
TECHNIQUE
),
key
=
lambda
x
:
x
[
1
])
validLetters
=
[
_
[
0
][
0
].
upper
()
for
_
in
validTechniques
]
if
conf
.
tech
and
isinstance
(
conf
.
tech
,
basestring
):
_
=
[]
for
letter
in
conf
.
tech
.
upper
():
if
letter
not
in
validLetters
:
errMsg
=
"value for --technique must be a string composed "
errMsg
+=
"by the letters %s. Refer to the "
%
", "
.
join
(
validLetters
)
errMsg
+=
"user's manual for details"
raise
SqlmapSyntaxException
(
errMsg
)
for
validTech
,
validInt
in
validTechniques
:
if
letter
==
validTech
[
0
]:
_
.
append
(
validInt
)
break
conf
.
tech
=
_
def
_setDBMS
():
"""
Force the back-end DBMS option.
"""
if
not
conf
.
dbms
:
return
debugMsg
=
"forcing back-end DBMS to user defined value"
logger
.
debug
(
debugMsg
)
conf
.
dbms
=
conf
.
dbms
.
lower
()
regex
=
re
.
search
(
"%s ([\d\.]+)"
%
(
"(%s)"
%
"|"
.
join
([
alias
for
alias
in
SUPPORTED_DBMS
])),
conf
.
dbms
,
re
.
I
)
if
regex
:
conf
.
dbms
=
regex
.
group
(
1
)
Backend
.
setVersion
(
regex
.
group
(
2
))
if
conf
.
dbms
not
in
SUPPORTED_DBMS
:
errMsg
=
"you provided an unsupported back-end database management "
errMsg
+=
"system. Supported DBMSes are as follows: %s. "
%
', '
.
join
(
sorted
(
_
for
_
in
DBMS_DICT
))
errMsg
+=
"If you do not know the back-end DBMS, do not provide "
errMsg
+=
"it and sqlmap will fingerprint it for you."
raise
SqlmapUnsupportedDBMSException
(
errMsg
)
for
dbms
,
aliases
in
DBMS_ALIASES
:
if
conf
.
dbms
in
aliases
:
conf
.
dbms
=
dbms
break
def
_setTamperingFunctions
():
"""
Loads tampering functions from given script(s)
"""
if
conf
.
tamper
:
last_priority
=
PRIORITY
.
HIGHEST
check_priority
=
True
resolve_priorities
=
False
priorities
=
[]
for
tfile
in
re
.
split
(
PARAMETER_SPLITTING_REGEX
,
conf
.
tamper
):
found
=
False
tfile
=
tfile
.
strip
()
if
not
tfile
:
continue
elif
os
.
path
.
exists
(
os
.
path
.
join
(
paths
.
SQLMAP_TAMPER_PATH
,
tfile
if
tfile
.
endswith
(
'.py'
)
else
"%s.py"
%
tfile
)):
tfile
=
os
.
path
.
join
(
paths
.
SQLMAP_TAMPER_PATH
,
tfile
if
tfile
.
endswith
(
'.py'
)
else
"%s.py"
%
tfile
)
elif
not
os
.
path
.
exists
(
tfile
):
errMsg
=
"tamper script '%s' does not exist"
%
tfile
raise
SqlmapFilePathException
(
errMsg
)
elif
not
tfile
.
endswith
(
'.py'
):
errMsg
=
"tamper script '%s' should have an extension '.py'"
%
tfile
raise
SqlmapSyntaxException
(
errMsg
)
dirname
,
filename
=
os
.
path
.
split
(
tfile
)
dirname
=
os
.
path
.
abspath
(
dirname
)
infoMsg
=
"loading tamper script '%s'"
%
filename
[:
-
3
]
logger
.
info
(
infoMsg
)
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
dirname
,
'__init__.py'
)):
errMsg
=
"make sure that there is an empty file '__init__.py' "
errMsg
+=
"inside of tamper scripts directory '%s'"
%
dirname
raise
SqlmapGenericException
(
errMsg
)
if
dirname
not
in
sys
.
path
:
sys
.
path
.
insert
(
0
,
dirname
)
try
:
module
=
__import__
(
filename
[:
-
3
].
encode
(
sys
.
getfilesystemencoding
()))
except
(
ImportError
,
SyntaxError
),
msg
:
raise
SqlmapSyntaxException
(
"cannot import tamper script '%s' (%s)"
%
(
filename
[:
-
3
],
msg
))
priority
=
PRIORITY
.
NORMAL
if
not
hasattr
(
module
,
'__priority__'
)
else
module
.
__priority__
for
name
,
function
in
inspect
.
getmembers
(
module
,
inspect
.
isfunction
):
if
name
==
"tamper"
and
inspect
.
getargspec
(
function
).
args
and
inspect
.
getargspec
(
function
).
keywords
==
"kwargs"
:
found
=
True
kb
.
tamperFunctions
.
append
(
function
)
function
.
func_name
=
module
.
__name__
if
check_priority
and
priority
>
last_priority
:
message
=
"it seems that you might have mixed "
message
+=
"the order of tamper scripts. "
message
+=
"Do you want to auto resolve this? [Y/n/q] "
test
=
readInput
(
message
,
default
=
"Y"
)
if
not
test
or
test
[
0
]
in
(
"y"
,
"Y"
):
resolve_priorities
=
True
elif
test
[
0
]
in
(
"n"
,
"N"
):
resolve_priorities
=
False
elif
test
[
0
]
in
(
"q"
,
"Q"
):
raise
SqlmapUserQuitException
check_priority
=
False
priorities
.
append
((
priority
,
function
))
last_priority
=
priority
break
elif
name
==
"dependencies"
:
function
()
if
not
found
:
errMsg
=
"missing function 'tamper(payload, **kwargs)' "
errMsg
+=
"in tamper script '%s'"
%
tfile
raise
SqlmapGenericException
(
errMsg
)
if
kb
.
tamperFunctions
and
len
(
kb
.
tamperFunctions
)
>
3
:
warnMsg
=
"using too many tamper scripts is usually not "
warnMsg
+=
"a good idea"
logger
.
warning
(
warnMsg
)
if
resolve_priorities
and
priorities
:
priorities
.
sort
(
reverse
=
True
)
kb
.
tamperFunctions
=
[]
for
_
,
function
in
priorities
:
kb
.
tamperFunctions
.
append
(
function
)
def
_setWafFunctions
():
"""
Loads WAF/IDS/IPS detecting functions from script(s)
"""
if
conf
.
identifyWaf
:
for
found
in
glob
.
glob
(
os
.
path
.
join
(
paths
.
SQLMAP_WAF_PATH
,
"*.py"
)):
dirname
,
filename
=
os
.
path
.
split
(
found
)
dirname
=
os
.
path
.
abspath
(
dirname
)
if
filename
==
"__init__.py"
:
continue
debugMsg
=
"loading WAF script '%s'"
%
filename
[:
-
3
]
logger
.
debug
(
debugMsg
)
if
dirname
not
in
sys
.
path
:
sys
.
path
.
insert
(
0
,
dirname
)
try
:
if
filename
[:
-
3
]
in
sys
.
modules
:
del
sys
.
modules
[
filename
[:
-
3
]]
module
=
__import__
(
filename
[:
-
3
])
except
ImportError
,
msg
:
raise
SqlmapSyntaxException
(
"cannot import WAF script '%s' (%s)"
%
(
filename
[:
-
3
],
msg
))
_
=
dict
(
inspect
.
getmembers
(
module
))
if
"detect"
not
in
_
:
errMsg
=
"missing function 'detect(get_page)' "
errMsg
+=
"in WAF script '%s'"
%
found
raise
SqlmapGenericException
(
errMsg
)
else
:
kb
.
wafFunctions
.
append
((
_
[
"detect"
],
_
.
get
(
"__product__"
,
filename
[:
-
3
])))
View remainder of file in raw view
Back
|
FazBrowse Home
|
New Git URL