| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1231 人关注过本帖
标题:请教PB加密代码问题。
只看楼主 加入收藏
pwin237
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-10-22
收藏
 问题点数:0 回复次数:0 
请教PB加密代码问题。
最近因为工作需要,用C#开发一个功能,普通发票打印后,导出一个DBF文件,里面有一项为JM的项,不知如何加密,后来在网上找到破解PB的软件,破解他原来的程序,看到加密部分如下,由于本人对PB不懂,烦各位帮手看看。

文件一:这个加密方式应该看得懂,但第二个就不清楚了。
$PBExportHeader$f_encrypt.srf
$PBExportComments$By PBKiller v1.3(kivens@)
global type f_encrypt from function_object
end type

forward prototypes
global function string f_encrypt (string a_ymm)
end prototypes

global function string f_encrypt (string a_ymm);integer i
integer li_kllen
string ls_zmkl = ""


li_kllen = len(a_ymm)

for i = 1 to li_kllen
    ls_zmkl = ls_zmkl + char(asc(mid(a_ymm,i,1)) + i + li_kllen)
next

return ls_zmkl
end function


文件二:其中这一句不知道是否破解后有问题?好像语句不完整。choose case mod(integer(mid(ls_zmkl,li_i = mod(integer(mid(ls_zmkl,li_i * 2 + 1,2)),26
烦请高人指点。

$PBExportHeader$f_encrypt2.srf
$PBExportComments$By PBKiller v1.3(kivens@)
global type f_encrypt2 from function_object
end type

forward prototypes
global function string f_encrypt2 (string as_string)
end prototypes

global function string f_encrypt2 (string as_string);integer li_count
integer li_kllen
integer li_i
string ls_zmkl
string ls_zmkl2
string ls_my
string ls_zmkl3
string ls_temp


li_kllen = len(as_string)
ls_zmkl = ""

for li_i = 1 to li_kllen

    choose case mid(as_string,li_i,1)
        case "0"
            ls_zmkl = ls_zmkl + "52"
            continue
        case "1"
            ls_zmkl = ls_zmkl + "63"
            continue
        case "2"
            ls_zmkl = ls_zmkl + "45"
            continue
        case "3"
            ls_zmkl = ls_zmkl + "78"
            continue
        case "4"
            ls_zmkl = ls_zmkl + "90"
            continue
        case "5"
            ls_zmkl = ls_zmkl + "27"
            continue
        case "6"
            ls_zmkl = ls_zmkl + "14"
            continue
        case "7"
            ls_zmkl = ls_zmkl + "36"
            continue
        case "8"
            ls_zmkl = ls_zmkl + "81"
            continue
        case "9"
            ls_zmkl = ls_zmkl + "09"
    end choose

next

li_kllen = len(ls_zmkl)
ls_zmkl2 = ""
ls_my = "8754039126"

for li_i = 1 to li_kllen
    ls_zmkl2 = ls_zmkl2 + string(mod(integer(mid(ls_zmkl,li_i,1)) + integer(mid(ls_my,integer(mid(ls_zmkl,li_i,1)),1)),10))
next

ls_zmkl3 = ""

for li_i = 0 to li_kllen / 2 - 1

    choose case mod(integer(mid(ls_zmkl,li_i = mod(integer(mid(ls_zmkl,li_i * 2 + 1,2)),26
        case 0
            ls_zmkl3 = ls_zmkl3 + "a"
            continue
        case 1
            ls_zmkl3 = ls_zmkl3 + "b"
            continue
        case 2
            ls_zmkl3 = ls_zmkl3 + "c"
            continue
        case 3
            ls_zmkl3 = ls_zmkl3 + "d"
            continue
        case 4
            ls_zmkl3 = ls_zmkl3 + "e"
            continue
        case 5
            ls_zmkl3 = ls_zmkl3 + "f"
            continue
        case 6
            ls_zmkl3 = ls_zmkl3 + "g"
            continue
        case 7
            ls_zmkl3 = ls_zmkl3 + "h"
            continue
        case 8
            ls_zmkl3 = ls_zmkl3 + "i"
            continue
        case 9
            ls_zmkl3 = ls_zmkl3 + "j"
            continue
        case 10
            ls_zmkl3 = ls_zmkl3 + "k"
            continue
        case 11
            ls_zmkl3 = ls_zmkl3 + "l"
            continue
        case 12
            ls_zmkl3 = ls_zmkl3 + "m"
            continue
        case 13
            ls_zmkl3 = ls_zmkl3 + "n"
            continue
        case 14
            ls_zmkl3 = ls_zmkl3 + "o"
            continue
        case 15
            ls_zmkl3 = ls_zmkl3 + "p"
            continue
        case 16
            ls_zmkl3 = ls_zmkl3 + "q"
            continue
        case 17
            ls_zmkl3 = ls_zmkl3 + "r"
            continue
        case 18
            ls_zmkl3 = ls_zmkl3 + "s"
            continue
        case 19
            ls_zmkl3 = ls_zmkl3 + "t"
            continue
        case 20
            ls_zmkl3 = ls_zmkl3 + "u"
            continue
        case 21
            ls_zmkl3 = ls_zmkl3 + "v"
            continue
        case 22
            ls_zmkl3 = ls_zmkl3 + "w"
            continue
        case 23
            ls_zmkl3 = ls_zmkl3 + "x"
            continue
        case 24
            ls_zmkl3 = ls_zmkl3 + "y"
            continue
        case 25
            ls_zmkl3 = ls_zmkl3 + "z"
    end choose

next

ls_temp = mid(ls_zmkl3,3,10)
ls_zmkl3 = replace(ls_zmkl3,3,10,mid(ls_zmkl3,29,36))
ls_zmkl3 = ls_zmkl3 + ls_temp
ls_temp = mid(ls_zmkl3,14,21)
ls_zmkl3 = replace(ls_zmkl3,14,21,mid(ls_zmkl3,5,12))
ls_zmkl3 = ls_zmkl3 + ls_temp
ls_temp = mid(ls_zmkl3,1,5)
ls_zmkl3 = replace(ls_zmkl3,1,5,mid(ls_zmkl3,31,35))
return ls_zmkl3
end function
搜索更多相关主题的帖子: 代码 
2010-10-22 17:16
快速回复:请教PB加密代码问题。
数据加载中...
 
   



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

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