mirror of
https://github.com/horsicq/Detect-It-Easy.git
synced 2026-06-24 01:54:08 +00:00
18 lines
401 B
Text
18 lines
401 B
Text
// DIE's signature file
|
|
init("source","python");
|
|
|
|
function detect(bShowType,bShowVersion,bShowOptions)
|
|
{
|
|
var sText=Text.getString(0,Math.min(Text.getSize(),8192));
|
|
|
|
if((/import\s/.test(sText)) &&(/class\s/.test(sText))&&(/self/.test(sText)))
|
|
{
|
|
if(/\sdef\s/.test(sText))
|
|
{
|
|
bDetected=1;
|
|
}
|
|
}
|
|
|
|
|
|
return result(bShowType,bShowVersion,bShowOptions);
|
|
}
|