- UID
- 65173
注册时间2010-1-1
阅读权限20
最后登录1970-1-1
以武会友
TA的每日心情 | 开心 2021-10-11 20:54 |
---|
签到天数: 1 天 [LV.1]初来乍到
|
有一个管理软件,是用PB写的,注册码已破解了,进入软件输入注册码提示正确的,显示已注册的,但退出软件再次进入,又变回未注册用户
请各位高手们抽点时间帮我看看啊,本人在次深表感激之情,哈哈
以下这段代码是打开软件时就开始判断软件是否注册--------------------------------------------------------------------
i = r_driver()
if i = -1 then
ifzc = false
else
ifzc = true
end if
ll_rc = dllregisterserver()
if ifzc = false and ifsy = false then
messagebox("提示","你的软件试用期已到(数据已被锁定),请先注册!")
halt
end if
-----------------------------------------------------------------------------------------------------------------
以下是r_driver函数的代码-------------------------------------------------------------------------------------------
global function integer r_driver ();long retval
string sdrv
string str
string str2
long a
long ll_flag
long b
ulong ll_retval
string s_retval1
string s_retval2
sdrv = "c:\"
str = space(256)
str2 = space(256)
ll_retval = getvolumeinformationa(sdrv,str,256,retval,a,b,str2,256)
s_retval1 = string(retval,"################")
select driver , flag from driver using sqlca;
/* SQL Parameters List
0-> :s_retval2
1-> :ll_flag
*/
ll_flag = ll_flag + 1
if isnull(s_retval2) then
s_retval2 = "9"
else
s_retval2 = trim(s_retval2)
end if
if ll_flag < 120 then
ifsy = true
else
ifsy = false
end if
if ((check_dog() = 1) or (check_dog_hid() = 1)) then
return 1
else
if ll_flag > 80 then
messagebox("提示","软件试用期即将结束,请注册!")
end if
update driver set flag =0 using sqlca;
/* SQL Parameters List
0-> :ll_flag
*/
commit using sqlca;
return -1
end if
end function
-----------------------------------------------------------------------------------------------------------------------
以下是check_dog函数的代码------------------------------------------------------------------------------------------------
global function integer check_dog ();long handle = -1
uint id = 65535
ulong pswd
ulong nvalue
string keyp = " "
boolean rc = false
id = 29507
handle = openschip(id,keyp)
if handle < 0 then
closeschip(handle)
return -1
end if
pswd = 67 * 16 ^ 6 + 115 * 16 ^ 4 + 25 * 16 ^ 2 + 1
rc = readschipmem(handle,pswd,1,nvalue)
if rc then
if nvalue < 16 then
else
if nvalue < 256 then
else
if nvalue < 4096 then
end if
end if
end if
else
messagebox("R/W Error","请检查软件狗是否正确安装?",none!)
closeschip(handle)
return -1
end if
if trim(inttohexstr(nvalue,4)) <> "8976" then
messagebox("提示","软件狗密码错误!")
closeschip(handle)
return -1
end if
closeschip(handle)
return 1
end function
---------------------------------------------------------------------------------------------------------------------
以下是check_dog_hid函数的代码------------------------------------------------------------------------------------------
global function integer check_dog_hid ();string ls_mm
boolean ri = false
sk_init_data initdata
string szpath
long hkey
uint userid
boolean rl = false
integer index
integer length
long readpsd
string buffer = " "
integer i
string output
initdata.cbsize = 32
initdata.keymode = 1
initdata.sdkversion = 1
ri = sk_init(initdata)
userid = 60206
szpath = space(255)
hkey = sk_open(userid,szpath)
if hkey = -1 then
sk_close(hkey)
hkey = -1
return -1
end if
index = 0
length = 10
readpsd = 197343
rl = sk_readprotectmemory(hkey,readpsd,index,buffer,length)
if rl = false then
messagebox("R/W Error","请检查软件狗是否正确安装?",none!)
sk_close(hkey)
hkey = -1
return -1
end if
sk_close(hkey)
hkey = -1
for i = 1 to length
output = output + " " + string(asc(mid(buffer,i,1)))
next
if trim(output) <> "68 69 77 79 95 90 89 72 0 0" then
messagebox("提示","软件狗密码错误!")
sk_close(hkey)
hkey = -1
return -1
end if
return 1
end function
--------------------------------------------------------------------------------------------------
求各位帮我看看啊,我用UE想把
i = r_driver()
if i = -1 then
ifzc = false
else
ifzc = true
end if
这里的i=-1改成i<>-1,在UE里就是没办法找到这几个的机器码,只能找到这段代码之前的和之后的。所以没则了,搞不定啊,我又是新手
恳求各位帮忙,谢谢!! |
|