首页
社区
课程
招聘
[原创]某记账软件财务软件
发表于: 2013-4-22 13:12 4023

[原创]某记账软件财务软件

2013-4-22 13:12
4023
前言:略

编写语言:C# + 壳

下载地址:http://ebadu.newhua.com/down/xyCashManage.zip

注册部分源码。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
public class RegServer
{
    // Fields
    public string KEY_DATE;
    public string KEY_ID;
    public string KEY_NAME;
    public string KEY_SN;
    public static bool m_bError;
    public static DateTime m_dtStartUse;
    public int m_nType;
    public static string m_strID;
    public static string m_strName;
    public static string m_strSN;
    public string REG_SEC;
    public static RegServer ThisObj;
    public int TRY_DAYS;
 
    // Methods
    static RegServer()
    {
        Class6.B5xmjkIz9OKt5();
        m_strName = "unknown";
        m_strID = "unknown";
        m_strSN = "";
        m_dtStartUse = DateTime.Now;
        m_bError = false;
    }
 
    public RegServer()
    {
        Class6.B5xmjkIz9OKt5();
        this.REG_SEC = "XY_SOFT";
        this.KEY_DATE = "DATE";
        this.KEY_NAME = "NAME";
        this.KEY_SN = "SN";
        this.KEY_ID = "ID";
        this.TRY_DAYS = 30;
        SLEncrypt.EncryptKey = "2008-10-10";
        SLEncrypt.EncryptVect = "xysoft2008";
        ThisObj = this;
        string text = "您没有访问注册表的权限!\r\n请以管理员身份登录系统后再进行操作!\r\n如果您是Vista/Win7系统,请关闭UAC后再进行操作!\r\n如有疑问,请登录http://www.xingyusoft.cn获取帮助!\r\n";
        this.m_nType = new Ini().IniReadInt("REG", "TYPE", 0);
        if (this.m_nType != 0)
        {
            text = "对不起,注册文件访问失败!";
        }
        string strValue = "";
        try
        {
            if (this.m_nType == 0)
            {
                if (Regs.ReadItem(this.REG_SEC, this.KEY_ID, ref strValue) == -1)
                {
                    PublicFunc.MsgError(text);
                    m_bError = true;
                    return;
                }
                if (strValue == "")
                {
                    strValue = DateTime.Now.ToString("yyyyMMddHHmmss");
                    if (!Regs.WriteItem(this.REG_SEC, this.KEY_ID, strValue))
                    {
                        PublicFunc.MsgError(text);
                        m_bError = true;
                        return;
                    }
                    m_strID = strValue;
                }
                string str3 = "";
                Regs.ReadItem(this.REG_SEC, this.KEY_DATE, ref str3);
                if (str3 == "")
                {
                    str3 = DateTime.Now.ToString("yyyy-MM-dd");
                    Regs.WriteItem(this.REG_SEC, this.KEY_DATE, str3);
                    return;
                }
                DateTime now = DateTime.Now;
                if (!DateTime.TryParse(str3, out now))
                {
                    return;
                }
                m_dtStartUse = now;
                Regs.ReadItem(this.REG_SEC, this.KEY_NAME, ref m_strName);
                Regs.ReadItem(this.REG_SEC, this.KEY_SN, ref m_strSN);
            }
            else
            {
                RegFile.Read();
                strValue = RegFile.m_strID;
                m_strName = RegFile.m_strUser;
                m_strSN = RegFile.m_strSN;
                m_dtStartUse = RegFile.m_dtStartUse;
            }
            m_strID = strValue;
        }
        catch (Exception exception)
        {
            PublicFunc.ShowExceptionErr(exception, MethodBase.GetCurrentMethod(), new string[0]);
            PublicFunc.MsgError(text);
            m_bError = true;
        }
    }
 
    public bool CanUse()
    {
        TimeSpan span = m_dtStartUse.AddDays((double) this.TRY_DAYS).Subtract(DateTime.Now);
        return ((span.Days > 0) && (span.Days <= this.TRY_DAYS));
    }
 
    public int CanUseDays()
    {
        return Math.Abs(m_dtStartUse.AddDays((double) this.TRY_DAYS).Subtract(DateTime.Now).Days);
    }
 
