Skip to content

Commit 9de2e84

Browse files
author
Don Johnson
committed
Initial commit
good code
1 parent 4432902 commit 9de2e84

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

bad_vuln.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#include <iostream>
2+
#include <cstdio>
3+
#include <cstdlib>
4+
#include <cstring>
5+
6+
int main() {
7+
char command[64];
8+
9+
std::cout << "Enter a shell command to run: ";
10+
11+
12+
gets(command);
13+
14+
15+
system(command);
16+
17+
return 0;
18+
}

0 commit comments

Comments
 (0)