A novel approach to hiding files
Although I'm usually a proponent of doing things in the open — when it comes to software development, of course — I stumbled upon this little gem while reading up on the difference between hard links and soft links on UNIX-based systems:
Have you ever wondered how you could hide a temporary file? Well, you could do the following:
{ FILE *fp; fp = fopen("some.hidden.file","w"); unlink("some.hidden.file"); /* deletes the filename part */ /* some.hidden.file no longer has a filename and is truely hidden */ fprintf(fp,"This data won't be found\n"); /* access the data part */ /*etc*/ fclose(fp); /* finally release the data part */ }
Comments
lsof
or/proc/$pid/fd
to have a nose around.by Dominic Mitchell on 2008-11-28 22:15:30