3333from lib .core .common import boldifyMessage
3434from lib .core .common import checkFile
3535from lib .core .common import dataToStdout
36+ from lib .core .common import decodeStringEscape
3637from lib .core .common import getPublicTypeMembers
3738from lib .core .common import getSafeExString
3839from lib .core .common import findLocalPort
@@ -1500,11 +1501,8 @@ def _cleanupOptions():
15001501 else :
15011502 conf .rParam = []
15021503
1503- if conf .paramDel and '\\ ' in conf .paramDel :
1504- try :
1505- conf .paramDel = conf .paramDel .decode ("string_escape" )
1506- except ValueError :
1507- pass
1504+ if conf .paramDel :
1505+ conf .paramDel = decodeStringEscape (conf .paramDel )
15081506
15091507 if conf .skip :
15101508 conf .skip = conf .skip .replace (" " , "" )
@@ -1616,7 +1614,7 @@ class _(unicode):
16161614 conf .code = int (conf .code )
16171615
16181616 if conf .csvDel :
1619- conf .csvDel = conf .csvDel . decode ( "string_escape" ) # e.g. '\\t' -> '\t'
1617+ conf .csvDel = decodeStringEscape ( conf .csvDel )
16201618
16211619 if conf .torPort and isinstance (conf .torPort , basestring ) and conf .torPort .isdigit ():
16221620 conf .torPort = int (conf .torPort )
@@ -1629,12 +1627,7 @@ class _(unicode):
16291627 setPaths (paths .SQLMAP_ROOT_PATH )
16301628
16311629 if conf .string :
1632- try :
1633- conf .string = conf .string .decode ("unicode_escape" )
1634- except :
1635- charset = string .whitespace .replace (" " , "" )
1636- for _ in charset :
1637- conf .string = conf .string .replace (_ .encode ("string_escape" ), _ )
1630+ conf .string = decodeStringEscape (conf .string )
16381631
16391632 if conf .getAll :
16401633 map (lambda _ : conf .__setitem__ (_ , True ), WIZARD .ALL )
0 commit comments