Advertisement
Guest User

Untitled

a guest
Jul 9th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. char inputArray[300];
  2. char buffer[300];
  3. char username[100];
  4. char password[100];
  5. char name[100];
  6. int i=0;
  7.  
  8. void repeat(char *to)
  9. {
  10. while(*to!='=')
  11. {
  12. to++;
  13. }
  14. }
  15.  
  16. void array(char *mm,char *tt)
  17. {
  18. i=0;
  19. while(*tt!='+')
  20. {
  21. mm[i]=*tt;
  22. tt++;
  23. i++;
  24. }
  25. }
  26.  
  27. int main()
  28. {
  29. printf("give me the shit in this fashion: username=?+password=?+real=?n");
  30. scanf("%s",inputArray);
  31. strcpy(buffer,inputArray);
  32. char *tok=buffer;
  33.  
  34. repeat(tok);
  35. tok++;
  36.  
  37. array(username,tok);
  38. repeat(tok);
  39.  
  40. tok++;
  41.  
  42. array(password,tok);
  43.  
  44. tok++;
  45.  
  46. repeat(tok);
  47. tok++;
  48.  
  49. array(name,tok);
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement