LightningStalker

argvdump.c - Command line dumper

Oct 30th, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. /* argvdump.c
  2.  * Dumps all command line arguments
  3.  * Useful for debugging programs that call other programs
  4.  * Just create a symlink with the name of your target application.
  5.  * The Lightning Stalker 2013
  6. */
  7.  
  8. #include <stdio.h>
  9.  
  10. int main (int argc, char **argv)
  11. {
  12.     int i;
  13.    
  14.     fprintf (stderr, "%s ", argv[0]);
  15.     for (i = 1; i < argc; i++)
  16.         fprintf (stderr, "\"%s\" ", argv[i]);
  17.     fputs ("\n", stderr);
  18.     return (0);
  19. }
Add Comment
Please, Sign In to add comment