BinaryByter
How about
BinaryByter
you try to play...
BinaryByter
the piano reduction of mars
BinaryByter
xDDD
dot
Hi
dot
I need some question which are tricky in c programming
Ariana
wut
Ariana
Do you mean the wilderness
BinaryByter
how to use templates in C?
given a function, how do you change its behaviour without changing the functions code?
BinaryByter
I have one
Ariana
/war n pleease read
BinaryByter
it has a few billion pages
BinaryByter
BinaryByter
quadrillion pages
Ariana
XD
BinaryByter
yes
BinaryByter
duckduckgo.com
Ariana
dot
No I need some question to code to improve my coding skills
Ariana
Send pull requests
Ariana
done
BinaryByter
ah right you wanted someone to push to your code
dot
No I need some question to code to improve my coding skills
Can any one suggest any site or forum any
BinaryByter
Oh yes I can
BinaryByter
@prograchallenges
dot
Tks guise
MᏫᎻᎯᎷᎷᎬᎠ
given a function, how do you change its behaviour without changing the functions code?
I find this question is more general That's why it's called generic programming XD
MᏫᎻᎯᎷᎷᎬᎠ
Does array<T, size_t> stores it's elements into the stack or the heap?
Ariana
given a function, how do you change its behaviour without changing the functions code?
use another function to overwrite that function in runtime :)
MᏫᎻᎯᎷᎷᎬᎠ
Lol
MᏫᎻᎯᎷᎷᎬᎠ
_Ty _Elems[_Size];
MᏫᎻᎯᎷᎷᎬᎠ
It's not on the heap
MᏫᎻᎯᎷᎷᎬᎠ
And that makes sense
MᏫᎻᎯᎷᎷᎬᎠ
use another function to overwrite that function in runtime :)
I think he implicitly meant given ONLY one function
Parra
use another function to overwrite that function in runtime :)
but this is difficult because it may not fit correctly
Ludovic 'Archivist'
Parra
I think detours is easier
Ludovic 'Archivist'
Parra
:F
Ludovic 'Archivist'
You generally use relocations to accommodate functions to use specific CPU instructions that you have
Ludovic 'Archivist'
a self-pwning function:>
That is generally how you actually implement it
Ludovic 'Archivist'
for example?
. Wrong chat
Ludovic 'Archivist'
for example?
Functions that use AES-NI
Parra
do you have docs? or examples?
Ariana
meant like function that does printf("%489247$x%10$nAAAAAA\x00\x50\x08\x40") tho they are just different ways to pwn just some boringsome more intereting
Ludovic 'Archivist'
Or that use weird instruction sets like Intel prefetch cache instructions, or other domain specific stuff like rsqrt
Parra
i only have worked with detouring
Parra
i see
Ludovic 'Archivist'
do you have docs? or examples?
Hard to find any, it is kinda a method for the time we wanted software fast
Parra
I understand
Parra
the patch is done over the memory
Parra
or in the binary?
Parra
im using detours in metacall right now
Ludovic 'Archivist'
Parra
to intercept forks
Parra
because of fork model
Ludovic 'Archivist'
the patch is done over the memory
You basically overwrite the contents of the function then set it read only
Parra
it's similar to detouring
Parra
almost the same
Ludovic 'Archivist'
Some just load the functions in userspace and call them normally
Parra
detours injects a jump and redirects to your own function
Parra
then you have the trampoline
Parra
to jump back to the original if you want
Ludovic 'Archivist'
Ludovic 'Archivist'
Parra
what is perf?
Ludovic 'Archivist'
It likely triggers lots of cache misses