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

Skip to content

Commit 95b52a0

Browse files
committed
Minor patch for custom injection into HTTP Authorization header
1 parent c5138d4 commit 95b52a0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/core/agent.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from lib.core.dicts import DUMP_DATA_PREPROCESS
2929
from lib.core.dicts import FROM_DUMMY_TABLE
3030
from lib.core.enums import DBMS
31+
from lib.core.enums import HTTP_HEADER
3132
from lib.core.enums import PAYLOAD
3233
from lib.core.enums import PLACE
3334
from lib.core.enums import POST_HINT
@@ -114,6 +115,11 @@ def payload(self, place=None, parameter=None, value=None, newValue=None, where=N
114115
match = re.search(r"([^;]+)=(?P<value>[^;]+);?\Z", origValue)
115116
if match:
116117
origValue = match.group("value")
118+
elif ',' in paramString:
119+
header = paramString.split(',')[0]
120+
121+
if header.upper() == HTTP_HEADER.AUTHORIZATION.upper():
122+
origValue = origValue.split(' ')[-1]
117123

118124
if conf.prefix:
119125
value = origValue

0 commit comments

Comments
 (0)