-
-
Save yohanes/285a4eda1e6c8b6b43f5 to your computer and use it in GitHub Desktop.
Daemon 4 .so HITB2014
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
#define _GNU_SOURCE /* See feature_test_macros(7) */ | |
#define _XOPEN_SOURCE /* See feature_test_macros(7) */ | |
#include <time.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
time_t time(time_t *t) | |
{ | |
char *t0 = getenv("TIME"); | |
long tt = atol(t0); | |
return tt; | |
} | |
int strncmp(const char *s1, const char *s2, size_t c) | |
{ | |
char *t0 = getenv("TIME"); | |
FILE *f = fopen("timemap.txt", "a+"); | |
fprintf(f, "%s %*s\n", t0, c, s1); | |
fclose(f); | |
exit(0); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment