• 标 题:附上:Crackmex01e 关键原程式(VC60)。 (1千字)
  • 作 者:wocy
  • 时 间:2001-3-15 0:28:24

此程式是根据注册号得一个效验值,存入cmos 得0x3f处,在启动程式得时候判断这个效验值,为81d,即可。下面是关键原代码
cmoscoolv1  Cmos信息比较程式 htpp://wocy.top263.net/soft/cmoscoolv1.zip

//////crate the verify code and save it when press the bottom ok
void CCrackmex01eDlg::Onok() //Press the buttom ok the do here
{
    // TODO: Add your control notification handler code here
    char ch;
    char s;
    UpdateData(TRUE);
    int i;
    for(i=0,s=0;i<m_code.GetLength ();i++)  //the var m_code is your input regist code.
    {
        ch=m_code.GetAt(i);      //get the no.x char  to ch
        s+=ch;                    //the s is the verify code
        s+=i;
    }
    s%=127;                          //save the low 7 bit
        _outp(0x70,0x3f);        //save v.code to cmos
        _outp(0x71,s);
    MessageBox("Please Restart the Porogram to Check your regist code.","Waring...");  //show the dialog waring.
}

////////verify the saved code and to do the next work when begin open the program.

    int i;
    _outp(0x70,0x3f);          //read the saved verify code
    i=_inp(0x71);
    if(i==81)                //==81 then ...else ....
    {
        m_ok.ShowWindow(0);        //unshow the ok bottom
        m_edit.ShowWindow (0);    //unshow the edit bottom
        m_reg.SetWindowText("REGISTED,Email to wocy@263.net");
        m_reg.ShowWindow(1);        //show the text about me.
    }
    else              //Un.....
    {
        m_ok.ShowWindow(1);
        m_edit.ShowWindow (1);
        m_reg.SetWindowText("REGISTED,Email to wocy@263.net");
        m_reg.ShowWindow(0);
    }

good luck.