// Detect It Easy: detection rule file
// Author: KDSS-Research (koffidev365supp@gmail.com)

// Rewritten by DosX
// E-Mail: collab@kay-software.ru
// GitHub: https://github.com/DosX-dev
// Telegram: @DosX_dev

// https://github.com/Nuitka/Nuitka
meta("packer", "Nuitka");

function detect() {
    var dataSection = PE.section[".rdata"]

    if (dataSection && !PE.isRichSignaturePresent()) {
        var dataSectionOffset = dataSection.FileOffset,
            dataSectionSize = dataSection.FileSize;

        if (PE.findString(dataSectionOffset, dataSectionSize, "__nuitka_version__") != -1) {
            bDetected = true;
        } else if (PE.findString(dataSectionOffset, dataSectionSize, "NUITKA_ONEFILE_PARENT") != -1) {
            sOptions = "OneFile";
            bDetected = true;
        }
    }

    sLang = "Python";

    return result();
}