@@ -773,7 +773,7 @@ def _setTamperingFunctions():
773773 try :
774774 module = __import__ (safeFilepathEncode (filename [:- 3 ]))
775775 except Exception as ex :
776- raise SqlmapSyntaxException ("cannot import tamper module '%s' (%s)" % (filename [:- 3 ], getSafeExString (ex )))
776+ raise SqlmapSyntaxException ("cannot import tamper module '%s' (%s)" % (getUnicode ( filename [:- 3 ]) , getSafeExString (ex )))
777777
778778 priority = PRIORITY .NORMAL if not hasattr (module , "__priority__" ) else module .__priority__
779779
@@ -807,7 +807,7 @@ def _setTamperingFunctions():
807807 function ()
808808 except Exception as ex :
809809 errMsg = "error occurred while checking dependencies "
810- errMsg += "for tamper module '%s' ('%s')" % (filename [:- 3 ], getSafeExString (ex ))
810+ errMsg += "for tamper module '%s' ('%s')" % (getUnicode ( filename [:- 3 ]) , getSafeExString (ex ))
811811 raise SqlmapGenericException (errMsg )
812812
813813 if not found :
@@ -870,7 +870,7 @@ def _setPreprocessFunctions():
870870 try :
871871 module = __import__ (safeFilepathEncode (filename [:- 3 ]))
872872 except Exception as ex :
873- raise SqlmapSyntaxException ("cannot import preprocess module '%s' (%s)" % (filename [:- 3 ], getSafeExString (ex )))
873+ raise SqlmapSyntaxException ("cannot import preprocess module '%s' (%s)" % (getUnicode ( filename [:- 3 ]) , getSafeExString (ex )))
874874
875875 for name , function in inspect .getmembers (module , inspect .isfunction ):
876876 if name == "preprocess" and inspect .getargspec (function ).args and all (_ in inspect .getargspec (function ).args for _ in ("page" , "headers" , "code" )):
@@ -925,7 +925,7 @@ def _setWafFunctions():
925925 del sys .modules [filename [:- 3 ]]
926926 module = __import__ (safeFilepathEncode (filename [:- 3 ]))
927927 except ImportError as ex :
928- raise SqlmapSyntaxException ("cannot import WAF script '%s' (%s)" % (filename [:- 3 ], getSafeExString (ex )))
928+ raise SqlmapSyntaxException ("cannot import WAF script '%s' (%s)" % (getUnicode ( filename [:- 3 ]) , getSafeExString (ex )))
929929
930930 _ = dict (inspect .getmembers (module ))
931931 if "detect" not in _ :
0 commit comments