Detect-It-Easy/db/PE/library_Python.4.sg
2026-05-25 21:03:46 +03:00

23 lines
No EOL
572 B
JavaScript
Executable file

// Detect It Easy: detection rule file
// Author: horsicq <horsicq@gmail.com>
meta("library", "Python"); // !!!! 🐓🐓🐓🐓🐓 !!!!
function detect() {
var aPython = PE.isLibraryPresentExp(/^python(\d)(\d+)/i);
if (aPython) {
sVersion = aPython[1] + "." + aPython[2];
bDetected = true;
}
var aPython2 = PE.isLibraryPresentExp(/^libpython(\d.\d)/i);
if (aPython2) {
sVersion = aPython2[1];
bDetected = true;
}
sLang = "Python";
sLangVersion = sVersion;
return result();
}