Skip to content

Commit 0330bcc

Browse files
committed
fixed
1 parent 0572132 commit 0330bcc

40 files changed

+616
-0
lines changed

examples/abo1.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* abo1.c *
2+
* specially crafted to feed your brain by gera */
3+
4+
/* Dumb example to let you get introduced... */
5+
6+
int main(int argv,char **argc) {
7+
char buf[256];
8+
9+
strcpy(buf,argc[1]);
10+
}

examples/abo10.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* abo10.c *
2+
* specially crafted to feed your brain by [email protected] */
3+
4+
/* Deja-vu */
5+
6+
char buf[256];
7+
8+
int main(int argv,char **argc) {
9+
char *pbuf=(char*)malloc(256);
10+
11+
gets(buf);
12+
free(pbuf);
13+
}

examples/abo2.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* abo2.c *
2+
* specially crafted to feed your brain by [email protected] */
3+
4+
/* This is a tricky example to make you think *
5+
* and give you some help on the next one */
6+
7+
int main(int argv,char **argc) {
8+
char buf[256];
9+
10+
strcpy(buf,argc[1]);
11+
exit(1);
12+
}

examples/abo3.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* abo3.c *
2+
* specially crafted to feed your brain by [email protected] */
3+
4+
/* This'll prepare you for The Next Step */
5+
6+
int main(int argv,char **argc) {
7+
extern system,puts;
8+
void (*fn)(char*)=(void(*)(char*))&system;
9+
char buf[256];
10+
11+
fn=(void(*)(char*))&puts;
12+
strcpy(buf,argc[1]);
13+
fn(argc[2]);
14+
exit(1);
15+
}

examples/abo4.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* abo4.c *
2+
* specially crafted to feed your brain by [email protected] */
3+
4+
/* After this one, the next is just an Eureka! away */
5+
6+
extern system,puts;
7+
void (*fn)(char*)=(void(*)(char*))&system;
8+
9+
int main(int argv,char **argc) {
10+
char *pbuf=malloc(strlen(argc[2])+1);
11+
char buf[256];
12+
13+
fn=(void(*)(char*))&puts;
14+
strcpy(buf,argc[1]);
15+
strcpy(pbuf,argc[2]);
16+
fn(argc[3]);
17+
while(1);
18+
}

examples/abo5.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* abo5.c *
2+
* specially crafted to feed your brain by [email protected] */
3+
4+
/* You take the blue pill, you wake up in your bed, *
5+
* and you believe what you want to believe *
6+
* You take the red pill, *
7+
* and I'll show you how deep goes the rabbit hole */
8+
9+
int main(int argv,char **argc) {
10+
char *pbuf=malloc(strlen(argc[2])+1);
11+
char buf[256];
12+
13+
strcpy(buf,argc[1]);
14+
for (;*pbuf++=*(argc[2]++););
15+
exit(1);
16+
}

examples/abo6.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* abo6.c *
2+
* specially crafted to feed your brain by [email protected] */
3+
4+
/* return to me my love */
5+
6+
int main(int argv,char **argc) {
7+
char *pbuf=malloc(strlen(argc[2])+1);
8+
char buf[256];
9+
10+
strcpy(buf,argc[1]);
11+
strcpy(pbuf,argc[2]);
12+
while(1);
13+
}

examples/abo7.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* abo7.c *
2+
* specially crafted to feed your brain by [email protected] */
3+
4+
/* sometimes you can, *
5+
* sometimes you don't *
6+
* that's what life's about */
7+
8+
char buf[256]={1};
9+
10+
int main(int argv,char **argc) {
11+
strcpy(buf,argc[1]);
12+
}

examples/abo8.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* abo8.c *
2+
* specially crafted to feed your brain by [email protected] */
3+
4+
/* spot the difference */
5+
6+
7+
8+
char buf[256];
9+
10+
int main(int argv,char **argc) {
11+
strcpy(buf,argc[1]);
12+
}

examples/abo9.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* abo9.c *
2+
* specially crafted to feed your brain by [email protected] */
3+
4+
/* free(your mind) */
5+
/* I'm not sure in what operating systems it can be done */
6+
7+
int main(int argv,char **argc) {
8+
char *pbuf1=(char*)malloc(256);
9+
char *pbuf2=(char*)malloc(256);
10+
11+
gets(pbuf1);
12+
free(pbuf2);
13+
free(pbuf1);
14+
}

0 commit comments

Comments
 (0)