Here's a minimal test case:
#include <stdio.h>
#include <stdlib.h>
int main ( int argc , char **argv )
{
const char abc [15] = "abcdefg\0";
printf ("%s\n" , abc);
return 0;
}
And you do strings test
, you should see abcdefg
, as it's stored in read only area.
So , what's the best way to prevent user from reading this string , with "strings" command , e.g I don't want users to know my SQL phrase