mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-06-10 02:01:57 +00:00
minor update regarding --load-cookies
This commit is contained in:
parent
2c87d061e9
commit
cd28eb6544
4 changed files with 19 additions and 8 deletions
|
|
@ -8,6 +8,7 @@ See the file 'doc/COPYING' for copying permission
|
|||
"""
|
||||
|
||||
import codecs
|
||||
import cookielib
|
||||
import copy
|
||||
import ctypes
|
||||
import httplib
|
||||
|
|
@ -3194,3 +3195,15 @@ def hashDBRetrieve(key, unserialize=False, checkConf=False):
|
|||
|
||||
_ = "%s%s" % (conf.url or "%s%s" % (conf.hostname, conf.port), key)
|
||||
return conf.hashDB.retrieve(_, unserialize) if kb.resumeValues and not (checkConf and any([conf.flushSession, conf.freshQueries])) else None
|
||||
|
||||
def resetCookieJar(cookieJar):
|
||||
if not conf.loC:
|
||||
cookieJar.clear()
|
||||
else:
|
||||
try:
|
||||
cookieJar.load(conf.loC)
|
||||
cookieJar.clear_expired_cookies()
|
||||
except cookielib.LoadError, msg:
|
||||
errMsg = "there was a problem loading "
|
||||
errMsg += "cookies file ('%s')" % msg
|
||||
raise sqlmapGenericException, errMsg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue