| ofs | hex dump | ascii |
|---|---|---|
| 0000 | 77 4f 46 32 00 01 00 00 00 04 f5 00 00 11 00 00 00 0c 53 34 00 04 f4 8f 00 01 00 00 00 00 00 00 | wOF2..............S4............ |
| 0020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1a ac 55 1b 87 ba 52 1c 81 aa 4a 3f 48 56 41 52 | ..................U...R...J?HVAR |
| 0040 | c4 41 06 60 3f 53 54 41 54 81 46 00 81 cb 0a 2f 82 10 0a 88 cd 44 87 9e 36 0b cf 54 00 30 9a b2 | .A.`?STAT.F..../.....D..6..T.0.. |
| 0060 | 20 01 36 02 24 03 cf 4e 04 20 05 94 63 07 81 c9 2d 5b 9f d2 bb 94 87 8c 5e e7 9b f5 29 b6 b5 c4 | ..6.$..N....c...-[......^...)... |
| 0080 | be 23 39 05 a2 01 62 4a 3b 22 ea 77 dc 56 e7 88 2a b9 55 05 5a 14 41 e7 f3 ac 89 04 26 a3 b5 6d | .#9...bJ;".w.V..*.U.Z.A.....&..m |
| 00a0 | 20 34 36 28 de 78 a3 ff b6 8e 68 d4 6e 8a 00 7f 5f cc 81 92 63 f7 0c b3 92 96 3e 87 5f 11 2a 1d | .46(.x....h.n..._...c.....>._.*. |
| 00c0 | 94 69 d9 ff ff ff ff ff ff ff ff ff ff ff ff ff ad ae e3 e9 b7 35 33 bb 7b 33 ef b3 3f 10 fe ae | .i...................53.{3..?... |
| 00e0 | 1f 10 51 51 44 81 48 84 80 52 b3 10 45 eb d2 92 2b eb 3c bd ee 8b 98 60 51 da 28 eb 1b 3f 08 29 | ..QQD.H..R..E...+.<....`Q.(..?.) |
| 0100 | 86 28 4e a9 f4 92 20 3f 93 0d 41 03 a3 1c 12 10 08 11 e7 55 01 14 2a 96 ca 59 bc 9c ac a8 24 49 | .(N....?..A........U..*..Y....$I |
| 0120 | 92 64 75 cd bd 2c bb b6 1e 12 49 45 55 35 6c 30 d4 8a c6 df ac 6f c1 86 35 bc bd b3 d6 d0 60 14 /**
* Original by Scott Helme.
*
* Reference: https://scotthelme.co.uk/csp-cheat-sheet/
*
* Supports the following:
* - https://www.w3.org/TR/CSP1/
* - https://www.w3.org/TR/CSP2/
* - https://www.w3.org/TR/CSP3/
*/
(function (Prism) {
/**
* @param {string} source
* @returns {RegExp}
*/
function value(source) {
return RegExp(
/([ \t])/.source + '(?:' + source + ')' + /(?=[\s;]|$)/.source,
'i'
);
}
Prism.languages.csp = {
directive: {
pattern:
/(^|[\s;])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|prefetch|script|style|worker)-src|disown-opener|form-action|frame-(?:ancestors|options)|input-protection(?:-(?:clip|selectors))?|navigate-to|plugin-types|policy-uri|referrer|reflected-xss|report-(?:to|uri)|require-sri-for|sandbox|(?:script|style)-src-(?:attr|elem)|upgrade-insecure-requests)(?=[\s;]|$)/i,
lookbehind: true,
alias: 'property',
},
scheme: {
pattern: value(/[a-z][a-z0-9.+-]*:/.source),
lookbehind: true,
},
none: {
pattern: value(/'none'/.source),
lookbehind: true,
alias: 'keyword',
},
nonce: {
pattern: value(/'nonce-[-+/\w=]+'/.source),
lookbehind: true,
alias: 'number',
},
hash: {
pattern: value(/'sha(?:256|384|512)-[-+/\w=]+'/.source),
lookbehind: true,
alias: 'number',
},
host: {
pattern: value(
/[a-z][a-z0-9.+-]*:\/\/[^\s;,']*/.source +
'|' +
/\*[^\s;,']*/.source +
'|' +
/[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::[\d*]+)?(?:\/[^\s;,']*)?/.source
),
lookbehind: true,
alias: 'url',
inside: {
important: /\*/,
},
},
keyword: [
{
pattern: value(/'unsafe-[a-z-]+'/.source),
lookbehind: true,
alias: 'unsafe',
},
{
pattern: value(/'[a-z-]+'/.source),
lookbehind: true,
alias: 'safe',
},
],
punctuation: /;/,
};
})(Prism);
|
