请Moodsky和各位PB高手看下这个PB程序的算法。
用PBKILL分析得到该软件的取得序列号的方式。我是菜鸟不懂PB所以不知道是怎么生成硬盘序列号和注册号的,希望能得到大家的回复,最好能给个VB代码:lol: 谢谢了!
public function string uf_get_volumeinfo ();string ls_rootpath
string ls_volumnename
string ls_str
ulong lul_volumenamesize
ulong lul_volumeserialnumber
ulong lul_maximumcomponentlength
ulong lul_filesystemflags
string ls_filesystemnamebuffer
ulong lul_filesystemnamesize
boolean lb_rtn = false
ls_rootpath = "C:\"
ls_volumnename = space(256)
lul_volumenamesize = 256
lul_maximumcomponentlength = 256
ls_filesystemnamebuffer = space(256)
lul_filesystemnamesize = 256
lb_rtn = false
lb_rtn = getvolumeinformationa(ls_rootpath,ls_volumnename,lul_volumenamesize,lul_volumeserialnumber,lul_maximumcomponentlength,lul_filesystemflags,ls_filesystemnamebuffer,lul_filesystemnamesize)
if lb_rtn = true then
else
return ""
end if
ls_str = f_get_str_asc(string(lul_volumeserialnumber))
return ls_str
end function
public function string uf_zc_get_gsmc (string as_gsmc,string as_bbh);long ll_len
long ll_i
string ls_str
string ls_qt
string ls_str_l
string ls_single
string ls_str_bz_1
string ls_str_bz_2
string ls_str_bz_3
ls_str_bz_1 = f_get_str_asc(mid(as_gsmc,6,8))
ls_str = left(ls_str_bz_1,3)
ls_str_bz_2 = right(ls_str_bz_1,len(ls_str_bz_1) - 3) + ls_str
ls_qt = f_get_str_asc(string(round(12.6542321 * dec("1." + f_get_str_asc(as_bbh)),8)))
ll_len = len(ls_qt)
for ll_i = 1 to ll_len
ls_single = string(integer(mid(ls_qt,ll_i,1)) + integer(mid(ls_str_bz_2,ll_i,1)))
ls_str_l = ls_str_l + ls_single
next
ls_str_bz_3 = ls_str_l + left(ls_str_bz_2,len(ls_str_bz_2) - ll_len)
return ls_str_bz_3
end function
public function string uf_zc_get_work_lx (integer ai_work,integer ai_zclx,string as_bbh);long ll_len
long ll_i
long ll_work
long ll_zclx
string ls_str
string ls_qt
string ls_str_l
string ls_single
string ls_str_bz_1
string ls_str_bz_2
string ls_str_bz_3
ll_work = ai_work * 79
ll_zclx = (ai_zclx * 39) * ll_work
if ai_zclx = 1979 then
ls_str_bz_1 = string(ll_work) + string(ll_zclx)
else
ls_str_bz_1 = string(ll_zclx) + string(ll_work)
end if
ls_str_bz_2 = string(truncate(long(ls_str_bz_1) * round(6.29284022 * dec("1." + f_get_str_asc(as_bbh)),8),0))
ls_str_bz_3 = f_get_str_asc(ls_str_bz_2)
return ls_str_bz_3
end function
public function string uf_zc_get_ypjbh (string as_ypjph,string as_bbh);long ll_len
long ll_i
string ls_str
string ls_qt
string ls_str_l
string ls_single
string ls_str_bz_1
string ls_str_bz_2
string ls_str_bz_3
ls_str_bz_1 = as_ypjph
ls_str = left(ls_str_bz_1,1)
ls_str_bz_2 = right(ls_str_bz_1,len(ls_str_bz_1) - 1) + ls_str
ls_qt = f_get_str_asc(string(round(7.39745043782 * dec("1." + f_get_str_asc(as_bbh)),11)))
ll_len = len(ls_qt)
for ll_i = 1 to ll_len
ls_single = string(integer(mid(ls_qt,ll_i,1)) + integer(mid(ls_str_bz_2,ll_i,1)))
ls_str_l = ls_str_l + ls_single
next
ls_str_bz_3 = ls_str_l + left(ls_str_bz_2,len(ls_str_bz_2) - ll_len)
return ls_str_bz_3
end function
public function string uf_zc_get_ypxlh (string as_ypxlh,string as_bbh);long ll_len
long ll_i
string ls_str
string ls_qt
string ls_str_l
string ls_single
string ls_str_bz_1
string ls_str_bz_2
string ls_str_bz_3
ls_str_bz_1 = as_ypxlh (这个地方应该是硬盘序列号的缩写:lol: )
ls_str = left(ls_str_bz_1,5)
ls_str_bz_2 = right(ls_str_bz_1,len(ls_str_bz_1) - 5) + ls_str
ls_qt = f_get_str_asc(string(round(5.0976283 * dec("1." + f_get_str_asc(as_bbh)),7)))
ll_len = len(ls_qt)
for ll_i = 1 to ll_len
ls_single = string(integer(mid(ls_qt,ll_i,1)) + integer(mid(ls_str_bz_2,ll_i,1)))
ls_str_l = ls_str_l + ls_single
next
ls_str_bz_3 = ls_str_l + left(ls_str_bz_2,len(ls_str_bz_2) - ll_len)
return ls_str_bz_3
end function
on u_system.create
call super::create;
triggerevent("constructor")
end on
on u_system.destroy
triggerevent("destructor")
call super::destroy
end on PB的PJ是有的难度 你把各个字符串的定义是什么贴上来
像这些都是做什么的。
string ls_str
string ls_qt
string ls_str_l
string ls_single
string ls_str_bz_1
string ls_str_bz_2
string ls_str_bz_
你按着PBKILL里分析出来东西把每个定义标出来,我帮你看看。
要不把东西发我邮箱里,[email protected] 我倒是觉得pb的语法最好理解。 太长了,看的头太大了
不过慢慢看应该不难,PB就是basic嘛,不难理解
页:
[1]