Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 05f92d5

Browse files
committed
Fixes #3552
1 parent 89c6cc7 commit 05f92d5

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

lib/controller/controller.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
from lib.core.enums import CONTENT_TYPE
4949
from lib.core.enums import HASHDB_KEYS
5050
from lib.core.enums import HEURISTIC_TEST
51+
from lib.core.enums import HTTP_HEADER
5152
from lib.core.enums import HTTPMETHOD
5253
from lib.core.enums import NOTE
5354
from 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()

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from 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"
2121
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2222
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2323
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

0 commit comments

Comments
 (0)