File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7373from lib .core .settings import CANDIDATE_SENTENCE_MIN_LENGTH
7474from lib .core .settings import CHECK_INTERNET_ADDRESS
7575from lib .core .settings import CHECK_INTERNET_VALUE
76+ from lib .core .settings import DEFAULT_COOKIE_DELIMITER
7677from lib .core .settings import DEFAULT_GET_POST_DELIMITER
7778from lib .core .settings import DUMMY_NON_SQLI_CHECK_APPENDIX
7879from 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
15641574def checkInternet ():
Original file line number Diff line number Diff line change 1818from 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 "
2222TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2323TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2424VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
You can’t perform that action at this time.
0 commit comments