Update check Code

社区服务
高级搜索
猴岛论坛CSGO反恐精英CS作弊器交流讨论Update check Code
发帖 回复
正序阅读 最近浏览的帖子最近浏览的版块
0个回复

Update check Code

楼层直达
作弊辅导员_h

ZxID:1019634

等级: 元老
定做作弊器
举报 只看楼主 使用道具 楼主   发表于: 2007-07-03 0

This will check to see if there is an update for your hack. What it does is download a file from the internet and compare it with a string in the hack, if they don't match it alerts you. This took me like 5-10 minutes max, I tried to make it as coder friendly as I could in that amount of time. You may want to add a function to delete the file it creates or whatever, there is infinite possibilities, this is just the barebones. Anyway, I'll stop babbling and give you the code. Add this to your loader or in your DLL under "DllMain" in "main.cpp". 

Code:

// =================Update Check=================
   char   ufile[99] = "UPDATE FILE HERE"; // update file
   char    site[99] = "SITE HERE";  // site
   char     ver[4] = "3";
   char readver[4];
   int   update;
   
   // download
   HRESULT news = URLDownloadToFile(NULL,ufile,"C:/update.txt",NULL,0);

   // read and compare
   ifstream version("C:/update.txt");
   version.read(readver,1);
   version.close();

   // alert user
   if(strcmp(ver,readver) && readver != NULL)
   {
   update = MessageBox(0,"Your dll/loader is out of date. Would you like to visit our site?","Update available.",MB_ICONQUESTION|MB_TOPMOST|MB_YESNO);
   }
   
   switch (update)
   {
   case IDYES: ShellExecute( NULL, "open",site, NULL, NULL, SW_SHOWNORMAL ); ExitProcess(0); break;
   }
   // ============================================== 

密码被盗,请联系cscheat取回
« 返回列表
发帖 回复