// DIE's signature file
// Author: Levis <levintaeyeon@live.com>
// History:
// Update sign to detect version of Python from 1.0 to 3.4

init("format","Python Compiled Module");

function detect(bShowType,bShowVersion,bShowOptions)
{
    if(Binary.getSize()>=8)
    {
        bDetected=1;
        switch(Binary.readDword(0))
        {
        case 0x00999902: sVersion="1.0";     break;
        case 0x00999903: sVersion="1.1-1.2"; break;
        case 0x0A0D2E89: sVersion="1.3";     break;
        case 0x0A0D1704: sVersion="1.4";     break;
        case 0x0A0D4E99: sVersion="1.5";     break;
        case 0x0A0DC4FC: sVersion="1.6";     break;
        case 0x0A0DC687: sVersion="2.0";     break;
        case 0x0A0DEB2A: sVersion="2.1";     break;
        case 0x0A0DED2D: sVersion="2.2";     break;
        case 0x0A0DF23B: sVersion="2.3";     break;
        case 0x0A0DF26D: sVersion="2.4";     break;
        case 0x0A0DF2B3: sVersion="2.5";     break;
        case 0x0A0DF2D1: sVersion="2.6";     break;
        case 0x0A0DF303: sVersion="2.7";     break;
        case 0x0A0D0C3A: sVersion="3.0";     break;
        case 0x0A0D0C4E: sVersion="3.1";     break;
        case 0x0A0D0C6C: sVersion="3.2";     break;
        case 0x0A0D0C9E: sVersion="3.3";     break;
        case 0x0A0D0CEE: sVersion="3.4";     break;

        default:
            bDetected=0;
        }
    }

    return result(bShowType,bShowVersion,bShowOptions);
}
