mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
more and more fixes
This commit is contained in:
parent
37590520c4
commit
0f5768cddf
|
@ -95,9 +95,9 @@ def urlencode(string, safe=":/?%&=", convall=False):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
if convall:
|
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:
|
else:
|
||||||
result = urllib.quote(string, safe)
|
result = urllib.quote(string.encode("utf-8"), safe)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
|
@ -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
|
with sqlmap; if not, write to the Free Software Foundation, Inc., 51
|
||||||
Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
"""
|
"""
|
||||||
|
import codecs
|
||||||
|
|
||||||
from ConfigParser import NoSectionError
|
from ConfigParser import NoSectionError
|
||||||
from ConfigParser import RawConfigParser
|
from ConfigParser import RawConfigParser
|
||||||
|
|
||||||
from lib.core.common import checkFile
|
from lib.core.common import checkFile
|
||||||
from lib.core.convert import utf8decode
|
|
||||||
from lib.core.data import conf
|
from lib.core.data import conf
|
||||||
from lib.core.data import logger
|
from lib.core.data import logger
|
||||||
from lib.core.exception import sqlmapMissingMandatoryOptionException
|
from lib.core.exception import sqlmapMissingMandatoryOptionException
|
||||||
|
@ -53,8 +53,6 @@ def configFileProxy(section, option, boolean=False, integer=False):
|
||||||
value = False
|
value = False
|
||||||
elif value in ("true", "True"):
|
elif value in ("true", "True"):
|
||||||
value = True
|
value = True
|
||||||
else:
|
|
||||||
value = utf8decode(value)
|
|
||||||
|
|
||||||
if value:
|
if value:
|
||||||
conf[option] = value
|
conf[option] = value
|
||||||
|
@ -79,7 +77,7 @@ def configFileParser(configFile):
|
||||||
|
|
||||||
checkFile(configFile)
|
checkFile(configFile)
|
||||||
config = RawConfigParser()
|
config = RawConfigParser()
|
||||||
config.read(configFile)
|
config.readfp(codecs.open(configFile, "r", "UTF8"))
|
||||||
|
|
||||||
if not config.has_section("Target"):
|
if not config.has_section("Target"):
|
||||||
raise NoSectionError, "Target in the configuration file is mandatory"
|
raise NoSectionError, "Target in the configuration file is mandatory"
|
||||||
|
|
|
@ -340,7 +340,7 @@ lastChar = 0
|
||||||
|
|
||||||
# SQL statement to be executed.
|
# SQL statement to be executed.
|
||||||
# Example: SELECT 'foo', 'bar'
|
# Example: SELECT 'foo', 'bar'
|
||||||
query =
|
query = INSERT INTO users VALUES (9, 'café', 'test')
|
||||||
|
|
||||||
# Prompt for an interactive SQL shell.
|
# Prompt for an interactive SQL shell.
|
||||||
# Valid: True or False
|
# Valid: True or False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user