Does anyone know how this is encrypted?

the background is like this. A software bought by the company was installed on xp, but now it has to be migrated to a new server. If there is a problem with the migration, you need to enter the registration code after installation. The company that made this software has closed down before, and there are no documents. After reading the code, I don"t know how to encrypt it

.
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.cwebs.common.util;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.Date;

public class MachineCode {
    private static String expiredString;

    static {
        try {
            System.load(MachineCode.class.getResource("/").getFile() + "HDSID.properties");
        } catch (Exception var13) {
            System.out.println("HDSID.dll ");
        }

        File f = new File(MachineCode.class.getResource("/").getFile() + "license.dat");
        expiredString = null;
        if (f != null && f.exists()) {
            BufferedReader reader = null;

            try {
                reader = new BufferedReader(new FileReader(f));
                expiredString = reader.readLine();
                reader.close();
            } catch (Exception var12) {
                ;
            } finally {
                if (reader != null) {
                    try {
                        reader.close();
                    } catch (Exception var11) {
                        ;
                    }
                }

            }
        }

    }

    public MachineCode() {
    }

    public static native String getHDSID();

    public static native String getCPUSID();

    public static native String getSID();

    public static native String getDecryptionStr(String var0);

    public static String getMachineCode() {
        try {
            return getHDSID();
        } catch (Exception var1) {
            System.out.println("");
            return null;
        }
    }

    public static boolean chcode(String deStr, String souStr) {
        if (deStr != null && !deStr.equals("") && souStr != null && !souStr.equals("")) {
            String _destr = getDecryptionStr(deStr);
            if (_destr.length() > souStr.length()) {
                _destr = _destr.substring(0, souStr.length());
            }

            return _destr.equals(souStr);
        } else {
            return false;
        }
    }

    public static Date getExpired() {
        String tempString = null;
        if (expiredString != null) {
            try {
                DESPlus des = new DESPlus(getMachineCode());
                tempString = des.decrypt(expiredString);
            } catch (Exception var2) {
                tempString = "1977-04-17";
            }
        } else {
            tempString = "1977-04-17";
        }

        return C_Date.strTodate(tempString, "yyyy-MM-dd");
    }

    public static void main(String[] args) {
        try {
            DESPlus des = new DESPlus("B1B1AC094568C763DB");
            System.out.println(des.encrypt("2013-12-30"));
        } catch (Exception var2) {
            ;
        }

    }
}

license.dat opens content like this
1e8155d85ed62cc87ea60962dd2bc858

HDSID.properties is something like this

clipboard.png

does anyone know how to encrypt it? install vcredit.exe software before deploying the configuration


I have a plan: first get a class with the same name, compile it into a .class file, then open his jar package in zip format, replace the .class file with your own, and finish


the positive solution upstairs, as long as the logic of the comparison is changed to be able to judge, there is no need to worry about the original encryption logic.

clipboard.png

the return value of this method is changed to true

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4bc85-445e9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4bc85-445e9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?