- Joined
- Aug 14, 2009
- Messages
- 2,304
- Reaction score
- 1,189
This C# Program inserts the generated XML into the database:
Stealer code (Put in WOBackend before return resultCode; in the function
Put this:
After:
In WOBackend
EDIT:
No support is given. For this to work you must obviously have a full database. And you need a pattern in Notepad++ to replace the time like so:
Ctrl+F then to Replace and search pattern:
You must be registered to see links
Stealer code (Put in WOBackend before return resultCode; in the function
):int CWOBackendReq:arseResult(CkHttpResponse* resp)
Code:
/*------------------------------------------------*/
r3dOutToLog("\n\n\n\n\n");
const char* d = bodyStr_;
const char* p = d;
if(p[0] != 'S' || p[1] != 'H' || p[2] != 'O' || p[3] != '3') {
r3dOutToLog("GetShopData: bad answer #1\n");
return 9;
}
p += 4;
// new skills. served as skillID/byte array of 5 per price
while(true)
{
WORD skillID = *(WORD*)p;
p += 2;
if(skillID == 0xFFFF)
break;
r3d_assert(skillID < CUserSkills::CLASS_MAX * CUserSkills::SKILL_CLASS_MULT);
p += 5;
/*ShopSkillCosts2[skillID][0] = *(BYTE*)p; p += 1;
ShopSkillCosts2[skillID][1] = *(BYTE*)p; p += 1;
ShopSkillCosts2[skillID][2] = *(BYTE*)p; p += 1;
ShopSkillCosts2[skillID][3] = *(BYTE*)p; p += 1;
ShopSkillCosts2[skillID][4] = *(BYTE*)p; p += 1;*/
}
if(p[0] != 'S' || p[1] != 'H' || p[2] != 'O' || p[3] != '3') {
r3dOutToLog("GetShopData: bad answer #2\n");
r3d_assert(false);
return 9;
}
p += 4;
r3dOutToLog("\n\n\n\n\n");
// shop items
while(1)
{
if((p - d) >= bodyLen_) {
r3dOutToLog("GetShopData: bad answer #2\n");
return 9;
}
// end tag
if(p[0] == 'S' && p[1] == 'H' && p[2] == 'O' && p[3] == '3')
break;
// item
DWORD itemId = *(DWORD*)p; p += 4;
BYTE priceBits = *(BYTE*)p; p += 1;
BYTE itemCat = *(BYTE*)p; p += 1;
DWORD price1d=0, price7d=0, price30d=0, pricePerm=0;
DWORD gd_price1d=0, gd_price7d=0, gd_price30d=0, gd_pricePerm=0;
r3d_assert(priceBits);
if(priceBits & 0x1) {
price1d = *(DWORD*)p; p += 4;
}
if(priceBits & 0x2) {
price7d = *(DWORD*)p; p += 4;
}
if(priceBits & 0x4) {
price30d = *(DWORD*)p; p += 4;
}
if(priceBits & 0x8) {
pricePerm = *(DWORD*)p; p += 4;
}
if(priceBits & 0x10) {
gd_price1d = *(DWORD*)p; p += 4;
}
if(priceBits & 0x20) {
gd_price7d = *(DWORD*)p; p += 4;
}
if(priceBits & 0x40) {
gd_price30d = *(DWORD*)p; p += 4;
}
if(priceBits & 0x80) {
gd_pricePerm = *(DWORD*)p; p += 4;
}
r3dOutToLog("<item itemID=\"%d\" price1d=\"%d\" price7d=\"%d\" price30d=\"%d\" pricePerm=\"%d\" gd_price1d=\"%d\" gd_price7d=\"%d\" gd_price30d=\"%d\" gd_pricePerm=\"%d\" />\n", itemId, price1d, price7d, price30d, pricePerm, gd_price1d, gd_price7d, gd_price30d, gd_pricePerm);
}
r3dOutToLog("\n\n\n\n\n");
/*------------------------------------------------*/
Put this:
Code:
sprintf(fullUrl, "%s", "api/api_GetShop5.aspx");
g_api_ip->SetString("api1.thewarinc.com");
After:
Code:
// create request
char fullUrl[512];
if(url[0] != '/')
sprintf(fullUrl, "%s%s", gDomainBaseUrl, url);
else
sprintf(fullUrl, "%s", url);
In WOBackend
EDIT:
No support is given. For this to work you must obviously have a full database. And you need a pattern in Notepad++ to replace the time like so:
Ctrl+F then to Replace and search pattern:
and replace with nothing. Also searchmode is regular expression(.*?)\|
Last edited: