Created
November 23, 2017 10:24
-
-
Save WangYihang/dcc51571d5fdb71a106bc7cc0389742f 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
#include <stdio.h> | |
#include <unistd.h> | |
int main(int argc, char* argv[]) | |
{ | |
FILE * fp; | |
char buffer[0x100]; | |
fp=popen(argv[1],"r"); | |
int counter = 1; | |
while(counter){ | |
counter = fread(buffer, 1, sizeof(buffer), fp); | |
write(1, buffer, counter); | |
} | |
pclose(fp); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment