View previous topic :: View next topic |
Author |
Message |
theboy181 Advanced Cheater
Reputation: 0
Joined: 26 Jan 2018 Posts: 91
|
Posted: Sat Apr 30, 2022 6:04 pm Post subject: adding a list of addresses from text file copy paste lists? |
|
|
I have extracted a bunch of addresses from IDA, and I want to copy them into CE and have them added into the table.
Example
001063B4
00106DF8
00106DFC
00107EC0
00108230
00108234
00108240
00108244
00109258
00109E60
0010A1E8
0010A1EC
0010A1F0
0010A1F4
0010A1F8
0010DB6C
0010DB70
Is there a way to import these address? I would also like to change the lists offset by -0x100000 as well.
|
|
Back to top |
|
 |
mece Newbie cheater
Reputation: 2
Joined: 29 Jun 2014 Posts: 17
|
Posted: Sat Apr 30, 2022 6:27 pm Post subject: |
|
|
theboy181 wrote: | Is there a way to import these address? I would also like to change the lists offset by -0x100000 as well. |
1. Open lua engine (Ctrl+M then Ctrl+L)
2. Paste the following code into the edit box
3. Execute (Ctrl+Enter)
Code: |
local addrTable = {
"001063B4",
"00106DF8",
"00106DFC",
"00107EC0",
"00108230",
"00108234",
"00108240",
"00108244",
"00109258",
"00109E60",
"0010A1E8",
"0010A1EC",
"0010A1F0",
"0010A1F4",
"0010A1F8",
"0010DB6C",
"0010DB70",
}
for _,addr in ipairs(addrTable) do
local mr = getAddressList().CreateMemoryRecord()
mr.Address = addr .. "-100000"
end
|
|
|
Back to top |
|
 |
theboy181 Advanced Cheater
Reputation: 0
Joined: 26 Jan 2018 Posts: 91
|
Posted: Sat Apr 30, 2022 6:36 pm Post subject: |
|
|
A lot of work for a long list, but way better!
There anyway that I could just make a list in a txt file and call to it?
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 150
Joined: 06 Jul 2014 Posts: 4646
|
Posted: Sat Apr 30, 2022 6:48 pm Post subject: |
|
|
Or from clipboard:
Code: | function paste_raw_addresses(str)
str = str or readFromClipboard()
for s in str:gmatch'[^\r\n]+' do
local addr = getAddressSafe(s)
if addr then
local memrec = AddressList.createMemoryRecord()
memrec.Address = getNameFromAddress(addr)
end
end
end
-- could put this in a menu item, call from hotkey, etc.
paste_raw_addresses() |
Right click the memory records in the address list and select "Recalculate new addresses", check the "Hexadecimal" box, and put in "-100000"
If you need to read it from a file, read the file to a string (see any Lua IO tutorial) and pass the string to that function.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
mece Newbie cheater
Reputation: 2
Joined: 29 Jun 2014 Posts: 17
|
Posted: Sat Apr 30, 2022 6:54 pm Post subject: |
|
|
theboy181 wrote: | There anyway that I could just make a list in a txt file and call to it? |
Code: |
local file = io.open(os.getenv("USERPROFILE").."\\desktop\\addresses.txt", "r")
for line in file:lines() do
local mr = getAddressList().CreateMemoryRecord()
mr.Address = line .. "-100000"
end
|
|
|
Back to top |
|
 |
theboy181 Advanced Cheater
Reputation: 0
Joined: 26 Jan 2018 Posts: 91
|
Posted: Sat Apr 30, 2022 9:14 pm Post subject: |
|
|
ParkourPenguin wrote: | Or from clipboard:
Code: | function paste_raw_addresses(str)
str = str or readFromClipboard()
for s in str:gmatch'[^\r\n]+' do
local addr = getAddressSafe(s)
if addr then
local memrec = AddressList.createMemoryRecord()
memrec.Address = getNameFromAddress(addr)
end
end
end
-- could put this in a menu item, call from hotkey, etc.
paste_raw_addresses() |
Right click the memory records in the address list and select "Recalculate new addresses", check the "Hexadecimal" box, and put in "-100000"
If you need to read it from a file, read the file to a string (see any Lua IO tutorial) and pass the string to that function. |
I added my offsets, and got this error
Script Error:[string "function paste_raw_addresses(str)
..."]:13: malformed number near '001063B4'
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 150
Joined: 06 Jul 2014 Posts: 4646
|
Posted: Sat Apr 30, 2022 9:38 pm Post subject: |
|
|
theboy181 wrote: | I added my offsets, and got this error... | I assume whatever changes you made are causing the error.
If you want useful help, post the code you're running.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
|