Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 495e7c8

Browse files
committed
Trivial update
1 parent b6fbca0 commit 495e7c8

34 files changed

Lines changed: 93 additions & 94 deletions

lib/controller/checks.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@
7878
from lib.core.settings import FI_ERROR_REGEX
7979
from lib.core.settings import FORMAT_EXCEPTION_STRINGS
8080
from lib.core.settings import HEURISTIC_CHECK_ALPHABET
81+
from lib.core.settings import INFERENCE_EQUALS_CHAR
8182
from lib.core.settings import IPS_WAF_CHECK_PAYLOAD
82-
from lib.core.settings import IDS_WAF_CHECK_RATIO
83-
from lib.core.settings import IDS_WAF_CHECK_TIMEOUT
83+
from lib.core.settings import IPS_WAF_CHECK_RATIO
84+
from lib.core.settings import IPS_WAF_CHECK_TIMEOUT
8485
from lib.core.settings import MAX_DIFFLIB_SEQUENCE_LENGTH
8586
from lib.core.settings import NON_SQLI_CHECK_PREFIX_SUFFIX_LENGTH
8687
from lib.core.settings import PRECONNECT_INCOMPATIBLE_SERVERS
@@ -89,9 +90,8 @@
8990
from lib.core.settings import SUHOSIN_MAX_VALUE_LENGTH
9091
from lib.core.settings import SUPPORTED_DBMS
9192
from lib.core.settings import UNICODE_ENCODING
92-
from lib.core.settings import URI_HTTP_HEADER
9393
from lib.core.settings import UPPER_RATIO_BOUND
94-
from lib.core.settings import INFERENCE_EQUALS_CHAR
94+
from lib.core.settings import URI_HTTP_HEADER
9595
from lib.core.threads import getCurrentThreadData
9696
from lib.request.connect import Connect as Request
9797
from lib.request.comparison import comparison
@@ -1381,10 +1381,10 @@ def checkWaf():
13811381

13821382
kb.redirectChoice = REDIRECTION.YES
13831383
kb.resendPostOnRedirect = False
1384-
conf.timeout = IDS_WAF_CHECK_TIMEOUT
1384+
conf.timeout = IPS_WAF_CHECK_TIMEOUT
13851385

13861386
try:
1387-
retVal = (Request.queryPage(place=place, value=value, getRatioValue=True, noteResponseTime=False, silent=True, raise404=False, disableTampering=True)[1] or 0) < IDS_WAF_CHECK_RATIO
1387+
retVal = (Request.queryPage(place=place, value=value, getRatioValue=True, noteResponseTime=False, silent=True, raise404=False, disableTampering=True)[1] or 0) < IPS_WAF_CHECK_RATIO
13881388
except SqlmapConnectionException:
13891389
retVal = True
13901390
finally:

lib/controller/controller.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
import time
1313

1414
from lib.controller.action import action
15-
from lib.controller.checks import checkSqlInjection
16-
from lib.controller.checks import checkDynParam
17-
from lib.controller.checks import checkStability
18-
from lib.controller.checks import checkString
19-
from lib.controller.checks import checkRegexp
2015
from lib.controller.checks import checkConnection
16+
from lib.controller.checks import checkDynParam
2117
from lib.controller.checks import checkInternet
2218
from lib.controller.checks import checkNullConnection
19+
from lib.controller.checks import checkRegexp
20+
from lib.controller.checks import checkSqlInjection
21+
from lib.controller.checks import checkStability
22+
from lib.controller.checks import checkString
2323
from lib.controller.checks import checkWaf
2424
from lib.controller.checks import heuristicCheckSqlInjection
2525
from lib.core.agent import agent
@@ -40,8 +40,8 @@
4040
from lib.core.common import removePostHintPrefix
4141
from lib.core.common import safeCSValue
4242
from lib.core.common import showHttpErrorCodes
43-
from lib.core.common import urlencode
4443
from lib.core.common import urldecode
44+
from lib.core.common import urlencode
4545
from lib.core.compat import xrange
4646
from lib.core.data import conf
4747
from lib.core.data import kb
@@ -61,16 +61,16 @@
6161
from lib.core.exception import SqlmapSilentQuitException
6262
from lib.core.exception import SqlmapSkipTargetException
6363
from lib.core.exception import SqlmapSystemException
64-
from lib.core.exception import SqlmapValueException
6564
from lib.core.exception import SqlmapUserQuitException
65+
from lib.core.exception import SqlmapValueException
6666
from lib.core.settings import ASP_NET_CONTROL_REGEX
6767
from lib.core.settings import CSRF_TOKEN_PARAMETER_INFIXES
6868
from lib.core.settings import DEFAULT_GET_POST_DELIMITER
6969
from lib.core.settings import EMPTY_FORM_FIELDS_REGEX
70-
from lib.core.settings import IGNORE_PARAMETERS
71-
from lib.core.settings import LOW_TEXT_PERCENT
7270
from lib.core.settings import GOOGLE_ANALYTICS_COOKIE_PREFIX
7371
from lib.core.settings import HOST_ALIASES
72+
from lib.core.settings import IGNORE_PARAMETERS
73+
from lib.core.settings import LOW_TEXT_PERCENT
7474
from lib.core.settings import REFERER_ALIASES
7575
from lib.core.settings import USER_AGENT_ALIASES
7676
from lib.core.target import initTargetEnv

lib/core/common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
from lib.core.dicts import OBSOLETE_OPTIONS
7474
from lib.core.dicts import SQL_STATEMENTS
7575
from lib.core.enums import ADJUST_TIME_DELAY
76-
from lib.core.enums import CONTENT_STATUS
7776
from lib.core.enums import CHARSET_TYPE
77+
from lib.core.enums import CONTENT_STATUS
7878
from lib.core.enums import DBMS
7979
from lib.core.enums import EXPECTED
8080
from lib.core.enums import HEURISTIC_TEST
@@ -92,9 +92,9 @@
9292
from lib.core.exception import SqlmapBaseException
9393
from lib.core.exception import SqlmapDataException
9494
from lib.core.exception import SqlmapGenericException
95-
from lib.core.exception import SqlmapNoneDataException
9695
from lib.core.exception import SqlmapInstallationException
9796
from lib.core.exception import SqlmapMissingDependence
97+
from lib.core.exception import SqlmapNoneDataException
9898
from lib.core.exception import SqlmapSilentQuitException
9999
from lib.core.exception import SqlmapSyntaxException
100100
from lib.core.exception import SqlmapSystemException
@@ -110,9 +110,9 @@
110110
from lib.core.settings import BRUTE_DOC_ROOT_TARGET_MARK
111111
from lib.core.settings import BURP_REQUEST_REGEX
112112
from lib.core.settings import BURP_XML_HISTORY_REGEX
113-
from lib.core.settings import DBMS_DIRECTORY_DICT
114113
from lib.core.settings import CRAWL_EXCLUDE_EXTENSIONS
115114
from lib.core.settings import CUSTOM_INJECTION_MARK_CHAR
115+
from lib.core.settings import DBMS_DIRECTORY_DICT
116116
from lib.core.settings import DEFAULT_COOKIE_DELIMITER
117117
from lib.core.settings import DEFAULT_GET_POST_DELIMITER
118118
from lib.core.settings import DEFAULT_MSSQL_SCHEMA

lib/core/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
import hashlib
1010
import threading
1111

12+
from lib.core.datatype import LRUDict
1213
from lib.core.settings import MAX_CACHE_ITEMS
1314
from lib.core.settings import UNICODE_ENCODING
14-
from lib.core.datatype import LRUDict
1515
from lib.core.threads import getCurrentThreadData
1616

1717
_lock = threading.Lock()

