diff --git a/lib/core/option.py b/lib/core/option.py index 17a6d76a9..5b982757f 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1469,6 +1469,7 @@ def __setKnowledgeBaseAttributes(flushAll=True): kb.pageTemplates = dict() kb.previousMethod = None kb.orderByColumns = None + kb.originalCode = None kb.originalPage = None kb.originalTimeDelay = None diff --git a/lib/request/connect.py b/lib/request/connect.py index 7d5aec74b..dcb361ea1 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -309,7 +309,7 @@ class Connect: else kb.originalPage if kb.redirectChoice == REDIRECTION.ORIGINAL\ else conn.read() skipLogTraffic = kb.redirectChoice != REDIRECTION.FOLLOW - code = conn.redcode + code = conn.redcode if kb.redirectChoice != REDIRECTION.ORIGINAL else kb.originalCode else: page = conn.read() @@ -517,6 +517,7 @@ class Connect: page = None pageLength = None uri = None + code = None if not place: place = kb.injection.place or PLACE.GET @@ -700,6 +701,8 @@ class Connect: threadData.lastQueryDuration = calculateDeltaSeconds(start) + kb.originalCode = kb.originalCode or code + if kb.testMode: kb.testQueryCount += 1