(contentVal)
| 1592 | cprintc("Scanning mode completed: review the above results.\n", "magenta") |
| 1593 | |
| 1594 | def injectCommonClaims(contentVal): |
| 1595 | with open(config['input']['commonHeaders'], "r", encoding='utf-8', errors='ignore') as commonHeaders: |
| 1596 | nextHeader = commonHeaders.readline().rstrip() |
| 1597 | while nextHeader: |
| 1598 | origVal = "" |
| 1599 | try: |
| 1600 | origVal = headDict[nextHeader] |
| 1601 | except: |
| 1602 | pass |
| 1603 | headDict[nextHeader] = contentVal |
| 1604 | newContents = genContents(headDict, paylDict) |
| 1605 | jwtOut(newContents+"."+sig, "Injected "+str(contentVal)+" into Common Header Claim: "+str(nextHeader)) |
| 1606 | if origVal != "": |
| 1607 | headDict[nextHeader] = origVal |
| 1608 | else: |
| 1609 | del headDict[nextHeader] |
| 1610 | nextHeader = commonHeaders.readline().rstrip() |
| 1611 | with open(config['input']['commonPayloads'], "r", encoding='utf-8', errors='ignore') as commonPayloads: |
| 1612 | nextPayload = commonPayloads.readline().rstrip() |
| 1613 | while nextPayload: |
| 1614 | origVal = "" |
| 1615 | try: |
| 1616 | origVal = paylDict[nextPayload] |
| 1617 | except: |
| 1618 | pass |
| 1619 | paylDict[nextPayload] = contentVal |
| 1620 | newContents = genContents(headDict, paylDict) |
| 1621 | jwtOut(newContents+"."+sig, "Injected "+str(contentVal)+" into Common Payload Claim: "+str(nextPayload)) |
| 1622 | if origVal != "": |
| 1623 | paylDict[nextPayload] = origVal |
| 1624 | else: |
| 1625 | del paylDict[nextPayload] |
| 1626 | nextPayload = commonPayloads.readline().rstrip() |
| 1627 | |
| 1628 | def injectEachHeader(contentVal): |
| 1629 | for headerClaim in headDict: |
no test coverage detected