Oh finallly got the difference now then, thanks. Indeed also on stackoverflow a good example. The first one is in the read-only memory without copying the string to the newly allocated memory.
So next step would be
Not sure though if the call stays the same, as that is still unwritable and does not need to be writable. so just kept the (char *) there.Code:char *XOR(char str[], char cipher[]) { for (size_t i = 0; i < strlen(str); i++) { str[i] ^= cipher[i % strlen(cipher)]; } return str; }
Ill Google now to see what you mean by the NULL first argument.Code:char *CPA = XOR((char *)"CreateProcessA", (char *)"Sddd");




Reply With Quote