• Welcome to Valhalla Legends Archive.
 

0x25

Started by ReaSoN, September 13, 2009, 04:54 PM

Previous topic - Next topic

ReaSoN

I'm playing around with actual ping spoofing (Like setting your ping to the value you want) My bot is storing all the pings from a session and finding an average, then delaying sending 0x25 based on the formula

(custom ping - average ping)

I use a timer to do the delays instead of Sleep(), and i noticed that whenever i log in i always get -1ms because bnet thinks im not sending 0x25.
because i'm sending it some .125 seconds later, and then whenever i rejoin a channel or something my ping doesn't change. My question is, why does BNET keep sending 0x25 if it doesnt update the ping? And how can i "improve" my method to make it work?

Sixen

It doesn't change when you change the channel because the ping is taken at login (the initial ping response).
Blizzard Tech Support/Op W@R - FallenArms
The Chat Gem Lives!
http://www.diablofans.com
http://www.sixen.org

ReaSoN

But BNET keeps sending 0x25, even after they send it the first time, so why do they keep sending it?

Mystical

It does change during game play, just not in channels (EVER). you could ping the server your connected to randomly and get your inital ping responce from that to keep a somewhat like real time PING

brew

Quote from: ReaSoN on September 13, 2009, 04:54 PM
why does BNET keep sending 0x25 if it doesnt update the ping?
Good question. I think it's like a typical "are you still there bro?" kind of ping to test if the connection is still active and ok at the application level, whereas the one way SID_NULL keepalive is to keep the connection active and ping at a level below the application layer.


Quote from: ReaSoN on September 13, 2009, 04:54 PM
And how can i "improve" my method to make it work?
By delaying the sending of all other packets until your 0x25 is sent. What I like to do is break my program off into another GetMessage/TranslateMessage/DispatchMessage loop so it could service the GUI messages and the packets from other connections while it waits for the spoofing period to be over like so:


void __stdcall PingSpoofProc(int index) {
   char asdf[64];
   AddChatf(vbYellow, bot[index]->hWnd_rtfChat, asdf, "Sleep()ing for %dms...", bot[index]->spoofedping);
   Sleep(bot[index]->spoofedping);
   AddChat(vbGreen, "Wakey wakey!", bot[index]->hWnd_rtfChat);
   InsertDWORD(0);
   SendPacket(0x25, index);
   PostMessage(hWnd_main, WM_WAKEUP, 0, index);
}

void WaitForPingSpoof(int index) {
   MSG msg;
   HANDLE hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)PingSpoofProc, (void *)index, 0, NULL);
   while (GetMessage(&msg, (HWND)NULL, 0, 0)) {
      if (msg.message == WM_WAKEUP && msg.lParam == index && msg.hwnd == hWnd_main)
         break;
      if (!TranslateMDISysAccel(hWnd_Client, &msg)) {
         TranslateMessage(&msg);
         DispatchMessage(&msg);
      }
   }
   CloseHandle(hThread);
}

<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P