首页
社区
课程
招聘
[旧帖] [讨论]这个是什么算法来的。刚学算法 0.00雪花
发表于: 2014-9-25 23:31 1336

[旧帖] [讨论]这个是什么算法来的。刚学算法 0.00雪花

2014-9-25 23:31
1336
如果下是解密:加密怎么写的呢?
private void _$1(File paramFile)
        throws FileNotFoundException {
                if ((paramFile == null) || (!paramFile.exists())) {
                        throw new FileNotFoundException("Can't find the file.");
                }
                try {
                        File localFile = paramFile;
                        byte[]  localObject1 = new byte[ (int) localFile.length()];
                        Object localObject2 = new FileInputStream(localFile);
                        ((FileInputStream) localObject2).read((byte[]) localObject1);
                        ((FileInputStream) localObject2).close();
                        int[] localObject3 = {0, 65, 0, 3, 0, -113, -115, -38, -106, -26, -14, -81, 3, -112, -94, -22, 89, 37, 77, -6, 39, -29, 67, -82, -44, -103, 47, 21, 38, 71, -89, 72, 2, 89, -49, -19, 1, 110, 74, 68, -117, -28, 123, 107, 107, 92, 105, -5, 59, -23, 11, -107, -27, 36, -85, -22, 101, 82, -40, -108, 15, -103, 61, -39, 52, 28, 57, -28, 101, 1, 0, 1};
                        int i = (localObject3[0] & 0xFF) << 8 | localObject3[1] & 0xFF;
                        int j = (localObject3[2] & 0xFF) << 8 | localObject3[3] & 0xFF;
                        byte[] arrayOfByte2 = new byte[i];
                        byte[] arrayOfByte3 = new byte[j];
                        System.arraycopy(localObject3, 4, arrayOfByte2, 0, i);
                        System.arraycopy(localObject3, 4 + i, arrayOfByte3, 0, j);
                        Object localObject4 = new BigInteger(1, arrayOfByte2);
                        Object localObject5 = new BigInteger(1, arrayOfByte3);
                        int m = (((BigInteger) localObject4).bitLength() + 7) / 8;
                        int n = m;
                        int i1 = m - 1;
                        int i2 = (localObject1.length + n - 1) / n * i1;
                        byte[] arrayOfByte1 = new byte[i2];
                        int i3 = 0;
                        for (int i4 = 0; i3 < localObject1.length;
                        i4 += i1) {
                                byte[] arrayOfByte4 = new byte[n];
                                int i5 = localObject1.length - i3;
                                if (i5 > n)
                                        System.arraycopy(localObject1, i3, arrayOfByte4, 0, n);
                                else
                                        System.arraycopy(localObject1, i3, arrayOfByte4, 0, i5);
                                    BigInteger localBigInteger1 = new BigInteger(1, arrayOfByte4);
                                    BigInteger localBigInteger2 = localBigInteger1.modPow((BigInteger) localObject5, (BigInteger) localObject4);
                                    arrayOfByte4 = localBigInteger2.toByteArray();
                                if (arrayOfByte4.length <= i1)
                                        System.arraycopy(arrayOfByte4, 0, arrayOfByte1, i4 + i1 - arrayOfByte4.length, arrayOfByte4.length);
                                else
                                        System.arraycopy(arrayOfByte4, arrayOfByte4.length - i1, arrayOfByte1, i4, i1);
                                i3 += n;
                        }
                        i = arrayOfByte1[0] & 0xFF;
                        j = arrayOfByte1[1] & 0xFF;
                        arrayOfByte2 = new byte[i];
                        for (int k = 0; k < i; k++) {
                                arrayOfByte2[k] = arrayOfByte1[j];
                                j = arrayOfByte1[(j + 1)] & 0xFF;
                        }
                        ByteArrayInputStream localByteArrayInputStream = new ByteArrayInputStream(arrayOfByte2);
                        localObject4 = new DataInputStream(localByteArrayInputStream);
                        this._$8 = ((DataInputStream) localObject4).readShort();
                        this._$7 = ((DataInputStream) localObject4).readUTF();
                        this._$6 = ((DataInputStream) localObject4).readUTF();
                        if (this._$8 >= 3) {
                                this._$5 = ((DataInputStream) localObject4).readInt();
                                this._$4 = ((DataInputStream) localObject4).readInt();
                                this._$3 = ((DataInputStream) localObject4).readLong();
                                this._$2 = ((DataInputStream) localObject4).readInt();
                                this._$1 = ((DataInputStream) localObject4).readInt();
                        } else {
                                localObject5 = ((DataInputStream) localObject4).readUTF();
                                if (((String) localObject5).endsWith("CPU")) this._$5 = Integer.parseInt(((String) localObject5).substring(0, ((String) localObject5).length() - 3));
                                else this._$5 = Integer.parseInt((String) localObject5);
                                this._$3 = ((DataInputStream) localObject4).readLong();
                                this._$1 = ((DataInputStream) localObject4).readInt();
                                if (this._$1 == -1) {
                                        this._$4 = 5;
                                        this._$2 = 15;
                                } else {
                                        this._$4 = 0;
                                        this._$2 = 0;
                                }
                        }
                        this._$9 = this._$1;

                        if ((this._$8 == 2) || (this._$8 == 3)) {
                                String localObject13 = (this._$1 >>> 24 & 0xFF) + "." + (this._$1 >>> 16 & 0xFF) + "." + (this._$1 >>> 8 & 0xFF) + "." + (this._$1 >>> 0 & 0xFF);

                                localObject2 = InetAddress.getByName( localObject13);
                                ServerSocket localObject31 = new ServerSocket(0, 1, (InetAddress) localObject2);
                                ((ServerSocket) localObject31).close();

                                this._$9 = 0;
                        }
                } catch (Throwable localThrowable) {
                        if (this._$1 == -1) {
                                long l = System.currentTimeMillis() - this._$3;

                                if ((l >= 0L) && (l < this._$2 * 86400L * 1000L)) this._$9 = 0;
                                else if ((this._$4 > 0) && (this._$4 < 6)) {
                                        this._$9 = 0;
                                } else this._$9 = 2130706434;
                        }
                }
        }

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 205
活跃值: (60)
能力值: ( LV1,RANK:10 )
在线值:
发帖
回帖
粉丝
2
应该是:[null, 0, 0.0.0.0(IP), 0, null, null]
2014-9-25 23:46
0
游客
登录 | 注册 方可回帖
返回
//