Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: GoSu_KaOs on November 25, 2004, 03:11 PM

Title: Stuck on PingSpoof
Post by: GoSu_KaOs on November 25, 2004, 03:11 PM
How do I take off pingspoof?
You can pick between -1 and 0 on mine. But I cant figure out how to make it normal ping. I'm using TCPConnections.cls.

http://imdre.superihost.com/TCPConnections.cls.txt

If you can find it and show me how to change it back to normal, it will be appreciated.
Title: Re: Stuck on PingSpoof
Post by: Eric on November 25, 2004, 03:41 PM
Echo back SID_PING when it's received.
Title: Re: Stuck on PingSpoof
Post by: GoSu_KaOs on November 25, 2004, 07:38 PM
Quote from: LoRd[nK] on November 25, 2004, 03:41 PM
Echo back SID_PING when it's received.

How exactly do I echo back?
Title: Re: Stuck on PingSpoof
Post by: Arta on November 25, 2004, 07:56 PM
Just the entire message back to Battle.net.
Title: Re: Stuck on PingSpoof
Post by: BaDDBLooD on November 25, 2004, 08:02 PM
Quote from: Arta[vL] on November 25, 2004, 07:56 PM
Just the entire message back to Battle.net.

You just want to send back the 'Void"
Title: Re: Stuck on PingSpoof
Post by: Arta on November 25, 2004, 09:05 PM
Huh?
Title: Re: Stuck on PingSpoof
Post by: BaDDBLooD on November 25, 2004, 10:05 PM
Doesn't a packet consist of the Header and then the Void?  You only want to send the void part back to bnet, correct?
Title: Re: Stuck on PingSpoof
Post by: UserLoser. on November 25, 2004, 10:23 PM
Quote from: BaDDBLooD on November 25, 2004, 10:05 PM
Doesn't a packet consist of the Header and then the Void?  You only want to send the void part back to bnet, correct?

'void' is what you call data that has no set length, data type, contents, etc.  Telling people to send back the 'void' isn't a good way to explain something
Title: Re: Stuck on PingSpoof
Post by: BaDDBLooD on November 25, 2004, 10:29 PM
isn't it better than message?
Title: Re: Stuck on PingSpoof
Post by: GoSu_KaOs on November 25, 2004, 11:43 PM
so how do i send the void?     InsertDWORD 0?
Title: Re: Stuck on PingSpoof
Post by: Banana fanna fo fanna on November 26, 2004, 12:46 AM
...null?
Title: Re: Stuck on PingSpoof
Post by: OnlyMeat on November 26, 2004, 04:38 AM
Quote from: GoSu_KaOs on November 25, 2004, 03:11 PM
How do I take off pingspoof?
You can pick between -1 and 0 on mine. But I cant figure out how to make it normal ping. I'm using TCPConnections.cls.

http://imdre.superihost.com/TCPConnections.cls.txt

If you can find it and show me how to change it back to normal, it will be appreciated.

This is my code in c++ if it helps, all you do is handle packet 0x25 and send it back using the same data it sent originally ( which has a DWORD length ):-


void CBot::OnPkt_25(char *pszData, int nLen)
{
// Echo ping response

CPacket Packet;

Packet << *(UINT *)pszData;
Packet.Send(PKT_PING, GetSocket());
}
Title: Re: Stuck on PingSpoof
Post by: Arta on November 26, 2004, 07:23 AM
You can go to the trouble of parsing the message, extracting the DWORD, creating a new header and sending the reply, or you can just send the message straight back to the server, which equates to the exact same thing.
Title: Re: Stuck on PingSpoof
Post by: OnlyMeat on November 26, 2004, 08:51 AM
Quote from: Arta[vL] on November 26, 2004, 07:23 AM
You can go to the trouble of parsing the message, extracting the DWORD, creating a new header and sending the reply, or you can just send the message straight back to the server, which equates to the exact same thing.

Although you do have to parse the header to determine if it's a valid bnet login packet i.e 0xff and extract the ID anyway, so it's not much of a big deal to copy the dword and send it straight back.
Title: Re: Stuck on PingSpoof
Post by: Arta on November 26, 2004, 10:48 AM
*shrug* invalid messages never get to my message processing.


void ProcessPing(CBNCSMessage *Message)
{
      Send(Message);
}


Seems easiest to me!
Title: Re: Stuck on PingSpoof
Post by: UserLoser. on November 26, 2004, 10:58 AM
Quote from: Arta[vL] on November 26, 2004, 07:23 AM
You can go to the trouble of parsing the message, extracting the DWORD, creating a new header and sending the reply, or you can just send the message straight back to the server, which equates to the exact same thing.

Is there any evidence which shows that it'll always be a 32-bit value from the server?  Starcraft's Battle.snp performs no check on the length, it just sends back what it receives (but it does create it's own header)
Title: Re: Stuck on PingSpoof
Post by: Arta on November 26, 2004, 03:41 PM
No. The correct procedure is just to echo the message back. Hence my postulations :)
Title: Re: Stuck on PingSpoof
Post by: Networks on November 28, 2004, 12:52 PM
Is it possible to get an exact ping value if you stall sending 0x25 (i think)? I pretty sure it's not. How does it work when you stall sending it.
Title: Re: Stuck on PingSpoof
Post by: BaDDBLooD on November 28, 2004, 01:35 PM
If you stall sending it, your ping goes up dramatically.
Title: Re: Stuck on PingSpoof
Post by: Soul Taker on November 28, 2004, 02:20 PM
Quote from: Networks on November 28, 2004, 12:52 PM
Is it possible to get an exact ping value if you stall sending 0x25 (i think)? I pretty sure it's not. How does it work when you stall sending it.
Yes.  Just delay sending it by (Desired Value - Normal Ping).  If you want a ping lower than the ping you normally get, then this obviously won't work.
Title: Re: Stuck on PingSpoof
Post by: Warrior on November 29, 2004, 09:38 AM
Well it is possible to spoof your ping by timing your response to 0x25 but I dont think the Timer Control is accurate to the nearest 1 millisecond so your best bet would be to use SetTimer / KillTimer API Calls
Title: Re: Stuck on PingSpoof
Post by: OnlyMeat on November 29, 2004, 02:49 PM
Quote from: Warrior on November 29, 2004, 09:38 AM
Well it is possible to spoof your ping by timing your response to 0x25 but I dont think the Timer Control is accurate to the nearest 1 millisecond so your best bet would be to use SetTimer / KillTimer API Calls

The timer control uses those api calls internally.
Title: Re: Stuck on PingSpoof
Post by: o.OV on November 29, 2004, 04:08 PM
Quote from: Warrior on November 29, 2004, 09:38 AM
Well it is possible to spoof your ping by timing your response to 0x25 but I dont think the Timer Control is accurate to the nearest 1 millisecond so your best bet would be to use SetTimer / KillTimer API Calls

High Performance timer used in multimedia applications would work better I hear.. never bothered though. You can try if you want.