Skip to content

Instantly share code, notes, and snippets.

@icedraco
Last active August 29, 2015 14:25
Show Gist options
  • Select an option

  • Save icedraco/171a0df98ae3bcbb8a83 to your computer and use it in GitHub Desktop.

Select an option

Save icedraco/171a0df98ae3bcbb8a83 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(void) {
char buffer[1024];
char buffer2[2048];
fgets(buffer, 1023, stdin);
sprintf(buffer2, "echo $((%s))", buffer);
system(buffer2); // TADA! :D
return 0;
}
// Shorter version:
// int main(void) {
// return system("python"); // TADA! :D
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment