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

Skip to content

Commit 19925b8

Browse files
committed
Update regarding #3968
1 parent 4b5927b commit 19925b8

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

lib/controller/checks.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
from lib.core.settings import CANDIDATE_SENTENCE_MIN_LENGTH
7474
from lib.core.settings import CHECK_INTERNET_ADDRESS
7575
from lib.core.settings import CHECK_INTERNET_VALUE
76+
from lib.core.settings import DEFAULT_COOKIE_DELIMITER
7677
from lib.core.settings import DEFAULT_GET_POST_DELIMITER
7778
from lib.core.settings import DUMMY_NON_SQLI_CHECK_APPENDIX
7879
from lib.core.settings import FI_ERROR_REGEX
@@ -1559,6 +1560,15 @@ def checkConnection(suppressOutput=False):
15591560
kb.originalPage = kb.pageTemplate = threadData.lastPage
15601561
kb.originalCode = threadData.lastCode
15611562

1563+
if conf.cj and not conf.cookie and not conf.dropSetCookie:
1564+
candidate = DEFAULT_COOKIE_DELIMITER.join("%s=%s" % (_.name, _.value) for _ in conf.cj)
1565+
1566+
message = "you have not declared cookie(s), while "
1567+
message += "server wants to set its own ('%s'). " % re.sub(r"(=[^=;]{10}[^=;])[^=;]+([^=;]{10})", r"\g<1>...\g<2>", candidate)
1568+
message += "Do you want to use those [Y/n] "
1569+
if readInput(message, default='Y', boolean=True):
1570+
conf.httpHeaders.append((HTTP_HEADER.COOKIE, candidate))
1571+
15621572
return True
15631573

15641574
def checkInternet():

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
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.10.14"
21+
VERSION = "1.3.10.15"
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)

0 commit comments

Comments
 (0)