首页
社区
课程
招聘
[旧帖] 懂PB的前辈进来,帮我分析下这段代码 0.00雪花
发表于: 2006-12-6 13:27 4039

[旧帖] 懂PB的前辈进来,帮我分析下这段代码 0.00雪花

2006-12-6 13:27
4039
long i
long j
long ll
string ls_xkzh

ls_xkzh = trim(parent.sle_1.text)

for i = 1 to 16

        if i < 5 then
                j = i * 3
        end if

        if j > 15 then
                j = j - 5
        end if

        ls_xkzh = replace(ls_xkzh,i,1,char(asc(mid(ls_xkzh,i,1)) - j - 16))
next

ll = long(left(ls_xkzh,10))

if right(ls_xkzh,6) <> right(string(ll / 23 - gl_mc),6) or mod(ll,gl_mc) <> 0 or len(ls_xkzh) <> 16 or isnull(ls_xkzh) then
        messagebox("","非法许可证号!")
        parent.ii_serial_times ++

        if parent.ii_serial_times > 3 then
                halt
        end if

        return
end if

ls_xkzh = parent.sle_1.text

if len(ls_xkzh) <> 16 then
        return
end if

update syst02 set xkzh =' '  using sqlca;
/* SQL Parameters List
0-> :ls_xkzh
*/
close(parent)
return

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
免费 0
支持
分享
最新回复 (7)
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
帖子沉了,自己顶下
2006-12-7 21:22
0
雪    币: 189
活跃值: (4810)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
3
我帮你顶一下他.....
2006-12-12 07:03
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
我也来帮忙。
2006-12-12 18:54
0
雪    币: 200
活跃值: (11)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
很快就要沉了,我不懂PB,也进来顶一下!
2006-12-13 13:18
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
[QUOTE]最初由 yhhwx 发布
                    定义类型
long i
long j
long ll
string ls_xkzh

              sle_1.text应该是程序窗口中的某个文本控件文本
ls_xkzh = trim(parent.sle_1.text)
               
for i = 1 to 16
                 循环开始,如果I的值小于5,J=I*3
if i < 5 then
j = i * 3
end if
                   I大于15,J=J-15
if j > 15 then
j = j - 5
end if
                       replace内容替换,具体的,网上查一下就知道了,
                       mid取ls_xkzh的第I位和1位。
        ls_xkzh = replace(ls_xkzh,i,1,char(asc(mid(ls_xkzh,i,1)) - j - 16))
next
               left取lx_xkzh左十位,ll等于结果转换为long
ll = long(left(ls_xkzh,10))
                  right取右,
if right(ls_xkzh,6) <> right(string(ll / 23 - gl_mc),6) or mod(ll,gl_mc) <> 0 or len(ls_xkzh) <> 16 or isnull(ls_xkzh) then
messagebox("","非法许可证号!")
parent.ii_serial_times ++

if parent.ii_serial_times > 3 then
halt
end if

return
end if

ls_xkzh = parent.sle_1.text

if len(ls_xkzh) <> 16 then
return
end if

update syst02 set xkzh =' ' using sqlca;
/* SQL Parameters List
0-> :ls_xkzh
*/
close(parent)
return

哎,翻来翻去,你还是自己在网上查一下就知道了,
高手都不来回答,我是菜鸟,给你点意思!!
不对的地方,多多指教吧。
2006-12-14 02:20
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
7
多谢大哥了,我下了PB的函数手册。意思已经全弄明白了。可是程序中找不到 GL_MC这个控件,还是无法逆算。郁闷中。
2006-12-19 10:20
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
8
多谢前面那位给我解释源码的朋友,通过查询PB函数手册我已经能读懂PB程序了,语句其实和 VB差不多。再次感谢您,在短期内我又掌握了一门语言。
2006-12-19 10:29
0
游客
登录 | 注册 方可回帖
返回
//