Skip to content

Instantly share code, notes, and snippets.

@0x9090
Created June 26, 2019 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0x9090/2930f53f287150459fcc45c68aaf837d to your computer and use it in GitHub Desktop.
Save 0x9090/2930f53f287150459fcc45c68aaf837d to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(int argc, char * argv[])
{
char a[1024];
strcpy(a, argv[1]);
printf(a);
printf("\n");
}
/* ------------------------ */
# ls -alh
total 8
drwxr-xr-x 3 nops ANT\Domain Users 96B Jan 10 11:26 .
drwxr-xr-x 9 nops ANT\Domain Users 288B Jan 10 11:25 ..
-rw-r--r-- 1 nops ANT\Domain Users 132B Jan 10 11:17 printer.c
# gcc -o printer printer.c
# ./printer asdf
asdf
# ls -alh
total 32
drwxr-xr-x 4 nops ANT\Domain Users 128B Jan 10 11:25 .
drwxr-xr-x 9 nops ANT\Domain Users 288B Jan 10 11:25 ..
-rwsr-xr-x 1 nops ANT\Domain Users 8.4K Jan 10 11:21 printer
-rw-r--r-- 1 nops ANT\Domain Users 132B Jan 10 11:17 printer.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment