-
-
[求助]求解一个密码算法并返回的密码
-
发表于:
2011-11-10 05:52
6375
-
各位大侠,最近反编译了一个启动时要验证密码的C#程序,看了获取密码的源代码,试了很多种密码的组合输入都不对,请问一下这段代码生成的密码组合方式是怎么样的?生成出来的密码是什么?
C#入门不久,想弄明白以下代码怎么计算得出密码。谢谢大侠们!
以下为生成密码的源代码
private bool checkpassword()
{
return this.checkpassword(1);
}
private bool checkpassword(int i)
{
byte[] bytes = MD5.Create().ComputeHash(Encoding.ASCII.GetBytes((i == 0) ? this.textBox1.Text : this.txtPassword.Text));
string str = Encoding.ASCII.GetString(bytes);
switch (DateTime.Now.DayOfWeek)
{
case DayOfWeek.Sunday:
return (str == "I\x001e->g|i\tc\x000f?pG*0|");
case DayOfWeek.Monday:
return (str == "\x0003[\n*Es(6~vs`\x0003\\Ku");
case DayOfWeek.Tuesday:
return (str == " RH!\x0014,:bk5p\x0003pY<n");
case DayOfWeek.Wednesday:
return (str == "Ga=&0q\t-Bda;\vd\x001f3");
case DayOfWeek.Thursday:
return (str == "Ga=&0q\t-Bda;\vd\x001f3");
case DayOfWeek.Friday:
return (str == "*]\x0003\x0010\x0012)\f\axa\x0001\x001f\a\x001a~z");
case DayOfWeek.Saturday:
return (str == "w[&/W\x000e6W\r\x00019\f\x0014B\a&");
}
return false;
}
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课