mirror of
https://github.com/horsicq/Detect-It-Easy.git
synced 2026-06-24 01:54:08 +00:00
28 lines
690 B
Text
28 lines
690 B
Text
// DIE's signature file
|
|
// Author: Jason Hood <jadoxa@yahoo.com.au>
|
|
|
|
init("compiler","WATCOM C/C++");
|
|
|
|
function detect(bShowType,bShowVersion,bShowOptions)
|
|
{
|
|
if(MSDOS.compareEP("E9....'WATCOM C'"))
|
|
{
|
|
bDetected=1;
|
|
}
|
|
else if(MSDOS.isSignaturePresent(0,Math.min(2048,MSDOS.getSize()),"'WATCOM C'"))
|
|
{
|
|
bDetected=1;
|
|
}
|
|
else if(MSDOS.isLE())
|
|
{
|
|
var nLE=MSDOS.getNEOffset();
|
|
var nDataPage=MSDOS.readDword(nLE+0x80);
|
|
var nOffset=MSDOS.readDword(nLE+0x1C);
|
|
if(MSDOS.compare("EB..'WATCOM C'",nDataPage+nOffset))
|
|
{
|
|
bDetected=1;
|
|
}
|
|
}
|
|
|
|
return result(bShowType,bShowVersion,bShowOptions);
|
|
}
|