Detect-It-Easy/db/PE/format_AutoHotKey.3.sg
2026-06-21 09:46:17 +02:00

23 lines
No EOL
761 B
JavaScript
Executable file

// Detect It Easy: detection rule file
// Author: horsicq <horsicq@gmail.com>
// https://www.autohotkey.com/
meta("format", "Compiled AutoHotKey");
function detect() {
if (PE.resource[">AUTOHOTKEY SCRIPT<"]) {
sVersion = PE.getFileVersion();
bDetected = true;
} else {
var sManifest = PE.getManifest();
if (sManifest.indexOf("AutoHotkey") !== -1 && // First, we look for a substring to save processor cycles
sManifest.match(/(\n?)<assemblyIdentity.*?(\n?).*version(.*?)(\n?)name=\"AutoHotkey\"/)) {
aVersion = sManifest.match(/version=\"(.*?)\" ?name=\"AutoHotkey/);
sVersion = aVersion[1];
bDetected = true;
}
}
return result();
}