Guest User

Untitled

a guest
Jan 12th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4.  
  5. int main(int argc, char* argv[])
  6. {
  7. system(argv[1]);
  8.  
  9. // Loading all the data from the scrambled list into main.
  10. std::cout << "Loading " << argv[1] << " into memory..." << std::endl;
  11. std::ifstream* scrambleList = new std::ifstream(argv[1]);
  12. std::string scrambleArray[50];
  13. std::string tempStr;
  14. for(int i = 0; i < 50; i++)
  15. {
  16. *scrambleList >> scrambleArray[i];
  17. std::cout << "#" << i << ": " << scrambleArray[i] << std::endl;
  18. if(scrambleList->eof())
  19. break;
  20. }
  21. std::cout << "Loading complete!" << std::endl << std::endl;
  22.  
  23. for(int i = 0; scrambleArray[i] != "\0"; i++)
  24. {
  25. std::cout << "Executing decoders for " << scrambleArray[i] << std::endl;
  26. tempStr = "deslen ";
  27. tempStr += scrambleArray[i] + " ";
  28. tempStr += argv[2];
  29. tempStr += " ";
  30. tempStr += "temp";
  31. system((char*)tempStr.c_str());
  32. std::cout << " Executing: " << tempStr << std::endl;
  33. }
  34.  
  35. system(argv[3]);
  36. return 0;
  37. }
  38.  
  39.  
  40. #include <iostream>
  41. #include <fstream>
  42.  
  43. int main(int argc, char* argv[])
  44. {
  45. std::ofstream* targetList = new std::ofstream(argv[3]);
  46. std::ifstream* wordList = new std::ifstream(argv[2]);
  47. std::string fullArray[255];
  48.  
  49. // Loading all the data from the full list into the array.
  50. for(int i = 0; i < 255; i++)
  51. {
  52. *wordList >> fullArray[i];
  53. if(wordList->eof())
  54. break;
  55. }
  56.  
  57. return 0;
  58. }
Add Comment
Please, Sign In to add comment