Advertisement
Guest User

Untitled

a guest
May 17th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. WSADATA wsaData;
  2. if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) {
  3. MessageBox(NULL,"WSAStartup failed.\nMake Sure you're connected to network.", "MassasHook", MB_OK);
  4. return false;
  5. }
  6. SOCKET Socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
  7.  
  8. struct hostent *host;
  9. host = gethostbyname("www.massas.pw");
  10. SOCKADDR_IN SockAddr;
  11. SockAddr.sin_port = htons(80);
  12. SockAddr.sin_family = AF_INET;
  13. SockAddr.sin_addr.s_addr = *((unsigned long*)host->h_addr);
  14. if (connect(Socket, (SOCKADDR*)(&SockAddr), sizeof(SockAddr)) != 0) {
  15. MessageBox(NULL, "Error connecting to server", "MassasHook", MB_OK);
  16. return false;
  17. }
  18. //connected
  19. std::string sendbuf = "GET /vloader/users.txt HTTP/1.1\r\nHost: www.massas.pw\r\nConnection: close\r\n\r\n";
  20. send(Socket, sendbuf.c_str(), sendbuf.length(), 0);
  21. char buffer[10000];
  22.  
  23. int nDataLength = 1;
  24. while (nDataLength != 0)
  25. {
  26. nDataLength = recv(Socket, buffer, 10000, 0);
  27. }
  28. closesocket(Socket);
  29. WSACleanup();
  30.  
  31. std::string source = buffer;
  32.  
  33. DWORD dwSerial;
  34. GetVolumeInformation("C:\\", NULL, 255, &dwSerial, NULL, NULL, NULL, 255);
  35. auto hwid = std::to_string(dwSerial);
  36.  
  37.  
  38. if (source.find(hwid) != std::string::npos)
  39. {
  40. init();
  41. }
  42. else
  43. {
  44. MessageBox(NULL, "You do not have acess to massashook", "MassasHook", MB_OK);
  45. MessageBox(NULL, std::string(hwid + "\nUsa CTRL + C para copiar o teu hwid").c_str() , "Your HWID", MB_OK);
  46. Sleep(200);
  47. FreeLibraryAndExitThread((HMODULE)base, 0);
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement