untoha How do I cheat? Reputation: 0
Joined: 16 Oct 2019 Posts: 2
|
Posted: Wed Oct 16, 2019 8:48 am Post subject: searching adsresses, help |
|
|
hi folks! im totaly new in CE. i need to find float like -123.123123 but exactly i know -123. i can find what i need manually in CE but this code don't gave addresses that exist in manual scanning. what i do wring? i tried changing params for firstScan but still no needed adreesses in LUA script result.
also i dont understand in what process is searching firstScan(). should i do openProcess(processname) or something?
Code: | all_address = {}
function findDoubleValueAndReplace(findValue)
memscan = createMemScan()
foundlist = createFoundList(memscan)
protectionflags = "*W*X*C"
-- firstScan(scanoption, vartype, roundingtype, input1, input2,
-- startAddress, stopAddress, protectionflags,
-- alignmenttype, "alignmentparam",
-- isHexadecimalInput, isNotABinaryString, isunicodescan, iscasesensitive)
-- scanOption: soUnknownValue, soExactValue, soValueBetween, soBiggerThan, soSmallerThan
-- vartype: vtByte, vtWord, vtDword, vtQword, vtSingle, vtDouble, vtString,
-- vtByteArray, vtGrouped, vtBinary, vtAll
-- roundingtype: rtRounded, rtTruncated, rtExtremerounded
-- alignmenttype: fsmNotAligned, fsmAligned, fsmLastDigits
-- protectionflags: X W C (+ to indicate that flag MUST be set, - MUST NOT, * whatever)
memscan.firstScan(soExactValue, vtSingle, rtRounded, findValue, nil,
"0","7fffffff",protectionflags,
fsmAligned,"4",
false, false, false, false)
memscan.waitTillDone()
foundlist.initialize()
for i=0, foundlist.Count-1 do
all_address[i+1] = foundlist.Address[i]
end
foundlist.destroy()
memscan.destroy()
end
findDoubleValueAndReplace(-123)
|
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4299
|
Posted: Wed Oct 16, 2019 9:28 am Post subject: |
|
|
- The function is called findDoubleValueAndReplace, but you're searching for a vtSingle instead of a vtDouble. You're also not replacing anything.
- Perhaps you should use rtExtremerounded instead.
- findValue should be a string. What you have now should be fine if you pass in a number since Lua will automatically convert it; it's just good to be aware.
- You should generally not pass nil values to firstScan (I've had problems in the past). Instead of using nil for input2, use an empty string ("").
- The stop address is a little low if you're targeting a 64-bit process. Copy the stop address from CE's main window (something like "7fffffffffffffff")
- Doubles are typically 8-byte aligned, but using a 4-byte alignment shouldn't break anything.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|