Natural Adabas – 8.3.4.0.171 CE

The license consists in two xml files, natCE83.xml and ndvCE83.xml .
The tag called LicenseKey that holds a MD5 file checksum and the tag ExpirationDate the date limit.

The algorithm is very simple:Replace all values of the LicenseKey tag with 32 byte (20 hex).Calculate de MD5Loop every byte doing AND & 15 after second oneAnd SHR plus AND with >> 4 & 15restore the Tag with the new value
This license code is inside saglic-ALL-Any.jar, class com.softwareag.common.lic.SagLic and the function is getSignedCertificate
    protected String getSignedCertificate(String certificateString) throws SagLicException, UnsupportedEncodingException {
        String methodName = "getSignedCertificate";
        String tagLicenseKey = "<LicenseKey>";
        int keyStartPos;
        if ((keyStartPos = SagUtilitiesStrings.indexStrInStr(certificateString, tagLicenseKey, 0, true)) < 0) {
            throw new SagLicException(2, methodName);
        } else {
            byte[] newCertificateBytes = certificateString.getBytes("US-ASCII");

            int i;
            for(i = keyStartPos + tagLicenseKey.length(); i < 32 + keyStartPos + tagLicenseKey.length(); ++i) {
                newCertificateBytes[i] = 32;
            }

            SagLicMd5 sagLicMd5 = new SagLicMd5();

            for(i = 0; i < newCertificateBytes.length; ++i) {
                if (SagUtilitiesStrings.isHashableChar(newCertificateBytes[i])) {
                    sagLicMd5.update(newCertificateBytes, i, 1);
                }
            }

            byte[] digestKey = sagLicMd5.digest();
            i = keyStartPos + tagLicenseKey.length();

            for(int j = 0; i < 32 + keyStartPos + tagLicenseKey.length(); ++j) {
                newCertificateBytes[i] = sHex[digestKey[j] >> 4 & 15];
                newCertificateBytes[i + 1] = sHex[digestKey[j] & 15];
                i += 2;
            }

            String newCertificateString = new String(newCertificateBytes, "US-ASCII");
            return newCertificateString;

The license files and code can be found here:

https://mega.nz/file/FgxBWArT#kVlli3uOuzlhhA2ILFI5i_mZMHbpqIMKGClBUgv_luw

The DVD_Version_NAT_8.3.4.0.171_CE.zip installation file can be found here:

https://mega.nz/file/A0gDXQTD#3EXMAYj405-s7OokNBWjcl1ucD6ovZhEwxCsuKX2UWw

Leave a Reply

Your email address will not be published. Required fields are marked *