Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


AAmaker [Lua plugin]
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions
View previous topic :: View next topic  
Author Message
danrevella
Master Cheater
Reputation: 2

Joined: 11 Jun 2008
Posts: 290

PostPosted: Mon Feb 01, 2016 4:49 am    Post subject: Reply with quote

++METHOS wrote:
Not sure. I don't have that script in my autorun folder. I'm currently only running the default scripts, including aamaker. I added your differentAOBScanTemplate in there, but I was receiving the errors before that.

When I was initially testing my changes, I received a few errors, basically telling me that something wasn't right. I tested on a few, specific instructions inside of firefox. When I closed everything out and went back in to firefox to test again, I would receive the errors if I chose those same instructions, but if I chose a different instruction, it seemed to work. Now, if I go in there, everything works...which made me think that it was memory issue.

EDIT:
I will incorporate those two typo changes. Thank you for posting the corrections.

@methos
If you want, may you gently post your modified last version?
Thanks!!!
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Feb 01, 2016 8:19 am    Post subject: Reply with quote

EDIT:
See OP for latest table.


Last edited by ++METHOS on Mon Feb 01, 2016 11:39 am; edited 2 times in total
Back to top
View user's profile Send private message
GH*master
Expert Cheater
Reputation: 8

Joined: 10 Jan 2008
Posts: 159

PostPosted: Mon Feb 01, 2016 10:11 am    Post subject: Reply with quote

I have a little time after my work. I'm working in studio games with Unity Engine. Well, I'm here

Daily News:
1. fix link repositories
2. ++METHOS modification is nice. Acepted and comit repositories(Can I add your code to the repository?)
3. Update repositories
4. Update first post. Now, we have version 2.4.0

++METHOS, if you want, I will create the repositories group of delopers BitBacked service and you will can join the group. Of course, if you wish.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Feb 01, 2016 10:19 am    Post subject: Reply with quote

GH*master-
Of course, add whatever you wish. This plugin is great and I would love to see it developed further.

Regarding joining the group, I do not know LUA, so I do not know if I can be much help to you. I am happy to contribute whatever I can, nonetheless. I appreciate your work. Thank you for sharing.

EDIT:
Regarding this:

++METHOS wrote:
I've been trying to figure this out, but I don't understand LUA. Is there a way to incorporate the original [register+offset] in to the code, similar to what we can do with ->>cheatCode or similar? For example:

original code is this:

Code:
mov [ebp+08],ecx
mov byte ptr [esi+0C],00


and I want to be able to incorporate [ebp+08] in to my template, wherever I want, such as this:

Code:
push eax
mov eax,->>register+offset
cmp eax,1
pop eax
jne originalcode
mov ->>register+offset,#999


If we can easily have something like ->>register+offset to use in our template, we can create universal scripts for things like teleport, vacuum and fly mode etc.. Of course, other work would still have to be done to make the scripts work, but it would save a lot of time. Of course, if you do not wish to include these kind of features, that's okay. I think, I would still like to develop something for my own personal use, if possible.

Thanks.

EDIT2:
Updated plugin to allow 'Testing Bytes' option for AOBScanModule and AOBScanModuleStealth templates.

EDIT3:
GH*master-
I'm getting symbol addresses in lieu of module+offset. Is this your intent?

AA Maker addressing:
Code:
aobscanmodule(aob_disable_ped_traffic,sdhdship.UFG::WheeledVehicleManager::EnableTrafficSystem+10,0f85xxxxxxxx38xxxxxxxxxx0f84xxxxxxxx88xxxxxxxxxx88)
alloc(newmem_disable_ped_traffic,2048,sdhdship.UFG::WheeledVehicleManager::EnableTrafficSystem+10)


CE addressing at the same injection point:
Code:
aobscanmodule(disable_ped_traffic,sdhdship.exe,0F 85 AB 00 00 00 38)
alloc(newmem,$1000,"sdhdship.exe"+64C720)


Also, I'm getting the following error while trying to inject at a particular call:
Code:
aamaker.lua:296: attempt to concatenate a nil value (local 'offset')


Here is the CE-generated script at this problem location (see comments below):
Code:
[ENABLE]

aobscanmodule(INJECT,sdhdship.exe,E8 57 57 1B 00)
alloc(newmem,$1000,"sdhdship.exe"+496FB4)

label(code)
label(return)

newmem:

code:
  call sdhdship.UFG::WheeledVehicleManager::EnableTrafficSystem
  jmp return

INJECT:
  jmp code
return:
registersymbol(INJECT)

[DISABLE]

INJECT:
  db E8 57 57 1B 00

unregistersymbol(INJECT)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: "sdhdship.exe"+496FB4

"sdhdship.exe"+496F8D: 48 8B D9                    -  mov rbx,rcx
"sdhdship.exe"+496F90: 48 85 C0                    -  test rax,rax
"sdhdship.exe"+496F93: 74 4D                       -  je sdhdship.exe+496FE2
"sdhdship.exe"+496F95: 80 78 3C 00                 -  cmp byte ptr [rax+3C],00
"sdhdship.exe"+496F99: 74 07                       -  je sdhdship.exe+496FA2           ///////////////// Injecting here works with AA Maker.
"sdhdship.exe"+496F9B: 33 C9                       -  xor ecx,ecx
"sdhdship.exe"+496F9D: E8 7E 2A 1C 00              -  call sdhdship.exe+659A20         ///////////////// Injecting here works with AA Maker.
"sdhdship.exe"+496FA2: 48 8B 83 60 01 00 00        -  mov rax,[rbx+00000160]
"sdhdship.exe"+496FA9: 48 8B 0D 60 CB F9 01        -  mov rcx,[sdhdship.exe+2433B10]
"sdhdship.exe"+496FB0: 0F B6 50 3E                 -  movzx edx,byte ptr [rax+3E]
// ---------- INJECTING HERE ----------
"sdhdship.exe"+496FB4: E8 57 57 1B 00              -  call sdhdship.exe+64C710         ///////////////// Injecting here does not work.
// ---------- DONE INJECTING  ----------
"sdhdship.exe"+496FB9: 48 8B 83 60 01 00 00        -  mov rax,[rbx+00000160]
"sdhdship.exe"+496FC0: 80 78 38 00                 -  cmp byte ptr [rax+38],00
"sdhdship.exe"+496FC4: 74 07                       -  je sdhdship.exe+496FCD           ///////////////// Injecting here does not work.
"sdhdship.exe"+496FC6: 33 C9                       -  xor ecx,ecx
"sdhdship.exe"+496FC8: E8 03 C7 F7 FF              -  call sdhdship.exe+4136D0
"sdhdship.exe"+496FCD: 48 8B 83 60 01 00 00        -  mov rax,[rbx+00000160]
"sdhdship.exe"+496FD4: 0F B6 48 3A                 -  movzx ecx,byte ptr [rax+3A]
"sdhdship.exe"+496FD8: 48 83 C4 20                 -  add rsp,20
"sdhdship.exe"+496FDC: 5B                          -  pop rbx
"sdhdship.exe"+496FDD: E9 3E C6 F7 FF              -  jmp sdhdship.exe+413620
}


Thanks.



aamaker.lua
 Description:

Download
 Filename:  aamaker.lua
 Filesize:  24.08 KB
 Downloaded:  1856 Time(s)

Back to top
View user's profile Send private message
GH*master
Expert Cheater
Reputation: 8

Joined: 10 Jan 2008
Posts: 159

PostPosted: Tue Feb 02, 2016 9:06 am    Post subject: Reply with quote

1. Update repositories
2. Update first post. Now, we have version 2.4.1

>> I'm getting symbol addresses in lieu of module+offset. Is this your intent?

I agree, we need "module+offset".
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 54

Joined: 01 Oct 2008
Posts: 938

PostPosted: Tue Feb 02, 2016 9:58 am    Post subject: Reply with quote

Probably
getSymbolFromAddress @ SymbolList class will return "module+offset" form from an address.

But how to get ce's internal SymbolList class?


bye~


See next message Smile


Maybe valid...
Code:
function safeGetAddr(s)
  if type(s)=='number' then return s end
  if type(s)~='string' then error('safeGetAddr check input:'..tostring(s),2) end
  local e = errorOnLookupFailure(false) -- suppress noisy error
  local addr = getAddress(s)
  errorOnLookupFailure(e)
  if addr==0 then -- not valid as address
    addr = tonumber(s,16) -- try hexform
  end
  return addr
end

function getModuleByAddress(addr)
  addr = safeGetAddr(addr)
  if addr~=nil then
    local mm = enumModules()
    for i=1,#mm do
      local base,size=mm[i].Address,getModuleSize(mm[i].Name)
      if base~=nil and size~=nil and addr>=base and addr<base+size then
        mm[i].Size = size
        mm[i].EndAddress = size+mm[i].Address
        return mm[i]
      end
    end
  end
end

function getModuleOffsetForm(s)
  local m,addr = getModuleByAddress(s),safeGetAddr(s)
  if m~= nil then
    local offset = addr - m.Address
    offset = offset>0 and string.format('+%X',offset) or ''
    return m.Name..offset
  end
end

local addy = 'ADVAPI32.RegGetValueA+4'

print(getModuleOffsetForm(addy))
-- return : ADVAPI32+A989


If should return nil if the input address is not within any static module (ie. those modules given by enumModules).

_________________
- Retarded.


Last edited by panraven on Tue Feb 02, 2016 4:17 pm; edited 2 times in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25253
Location: The netherlands

PostPosted: Tue Feb 02, 2016 11:01 am    Post subject: Reply with quote

if there's no symbol then getNameFromAddress(address) should return a modulename+offset notation
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Feb 02, 2016 12:21 pm    Post subject: Reply with quote

Script currently generates this:
Quote:
Code:
aobscanmodule( - ,game.UFG::WheeledVehicleManager::EnableTrafficSystem+10, - )
alloc( - , - ,game.UFG::WheeledVehicleManager::EnableTrafficSystem+10)


