| View previous topic :: View next topic |
| Author |
Message |
rog9001 Expert Cheater
Reputation: 2
Joined: 22 Dec 2015 Posts: 214 Location: Jupiter
|
Posted: Thu Jul 28, 2016 1:58 pm Post subject: How to use for 2 injection points? |
|
|
I am having some issues when making a edit box set a value in a script with 2 injection points so basically
| Code: |
function CEToggleBox1Change(sender)
if ( blah blah blah(FORM1.CEToggleBox1) == 1) then
autoAssemble(string.format([[
alloc(mem1,1000)
label(1)
label(ret)
mem1:
1:
mov eax,%X
mov edx,eax
jmp ret
ADDRESS:
jmp 1
nop
ret:
alloc(mem2,1000)
label(1a)
label(reta)
mem2:
1a:
mov [eax+0C],%X
mov ecx,[eax+0C]
jmp reta
ADDRESS2:
jmp 1a
reta:
]],tonumber(FORM1.CEEdit1.Text)))
else
autoAssemble([[
// deallocation stuff \\
]])
end
end
|
but how do I make the %X work for both injection points?
Last edited by rog9001 on Thu Jul 28, 2016 2:52 pm; edited 1 time in total |
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4706
|
Posted: Thu Jul 28, 2016 2:22 pm Post subject: |
|
|
| rog9001 wrote: | | as you know or don't know %X only work for 1 injection point |
Where did you get that idea? If you have multiple format specifiers, all you need to do is include multiple arguments to string.format. Example:
| Code: | | print(string.format("Two hexadecimal numbers '%08X' and '%08X'.", 0x00401828, 0x1234ABCD)) |
I should also point out this.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
rog9001 Expert Cheater
Reputation: 2
Joined: 22 Dec 2015 Posts: 214 Location: Jupiter
|
Posted: Thu Jul 28, 2016 2:44 pm Post subject: |
|
|
| ParkourPenguin wrote: | | rog9001 wrote: | | as you know or don't know %X only work for 1 injection point |
Where did you get that idea? If you have multiple format specifiers, all you need to do is include multiple arguments to string.format. Example:
| Code: | | print(string.format("Two hexadecimal numbers '%08X' and '%08X'.", 0x00401828, 0x1234ABCD)) |
I should also point out this. |
Well I am not good with lua at all. I do not understand, what is this meant to be?
print(string.format("Two hexadecimal numbers '%08X' and '%08X'.", 0x00401828, 0x1234ABCD))
Also exactly what do you do with this?
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4706
|
Posted: Thu Jul 28, 2016 3:30 pm Post subject: |
|
|
That is an example. It shows you can use multiple format specifiers (i.e. %X) in a format string as you requested. If you do not know how to gather information from that example, you should learn the basics of Lua first before you try to learn topics that build off of the basics.
For more technical information:
http://www.lua.org/manual/5.3/manual.html#pdf-string.format
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
rog9001 Expert Cheater
Reputation: 2
Joined: 22 Dec 2015 Posts: 214 Location: Jupiter
|
Posted: Thu Jul 28, 2016 3:49 pm Post subject: |
|
|
| ParkourPenguin wrote: | That is an example. It shows you can use multiple format specifiers (i.e. %X) in a format string as you requested. If you do not know how to gather information from that example, you should learn the basics of Lua first before you try to learn topics that build off of the basics.
For more technical information:
http://www.lua.org/manual/5.3/manual.html#pdf-string.format |
thanks for the help :\
last question. what if instead of the %x, %d, %c, %i and all of that other stuff all separate, what if i want to assign 1 of those things for example %d to something so for example "[Input] = %d"
and then do something like
| Code: |
mov eax,[Input]
mov edx,eax
jmp ret
. . .
push esi
mov esi,[Input]
mov [eax+0C],esi
mov ecx,[eax+0C]
pop esi
jmp reta
|
how would something like this be done?
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4706
|
Posted: Thu Jul 28, 2016 3:51 pm Post subject: |
|
|
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Thu Jul 28, 2016 6:19 pm Post subject: |
|
|
|
|
|
| Back to top |
|
 |
|