lib/core/dicts.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
from lib.core.enums import DBMS
1010
from lib.core.enums import OS
1111
from lib.core.enums import POST_HINT
12+
from lib.core.settings import ACCESS_ALIASES
1213
from lib.core.settings import BLANK
13-
from lib.core.settings import NULL
14+
from lib.core.settings import DB2_ALIASES
15+
from lib.core.settings import FIREBIRD_ALIASES
16+
from lib.core.settings import H2_ALIASES
17+
from lib.core.settings import HSQLDB_ALIASES
18+
from lib.core.settings import INFORMIX_ALIASES
19+
from lib.core.settings import MAXDB_ALIASES
1420
from lib.core.settings import MSSQL_ALIASES
1521
from lib.core.settings import MYSQL_ALIASES
16-
from lib.core.settings import PGSQL_ALIASES
22+
from lib.core.settings import NULL
1723
from lib.core.settings import ORACLE_ALIASES
24+
from lib.core.settings import PGSQL_ALIASES
1825
from lib.core.settings import SQLITE_ALIASES
19-
from lib.core.settings import ACCESS_ALIASES
20-
from lib.core.settings import FIREBIRD_ALIASES
21-
from lib.core.settings import MAXDB_ALIASES
2226
from lib.core.settings import SYBASE_ALIASES
23-
from lib.core.settings import DB2_ALIASES
24-
from lib.core.settings import HSQLDB_ALIASES
25-
from lib.core.settings import H2_ALIASES
26-
from lib.core.settings import INFORMIX_ALIASES
2727

