View Issue Details

IDProjectCategoryView StatusLast Update
0000475fileGeneralpublic2024-02-04 19:28
Reporteradepasquale Assigned Tochristos  
PrioritylowSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.45 
Fixed in VersionHEAD 
Summary0000475: Magic for Microsoft HTML Application (HTA)
DescriptionMicrosoft HTML Application (HTA) is a sub-set of HTML.
Figured it made sense to add a specific magic for that "<hta:application>" tag.
Had to use a strength of +50 to prioritize HTA over HTML.
Please close the issue if not interested in making this distinction.

Before/after:
sample.hta: HTML document, ASCII text
sample.hta: Microsoft HTML Application (HTA), ASCII text

Documentation:
https://en.wikipedia.org/wiki/HTML_Application
https://learn.microsoft.com/en-us/previous-versions//ms536496(v=vs.85)
TagsNo tags attached.

Activities

adepasquale

2023-08-31 14:32

reporter  

hta-FILE5_45.patch (571 bytes)   
diff --git a/magic/Magdir/sgml b/magic/Magdir/sgml
index fb698a54..e5431d34 100644
--- a/magic/Magdir/sgml
+++ b/magic/Magdir/sgml
@@ -108,6 +108,13 @@
 !:mime	text/html
 !:strength + 15
 
+# Microsoft HTML Application (HTA)
+# https://learn.microsoft.com/en-us/previous-versions//ms536496(v=vs.85)
+0	search/4096/cWt	\<hta:application\ 	Microsoft HTML Application (HTA)
+!:mime	application/hta
+!:ext	hta
+!:strength + 50
+
 # Extensible markup language (XML), a subset of SGML
 # from Marc Prud'hommeaux (marc@apocalypse.org)
 0	search/1/cwt	\<?xml			XML document text
hta-FILE5_45.patch (571 bytes)   
sample.hta (169 bytes)   
<html>
<head>
<title>Sample HTA</title>
<hta:application id="test" />
<script language="vbscript">

MsgBox("test")

</script>
</head>
<body scroll="no">
</body>
</html>
sample.hta (169 bytes)   

christos

2024-02-04 19:28

manager   ~0003999

Added, thanks!

Issue History

Date Modified Username Field Change
2023-08-31 14:32 adepasquale New Issue
2023-08-31 14:32 adepasquale File Added: hta-FILE5_45.patch
2023-08-31 14:32 adepasquale File Added: sample.hta
2024-02-04 19:28 christos Assigned To => christos
2024-02-04 19:28 christos Status new => assigned
2024-02-04 19:28 christos Status assigned => resolved
2024-02-04 19:28 christos Resolution open => fixed
2024-02-04 19:28 christos Fixed in Version => HEAD
2024-02-04 19:28 christos Note Added: 0003999