mirror of
https://github.com/horsicq/Detect-It-Easy.git
synced 2026-06-24 01:54:08 +00:00
Added a standard header comment to all db framework and detection rule files, indicating they are part of the Detect It Easy (DiE-JS) framework and warning against unauthorized changes. This improves consistency and clarifies file purpose for maintainers.
33 lines
No EOL
948 B
Text
33 lines
No EOL
948 B
Text
// Detect It Easy: DiE-JS framework file
|
|
// Don't change anything unless you're sure about what you're doing
|
|
|
|
// Author: DosX
|
|
// E-Mail: collab@kay-software.ru
|
|
// GitHub: https://github.com/DosX-dev
|
|
// Telegram: @DosX_dev
|
|
|
|
function getPythonVersionByDll(dllFileName) { // python = 💩
|
|
var version = "";
|
|
|
|
var startIndex = dllFileName.indexOf("python");
|
|
if (startIndex !== -1) {
|
|
startIndex += 6;
|
|
var endIndex = dllFileName.indexOf(".", startIndex);
|
|
if (endIndex === -1) {
|
|
endIndex = dllFileName.length;
|
|
}
|
|
version = dllFileName.substring(startIndex, endIndex);
|
|
}
|
|
|
|
if (version !== "") {
|
|
if (version.length === 1) {
|
|
return version + ".0";
|
|
} else if (version.length === 2) {
|
|
return version[0] + "." + version[1];
|
|
} else {
|
|
return version[0] + "." + version.substring(1);
|
|
}
|
|
} else {
|
|
return null;
|
|
}
|
|
} |