Skip to content
This repository was archived by the owner on May 3, 2022. It is now read-only.

Commit 35740b8

Browse files
committed
removed stdint types
1 parent 06c3d5f commit 35740b8

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

level0/source.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
#include <string.h>
44
#include <unistd.h>
55
#include <sys/types.h>
6-
#include <stdint.h>
76
#define _GNU_SOURCE
87

9-
uint8_t main(uint32_t argc, uint8_t **argv) {
8+
int main(int argc, char **argv) {
109
if (atoi(argv[1]) == 423) {
1110
char *const args[] = { strdup("/bin/sh"), NULL };
1211
gid_t gid = getegid();

level1/source.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#include <stdio.h>
2-
#include <stdint.h>
32
#include <stdlib.h>
43

54
void run(void) {
65
fwrite("Good... Wait what?\n", 1, 19, stdout);
76
system("/bin/sh");
87
}
98

10-
uint8_t main(void) {
9+
int main(void) {
1110
char buffer[64];
1211

1312
gets(buffer);

level2/source.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#include <stdio.h>
2-
#include <stdint.h>
32
#include <string.h>
43
#include <stdlib.h>
54

65
void p(void) {
7-
uint8_t input[76];
8-
uint32_t memory_address;
6+
char input[76];
7+
int memory_address;
98

109
fflush(stdout);
1110
gets(input);
@@ -19,6 +18,8 @@ void p(void) {
1918
strdup(input);
2019
}
2120

22-
uint8_t main(void) {
21+
int main(void) {
2322
p();
23+
24+
return 0;
2425
}

level3/source.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#include <stdio.h>
2-
#include <stdint.h>
32
#include <stdlib.h>
43

5-
uint8_t m;
4+
int m;
65

76
void v(void) {
87
char input[520];
@@ -16,6 +15,8 @@ void v(void) {
1615
}
1716
}
1817

19-
uint8_t main(void) {
18+
int main(void) {
2019
v();
20+
21+
return 0;
2122
}

level4/source.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#include <stdio.h>
2-
#include <stdint.h>
32
#include <stdlib.h>
43

5-
uint32_t m;
4+
int m;
65

76
void p(char *string) {
87
printf(string);
@@ -19,6 +18,8 @@ void n(void) {
1918
}
2019
}
2120

22-
uint8_t main(void) {
21+
int main(void) {
2322
n();
23+
24+
return 0;
2425
}

level5/source.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include <unistd.h>
22
#include <stdlib.h>
33
#include <stdio.h>
4-
#include <stdint.h>
54

65
void o(void) {
76
system("/bin/sh");
@@ -16,6 +15,7 @@ void n(void) {
1615
exit(1);
1716
}
1817

19-
uint8_t main(void) {
18+
int main(void) {
2019
n();
20+
return 0;
2121
}

level6/source.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include <stdlib.h>
22
#include <stdio.h>
3-
#include <stdint.h>
43
#include <string.h>
54

65
typedef void(*function_pointer)(void);
@@ -13,8 +12,8 @@ void m(void) {
1312
puts("Nope");
1413
}
1514

16-
uint8_t main(int argc, char **argv) {
17-
uint8_t *input = (uint8_t*)malloc(64);
15+
int main(int argc, char **argv) {
16+
char *input = (char*)malloc(64);
1817
function_pointer *f = (function_pointer*)malloc(4);
1918
*f = m;
2019

0 commit comments

Comments
 (0)