summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Henrie <alexhenrie24@gmail.com>2023-10-28 19:06:47 -0600
committerDavid Faure <faure@kde.org>2023-10-29 07:55:07 +0000
commited943f18ed8ebdbc890732573e7c12b23d670c1f (patch)
treeeb34aca7bb58b2af187ac0cd01534e1aae1a8e25
parent6e9ec87d488fbd02cddabbe7691488a61548232f (diff)
Add text/jscript.encode
This is the MIME type that Internet Explorer accepts for pseudo-base64-encoded JScript files, which typically have a .jse extension. Use of this file format is discouraged and files of this type should be treated with suspicion. https://www.virusbulletin.com/virusbulletin/2006/01/inside-microsoft-script-encoder/ https://book.hacktricks.xyz/windows-hardening/ntlm/places-to-steal-ntlm-creds#jscript
-rw-r--r--data/freedesktop.org.xml.in9
-rw-r--r--tests/mime-detection/list2
-rw-r--r--tests/mime-detection/survey.jsebin0 -> 5717 bytes
3 files changed, 11 insertions, 0 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in
index ade9adb..e2c466d 100644
--- a/data/freedesktop.org.xml.in
+++ b/data/freedesktop.org.xml.in
@@ -2696,6 +2696,15 @@ command to generate the output files.
<glob pattern="*.jsm"/>
<glob pattern="*.mjs"/>
</mime-type>
+ <mime-type type="text/jscript.encode">
+ <comment>Encoded JScript program</comment>
+ <sub-class-of type="application/x-executable"/>
+ <generic-icon name="text-x-script"/>
+ <magic>
+ <match type="string" value="#@~^" offset="0"/>
+ </magic>
+ <glob pattern="*.jse"/>
+ </mime-type>
<mime-type type="application/json">
<comment>JSON document</comment>
<acronym>JSON</acronym>
diff --git a/tests/mime-detection/list b/tests/mime-detection/list
index 4f84ad8..0daad20 100644
--- a/tests/mime-detection/list
+++ b/tests/mime-detection/list
@@ -310,6 +310,8 @@ build.gradle text/x-gradle ox
ico.ksy text/x-kaitai-struct ox
# Copied from http://asurvey.net/ccsfagent/media/survey.js
survey.js text/javascript ox
+# Created with `srcenc.exe survey.js survey.exe`
+survey.jse text/jscript.encode
# Copied from gecko/accessible/src/jsat/Utils.jsm in Boot2Gecko
Utils.jsm text/javascript ox
esm.mjs text/javascript ox
diff --git a/tests/mime-detection/survey.jse b/tests/mime-detection/survey.jse
new file mode 100644
index 0000000..dfb6ee9
--- /dev/null
+++ b/tests/mime-detection/survey.jse
Binary files differ