首页
社区
课程
招聘
经典首饰进销存管理系统 v3.5 我跟PB第一次
发表于: 2005-10-2 10:40 15847

经典首饰进销存管理系统 v3.5 我跟PB第一次

killl 活跃值
10
2005-10-2 10:40
15847
经典首饰进销存管理系统 v3.5 我跟PB第一次

【破文标题】经典首饰进销存管理系统 v3.5 我跟PB第一次
【软件名称】经典首饰进销存管理系统 v3.5
【软件介绍】首饰零售企业与普通零售企业有着很多的不同之处,一般的进销存管理软件很难适应首饰零售企业的业务需求。经典首饰进销存 管理系统就是针对首饰零售行业的特点而开发的一套首饰零售企业专用的行业管理软件,其丰富而实用的功能能很好得满足首饰零售企业的管 理需求。
【软件地址】http://www.topjewelsoft.com/download.asp
【破文作者】KiLlL[DFCG][FCG]
【破解时间】2005-10-01 10:01
【破解声明】国庆节快乐!我跟PB第一次亲密接触! 仅限技术交流!
【破解过程】

总是听大牛说PB,不小心碰到了一个PB的程序,软件主页上已经是4.0了,隐藏了部分注册模块,所以我分析一下3.5应该也无所谓了吧。

其实一开始不知道是PB程序,peid得知是Microsoft Visual C++ 5.0 [Overlay]程序,od跟了一下,发现总在一个PBVM90.DLL里面,原来这个 就是pb程序呀,好了,找个工具,PBKiller试试了。

打开main.pbd文件,发现了w_realreg窗口里面对应的注册按钮事件:

gs_serial = trim(parent.sle_1.text) + trim(parent.sle_2.text) + trim(parent.sle_4.text) + trim(parent.sle_5.text)

if f_regisok(gs_serial,gs_workmode) then
    update GINFO_PARM SET KHSER =' '  using sqlca;
/* SQL Parameters List
0-> :gs_serial
*/

    if sqlca.sqlcode < 0 then
        rollback using sqlca;
        messagebox("提示","注册失败!")
        return
    end if

    commit using sqlca;
    messagebox("恭喜","您已注册成功!")
    w_main.title = gs_sysname + "(已授权)"
    w_main.uo_1.uf_setkh(gs_companyname)
else
    messagebox("提示","错误的注册码!")
    parent.sle_1.setfocus()
    return
end if

close(parent)
return

原来是调用一个函数:f_regisok(gs_serial,gs_workmode),其中的gs_serial就是显示的机器码,如何来的那?

查看这个窗口的open事件:

gs_hardid = getdiskser()
gs_hardid = trim(gs_hardid)

if isnull(gs_hardid) or gs_hardid = "" then
    gs_hardid = string(abs(getcpuid()))
end if

gs_hardid = upper(gs_hardid)
sle_3.text = f_getproductid(gs_hardid)
return

原来是取diskser,就是硬盘的序列号,如果失败就取cpuid,然后经过一个函数运算,就是f_getproductid(gs_hardid)。

要写注册机,需要知道两个函数,第一个是f_getproductid(gs_hardid),第二个是f_regisok。但是这个窗口里面没有。打开其他的文件看看 。

我找呀找,找呀找,终于找到了。

在share.pbd里面发现了这两个函数:先看第一个,f_getproductid()

integer li_len
integer i
string ls_char
string ls_temp

li_len = len(computerid)
ls_temp = ""

