Skip to content

Commit 9cc84b1

Browse files
authored
Merge branch 'master' into feature/detect-chromedriver
2 parents 3d017d5 + f02b3f2 commit 9cc84b1

File tree

9 files changed

+2964
-13
lines changed

9 files changed

+2964
-13
lines changed

Diff for: src/core/config/Categories.json

+1
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@
236236
"Parse IPv6 address",
237237
"Parse IPv4 header",
238238
"Parse TCP",
239+
"Parse TLS record",
239240
"Parse UDP",
240241
"Parse SSH Host Key",
241242
"Parse URI",

Diff for: src/core/lib/Protocol.mjs

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ export function objToTable(obj, nested=false) {
2626
</tr>`;
2727

2828
for (const key in obj) {
29+
if (typeof obj[key] === "function")
30+
continue;
31+
2932
html += `<tr><td style='word-wrap: break-word'>${key}</td>`;
3033
if (typeof obj[key] === "object")
3134
html += `<td style='padding: 0'>${objToTable(obj[key], true)}</td>`;

Diff for: src/core/operations/JWTSign.mjs

+8-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ class JWTSign extends Operation {
3636
name: "Signing algorithm",
3737
type: "option",
3838
value: JWT_ALGORITHMS
39+
},
40+
{
41+
name: "Header",
42+
type: "text",
43+
value: "{}"
3944
}
4045
];
4146
}
@@ -46,11 +51,12 @@ class JWTSign extends Operation {
4651
* @returns {string}
4752
*/
4853
run(input, args) {
49-
const [key, algorithm] = args;
54+
const [key, algorithm, header] = args;
5055

5156
try {
5257
return jwt.sign(input, key, {
53-
algorithm: algorithm === "None" ? "none" : algorithm
58+
algorithm: algorithm === "None" ? "none" : algorithm,
59+
header: JSON.parse(header || "{}")
5460
});
5561
} catch (err) {
5662
throw new OperationError(`Error: Have you entered the key correctly? The key should be either the secret for HMAC algorithms or the PEM-encoded private key for RSA and ECDSA.

Diff for: src/core/operations/JWTVerify.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class JWTVerify extends Operation {
2222

2323
this.name = "JWT Verify";
2424
this.module = "Crypto";
25-
this.description = "Verifies that a JSON Web Token is valid and has been signed with the provided secret / private key.<br><br>The key should be either the secret for HMAC algorithms or the PEM-encoded private key for RSA and ECDSA.";
25+
this.description = "Verifies that a JSON Web Token is valid and has been signed with the provided secret / private key.<br><br>The key should be either the secret for HMAC algorithms or the PEM-encoded public key for RSA and ECDSA.";
2626
this.infoURL = "https://wikipedia.org/wiki/JSON_Web_Token";
2727
this.inputType = "string";
2828
this.outputType = "JSON";

0 commit comments

Comments
 (0)