    public string GetNameBySN(string strSN)
    {
        return SLEncrypt.smethod_1(strSN);
    }
 
    public string GetSN(string strName)
    {
        return SLEncrypt.smethod_0(strName);
    }
 
    public bool IsReg()
    {
        return ((!(m_strName == "") && !(m_strSN == "")) && (this.GetNameBySN(m_strSN) == m_strName));
    }
 
    public bool SaveReg(string strName, string strSN)
    {
        if (this.m_nType == 0)
        {
            Regs.WriteItem(this.REG_SEC, this.KEY_NAME, strName);
            return Regs.WriteItem(this.REG_SEC, this.KEY_SN, strSN);
        }
        return RegFile.Write(strName, strSN);
    }
 
    // Properties
    public static bool IsError
    {
        get
        {
            return m_bError;
        }
    }
}


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
public class RegFile
{
    // Fields
    private static FileStream fileStream_0;
    private static int int_0;
    private static int int_1;
    private static int int_2;
    private static int int_3;
    private static int int_4;
    private static string jQvelmJmAc;
    public static DateTime m_dtStartUse;
    public static string m_strID;
    public static string m_strSN;
    public static string m_strUser;
    private static int omteopUyoT;
    private static string string_0;
 
    // Methods
    static RegFile()
    {
        Class6.B5xmjkIz9OKt5();
        jQvelmJmAc = "Config.dat";
        string_0 = "XYSOFT";
        int_0 = 10;
        omteopUyoT = 0x4e;
        int_1 = 0x93;
        int_2 = 0xd0;
        int_3 = 0x189;
        int_4 = 0x2a9;
        m_strID = DateTime.Now.ToString("yyyyMMddHHmmss");
        m_strUser = "";
        m_strSN = "";
        m_dtStartUse = DateTime.Now;
    }
 
    public RegFile()
    {
        Class6.B5xmjkIz9OKt5();
    }
 
    public static void CloseFile()
    {
        try
        {
            fileStream_0.Flush();
            fileStream_0.Close();
        }
        catch (Exception exception)
        {
            PublicFunc.ShowExceptionErr(exception, MethodBase.GetCurrentMethod(), new string[0]);
        }
    }
 
