导航菜单

页面标题

页面副标题

Kaspi.kz v5.85.1 - C0215bYk.java 源代码

正在查看: Kaspi.kz v5.85.1 应用的 C0215bYk.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package o;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.security.SecureRandom;
import org.bouncycastle.crypto.CryptoException;

public class C0215bYk {
    private byte[] setBackground;
    private BufferedInputStream setError;
    private BufferedOutputStream setFieldValue;
    private cbg setLabel;
    private boolean setOptions;

    public C0215bYk() {
        this.setOptions = true;
        this.setLabel = null;
        this.setError = null;
        this.setFieldValue = null;
        this.setBackground = null;
    }

    public C0215bYk(String str, String str2, String str3, boolean z) {
        SecureRandom secureRandom;
        PrintStream printStream;
        StringBuilder sb;
        String str4;
        SecureRandom secureRandom2 = null;
        this.setLabel = null;
        this.setError = null;
        this.setFieldValue = null;
        this.setBackground = null;
        this.setOptions = z;
        try {
            this.setError = new BufferedInputStream(new FileInputStream(str));
        } catch (FileNotFoundException unused) {
            System.err.println("Input file not found [" + str + "]");
            System.exit(1);
        }
        try {
            this.setFieldValue = new BufferedOutputStream(new FileOutputStream(str2));
        } catch (IOException unused2) {
            System.err.println("Output file not created [" + str2 + "]");
            System.exit(1);
        }
        if (z) {
            try {
                secureRandom = new SecureRandom();
            } catch (Exception unused3) {
            }
            try {
                secureRandom.setSeed("www.bouncycastle.org".getBytes());
            } catch (Exception unused4) {
                secureRandom2 = secureRandom;
                try {
                    System.err.println("Hmmm, no SHA1PRNG, you need the Sun implementation");
                    System.exit(1);
                    secureRandom = secureRandom2;
                    C0130bUc c0130bUc = new C0130bUc(secureRandom, 192);
                    C0224bYu c0224bYu = new C0224bYu();
                    c0224bYu.setError(c0130bUc);
                    this.setBackground = c0224bYu.setFieldValue();
                    BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(new FileOutputStream(str3));
                    byte[] label = cFk.setLabel(this.setBackground);
                    bufferedOutputStream.write(label, 0, label.length);
                    bufferedOutputStream.flush();
                    bufferedOutputStream.close();
                    return;
                } catch (IOException unused5) {
                    printStream = System.err;
                    sb = new StringBuilder();
                    str4 = "Could not decryption create key file [";
                }
            }
            C0130bUc c0130bUc2 = new C0130bUc(secureRandom, 192);
            C0224bYu c0224bYu2 = new C0224bYu();
            c0224bYu2.setError(c0130bUc2);
            this.setBackground = c0224bYu2.setFieldValue();
            BufferedOutputStream bufferedOutputStream2 = new BufferedOutputStream(new FileOutputStream(str3));
            byte[] label2 = cFk.setLabel(this.setBackground);
            bufferedOutputStream2.write(label2, 0, label2.length);
            bufferedOutputStream2.flush();
            bufferedOutputStream2.close();
            return;
        }
        try {
            BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(str3));
            int available = bufferedInputStream.available();
            byte[] bArr = new byte[available];
            bufferedInputStream.read(bArr, 0, available);
            this.setBackground = cFk.setOptions(bArr);
            return;
        } catch (IOException unused6) {
            printStream = System.err;
            sb = new StringBuilder();
            str4 = "Decryption key file not found, or not valid [";
        }
        sb.append(str4);
        sb.append(str3);
        sb.append("]");
        printStream.println(sb.toString());
        System.exit(1);
    }

    private void setBackground(byte[] bArr) {
        this.setLabel.setError(true, new ccy(bArr));
        byte[] bArr2 = new byte[47];
        byte[] bArr3 = new byte[this.setLabel.setError(47)];
        while (true) {
            try {
                int read = this.setError.read(bArr2, 0, 47);
                if (read <= 0) {
                    try {
                        break;
                    } catch (CryptoException unused) {
                        return;
                    }
                }
                int background = this.setLabel.setBackground(bArr2, 0, read, bArr3, 0);
                if (background > 0) {
                    byte[] options = cFk.setOptions(bArr3, 0, background);
                    this.setFieldValue.write(options, 0, options.length);
                    this.setFieldValue.write(10);
                }
            } catch (IOException e) {
                e.printStackTrace();
                return;
            }
        }
        int fieldValue = this.setLabel.setFieldValue(bArr3, 0);
        if (fieldValue > 0) {
            byte[] options2 = cFk.setOptions(bArr3, 0, fieldValue);
            this.setFieldValue.write(options2, 0, options2.length);
            this.setFieldValue.write(10);
        }
    }

    public static void setBackground(String[] strArr) {
        String str;
        boolean z = true;
        if (strArr.length < 2) {
            new C0215bYk();
            System.err.println("Usage: java " + C0215bYk.class.getName() + " infile outfile [keyfile]");
            System.exit(1);
        }
        String str2 = strArr[0];
        String str3 = strArr[1];
        if (strArr.length > 2) {
            str = strArr[2];
            z = false;
        } else {
            str = "deskey.dat";
        }
        new C0215bYk(str2, str3, str, z).setLabel();
    }

    private void setFieldValue(byte[] bArr) {
        this.setLabel.setError(false, new ccy(bArr));
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(this.setError));
        byte[] bArr2 = null;
        while (true) {
            try {
                String readLine = bufferedReader.readLine();
                if (readLine == null) {
                    try {
                        break;
                    } catch (CryptoException unused) {
                        return;
                    }
                }
                byte[] options = cFk.setOptions(readLine);
                bArr2 = new byte[this.setLabel.setError(options.length)];
                int background = this.setLabel.setBackground(options, 0, options.length, bArr2, 0);
                if (background > 0) {
                    this.setFieldValue.write(bArr2, 0, background);
                }
            } catch (IOException e) {
                e.printStackTrace();
                return;
            }
        }
        int fieldValue = this.setLabel.setFieldValue(bArr2, 0);
        if (fieldValue > 0) {
            this.setFieldValue.write(bArr2, 0, fieldValue);
        }
    }

    private void setLabel() {
        this.setLabel = new cbg(new bZZ(new bWV()));
        if (this.setOptions) {
            setBackground(this.setBackground);
        } else {
            setFieldValue(this.setBackground);
        }
        try {
            this.setError.close();
            this.setFieldValue.flush();
            this.setFieldValue.close();
        } catch (IOException e) {
            System.err.println("exception closing resources: " + e.getMessage());
        }
    }
}