MCPcopy
hub / github.com/ticarpi/jwt_tool / injectheaderclaim

Function injectheaderclaim

jwt_tool.py:340–344  ·  view source on GitHub ↗
(headerclaim, injectionvalue)

Source from the content-addressed store, hash-verified

338 return newpaylDict, newPaylB64
339
340def injectheaderclaim(headerclaim, injectionvalue):
341 newheadDict = headDict
342 newheadDict[headerclaim] = castInput(injectionvalue)
343 newHeadB64 = base64.urlsafe_b64encode(json.dumps(newheadDict,separators=(",",":")).encode()).decode('UTF-8').strip("=")
344 return newheadDict, newHeadB64
345
346def tamperToken(paylDict, headDict, sig):
347 cprintc("\n====================================================================\nThis option allows you to tamper with the header, contents and \nsignature of the JWT.\n====================================================================", "white")

Callers 2

scanModePlaybookFunction · 0.85
jwt_tool.pyFile · 0.85

Calls 1

castInputFunction · 0.85

Tested by

no test coverage detected