I would like to know I always understanding that bytes in binary format start with the symbol "\" (antislash) but when I generate random bytes with python sometimes it give me strange result look above :
>>> import os
some byte start with "\" and some with # or even ( ??? I totally don't get it if someone can explain
then why # and ( are not stored in hex like other bytes ?
look at that :
I generate 7 random bytes
after that I add on my C code :
unsigned char test = "\x06\xcf\x10^$\xa8\xab";
and it don't work !!
my editor say that this sequence is 8 bytes I don't understand !!
edit : I think pickinpatchfarm.com BDD was overloaded i havent your message in time, why then python print them ??
Last edited on
should I store as hex array ?
this is most likely because a character got misinterpreted or i should escape it or something
however i'm new to C i don't know too much about problem like that
You might know how long the string is but functions such as strcpy, strlen and printf doesn't. They use the null character to detect that the end of the string has been reached.
I dont fucking care about string or str function or anything
I don't think I'm forced to put a null after my buffer of bytes if I know the size
I want a bytes buffer without null terminated
stop talking me about string please
I will use unsigned char * now even if it add a null char but i don't know what the point of using C/C++ if it add a null for you, fuck it...
I would like a simple format like "\x80\x80\x80" because i will need to modify with python the value you know
I dont know if my example above will work and will be interpreted as hex
Last edited on