Advertisement
raisep0wn

NDH 2k10 public wargame, level9

May 19th, 2011
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.64 KB | None | 0 0
  1. /***********************************
  2. |            level9.c              |
  3. |  http://wargame.nuitduhack.com/  |
  4. |  http://www.nuitduhack.com/      |
  5. ***********************************/
  6. #include <stdio.h>
  7. #include <stdlib.h>
  8. #include <string.h>
  9.  
  10. // gcc -o level9 level9.c -fno-stack-protector -mpreferred-stack-boundary=2
  11. // paxctl -c -Spermx level9
  12.  
  13. void sayHello(char *tmp)
  14. {
  15.     char login[50];
  16.  
  17.     strcpy(login, tmp);
  18.     printf("Hi %s !\n", login);
  19. }
  20.  
  21. int main(int argc, char *argv[])
  22. {
  23.         if(argc < 2) {
  24.                 printf("Empty login! \n");
  25.                 exit(-1);
  26.         }
  27.     sayHello(argv[1]);
  28.  
  29.         exit(0);
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement