mirror of
https://github.com/horsicq/Detect-It-Easy.git
synced 2026-06-24 01:54:08 +00:00
17 lines
No EOL
400 B
JavaScript
Executable file
17 lines
No EOL
400 B
JavaScript
Executable file
// Detect It Easy: detection rule file
|
|
// Author: horsicq <horsicq@gmail.com>
|
|
meta("source", "Python");
|
|
|
|
function detect() {
|
|
var sText = Binary.getHeaderString();
|
|
|
|
if ((/import\s/.test(sText)) && (/class\s/.test(sText)) && (/self/.test(sText))) {
|
|
if (/\sdef\s/.test(sText)) {
|
|
bDetected = true;
|
|
}
|
|
}
|
|
|
|
sLang = "Python";
|
|
|
|
return result();
|
|
} |