Created
November 5, 2017 19:50
-
-
Save Duncaen/6f8eb88bb362afa61adfbd80fcf63876 to your computer and use it in GitHub Desktop.
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
| tmp@pi$ cat >test.sh | |
| echo hi | |
| tmp@pi$ chmod +x te | |
| term.p9 test.sh | |
| tmp@pi$ chmod +x test.sh | |
| tmp@pi$ cat >test.c | |
| #include <unistd.h> | |
| int | |
| main(){ | |
| return execve("test.sh",0,0); | |
| } | |
| tmp@pi$ make test | |
| cc test.c -o test | |
| tmp@pi$ ./test | |
| tmp@pi?255$ cat >test.sh | |
| #/bin/sh | |
| echo hi | |
| tmp@pi$ ./test | |
| hi | |
| tmp@pi$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment