File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848from lib .core .enums import CONTENT_TYPE
4949from lib .core .enums import HASHDB_KEYS
5050from lib .core .enums import HEURISTIC_TEST
51+ from lib .core .enums import HTTP_HEADER
5152from lib .core .enums import HTTPMETHOD
5253from lib .core .enums import NOTE
5354from lib .core .enums import PAYLOAD
@@ -318,6 +319,13 @@ def start():
318319 conf .cookie = targetCookie
319320 conf .httpHeaders = list (initialHeaders )
320321 conf .httpHeaders .extend (targetHeaders or [])
322+
323+ if conf .randomAgent or conf .mobile :
324+ for header , value in initialHeaders :
325+ if header .upper () == HTTP_HEADER .USER_AGENT .upper ():
326+ conf .httpHeaders .append ((header , value ))
327+ break
328+
321329 conf .httpHeaders = [conf .httpHeaders [i ] for i in xrange (len (conf .httpHeaders )) if conf .httpHeaders [i ][0 ].upper () not in (__ [0 ].upper () for __ in conf .httpHeaders [i + 1 :])]
322330
323331 initTargetEnv ()
Original file line number Diff line number Diff line change 1717from lib .core .enums import OS
1818
1919# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
20- VERSION = "1.3.4.3 "
20+ VERSION = "1.3.4.4 "
2121TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2222TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2323VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
You can’t perform that action at this time.
0 commit comments