Price Stealer (Original War Inc)

Results 1 to 6 of 6
  1. #1
    Moderator GigaToni is offline
    ModeratorRank
    Aug 2009 Join Date
    GER / FRLocation
    2,329Posts

    Price Stealer (Original War Inc)

    This C# Program inserts the generated XML into the database:

    Download

    Stealer code (Put in WOBackend before return resultCode; in the function
    int CWOBackendReq::ParseResult(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 by GigaToni; 27-01-14 at 08:13 AM.


  2. #2
    Account Upgraded | Title Enabled! djbadboys38 is offline
    MemberRank
    Aug 2010 Join Date
    TanzanyaLocation
    1,365Posts

    Re: Price Stealer (Original War Inc)

    I don't understand, what is this?

  3. #3
    Moderator GigaToni is offline
    ModeratorRank
    Aug 2009 Join Date
    GER / FRLocation
    2,329Posts

    Re: Price Stealer (Original War Inc)

    For the starting people (because no one released a Full database with real prices). It grabs the original Prices from War Inc^^

  4. #4
    Account Upgraded | Title Enabled! djbadboys38 is offline
    MemberRank
    Aug 2010 Join Date
    TanzanyaLocation
    1,365Posts

    Re: Price Stealer (Original War Inc)

    Quote Originally Posted by GigaToni View Post
    For the starting people (because no one released a Full database with real prices). It grabs the original Prices from War Inc^^
    wow looks good

  5. #5
    Moderator GigaToni is offline
    ModeratorRank
    Aug 2009 Join Date
    GER / FRLocation
    2,329Posts

    Re: Price Stealer (Original War Inc)

    BTW: works with every War Inc Site that doesn't require authentication.

  6. #6
    Harro Syxn is offline
    MemberRank
    Mar 2013 Join Date
    767Posts

    Re: Price Stealer (Original War Inc)

    Nice share gigatoni



Advertisement