Guest User

Untitled

a guest
Jun 15th, 2017
151
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <string.h>
  3. int main (int argc , char *argv[]){
  4. if (argc < 2){
  5. printf ("Uso: %s nombre\n" , argv[0]);
  6. exit(-1);
  7. }
  8. int DATASIZE=sizeof(argv[1]);
  9. printf ("\n[*]Generando vars\n");
  10. char cadena1[256];
  11. if(strlen(argv[1]) <= 256) strncpy(cadena1,argv[1] ,sizeof(argv[1]));
  12. else
  13. exit(-1);
  14.  
  15. printf ("Nombre :%s \n" , cadena1);
  16. }
RAW Paste Data