| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1163 人关注过本帖
标题:这个是什么算法来的。搞不清
只看楼主 加入收藏
coodi
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2014-10-5
结帖率:0
收藏
已结贴  问题点数:20 回复次数:10 
这个是什么算法来的。搞不清
public class Ver {
    private int _$9 = 0;
    private int _$8 = 0;
    private String _$7 = null;
    private String _$6 = null;
    private int _$5 = 0;
    private int _$4 = 0;
    private long _$3 = 0L;
    private int _$2 = 0;
    private int _$1 = 0;
    public void load(File paramFile) throws FileNotFoundException {
        _$1(paramFile);
    }
    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()];
//文件长度数组[9, -31, 9, 49, -3, 12, -113, 7, 101, 20, 25, 42, 59, 117, -48, -117, 25, -59, 106, 36, -42, -76, 56, -78, 59, 113, 114, -105, -98, 85, -77, 82, -16, 78, 86, -86, 30, 28, -2, 39, 83, -21, 0, 32, 86, -71, -124, -114, 122, 64, -95, -79, -89, -17, -71, -35, -95, -10, 34, 103, 56, 95, 17, -70, 89, -1, -107, -22, 61, -86, 77, -31, -73, 112, 9, 44, -49, -125, 53, -9, 76, 61, 115, -94, 90, -21, 65, -59, 122, -76, -36, -91, 88, -1, 51, -90, -90, -118, 99, -128, 17, -109, -49, -41, -28, 111, 98, -19, -127, 86, -37, -87, 76, 88, 45, -93, 5, 95, -38, -111, 16, -49, 30, -72, -54, 3, 105, 101, 55, 19, 11, -29, -115, -41, -19, -69, 111, -27, -64, 96, -43, 71, -1, 82, 106, -116, -45, 51, 87, 17, -12, 118, -111, 125, -108, -112, 56, -36, -117, 113, 120, -115, 127, 1, 106, -49, 9, 48, -12, 38, 81, 20, -69, 44, 37, 81, 104, 30, -89, -71, 69, 63, -121, -12, 17, 108, -52, 37, 57, 125, -117, -84, -121, 19, -43, 73, -100, 99, -5, -17, 100, -84, -121, -69, -3, 19, -69, -101, -25, -127, -84, 124, 21, 113, 27, 48, -76, 76, 13, -19, -127, -103, -1, 17, -85, 46, -76, 114, 30, 40, -78, -62, 86, 59, -34, -89, 110, -58, -58, 14, -71, 21, -80, -33, 98, 4, -50, 121, -83, -21, -121, 50, -89, -51, 89, 117, 12, 119, -87, 88, -84, 19, -65, 51, -40, -61, -29, -51, -35, -82, 54, 51, -39, 126, 82, -70, 62, -128, 109, -121, -38, 116, 115, 71, 115, 74, -74, -96, -95, -48, -1, -92, 28, 36, -50, -47, 20, -115, 116, -20, 80, 75, 74, 27, 14, 97, 99, 102, 86, -51, -55, -38, 127, -20, 10, 52, -5, 126, 6, 0]
            Object localObject2 = new FileInputStream(localFile);
            ((FileInputStream) localObject2).read((byte[]) localObject1);//读取文件
            ((FileInputStream) localObject2).close();
            byte[] 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;//得到I是65
            int j = (localObject3[2] & 0xFF) << 8 | localObject3[3] & 0xFF;//得到J是3
            byte[] arrayOfByte2 = new byte[i];
//开出65位的数组[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
            byte[] arrayOfByte3 = new byte[j];
            //开出[0, 0, 0]
            System.arraycopy(localObject3, 4, arrayOfByte2, 0, i);//复制
            System.arraycopy(localObject3, 4 + i, arrayOfByte3, 0, j);//复制
            Object localObject4 = new BigInteger(1, arrayOfByte2);
          //得到localObject4=7518539155220091912091271151607171597180694736625285327722048871200906719085585230683358494079624676176505503892717301692809619039513418622614148430292069(则是BigInteger的modulus)
            Object localObject5 = new BigInteger(1, arrayOfByte3);
            //得到localObject5=65537(则大数BigInteger的KEY)
            int m = (((BigInteger) localObject4).bitLength() + 7) / 8;//64
            int n = m;//64
            int i1 = m - 1;//63
            int i2 = (localObject1.length + n - 1) / n * i1;//315
            byte[] arrayOfByte1 = new byte[i2];//315
            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);
//517407651520686600069155755378994573441292672595621585940102495302888392538492833013031513124330161658548374683634860721799927620216002436239992782000570
                    BigInteger localBigInteger2 = localBigInteger1.modPow((BigInteger) localObject5, (BigInteger) localObject4);
//9976971778203722047684271002989477961883238883022141389684090131454479278822236304571083126853114419726057531570923733312166778452205013214592459886091                    
                    arrayOfByte4 = localBigInteger2.toByteArray();
//[48, -60, 52, 63, 1, -44, -69, -93, 0, -96, -98, -92, 123, 83, -12, 108, 110, -2, 0, 108, -20, 30, -111, -45, 112, -38, -1, -118, -13, -66, -49, 17, -27, 116, -124, -79, 93, 30, 83, -67, 0, 94, 100, 8, 112, 47, 0, -34, 127, -87, 1, -18, 100, -4, 29, -103, -118, 72, 77, -23, 0, 78, 11]
                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;//65
            j = arrayOfByte1[1] & 0xFF;//3
            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();//CPU
this._$7 = ((DataInputStream) localObject4).readUTF();//用户
this._$6 = ((DataInputStream) localObject4).readUTF();//版本
            if (this._$8 >= 3) {
this._$5 = ((DataInputStream) localObject4).readInt();//0
this._$4 = ((DataInputStream) localObject4).readInt();//10
this._$3 = ((DataInputStream) localObject4).readLong();//1387728000000
this._$2 = ((DataInputStream) localObject4).readInt();//365
this._$1 = ((DataInputStream) localObject4).readInt();//-1
            } 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;//IP

            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);
//255.255.255.255
                localObject2 = InetAddress.getByName( localObject13);//255.255.255.255
                ServerSocket localObject31 = new ServerSocket(0, 1, (InetAddress) localObject2);
                ((ServerSocket) localObject31).close();

                this._$9 = 0;
            }
        } catch (Throwable localThrowable) {
            if (this._$1 == -1) {//365转成MILLIS
                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;
            }
        }
    }

[ 本帖最后由 coodi 于 2014-10-10 20:32 编辑 ]
搜索更多相关主题的帖子: private public null 
2014-10-05 14:26
love云彩
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
来 自:青藏高原
等 级:贵宾
威 望:53
帖 子:3663
专家分:11416
注 册:2012-11-17
收藏
得分:4 
没见过

思考赐予新生,时间在于定义
2014-10-05 15:26
coodi
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2014-10-5
收藏
得分:0 
回复 楼主 coodi
是不是RAS及BigInteger吗?有个:modPow及BigInteger,没KEY之类的

[ 本帖最后由 coodi 于 2014-10-5 15:57 编辑 ]
2014-10-05 15:54
小小程序猿
Rank: 11Rank: 11Rank: 11Rank: 11
等 级:小飞侠
威 望:1
帖 子:755
专家分:2785
注 册:2013-7-18
收藏
得分:4 
这样的命名看的我也是醉了,根本没有一丢丢想去阅读的想法

孤独与寂寞是催化一个人迅速成长的良药,没有之一
2014-10-06 21:01
韶志
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
来 自:斗气大陆
等 级:贵宾
威 望:44
帖 子:2223
专家分:13592
注 册:2013-3-22
收藏
得分:4 
见过也给懵了

三十年河东,三十年河西,莫欺少年穷!
2014-10-07 15:54
liucao
Rank: 10Rank: 10Rank: 10
来 自:恶灵之城
等 级:贵宾
威 望:13
帖 子:538
专家分:1575
注 册:2014-8-6
收藏
得分:4 
心碎加崩溃,本来就菜,看完觉得完全不会写代码了……把突出算法的一小段弄出来啊,我不会也可以去问问老师

