more and more fixes

This commit is contained in:
Miroslav Stampar 2010-05-28 14:04:34 +00:00
parent 37590520c4
commit 0f5768cddf
3 changed files with 5 additions and 7 deletions

View File

@ -95,9 +95,9 @@ def urlencode(string, safe=":/?%&=", convall=False):
return result
if convall:
result = urllib.quote(string)
result = urllib.quote(string.encode("utf-8")) #Reference: http://old.nabble.com/Re:-Problem:-neither-urllib2.quote-nor-urllib.quote-encode-the--unicode-strings-arguments-p19823144.html
else:
result = urllib.quote(string, safe)
result = urllib.quote(string.encode("utf-8"), safe)
return result

View File

@ -21,12 +21,12 @@ You should have received a copy of the GNU General Public License along
with sqlmap; if not, write to the Free Software Foundation, Inc., 51
Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import codecs
from ConfigParser import NoSectionError
from ConfigParser import RawConfigParser
from lib.core.common import checkFile
from lib.core.convert import utf8decode
from lib.core.data import conf
from lib.core.data import logger
from lib.core.exception import sqlmapMissingMandatoryOptionException
@ -53,8 +53,6 @@ def configFileProxy(section, option, boolean=False, integer=False):
value = False
elif value in ("true", "True"):
value = True
else:
value = utf8decode(value)
if value:
conf[option] = value
@ -79,7 +77,7 @@ def configFileParser(configFile):
checkFile(configFile)
config = RawConfigParser()
config.read(configFile)
config.readfp(codecs.open(configFile, "r", "UTF8"))
if not config.has_section("Target"):
raise NoSectionError, "Target in the configuration file is mandatory"

View File

@ -340,7 +340,7 @@ lastChar = 0
# SQL statement to be executed.
# Example: SELECT 'foo', 'bar'
query =
query = INSERT INTO users VALUES (9, 'café', 'test')
# Prompt for an interactive SQL shell.
# Valid: True or False