Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

C - hiding character in strings

I'm attempting to demonstrate format strings vulnerability in C. I need to stay away from strings command from revealing the ASCII string in my binary.

Here is my basic code:

#include <stdio.h>    
static char secret[] = "mysecretstring";
  int main(int argc, char *argv[]) {
    char buf[64];
    strncpy(buf, argv[1], sizeof(buf));

Sign In or Register to comment.