one car come one car go ,two car peng peng people die.
2014-10-09 14:28
coodi
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2014-10-5
收藏
得分:0 
回复 6 楼 liucao
不会吧。居然会对你哪么大打击。我是不懂才放上来问下而已。
2014-10-10 20:52
thj0775
Rank: 1
等 级:新手上路
帖 子:5
专家分:7
注 册:2011-6-25
收藏
得分:4 
我去...
2014-10-11 22:09
日知己所无
Rank: 11Rank: 11Rank: 11Rank: 11
等 级:贵宾
威 望:38
帖 子:427
专家分:2071
注 册:2014-3-22
收藏
得分:4 
程序代码:
package thread_436876;

import *;
import java.math.*;
import *;

public class Ver {
    private int _$9 = 0;
    private int _$8 = 0;
    private String _$7 = null;
    private String _$6 = null;
    private int _$5 = 0;
    private int _$4 = 0;
    private long _$3 = 0L;
    private int _$2 = 0;
    private int _$1 = 0;

    public void load(File paramFile) throws FileNotFoundException {
        _$1(paramFile);
    }

    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()];
            // 文件长度数组[9, -31, 9, 49, -3, 12, -113, 7, 101, 20, 25, 42, 59, 117,
            // -48, -117, 25, -59, 106, 36, -42, -76, 56, -78, 59, 113, 114,
            // -105, -98, 85, -77, 82, -16, 78, 86, -86, 30, 28, -2, 39, 83,
            // -21, 0, 32, 86, -71, -124, -114, 122, 64, -95, -79, -89, -17,
            // -71, -35, -95, -10, 34, 103, 56, 95, 17, -70, 89, -1, -107, -22,
            // 61, -86, 77, -31, -73, 112, 9, 44, -49, -125, 53, -9, 76, 61,
            // 115, -94, 90, -21, 65, -59, 122, -76, -36, -91, 88, -1, 51, -90,
            // -90, -118, 99, -128, 17, -109, -49, -41, -28, 111, 98, -19, -127,
            // 86, -37, -87, 76, 88, 45, -93, 5, 95, -38, -111, 16, -49, 30,
            // -72, -54, 3, 105, 101, 55, 19, 11, -29, -115, -41, -19, -69, 111,
            // -27, -64, 96, -43, 71, -1, 82, 106, -116, -45, 51, 87, 17, -12,
            // 118, -111, 125, -108, -112, 56, -36, -117, 113, 120, -115, 127,
            // 1, 106, -49, 9, 48, -12, 38, 81, 20, -69, 44, 37, 81, 104, 30,
            // -89, -71, 69, 63, -121, -12, 17, 108, -52, 37, 57, 125, -117,
            // -84, -121, 19, -43, 73, -100, 99, -5, -17, 100, -84, -121, -69,
            // -3, 19, -69, -101, -25, -127, -84, 124, 21, 113, 27, 48, -76, 76,
            // 13, -19, -127, -103, -1, 17, -85, 46, -76, 114, 30, 40, -78, -62,
            // 86, 59, -34, -89, 110, -58, -58, 14, -71, 21, -80, -33, 98, 4,
            // -50, 121, -83, -21, -121, 50, -89, -51, 89, 117, 12, 119, -87,
            // 88, -84, 19, -65, 51, -40, -61, -29, -51, -35, -82, 54, 51, -39,
            // 126, 82, -70, 62, -128, 109, -121, -38, 116, 115, 71, 115, 74,
            // -74, -96, -95, -48, -1, -92, 28, 36, -50, -47, 20, -115, 116,
            // -20, 80, 75, 74, 27, 14, 97, 99, 102, 86, -51, -55, -38, 127,
            // -20, 10, 52, -5, 126, 6, 0]
            Object localObject2 = new FileInputStream(localFile);
            ((FileInputStream) localObject2).read((byte[]) localObject1);// 读取文件
            ((FileInputStream) localObject2).close();
            byte[] 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;// 得到I是65
            int j = (localObject3[2] & 0xFF) << 8 | localObject3[3] & 0xFF;// 得到J是3
            byte[] arrayOfByte2 = new byte[i];
            // 开出65位的数组[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            // 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            // 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            // 0, 0]
            byte[] arrayOfByte3 = new byte[j];
            // 开出[0, 0, 0]
            System.arraycopy(localObject3, 4, arrayOfByte2, 0, i);// 复制
            System.arraycopy(localObject3, 4 + i, arrayOfByte3, 0, j);// 复制
            Object localObject4 = new BigInteger(1, arrayOfByte2);
            // 得到localObject4=7518539155220091912091271151607171597180694736625285327722048871200906719085585230683358494079624676176505503892717301692809619039513418622614148430292069(则是BigInteger的modulus)
            Object localObject5 = new BigInteger(1, arrayOfByte3);
            // 得到localObject5=65537(则大数BigInteger的KEY)
            int m = (((BigInteger) localObject4).bitLength() + 7) / 8;// 64
            int n = m;// 64
            int i1 = m - 1;// 63
            int i2 = (localObject1.length + n - 1) / n * i1;// 315
            byte[] arrayOfByte1 = new byte[i2];// 315
            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);
                // 517407651520686600069155755378994573441292672595621585940102495302888392538492833013031513124330161658548374683634860721799927620216002436239992782000570
                BigInteger localBigInteger2 = localBigInteger1.modPow(
                        (BigInteger) localObject5, (BigInteger) localObject4);
                // 9976971778203722047684271002989477961883238883022141389684090131454479278822236304571083126853114419726057531570923733312166778452205013214592459886091
                arrayOfByte4 = localBigInteger2.toByteArray();
                // [48, -60, 52, 63, 1, -44, -69, -93, 0, -96, -98, -92, 123,
                // 83, -12, 108, 110, -2, 0, 108, -20, 30, -111, -45, 112, -38,
                // -1, -118, -13, -66, -49, 17, -27, 116, -124, -79, 93, 30, 83,
                // -67, 0, 94, 100, 8, 112, 47, 0, -34, 127, -87, 1, -18, 100,
                // -4, 29, -103, -118, 72, 77, -23, 0, 78, 11]
                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;// 65
            j = arrayOfByte1[1] & 0xFF;// 3
            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();// CPU
            this._$7 = ((DataInputStream) localObject4).readUTF();// 用户
            this._$6 = ((DataInputStream) localObject4).readUTF();// 版本
            if (this._$8 >= 3) {
                this._$5 = ((DataInputStream) localObject4).readInt();// 0
                this._$4 = ((DataInputStream) localObject4).readInt();// 10
                this._$3 = ((DataInputStream) localObject4).readLong();// 1387728000000
                this._$2 = ((DataInputStream) localObject4).readInt();// 365
                this._$1 = ((DataInputStream) localObject4).readInt();// -1
            } 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;// IP

            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);
                // 255.255.255.255
                localObject2 = InetAddress.getByName(localObject13);// 255.255.255.255
                ServerSocket localObject31 = new ServerSocket(0, 1,
                        (InetAddress) localObject2);
                ((ServerSocket) localObject31).close();

                this._$9 = 0;
            }
        } catch (Throwable localThrowable) {
            if (this._$1 == -1) {// 365转成MILLIS
                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;
            }
        }
    }
}


没啥复杂的算法,就是从 版本信息的二进制文件(由paramFile参数传入)中,读取CPU、用户、版本等信息……
2014-10-12 12:02
coodi
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2014-10-5
收藏
得分:0 
回复 9 楼 日知己所无
还是不明,高手。加密是怎么加的呀;求解。怎么我觉得有RAS的影子在里面呢?
求加密代码:加密:[-1,365,1387728000000,99,0,ID,who,2]

[ 本帖最后由 coodi 于 2014-10-25 02:12 编辑 ]
2014-10-25 02:06
快速回复:这个是什么算法来的。搞不清
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.041871 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved