AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1516
|
Posted: Wed Aug 16, 2023 3:46 am Post subject: [TUTORIAL] Export string scan results. |
|
|
Code: | local listIndex = 0
function resultList(myvalue,leng)
local rst = ""
ms=createMemScan()
ms.firstScan(soExactValue,vtString,0,myvalue,"",0, 0xffffffffffffffff, "+W", fsmNotAligned, "1", false, false, false, false)
ms.waitTillDone()
fl=createFoundList(ms);
fl.initialize();
if fl.Count > 0 then
for i=0,fl.Count-1 do
address = fl.Address[i]
local other = readString(address, tonumber(leng))
listIndex = tonumber(listIndex) + 1
rst = rst .. "\n------------------ " .. listIndex .. " ------------------"
rst = rst .. "\n" .. other
rst = rst .. "\n----------------------------------------"
end
else
print("Value not found!")
end
fl.destroy()
ms.destroy()
return rst
end
function saveList(myvalue,leng,path,wFlag)
if wFlag=="w+" then listIndex=0 end -- update mode
fnd = resultList(myvalue,leng)
print(fnd)
-- write file
if path then -- (Creates the path or prints it to the path if it exists.)
local f1 = io.open(path, wFlag)
f1:write(fnd)
f1:close()
end
end
--use
local path = [[C:\Users\Public\Documents\zanzer.txt]]
local search = "claim"
-- write flag:
-- "w+" : update mode, all previous data is deleted;
-- "a+" : add update mode, previous data is preserved, writing is allowed only at the end of the file.
saveList(search,200,path,"a+") |
_________________
|
|