@@ -1340,44 +1340,6 @@ def checkStability():
1340
1340
1341
1341
return kb .pageStable
1342
1342
1343
- def checkString ():
1344
- if not conf .string :
1345
- return True
1346
-
1347
- infoMsg = "testing if the provided string is within the "
1348
- infoMsg += "target URL page content"
1349
- logger .info (infoMsg )
1350
-
1351
- page , headers , _ = Request .queryPage (content = True )
1352
- rawResponse = "%s%s" % (listToStrValue (headers .headers if headers else "" ), page )
1353
-
1354
- if conf .string not in rawResponse :
1355
- warnMsg = "you provided '%s' as the string to " % conf .string
1356
- warnMsg += "match, but such a string is not within the target "
1357
- warnMsg += "URL raw response, sqlmap will carry on anyway"
1358
- logger .warn (warnMsg )
1359
-
1360
- return True
1361
-
1362
- def checkRegexp ():
1363
- if not conf .regexp :
1364
- return True
1365
-
1366
- infoMsg = "testing if the provided regular expression matches within "
1367
- infoMsg += "the target URL page content"
1368
- logger .info (infoMsg )
1369
-
1370
- page , headers , _ = Request .queryPage (content = True )
1371
- rawResponse = "%s%s" % (listToStrValue (headers .headers if headers else "" ), page )
1372
-
1373
- if not re .search (conf .regexp , rawResponse , re .I | re .M ):
1374
- warnMsg = "you provided '%s' as the regular expression " % conf .regexp
1375
- warnMsg += "which does not have any match within the target URL raw response. sqlmap "
1376
- warnMsg += "will carry on anyway"
1377
- logger .warn (warnMsg )
1378
-
1379
- return True
1380
-
1381
1343
@stackedmethod
1382
1344
def checkWaf ():
1383
1345
"""
@@ -1542,7 +1504,31 @@ def checkConnection(suppressOutput=False):
1542
1504
1543
1505
try :
1544
1506
kb .originalPageTime = time .time ()
1545
- Request .queryPage (content = True , noteResponseTime = False )
1507
+ page , headers , _ = Request .queryPage (content = True , noteResponseTime = False )
1508
+
1509
+ rawResponse = "%s%s" % (listToStrValue (headers .headers if headers else "" ), page )
1510
+
1511
+ if conf .string :
1512
+ infoMsg = "testing if the provided string is within the "
1513
+ infoMsg += "target URL page content"
1514
+ logger .info (infoMsg )
1515
+
1516
+ if conf .string not in rawResponse :
1517
+ warnMsg = "you provided '%s' as the string to " % conf .string
1518
+ warnMsg += "match, but such a string is not within the target "
1519
+ warnMsg += "URL raw response, sqlmap will carry on anyway"
1520
+ logger .warn (warnMsg )
1521
+
1522
+ if conf .regexp :
1523
+ infoMsg = "testing if the provided regular expression matches within "
1524
+ infoMsg += "the target URL page content"
1525
+ logger .info (infoMsg )
1526
+
1527
+ if not re .search (conf .regexp , rawResponse , re .I | re .M ):
1528
+ warnMsg = "you provided '%s' as the regular expression " % conf .regexp
1529
+ warnMsg += "which does not have any match within the target URL raw response. sqlmap "
1530
+ warnMsg += "will carry on anyway"
1531
+ logger .warn (warnMsg )
1546
1532
1547
1533
kb .errorIsNone = False
1548
1534
0 commit comments