2828
FIREBIRD_TYPES = {
2929
261: "BLOB",

lib/core/dump.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import tempfile
1414
import threading
1515

16+
from extra.safe2bin.safe2bin import safechardecode
1617
from lib.core.common import Backend
1718
from lib.core.common import checkFile
1819
from lib.core.common import dataToDumpFile
@@ -39,8 +40,8 @@
3940
from lib.core.enums import DBMS
4041
from lib.core.enums import DUMP_FORMAT
4142
from lib.core.exception import SqlmapGenericException
42-
from lib.core.exception import SqlmapValueException
4343
from lib.core.exception import SqlmapSystemException
44+
from lib.core.exception import SqlmapValueException
4445
from lib.core.replication import Replication
4546
from lib.core.settings import DUMP_FILE_BUFFER_SIZE
4647
from lib.core.settings import HTML_DUMP_CSS_STYLE
@@ -55,8 +56,6 @@
5556
from thirdparty import six
5657
from thirdparty.magic import magic
5758

58-
from extra.safe2bin.safe2bin import safechardecode
59-
6059
class Dump(object):
6160
"""
6261
This class defines methods used to parse and output the results

lib/core/option.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
from lib.core.common import checkFile
2727
from lib.core.common import dataToStdout
2828
from lib.core.common import decodeStringEscape
29-
from lib.core.common import getPublicTypeMembers
30-
from lib.core.common import getSafeExString
3129
from lib.core.common import fetchRandomAgent
3230
from lib.core.common import filterNone
3331
from lib.core.common import findLocalPort
3432
from lib.core.common import findPageForms
3533
from lib.core.common import getConsoleWidth
3634
from lib.core.common import getFileItems
3735
from lib.core.common import getFileType
36+
from lib.core.common import getPublicTypeMembers
37+
from lib.core.common import getSafeExString
3838
from lib.core.common import intersect
3939
from lib.core.common import normalizePath
4040
from lib.core.common import ntToPosixSlashes
@@ -134,19 +134,19 @@
134134
from lib.parse.payloads import loadPayloads
135135
from lib.parse.sitemap import parseSitemap
136136
from lib.request.basic import checkCharEncoding
137-
from lib.request.connect import Connect as Request
138-
from lib.request.dns import DNSServer
139137
from lib.request.basicauthhandler import SmartHTTPBasicAuthHandler
140138
from lib.request.chunkedhandler import ChunkedHandler
139+
from lib.request.connect import Connect as Request
140+
from lib.request.dns import DNSServer
141141
from lib.request.httpshandler import HTTPSHandler
142142
from lib.request.pkihandler import HTTPSPKIAuthHandler
143143
from lib.request.rangehandler import HTTPRangeHandler
144144
from lib.request.redirecthandler import SmartRedirectHandler
145-
from lib.utils.har import HTTPCollectorFactory
146145
from lib.utils.crawler import crawl
147146
from lib.utils.deps import checkDependencies
148-
from lib.utils.search import search
147+
from lib.utils.har import HTTPCollectorFactory
149148
from lib.utils.purge import purge
149+
from lib.utils.search import search
150150
from thirdparty import six
151151
from thirdparty.keepalive import keepalive
152152
from thirdparty.multipart import multipartpost

lib/core/patch.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,17 @@
1818
import thirdparty.ansistrm.ansistrm
1919
import thirdparty.chardet.universaldetector
2020

21-
from lib.request.templates import getPageTemplate
22-
2321
from lib.core.common import filterNone
2422
from lib.core.common import getSafeExString
2523
from lib.core.common import isListLike
26-
from lib.core.common import singleTimeWarnMessage
2724
from lib.core.common import readInput
2825
from lib.core.common import shellExec
26+
from lib.core.common import singleTimeWarnMessage
2927
from lib.core.convert import stdoutEncode
3028
from lib.core.option import _setHTTPHandlers
3129
from lib.core.option import setVerbosity
3230
from lib.core.settings import IS_WIN
31+
from lib.request.templates import getPageTemplate
3332
from thirdparty.six.moves import http_client as _http_client
3433

3534
def dirtyPatches():

lib/core/settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.6.11"
21+
VERSION = "1.3.6.12"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
@@ -46,10 +46,10 @@
4646
CONSTANT_RATIO = 0.9
4747

4848
# Ratio used in heuristic check for WAF/IPS protected targets
49-
IDS_WAF_CHECK_RATIO = 0.5
49+
IPS_WAF_CHECK_RATIO = 0.5
5050

5151
# Timeout used in heuristic check for WAF/IPS protected targets
52-
IDS_WAF_CHECK_TIMEOUT = 10
52+
IPS_WAF_CHECK_TIMEOUT = 10
5353

5454
# Lower and upper values for match ratio in case of stable page
5555
LOWER_RATIO_BOUND = 0.02

lib/core/target.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,18 @@
4848
from lib.core.exception import SqlmapNoneDataException
4949
from lib.core.exception import SqlmapSystemException
5050
from lib.core.exception import SqlmapUserQuitException
51+
from lib.core.option import _setAuthCred
5152
from lib.core.option import _setDBMS
5253
from lib.core.option import _setKnowledgeBaseAttributes
53-
from lib.core.option import _setAuthCred
54+
from lib.core.settings import ARRAY_LIKE_RECOGNITION_REGEX
5455
from lib.core.settings import ASTERISK_MARKER
5556
from lib.core.settings import CSRF_TOKEN_PARAMETER_INFIXES
5657
from lib.core.settings import CUSTOM_INJECTION_MARK_CHAR
5758
from lib.core.settings import DEFAULT_GET_POST_DELIMITER
5859
from lib.core.settings import HOST_ALIASES
59-
from lib.core.settings import ARRAY_LIKE_RECOGNITION_REGEX
6060
from lib.core.settings import INJECT_HERE_REGEX
61-
from lib.core.settings import JSON_RECOGNITION_REGEX
6261
from lib.core.settings import JSON_LIKE_RECOGNITION_REGEX
62+
from lib.core.settings import JSON_RECOGNITION_REGEX
6363
from lib.core.settings import MULTIPART_RECOGNITION_REGEX
6464
from lib.core.settings import PROBLEMATIC_CUSTOM_INJECTION_PATTERNS
6565
from lib.core.settings import REFERER_ALIASES

0 commit comments

Comments
 (0)