mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-23 01:56:36 +03:00
update regarding Unicode char logging (Bug #148)
This commit is contained in:
parent
97840535c6
commit
39652bfbf4
|
@ -29,6 +29,7 @@ import time
|
||||||
import urllib2
|
import urllib2
|
||||||
import urlparse
|
import urlparse
|
||||||
import traceback
|
import traceback
|
||||||
|
import unicodedata
|
||||||
|
|
||||||
from lib.contrib import multipartpost
|
from lib.contrib import multipartpost
|
||||||
from lib.core.convert import urlencode
|
from lib.core.convert import urlencode
|
||||||
|
@ -74,7 +75,7 @@ class Connect:
|
||||||
cookieStr = ""
|
cookieStr = ""
|
||||||
requestMsg = "HTTP request:\n%s " % conf.method
|
requestMsg = "HTTP request:\n%s " % conf.method
|
||||||
requestMsg += "%s" % urlparse.urlsplit(url)[2] or "/"
|
requestMsg += "%s" % urlparse.urlsplit(url)[2] or "/"
|
||||||
responseMsg = "HTTP response "
|
responseMsg = u"HTTP response "
|
||||||
requestHeaders = ""
|
requestHeaders = ""
|
||||||
responseHeaders = ""
|
responseHeaders = ""
|
||||||
|
|
||||||
|
@ -228,6 +229,7 @@ class Connect:
|
||||||
elif conf.verbose > 4:
|
elif conf.verbose > 4:
|
||||||
responseMsg += "%s\n%s\n" % (responseHeaders, page)
|
responseMsg += "%s\n%s\n" % (responseHeaders, page)
|
||||||
|
|
||||||
|
responseMsg = unicodedata.normalize('NFKD', responseMsg).encode('ascii','ignore')
|
||||||
logger.log(8, responseMsg)
|
logger.log(8, responseMsg)
|
||||||
|
|
||||||
return page, responseHeaders
|
return page, responseHeaders
|
||||||
|
|
Loading…
Reference in New Issue
Block a user