Should generate this:
Quote:
Code:
aobscanmodule( - ,game.exe, - )
alloc( - , - ,"game.exe"+64C720)


Thanks.

EDIT:
mgr.inz.Player wrote:
About:
Code:
Error:Invalid class object

Did you try without other lua scripts inside autorun?
-I was just working on a target where I kept receiving this error and I could not create any advanced scripts (e.g. AOBScan, AOBScanModule and AOBScanModuleStealth). I tried removing all of the lua scripts from my autorun folder, with the exception of aamaker.lua, but it did not work. AOB must be used since module+offset does not work for this target.
Back to top
View user's profile Send private message
GH*master
Expert Cheater
Reputation: 8

Joined: 10 Jan 2008
Posts: 159

PostPosted: Sun Feb 21, 2016 7:37 pm    Post subject: This post has 1 review(s) Reply with quote

Ver. 2.4.2

+ fix "Error:Invalid class object".
Also you need to get signature from '+X-C-W' type memory. Else throw "Your signature is not located in a section of code. Nothing Found! You need a privilege '+ X-C-W'"

+ new directives

{$AddressInjection}
{$OriginalCode}
{$CheatCode}
{$Nops}
{$ArrayOfbyte}
{$ProcessName}
{$Date}
{$PrintLog}

+ change tamplates

Tamplate aobscanmodule similar to CE 6.5
Remove aobscan template

Go to first post



example2.png
 Description:
Tamplate aobscan module
 Filesize:  52.01 KB
 Viewed:  55375 Time(s)

example2.png



example.png
 Description:
 Filesize:  60.57 KB
 Viewed:  55375 Time(s)

example.png


Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Feb 22, 2016 2:55 am    Post subject: Reply with quote

Thanks, GH*master!

I added the 'cheatname' feature back in to the templates and changed a few things, if anyone is interested (note: I removed the 'cheatcode' feature, but you can add that back in, if you like):



aamaker.lua
 Description:

Download
 Filename:  aamaker.lua
 Filesize:  25.54 KB
 Downloaded:  1524 Time(s)

Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Feb 22, 2016 5:54 pm    Post subject: Reply with quote

Shouldn't you change the results from:
Code:
aobscanmodule(INJECT,sdhdship.exe,E8 57 57 1B 00)
alloc(newmem,$1000,"sdhdship.exe"+496FB4)

To...
Code:
aobscanmodule(INJECT,sdhdship.exe,E8 57 57 1B 00)
alloc(newmem,$1000,INJECT)
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Feb 23, 2016 12:19 am    Post subject: Reply with quote

Not sure which plugin version you are referring to, Zanzer, but current versions should not be generating scripts that look like that.

Also, alloc(newmem,$1000,INJECT) can be written as alloc(newmem,$1000) in the new versions of CE, I believe.
Back to top
View user's profile Send private message
gid2525
Expert Cheater
Reputation: 2

Joined: 21 Oct 2013
Posts: 101

PostPosted: Fri Mar 18, 2016 6:16 am    Post subject: Reply with quote

Getting an error when I right click and select Create AA AOBScanModule on the address I need:
Error:C:\Program Files (x86)\Cheat Engine 6.5\autorun\aamaker.lua:396: attempt to index a nil value (local 'result')

And then on the address above it:
Error:C:\Program Files (x86)\Cheat Engine 6.5\autorun\aamaker.lua:396: attempt to index a nil value (local 'result')
Error! Your signature is not located in a section of code. Nothing Found! You need a privilege '+ X-C-W'
Back to top
View user's profile Send private message
Anonymous Mouse
How do I cheat?
Reputation: 0

Joined: 29 Apr 2015
Posts: 5

PostPosted: Sun Apr 24, 2016 2:34 am    Post subject: Reply with quote

sorry for being but i am a idiot, but i'm attempting to make a rogue stormers cheat table but how do you use the AOBScanModule (i'm starting simple with money) i can find roughly the address I want in 2 or 3 searches i can even find the pointer (it didn't work i found it but when i reloaded the game the value i got was a bunch of 0's)

anyway i attempted to use the aa maker but i'm failing here's what i'm doing
- i find the address (or should i look for the pointer address?)
- use the ctrl + B shortcut right click the memory address that comes up highlighted
- go to quick AAMaker and select create AOB scan module
and i get a script but how do i edit the value? or get something that allows for value editing?
Back to top
View user's profile Send private message
xxhehe
Expert Cheater
Reputation: 0

Joined: 11 Mar 2015
Posts: 136

PostPosted: Sat Feb 11, 2017 5:36 am    Post subject: Reply with quote

ce6.6.0.1

error:...heatEnginePortable\App\Cheat Engine\autorun\aamaker.luaa:421: attempt to index a nil value (local 'result')



2017-02-11_192044.png
 Description:
 Filesize:  4.88 KB
 Viewed:  46672 Time(s)

2017-02-11_192044.png


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions All times are GMT - 6 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites