Detect-It-Easy/db/Binary/text.python.1.sg
2024-04-21 22:11:39 +03:00

16 lines
No EOL
432 B
JavaScript
Executable file

// DIE's signature file
init("source", "Python");
function detect(bShowType, bShowVersion, bShowOptions) {
var sText = Binary.getHeaderString();
if ((/import\s/.test(sText)) && (/class\s/.test(sText)) && (/self/.test(sText))) {
if (/\sdef\s/.test(sText)) {
bDetected = true;
}
}
_setLang("Python", bDetected);
return result(bShowType, bShowVersion, bShowOptions);
}