由一次偶然破解想到
2007-05-08 20:14
253 查看
五一七天,没事。偶然从硬盘上找到一个以前下载的国产控件(没注册码)破解掉了。
这个控件是asp.net2.0控件,只需设置属性,几分钟时间,即可获得一个漂亮的类似 Outlook 样式的菜单,若未注册,会在用户显示的基础上,多显示一项:****soft(*是字符),除此之外,无其它的限制。
想想:自然在OnpreRender事件那有特殊。用Reflector一看就知道了。关键代码如下:
if ((this._RegistUser != null) && (this._RegistUser != string.Empty))
if ((this._RegistCode != null) && (this._RegistCode != string.Empty))
if ((this.temp1 != null) && (this.temp1 != string.Empty))
{
string s = this.temp1.GetHashCode().ToString();
if (s.Substring(0, 1) == "-")
{
s = s.Substring(1);
}
long num = (long.Parse(s) * 0x17) + 0x2d11368aa3;
string text2 = num.ToString().Substring(2, 4) + "-" + num.ToString().Substring(6, 4);
num = (num * 3) + 0x22184ee23d;
string text3 = num.ToString().Substring(3, 4) + "-" + num.ToString().Substring(7, 4);
if ((this.temp2.Substring(0, 9) == text2) && (this.temp2.Substring(10, 9) == text3))
{
this.barbottom = 200;
}
else
{
num = (long.Parse(s) * 0x1f) + 0x4205091f33;
text2 = num.ToString().Substring(2, 4) + "-" + num.ToString().Substring(6, 4);
num = (num * 7) + 0x4ff65d2d53;
text3 = num.ToString().Substring(3, 4) + "-" + num.ToString().Substring(7, 4);
if ((this.temp2.Substring(0, 9) == text2) && (this.temp2.Substring(10, 9) == text3))
{
this.barbottom = 200;
}
}
}
算法简单,注册机就不写了。
由此我想有几点注意:
1. .net软件产品,一定要有保护措施(混淆,加壳等)。否则就象把源代码给了别人一样,版权就不用考虑了。
2. 轻易不要使自己设计的加密或注册算法,用成熟的现有算法。
3. 写软件很辛苦,成果来之不易,去之又很快。(作控件的大侠,若有得罪,请原谅!)。
这个控件是asp.net2.0控件,只需设置属性,几分钟时间,即可获得一个漂亮的类似 Outlook 样式的菜单,若未注册,会在用户显示的基础上,多显示一项:****soft(*是字符),除此之外,无其它的限制。
想想:自然在OnpreRender事件那有特殊。用Reflector一看就知道了。关键代码如下:
if ((this._RegistUser != null) && (this._RegistUser != string.Empty))
if ((this._RegistCode != null) && (this._RegistCode != string.Empty))
if ((this.temp1 != null) && (this.temp1 != string.Empty))
{
string s = this.temp1.GetHashCode().ToString();
if (s.Substring(0, 1) == "-")
{
s = s.Substring(1);
}
long num = (long.Parse(s) * 0x17) + 0x2d11368aa3;
string text2 = num.ToString().Substring(2, 4) + "-" + num.ToString().Substring(6, 4);
num = (num * 3) + 0x22184ee23d;
string text3 = num.ToString().Substring(3, 4) + "-" + num.ToString().Substring(7, 4);
if ((this.temp2.Substring(0, 9) == text2) && (this.temp2.Substring(10, 9) == text3))
{
this.barbottom = 200;
}
else
{
num = (long.Parse(s) * 0x1f) + 0x4205091f33;
text2 = num.ToString().Substring(2, 4) + "-" + num.ToString().Substring(6, 4);
num = (num * 7) + 0x4ff65d2d53;
text3 = num.ToString().Substring(3, 4) + "-" + num.ToString().Substring(7, 4);
if ((this.temp2.Substring(0, 9) == text2) && (this.temp2.Substring(10, 9) == text3))
{
this.barbottom = 200;
}
}
}
算法简单,注册机就不写了。
由此我想有几点注意:
1. .net软件产品,一定要有保护措施(混淆,加壳等)。否则就象把源代码给了别人一样,版权就不用考虑了。
2. 轻易不要使自己设计的加密或注册算法,用成熟的现有算法。
3. 写软件很辛苦,成果来之不易,去之又很快。(作控件的大侠,若有得罪,请原谅!)。
相关文章推荐
- 读“如果可以,让我们做一次'心的洗礼'”所想到的
- Android学习第七天---记录一次锁机软件的破解
- 记一次M1卡破解过程——weigr的第一次博文
- 由一次很有意思的购物体验想到的
- 对于架构的一次偶然心得
- 巧遇一次ESXI暴力口令破解(ssh) 推荐
- C#实现微信公众号群发消息(突破破解一天只能发一次的限制)
- 在QQ群里有人提问有没有C语言的XML解析,偶然想到了这个问题:C++调用C库,简单试验:
- 一次偶然的死機....
- 破解我吧:一次ELF文件的解构之旅
- 使用控制台破解百小度一个月只准改一次名字
- 由一次年会系统大战所想到的。。。(1)
- 一次偶然的ajax请求导致status为canceled的原因
- 一次没想好,第二次就要想到做好
- 记一次php webshell破解的经历
- 一次加入域不成功想到的
- 一次偶然的ajax请求导致status为canceled的原因
- 记一次偶然遇到mysql的max_connection_errors错误
- 一次面试想到的 推荐
- java一次多线程的怪异时间和偶然发现相关解释