@@ -52,23 +52,23 @@ def checkSqlInjection(place, parameter, value, parenthesis):
5252 randInt = randomInt ()
5353 randStr = randomStr ()
5454 prefix = ""
55- postfix = ""
55+ suffix = ""
5656 retVal = None
5757
58- if conf .prefix or conf .postfix :
58+ if conf .prefix or conf .suffix :
5959 if conf .prefix :
6060 prefix = conf .prefix
6161
62- if conf .postfix :
63- postfix = conf .postfix
62+ if conf .suffix :
63+ suffix = conf .suffix
6464
6565 for case in kb .injections .root .case :
6666 conf .matchRatio = None
6767
6868 positive = case .test .positive
6969 negative = case .test .negative
7070
71- if not prefix and not postfix and case .name == "custom" :
71+ if not prefix and not suffix and case .name == "custom" :
7272 continue
7373
7474 infoMsg = "testing %s (%s) injection " % (case .desc , logic )
@@ -116,16 +116,16 @@ def heuristicCheckSqlInjection(place, parameter, value):
116116 return
117117
118118 prefix = ""
119- postfix = ""
119+ suffix = ""
120120
121- if conf .prefix or conf .postfix :
121+ if conf .prefix or conf .suffix :
122122 if conf .prefix :
123123 prefix = conf .prefix
124124
125- if conf .postfix :
126- postfix = conf .postfix
125+ if conf .suffix :
126+ suffix = conf .suffix
127127
128- payload = "%s%s%s%s" % (value , prefix , randomStr (length = 10 , alphabet = ['"' , '\' ' , ')' , '(' ]), postfix )
128+ payload = "%s%s%s%s" % (value , prefix , randomStr (length = 10 , alphabet = ['"' , '\' ' , ')' , '(' ]), suffix )
129129 payload = agent .payload (place , parameter , value , payload )
130130 Request .queryPage (payload , place , raise404 = False )
131131 result = wasLastRequestDBMSError ()
@@ -209,30 +209,30 @@ def checkDynamicContent(firstPage, secondPage):
209209
210210 for i in xrange (len (blocks ) - 1 ):
211211 prefix = firstPage [blocks [i ][0 ]:blocks [i ][0 ] + blocks [i ][2 ]] if blocks [i ] else None
212- postfix = firstPage [blocks [i + 1 ][0 ]:blocks [i + 1 ][0 ] + blocks [i + 1 ][2 ]] if blocks [i + 1 ] else None
212+ suffix = firstPage [blocks [i + 1 ][0 ]:blocks [i + 1 ][0 ] + blocks [i + 1 ][2 ]] if blocks [i + 1 ] else None
213213
214214 if prefix is None and blocks [i + 1 ][0 ] == 0 :
215215 continue
216216
217- if postfix is None and (blocks [i ][0 ] + blocks [i ][2 ] >= len (firstPage )):
217+ if suffix is None and (blocks [i ][0 ] + blocks [i ][2 ] >= len (firstPage )):
218218 continue
219219
220- kb .dynamicMarkings .append ((re .escape (prefix [- conf .dynMarkLength :]) if prefix else None , re .escape (postfix [:conf .dynMarkLength ]) if postfix else None ))
220+ kb .dynamicMarkings .append ((re .escape (prefix [- conf .dynMarkLength :]) if prefix else None , re .escape (suffix [:conf .dynMarkLength ]) if suffix else None ))
221221
222222 if len (kb .dynamicMarkings ) > 0 :
223223 infoMsg = "dynamic content marked for removal (%d region%s)" % (len (kb .dynamicMarkings ), 's' if len (kb .dynamicMarkings ) > 1 else '' )
224224 logger .info (infoMsg )
225225
226226 if conf .seqMatcher .a :
227227 for item in kb .dynamicMarkings :
228- prefix , postfix = item
228+ prefix , suffix = item
229229
230230 if prefix is None :
231- conf .seqMatcher .a = re .sub ('(?s)^.+%s' % postfix , postfix , conf .seqMatcher .a )
232- elif postfix is None :
231+ conf .seqMatcher .a = re .sub ('(?s)^.+%s' % suffix , suffix , conf .seqMatcher .a )
232+ elif suffix is None :
233233 conf .seqMatcher .a = re .sub ('(?s)%s.+$' % prefix , prefix , conf .seqMatcher .a )
234234 else :
235- conf .seqMatcher .a = re .sub ('(?s)%s.+%s' % (prefix , postfix ), '%s%s' % (prefix , postfix ), conf .seqMatcher .a )
235+ conf .seqMatcher .a = re .sub ('(?s)%s.+%s' % (prefix , suffix ), '%s%s' % (prefix , suffix ), conf .seqMatcher .a )
236236
237237def checkStability ():
238238 """
@@ -347,14 +347,14 @@ def checkString():
347347
348348 if conf .string in page :
349349 setString ()
350- return True
351350 else :
352- errMsg = "you provided '%s' as the string to " % conf .string
353- errMsg += "match, but such a string is not within the target "
354- errMsg += "URL page content, please provide another string."
355- logger .error (errMsg )
351+ warnMsg = "you provided '%s' as the string to " % conf .string
352+ warnMsg += "match, but such a string is not within the target "
353+ warnMsg += "URL page content original request, sqlmap will "
354+ warnMsg += "keep going anyway"
355+ logger .warn (warnMsg )
356356
357- return False
357+ return True
358358
359359def checkRegexp ():
360360 if not conf .regexp :
@@ -377,15 +377,14 @@ def checkRegexp():
377377
378378 if re .search (conf .regexp , page , re .I | re .M ):
379379 setRegexp ()
380- return True
381380 else :
382- errMsg = "you provided '%s' as the regular expression to " % conf .regexp
383- errMsg += "match, but such a regular expression does not have any "
384- errMsg += "match within the target URL page content, please provide "
385- errMsg += "another regular expression. "
386- logger .error ( errMsg )
381+ warnMsg = "you provided '%s' as the regular expression to " % conf .regexp
382+ warnMsg += "match, but such a regular expression does not have any "
383+ warnMsg += "match within the target URL page content, sqlmap "
384+ warnMsg += "will keep going anyway "
385+ logger .warn ( warnMsg )
387386
388- return False
387+ return True
389388
390389def checkNullConnection ():
391390 """
0 commit comments