Guest User

Untitled

a guest
Mar 17th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #include <windows.h>
  2. #include <iostream>
  3. #include <string>
  4. #include <fstream>
  5. #include <locale.h>
  6. using namespace std;
  7.  
  8. int main() {
  9. setlocale(LC_ALL, "");
  10.  
  11. bool t = false;
  12. size_t temp;
  13. string str;
  14. char buf[2048];
  15. const char* substr = "Ваш IP";
  16.  
  17. ifstream file;
  18. file.open("2.html");
  19.  
  20. while (!file.eof()) {
  21. getline(file, str, 'n');
  22.  
  23. ZeroMemory(buf, 2048);
  24. strcpy(buf, str.c_str());
  25. t = OemToAnsi(buf, buf);
  26. str = (string)buf;
  27.  
  28. temp = str.find(substr);
  29. if (temp != string::npos)
  30. break;
  31. }
  32. file.close();
  33. cout << str << endl;
  34.  
  35. Sleep(3000);
  36. return 0;
  37. }
Add Comment
Please, Sign In to add comment