File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,7 +152,12 @@ def __urllib2Opener():
152152 conf .cj = cookielib .CookieJar ()
153153 else :
154154 conf .cj = cookielib .MozillaCookieJar ()
155- conf .cj .load (conf .loC )
155+ try :
156+ conf .cj .load (conf .loC )
157+ except cookielib .LoadError , msg :
158+ errMsg = "there was a problem loading "
159+ errMsg += "cookies file ('%s')" % msg
160+ raise sqlmapGenericException , errMsg
156161
157162 handlers .append (urllib2 .HTTPCookieProcessor (conf .cj ))
158163
@@ -1889,6 +1894,11 @@ def __basicOptionValidation():
18891894 errMsg += "supported charsets"
18901895 raise sqlmapSyntaxException , errMsg
18911896
1897+ if conf .loC :
1898+ if not os .path .exists (conf .loC ):
1899+ errMsg = "cookies file '%s' does not exist" % conf .loC
1900+ raise sqlmapFilePathException , errMsg
1901+
18921902def __resolveCrossReferences ():
18931903 lib .core .threads .readInput = readInput
18941904 lib .core .common .getPageTemplate = getPageTemplate
You can’t perform that action at this time.
0 commit comments