for i = 1 to li_len
    ls_char = mid(computerid,i,1)

    choose case ls_char
        case "1"
            ls_temp = ls_temp + "F"
            continue
        case "2"
            ls_temp = ls_temp + "A"
            continue
        case "3"
            ls_temp = ls_temp + "Q"
            continue
        case "4"
            ls_temp = ls_temp + "G"
            continue
        case "5"
            ls_temp = ls_temp + "P"
            continue
        case "6"
            ls_temp = ls_temp + "H"
            continue
        case "7"
            ls_temp = ls_temp + "D"
            continue
        case "8"
            ls_temp = ls_temp + "B"
            continue
        case "9"
            ls_temp = ls_temp + "R"
            continue
        case "0"
            ls_temp = ls_temp + "8"
            continue
        case "A"
            ls_temp = ls_temp + "N"
            continue
        case "B"
            ls_temp = ls_temp + "4"
            continue
        case "C"
            ls_temp = ls_temp + "S"
            continue
        case "D"
            ls_temp = ls_temp + "I"
            continue
        case "E"
            ls_temp = ls_temp + "T"
            continue
        case "F"
            ls_temp = ls_temp + "O"
            continue
        case "G"
            ls_temp = ls_temp + "3"
            continue
        case "H"
            ls_temp = ls_temp + "C"
            continue
        case "I"
            ls_temp = ls_temp + "U"
            continue
        case "J"
            ls_temp = ls_temp + "M"
            continue
        case "K"
            ls_temp = ls_temp + "9"
            continue
        case "L"
            ls_temp = ls_temp + "E"
            continue
        case "M"
            ls_temp = ls_temp + "5"
            continue
        case "N"
            ls_temp = ls_temp + "J"
            continue
        case "O"
            ls_temp = ls_temp + "V"
            continue
        case "P"
            ls_temp = ls_temp + "1"
            continue
        case "Q"
            ls_temp = ls_temp + "W"
            continue
        case "R"
            ls_temp = ls_temp + "6"
            continue
        case "S"
            ls_temp = ls_temp + "K"
            continue
        case "T"
            ls_temp = ls_temp + "X"
            continue
        case "U"
            ls_temp = ls_temp + "2"
            continue
        case "V"
            ls_temp = ls_temp + "7"
            continue
        case "W"
            ls_temp = ls_temp + "Y"
            continue
        case "X"
            ls_temp = ls_temp + "0"
            continue
        case "Y"
            ls_temp = ls_temp + "Z"
            continue
        case "Z"
            ls_temp = ls_temp + "L"
    end choose

next

li_len = len(ls_temp)
ls_temp = left(ls_temp,2) + "-" + mid(ls_temp,3,2) + "-" + right(ls_temp,li_len - 4)
return ls_temp

很简单,就是做了置换,写注册机的时候去掉“-”,然后相反置换就可以了。

再来看第二个函数:f_getserial(realid,wordmode)

string realid
string ls_cn
boolean lb_return = false

realid = f_getrealid(gs_hardid)
ls_cn = f_getserial(realid,workmode)
lb_return = cn = ls_cn
return lb_return

函数很简单,就是用机器码通过函数f_getserial计算出真正的注册码,然后跟你输入的注册码cn相比较。这里计算注册码用了2个函数, f_getrealid和f_getserial。

首先看f_getrealid函数。
string ls_return
string ls_order
integer li_len

ls_return = vvalue
li_len = len(vvalue)

if li_len < 16 then
    ls_order = f_chartoorder(vvalue)
    ls_return = ls_return + left(ls_order,16 - li_len)
end if

return ls_return

里面又用到了这个函数:

integer li_len
integer i
string rvalue
string ls_char

rvalue = ""
li_len = len(vvalue)

for i = 1 to li_len
    ls_char = mid(vvalue,i,1)
    rvalue = rvalue + string(asc(ls_char))
next

return rvalue

看完这两个函数,明白了,如果机器码小于16位,就用他们的ascii补全。再来看第二个计算注册码的函数f_getserial。

string ls_return
string ls_char
integer x
integer y
integer z
integer value

ls_return = ""

if workmode = "single" then
    ls_char = mid(vvalue,5,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,3,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,12,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 20),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,11,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,14,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,3,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 28),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,7,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,13,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,11,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 31),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,15,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,4,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,3,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 22),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,6,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,15,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,16,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 37),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,4,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,9,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,12,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 25),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,1,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,2,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,4,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 7),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,2,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,14,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,8,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 24),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,13,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,1,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,2,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 16),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,9,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,8,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,1,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 18),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,3,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,4,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,7,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 4),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,2,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,16,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,1,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 19),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,13,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,16,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,10,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 39),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,2,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,7,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,3,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 12),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,6,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,8,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,1,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 15),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,10,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,11,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,5,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 26),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,11,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,9,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,14,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 34),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,2,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,16,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,9,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 27),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,6,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,7,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,10,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 23),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,10,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,2,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,1,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 13),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
else
    ls_char = mid(vvalue,5,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,12,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,3,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 20),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,3,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,14,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,11,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 28),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

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

收藏
免费
支持
分享
最新回复 (8)
雪    币: 300
活跃值: (417)
能力值: ( LV9,RANK:410 )
在线值:
发帖
回帖
粉丝
2
    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,7,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,11,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,13,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 31),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,15,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,3,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,4,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 22),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,6,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,16,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,15,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 37),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,4,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,12,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,9,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 25),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,1,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,4,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,2,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 7),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,2,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,8,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,14,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 24),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,2,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,1,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,13,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 16),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,9,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,1,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,9,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 18),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,3,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,7,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,4,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 4),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,2,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,1,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,16,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 19),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,13,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,10,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,16,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 39),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,2,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,3,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,7,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 12),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,6,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,1,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,8,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 15),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,10,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,5,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,11,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 26),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,11,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,14,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,9,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 34),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,2,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,9,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,16,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 27),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,6,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,10,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,7,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 23),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
    ls_char = mid(vvalue,10,1)
    x = asc(ls_char)
    ls_char = mid(vvalue,1,1)
    y = asc(ls_char)
    ls_char = mid(vvalue,2,1)
    z = asc(ls_char)
    value = mod(abs(x * y + z - 13),100)

    if value > 90 then
        value = value - 9
    else

        if value > 57 and value < 65 then
            value = value + 7
        else

            if value > 37 and value < 48 then
                value = value + 10
            else

                if value > 27 and value < 38 then
                    value = value + 20
                else

                    if value > 17 and value < 28 then
                        value = value + 30
                    else

                        if value > 7 and value < 18 then
                            value = value + 40
                        else

                            if value < 8 then
                                value = value + 50
                            end if

                        end if

                    end if

                end if

            end if

        end if

    end if

    ls_return = ls_return + char(value)
end if

return ls_return

这一段是生成注册码的,第二个参数是“ workmode = "single"”,应该是单机版的算法。虽然很长,但是很简单,就是对ascii操作以后再判 断一下,跟vb很类似,所以稍微做点修改就直接可以用了。比如mod,char改改,可以改成自己定义的函数,char改成chr。
比如:

Public Function KiLlL_PB_Mod(i, j)
    KiLlL_PB_Mod = i Mod j
End Function

最后就可以用vb来写注册机了~

【算法总结】
1、获得机器码,如果可以获得硬盘序列号,就用它,否则取cpu序列号(PB函数,不知道结果是什么)。在注册窗口显示的是处理过的机器码 ,函数为f_getproductid(),如果这个机器码小于16位,调用f_getrealid函数补足16位。

2、通过f_getserial函数,获得注册码,参数为(处理后的机器码,"single")

【破解心得】
PB的程序有了利器真的是很方便呀!但是由于是第一次接触,找函数,理顺函数关系费了点时间。最新版的4.0做了处理,f_getserial变成了 一句提示不要破解的话,但是realreg窗体还在,如果对pbd文件格式熟悉,应该可以有办法下手的。
2005-10-2 10:40
0
雪    币: 61
活跃值: (160)
能力值: ( LV9,RANK:170 )
在线值:
发帖
回帖
粉丝
3
GOOD!
2005-10-2 11:39
0
雪    币: 279
活跃值: (160)
能力值: ( LV9,RANK:170 )
在线值:
发帖
回帖
粉丝
4
很有意思~~
用你写的keygen算出的注册码在我的机器上用不了~
在别人的机子上用你的keygen算出来的注册码却是正常能用~~
最后我用Hex在内存中找到了可用注册码
机器码:YI-Y5-N5RGGADQAH
keygen算出注册码:V1JM2-2V24I-40D3L-YPA8J
Hex在内存中找到的注册码:29831-6W5Y5-XLEEM-38562

请楼主分析一下。这是为什么啊~~

这是我的方法:
先用AAAAA-BBBBB-CCCCC-DDDDD去注册,弹出错误窗口。不关。
马上用WinHex打开lg2004.exe的整个内存,查找AAAAABBBBBCCCCCDDDDD,在那个下面一点的地方就可以找到注册码了~
如我的就是298316W5Y5XLEEM38562
也就是29831-6W5Y5-XLEEM-38562
哈哈~~
注册成功后注册码保存在Data\leader.db文件里面~每次启动的时候也会校对的~
还有忘了说。所有的数据都是保存在Data\leader.db,也就是说。数据只用备份这个就可以了~~
2005-10-2 12:33
0
雪    币: 234
活跃值: (370)
能力值: ( LV9,RANK:530 )
在线值:
发帖
回帖
粉丝
5
强!学习啊
2005-10-2 13:51
0
雪    币: 233
活跃值: (130)
能力值: ( LV8,RANK:130 )
在线值:
发帖
回帖
粉丝
6
killl国庆高产啊
2005-10-2 15:09
0
雪    币: 6551
活跃值: (1707)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
7
请问大侠们,这个DB文件密码怎么解?
2005-10-2 17:36
0
雪    币: 267
活跃值: (44)
能力值: ( LV9,RANK:330 )
在线值:
发帖
回帖
粉丝
8
支持,学习中
2005-10-2 18:38
0
雪    币: 4269
活跃值: (4927)
能力值: (RANK:215 )
在线值:
发帖
回帖
粉丝
9
不用这么烦琐的分析,直接提出文件内容来,用PB重新写个注册机。

偶一般都这么干。
2005-10-2 19:19
0
游客
登录 | 注册 方可回帖
返回

账号登录
验证码登录

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