CLEO Help Decimal to Hex

CLEO related
Status
Not open for further replies.

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
Hello ! everyone.

I have small problem.
I tried get key offset from ini file , but looks like my snippet accept only hex value, because when i add decimal value to pointer i get wrong pointer and code wan't work.
Exist any way to convert decimal to hex value for cleo?

PHP:
:Set_Virtual_Key
{
    0AB1: @Set_Virtual_Key 1  state 255
}
0AF0: 0@ = get_int_from_ini_file "cleo\Key.ini" section "YourKey" key "Key"
2@ = 0xB72CC8
0@ *= 2
005A: 2@ += 0@  // (int)
0A8C: write_memory 2@ size 1 value 1@ virtual_protect 0
0AB2: ret 0

@springfield
@monday
@Opcode.eXe
@supahdupahnubah
etc...
 

shanker

Well-known member
Joined
Sep 18, 2016
Messages
291
Reaction score
16
Location
Romania
can t you scan the integer value as %x?

ex:

0AD3: format 0@ = "%d" 1@ // 1@ is our integer
0AD4: scan 0@ "%x" 2@ // our decimal converted to hex

it works in C++, so it should work on CLEO too
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,121
Solutions
5
Reaction score
882
Location
Lithuania
can t you scan the integer value as %x?

ex:

0AD3: format 0@ = "%d" 1@ // 1@ is our integer
0AD4: scan 0@ "%x" 2@ // our decimal converted to hex

it works in C++, so it should work on CLEO too
Working solution
PHP:
0AC8: 11@ = allocate_memory_size 260
0AF4: 11@ = read_string_from_ini_file "cleo\JobRecorder.ini" section "SendKey" key "Key"
0AD4: $NOT_USED = scan_string 11@ format "%x" 10@
12@ = 0xB72CC8
10@ *= 2
005A: 12@ += 10@  // (int)
0A8D: 5@ = read_memory 12@ size 1 virtual_protect 0
 
Status
Not open for further replies.
Top