    public static bool OpenFile()
    {
        try
        {
            string path = Ini.IniAppPath() + jQvelmJmAc;
            bool flag = !File.Exists(path);
            fileStream_0 = new FileStream(path, FileMode.OpenOrCreate, FileAccess.ReadWrite);
            byte[] bytes = null;
            if (flag)
            {
                Random random = new Random((int) DateTime.Now.Ticks);
                bytes = new byte[random.Next(0x3e8, 0x7d0)];
                random.NextBytes(bytes);
                fileStream_0.Write(bytes, 0, bytes.Length);
                fileStream_0.Seek((long) int_0, SeekOrigin.Begin);
                bytes = Encoding.Unicode.GetBytes(string_0);
                fileStream_0.Write(bytes, 0, bytes.Length);
                m_strID = DateTime.Now.ToString("yyyyMMddHHmmss");
                fileStream_0.Seek((long) omteopUyoT, SeekOrigin.Begin);
                bytes = Encoding.Unicode.GetBytes(m_strID);
                fileStream_0.Write(bytes, 0, bytes.Length);
                string str3 = DateTime.Now.ToString("yyyy-MM-dd");
                fileStream_0.Seek((long) int_1, SeekOrigin.Begin);
                bytes = Encoding.Unicode.GetBytes(str3);
                fileStream_0.Write(bytes, 0, bytes.Length);
                Class3.smethod_0(ref str3);
                fileStream_0.Seek((long) int_2, SeekOrigin.Begin);
                bytes = Encoding.Unicode.GetBytes(str3);
                byte[] buffer = BitConverter.GetBytes(bytes.Length);
                fileStream_0.Write(buffer, 0, buffer.Length);
                fileStream_0.Write(bytes, 0, bytes.Length);
                return true;
            }
            fileStream_0.Seek((long) int_0, SeekOrigin.Begin);
            bytes = new byte[Encoding.Unicode.GetByteCount(string_0)];
            fileStream_0.Read(bytes, 0, bytes.Length);
            if (Encoding.Unicode.GetString(bytes) != string_0)
            {
                return false;
            }
            fileStream_0.Seek((long) omteopUyoT, SeekOrigin.Begin);
            bytes = new byte[Encoding.Unicode.GetByteCount(m_strID)];
            fileStream_0.Read(bytes, 0, bytes.Length);
            m_strID = Encoding.Unicode.GetString(bytes);
            string s = DateTime.Now.ToString("yyyy-MM-dd");
            fileStream_0.Seek((long) int_1, SeekOrigin.Begin);
            bytes = new byte[Encoding.Unicode.GetByteCount(s)];
            fileStream_0.Read(bytes, 0, bytes.Length);
            DateTime.TryParse(Encoding.Unicode.GetString(bytes), out m_dtStartUse);
            fileStream_0.Seek((long) int_2, SeekOrigin.Begin);
            byte[] buffer3 = new byte[4];
            fileStream_0.Read(buffer3, 0, 4);
            bytes = new byte[BitConverter.ToInt32(buffer3, 0)];
            fileStream_0.Read(bytes, 0, bytes.Length);
            s = Encoding.Unicode.GetString(bytes);
            string str5 = "";
            Class3.smethod_0(ref str5);
            if (str5 != s)
            {
                return false;
            }
            fileStream_0.Seek((long) int_3, SeekOrigin.Begin);
            buffer3 = new byte[4];
            fileStream_0.Read(buffer3, 0, 4);
            bytes = new byte[BitConverter.ToInt32(buffer3, 0)];
            fileStream_0.Read(bytes, 0, bytes.Length);
            m_strUser = Encoding.Unicode.GetString(bytes);
            fileStream_0.Seek((long) int_4, SeekOrigin.Begin);
            buffer3 = new byte[4];
            fileStream_0.Read(buffer3, 0, 4);
            bytes = new byte[BitConverter.ToInt32(buffer3, 0)];
            fileStream_0.Read(bytes, 0, bytes.Length);
            m_strSN = Encoding.Unicode.GetString(bytes);
            return true;
        }
        catch (Exception exception)
        {
            PublicFunc.ShowExceptionErr(exception, MethodBase.GetCurrentMethod(), new string[0]);
        }
        return false;
    }
 
    public static bool Read()
    {
        bool flag = OpenFile();
        CloseFile();
        return flag;
    }
 
    public static bool Write(string strName, string strSN)
    {
        bool flag = OpenFile();
        WriteData(strName, strSN);
        CloseFile();
        return flag;
    }
 
    public static bool WriteData(string strUser, string strSN)
    {
        try
        {
            string str = "";
            Class3.smethod_0(ref str);
            fileStream_0.Seek((long) int_2, SeekOrigin.Begin);
            byte[] bytes = Encoding.Unicode.GetBytes(str);
            byte[] buffer = BitConverter.GetBytes(bytes.Length);
            fileStream_0.Write(buffer, 0, buffer.Length);
            fileStream_0.Write(bytes, 0, bytes.Length);
            fileStream_0.Seek((long) int_3, SeekOrigin.Begin);
            bytes = Encoding.Unicode.GetBytes(strUser);
            buffer = BitConverter.GetBytes(bytes.Length);
            fileStream_0.Write(buffer, 0, buffer.Length);
            fileStream_0.Write(bytes, 0, bytes.Length);
            fileStream_0.Seek((long) int_4, SeekOrigin.Begin);
            bytes = Encoding.Unicode.GetBytes(strSN);
            buffer = BitConverter.GetBytes(bytes.Length);
            fileStream_0.Write(buffer, 0, buffer.Length);
            fileStream_0.Write(bytes, 0, bytes.Length);
            return true;
        }
        catch (Exception exception)
        {
            PublicFunc.ShowExceptionErr(exception, MethodBase.GetCurrentMethod(), new string[0]);
        }
        return false;
    }
}

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费
支持
分享
最新回复 (2)
雪    币: 498
活跃值: (1562)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
wxq
2
编译一个可用的注册机更好
2013-4-22 13:32
0
雪    币: 162
活跃值: (63)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
3
兄弟,能出点有关脱壳的教程否?搞过简单的,没有遇到过壳的。
2013-4-22 14:57
0
游客
登录 | 注册 方可回帖
返回

账号登录
验证码登录

忘记密码?
没有账号?立即免费注册