Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. int i = 0;
  2. int j = 0;
  3. int error = 0;
  4. for (int k = 0; k < 10; k++)
  5. {
  6. while(crypto_message[j] != '\0' && error == 0) {
  7. if (crypto_message[j] - dictionary[k][i] < 0)
  8. {
  9. if(isalnum(crypto_message[j] - dictionary[k][i] + 255) != 0 || ispunct(crypto_message[j] - dictionary[k][i] + 255) != 0 || isspace(crypto_message[j] - dictionary[k][i] + 255) != 0) {
  10. }
  11. else {
  12. error = 1;
  13. }
  14. }
  15. else
  16. {
  17. if(isalnum(crypto_message[j] - dictionary[k][i]) != 0 || ispunct(crypto_message[j] - dictionary[k][i]) != 0 || isspace(crypto_message[j] - dictionary[k][i]) != 0) {
  18. }
  19. else {
  20. error = 1;
  21. }
  22. }
  23. i++;
  24. j++;
  25. if (dictionary[k][i] == '\0')
  26. {
  27. i = 0;
  28. }
  29. }
  30. if(error == 1) {
  31. i = 0;
  32. j = 0;
  33. error = 0;
  34. }
  35. else {
  36. strcpy((char *)password, (const char *)dictionary[k]);
  37. return;
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement