| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 529 人关注过本帖
标题:请教这代码要怎么解?
只看楼主 加入收藏
kzxp
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2012-8-5
结帖率:0
收藏
已结贴  问题点数:20 回复次数:5 
请教这代码要怎么解?
LOCAL   oWMI   AS   OBJECT,oLocal   AS   OBJECT,oHARDWARE   AS   OBJECT,object1   AS   OBJECT,lcCPUID,LcMAC,lcHDID,lcSerial   
oWMI=CREATEOBJECT("WbemScripting.SWbemLocator")   
oLocal=oWMI.ConnectServer(".",   "root\cimv2")   
oHARDWARE=oLocal.ExecQuery("SELECT   *   FROM   Win32_NetworkAdapterConfiguration   Where   IPEnabled=1")   
FOR   EACH   object1   IN   oHARDWARE   
    LcMAC=object1.Properties_('MACAddress').VALUE   
    LcIP=object1.Properties_('IPAddress').VALUE   
    ox=CREATEOBJECT("MSwinsock.Winsock")
    EXIT   
ENDFOR

if thisform.label4.visible=.t.
    thisform.label4.visible=.f.
    thisform.label1.visible=.t.
    thisform.text4.visible=.t.
    thisform.text4.setfocus()
else
    if empty(allt(thisform.text4.value))
       messagebox("请输入您购买本软件时的注册码。",64,KZXP)
       thisform.text4.setfocus()
    else
        nx=0
        reg=0
        do while nx<=len(CName+LcMAC)
           reg=reg+asc(subs(CName+LcMAC,nx+1,2))
           nx=nx+2
        enddo
        reg=reg&psx
        reg_enx=""
        nx=1
        do_n=len(allt(str(reg)))
        do while nx<=do_n
           reg_en=val(subs(allt(str(reg)),nx,1))*val(subs(allt(str(reg)),do_n-nx,1))
           if reg_en<65
               do while .t.
                  reg_en=reg_en+26+nx
                  if reg_en>90
                     reg_en=reg_en-26
                     exit
                  endif
               enddo
           endif
           reg_enx=reg_enx+subs(allt(str(reg)),nx,1)+IIF(reg_en>90,"",iif(mod(reg_en+nx,2)=0,"",lower(chr(reg_en))))
           nx=nx+1
        enddo
        reg_zsb=reg_enx
        nx=0
        reg=0
        do while nx<=len(CName+"tryout"+LcMAC)
           reg=reg+asc(subs(CName+"tryout"+LcMAC,nx+1,2))
           nx=nx+2
        enddo
        reg=reg&psx
        reg_enx=""
        nx=1
        do_n=len(allt(str(reg)))
        do while nx<=do_n
           reg_en=val(subs(allt(str(reg)),nx,1))*val(subs(allt(str(reg)),do_n-nx,1))
           if reg_en<65
               do while .t.
                  reg_en=reg_en+26+nx
                  if reg_en>90
                     reg_en=reg_en-26
                     exit
                  endif
               enddo
           endif
           reg_enx=reg_enx+subs(allt(str(reg)),nx,1)+IIF(reg_en>90,"",iif(mod(reg_en+nx,2)=0,"",lower(chr(reg_en))))
           nx=nx+1
        enddo
        reg_srb=reg_enx
        if subs(allt(thisform.text4.value),3)=reg_zsb or subs(allt(thisform.text4.value),3)=reg_srb
           if subs(allt(thisform.text4.value),3)=reg_zsb
               messagebox("注册成功!欢迎使用本软件!",64,KZXP)
               THISFORM.LABEL4.CAPTION="软件授权给:"+CName
               thisform.image2.enabled=.t.
               reg=reg_zsb
*!*                   sele "set"
*!*                   loca all for setname="useresidual"
*!*                   repl valued with ""
           else
                  srb_yq=allt(subs(allt(str((len(CName)*len(LcMAC)+(len(CName)+len(LcMAC))*9))),1,2))
               srb_yq=iif(len(srb_yq)=1,"0"+srb_yq,srb_yq)
               sele "set"
               loca all for setname="useresidual"
               if subs(thisform.text4.value,1,2)=srb_yq
               
                   sr_date=date()+30
                   yearx=allt(str((len(CName)+len(LcMAC))*1999-year(sr_date)))
                   F1=SUBS(allt(str(asc("/")-47*len(CName))),1,3)
                   monthx=allt(str(month(sr_date)*(len(CName)+len(LcMAC))*1999))
                   F2=SUBS(allt(str(asc("/")-47*len(LcMAC))),1,3)
                   dayx=allt(str(day(sr_date)*(len(CName)+len(LcMAC))))
                   sr_date=yearx+F1+monthx+F2+dayx               
               
                   repl valued with sr_date
                   sr_date=dtoc(date()+30)                  
                else
                    
                    sr_date_jm=allt(valued)
                    F1_at=at("-",sr_date_jm)
                    F2_rat=rat("-",sr_date_jm)
                    yearx=subs(sr_date_jm,1,F1_at-1)
                    monthx=subs(sr_date_jm,F1_at+3,F2_rat-F1_at-3)
                    dayx=subs(sr_date_jm,F2_rat+3)
                    yearx=allt(str(((len(CName)+len(LcMAC))*1999)-val(yearx)))
                    monthx=allt(str(val(monthx)/((len(CName)+len(LcMAC))*1999)))
                    dayx=allt(str(val(dayx)/(len(CName)+len(LcMAC))))
                    sr_date=yearx+"/"+monthx+"/"+dayx

               endif
               if empty(ctod(sr_date)) or ctod(sr_date)-date()>30 or ctod(sr_date)<date()
                   messagebox("无效的注册日期!请联系软件供应商。",64,KZXP)
                   loadgzgl=.f.
                   THISFORM.CANCELBS=.T.
                   CLOSE ALL
                   release thisform
                   CANCEL
               else
                   messagebox("您所输入的是试用注册码,试用期到:"+sr_date+" 止。"+chr(13)+"如果需要购买正式版本,请联系软件供应商。",64,KZXP)
                   THISFORM.LABEL4.CAPTION="试用版授权日期到 "+sr_date+" 止。"
                   thisform.image2.enabled=.t.
               endif
               reg=reg_srb
           endif
           thisform.label4.visible=.t.
           loca all for setname="ID"
           mn=1
           reg_ps=""
           reg_len=len(reg)
           do while mn<=reg_len
              do case
                 case type(subs(reg,mn,1))="U"
                      reg_n=str(asc(subs(reg,mn,1))+len(CName)*(reg_len-mn))+"-"
                 case type(subs(reg,mn,1))="N"
                      reg_n=str(val(subs(reg,mn,1))+len(CName)*(reg_len-mn))+"_"
              endcase
              reg_ps=reg_ps+allt(reg_n)
              mn=mn+1
           enddo
           repl valued with reg_ps+allt(str(reg_len))
           thisform.label1.visible=.f.
           thisform.text4.visible=.f.
           
           thisform.text1.enabled=.t.
           thisform.text2.enabled=.t.
           thisform.text3.enabled=.t.
           
           thisform.text1.setfocus()
        else
           messagebox("注册码无效,请与软件供应商联系!",64,KZXP)
           loadgzgl=.f.
           CLOSE ALL
           release thisform
           CANCEL
        endif
    endif
endif
2012-08-05 11:41
sdta
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:江苏省连云港市
等 级:版主
威 望:335
帖 子:9841
专家分:27213
注 册:2012-2-5
收藏
得分:7 
自己先看,不懂的地方再问
软件注册程序

[ 本帖最后由 sdta 于 2012-8-6 01:18 编辑 ]

坚守VFP最后的阵地
2012-08-06 01:15
hu9jj
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:红土地
等 级:贵宾
威 望:400
帖 子:11857
专家分:43421
注 册:2006-5-13
收藏
得分:7 
也许是想破解别人的注册机制吧。

活到老,学到老!http://www.(该域名已经被ISP盗卖了)E-mail:hu-jj@
2012-08-06 09:06
kzxp
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2012-8-5
收藏
得分:0 
有没有人指点啊?求教了!!!
2012-08-08 10:57
bccn201203
Rank: 9Rank: 9Rank: 9
等 级:蜘蛛侠
威 望:3
帖 子:680
专家分:1140
注 册:2012-3-14
收藏
得分:7 
以下是引用kzxp在2012-8-8 10:57:58的发言:

有没有人指点啊?求教了!!!
楼主能看懂代码?不明白的地方提出来,大家一起为你想办法
2012-08-08 16:30
hu9jj
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:红土地
等 级:贵宾
威 望:400
帖 子:11857
专家分:43421
注 册:2006-5-13
收藏
得分:0 
也许是涉嫌破解他人的注册机制,也许是一大串代码需要逐条解释,很少会有人替楼主做的。楼主应该自己先分析,实在不明白的地方再提问,这样的效果可能会更好些。

活到老,学到老!http://www.(该域名已经被ISP盗卖了)E-mail:hu-jj@
2012-08-08 20:15
快速回复:请教这代码要怎么解?
数据加载中...
 
   



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

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