部分lua函数内容
function targetDo(str)
assert(type(str)=='string','targetDo(str) : parm:str is NOT a 字符串')
assert(getPEB() and getPEB()>0,"目标进程不存在 或者 没打开进程")
local buff=getAddressSafe('buff')
assert(buff,'没找到 buffer 在目标进程')
local s=utf8ToAnsi(str)
assert(type(s)=='string' and s:len()>0,'targetDo(): failed to convert string')
writeString(buff+0x20,s)
writeInteger(buff+0x20+s:len(),0)
writeInteger(buff+0x1c,s:len())
writeInteger(buff,1) --Write Status:NEED EXECUTE
local time1=os.time()
while(readInteger(buff)~=0) do -- wait for executing
processMessages(); sleep(10);
if os.time()-time1>10 then error ('执行超时!') end
end
local resu = readString(buff+0x20,readInteger(buff+0x1c))
assert(readInteger(buff+8)==0,(resu or '')..'\n'..str:gsub('[^\r]\n','\r\n')) -- error check
return ansiToUtf8(resu)
end
下面是lua脚本源文件 lua脚本.rar(1.62 KB, 下载次数: 7)