File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818from thirdparty .six import unichr as _unichr
1919
2020# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21- VERSION = "1.4.4.4 "
21+ VERSION = "1.4.4.5 "
2222TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2323TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2424VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
914914
915915# Leaving (dirty) possibility to change values from here (e.g. `export SQLMAP__MAX_NUMBER_OF_THREADS=20`)
916916for key , value in os .environ .items ():
917- if key .upper ().startswith ("%s_ " % SQLMAP_ENVIRONMENT_PREFIX ):
918- _ = key [len (SQLMAP_ENVIRONMENT_PREFIX ) + 1 :].upper ()
917+ if key .upper ().startswith ("%s " % SQLMAP_ENVIRONMENT_PREFIX ):
918+ _ = key [len (SQLMAP_ENVIRONMENT_PREFIX ):].upper ()
919919 if _ in globals ():
920- globals ()[_ ] = value
920+ original = globals ()[_ ]
921+ if isinstance (original , int ):
922+ try :
923+ globals ()[_ ] = int (value )
924+ except ValueError :
925+ pass
926+ elif isinstance (original , bool ):
927+ globals ()[_ ] = value .lower () in ('1' , 'true' )
928+ elif isinstance (original , (list , tuple )):
929+ globals ()[_ ] = [__ .strip () for __ in _ .split (',' )]
930+ else :
931+ globals ()[_ ] = value
921932
922933# Installing "reversible" unicode (decoding) error handler
923934def _reversible (ex ):
You can’t perform that action at this time.
0 commit comments