This file contains 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 <stdio.h> | |
#include <string.h> | |
int main(int argc, char **argv) { | |
char buf[128]; | |
if(argc < 2) return 1; | |
strcpy(buf, argv[1]); |
This file contains 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> | |
int main() { | |
system("id"); | |
return 0; | |
} |
This file contains 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 <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
int good(int addr) { | |
printf("Address of hmm: %p\n", addr); | |
} | |
int hmm() { | |
printf("Win.\n"); |
This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#define answer 3.141593 | |
void main(int argc, char **argv) { | |
float a = (argc - 2)?: strtod(argv[1], 0); |
This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
#include <signal.h> | |
#include <setjmp.h> | |
void catcher(int a) | |
{ | |
setresuid(geteuid(),geteuid(),geteuid()); | |
printf("WIN!\n"); | |
system("/bin/sh"); |
This file contains 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
cat /levels/level05 | |
#!/usr/bin/env python | |
import logging | |
import json | |
import optparse | |
import os | |
import pickle | |
import random | |
import re | |
import string |
This file contains 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 <stdio .h> | |
#include <string .h> | |
#include <stdlib .h> | |
void fun(char *str) | |
{ | |
char buf[1024]; | |
strcpy(buf, str); | |
} |
This file contains 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 <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#define NUM_FNS 4 | |
typedef int (*fn_ptr)(const char *); | |
int to_upper(const char *str) |
This file contains 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 <stdio.h> | |
int main(int argc, char **argv) | |
{ | |
printf("Congratulations on making it to level02!\n"); | |
printf("Point your browser to http://ctf.stri.pe/level02.php for the next challenge.\n"); | |
} |
This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char **argv) | |
{ | |
printf("Current time: "); | |
fflush(stdout); | |
system("date"); | |
return 0; | |
} |