• Welcome to Valhalla Legends Archive.
 

Hey all need some help.

Started by Final, September 29, 2006, 06:15 PM

Previous topic - Next topic

Final

Whats up i just started working on a bot need some help with 0x50 packet i Send it out But i dont recieve anything back.

Heres my Setup

InsertDWORD(0);
     InsertNonNTString("68XIRATS");
     InsertDWORD(0xCF);
     InsertDWORD(0);
     InsertDWORD(0);
     InsertDWORD(0);
     InsertDWORD(0);
     InsertNTString("USA");
     InsertNTString("United States");
     SendPacket(0x50);

This is in C++ Dev-C++Compiler

MyndFyre

QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Final

#2
shit wow that was fast lol
Ok i figured out what i did wrong I didnt setup socket well but now that i send it
it disconnects me .
Do i have to send something before 0x50 by any chance

l2k-Shadow

Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Hero

Before sending 0x50, send Chr(1).

Ringo

Quote from: Final on September 29, 2006, 06:22 PM
Do i have to send something before 0x50 by any chance
Yeah, you need to send a protocol byte 0x01 for game, 0x02 for FTP file transfer.
If there is still a problem, and your socket is set up right, you will need to post a packet capture of your program, so we can pick through it :)
Checking a packet capture from your program Vs a packet capture from the client your trying to emulate, should help you alot with issues like this one :P

Final

#6
Like this?

     SendPacket(0x01);
     InsertDWORD(0);
     InsertNonNTString("68XIRATS");
     InsertDWORD(0xCF);
     InsertDWORD(0);
     InsertDWORD(0);
     InsertDWORD(0);
     InsertDWORD(0);
     InsertDWORD(0);
     InsertNTString("USA");
     InsertNTString("United States");
     SendPacket(0x50);

I still getting disconnected i dont understand wy

Hdx

chr(0x01) not packet 0x01
1 single byte, w/o anything else.
~-~(HDX)~-~

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

l2k-Shadow

Quote from: Final on September 29, 2006, 07:52 PM
Like this?

     SendPacket(0x01);
     InsertDWORD(0);
     InsertNonNTString("68XIRATS");
     InsertDWORD(0xCF);
     InsertDWORD(0);
     InsertDWORD(0);
     InsertDWORD(0);
     InsertDWORD(0);
     InsertDWORD(0);
     InsertNTString("USA");
     InsertNTString("United States");
     SendPacket(0x50);

I still getting disconnected i dont understand wy

::) not packet 0x01, BYTE 0x01
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Final

im sorry but whats CHR()? im using c++ and how would i do a byte just add another DWORD? or WORD?

Hdx

Quote from: Final on September 29, 2006, 08:00 PM
im sorry but whats CHR()? im using c++ and how would i do a byte just add another DWORD? or WORD?
Well considering a Word is 2 bytes
And a DWord is 2 words
That would make a DWord 4 bytes....
just use send(0x01) or w/e the function to send data through your socket is in Cpp
~-~(HDX)~-~

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

rabbit

Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Final

#12
Ok I have to this point

DWORD logontype=*(unsigned long *)(buffer+4);
           servertoken=*(unsigned long *)(buffer+sizeof(logontype));
           DWORD UPDValue=*(unsigned long *)(buffer+sizeof(servertoken));
           int time=(int)(buffer+sizeof(UPDValue));
           char* verfile=buffer+sizeof(time);
           char* valuestring=buffer+sizeof(verfile);
           int checkrev;
           checkrev=checkRevisionFlat(valuestring,"STAR/Starcraft.exe","STAR/storm.dll","STAR/battle.snp",time,??);

but what goes in the last arguement were it says ??..?

Joe[x86]

Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

l2k-Shadow

#14
Quote from: Joex86] link=topic=15807.msg159198#msg159198 date=1159586673]
No, use a packet reader! :'(.

Yeah I second that that will make your code... much cleaner and better.

now that we're past that part, you are reading the packet wrong.
logontype - fine
servertoken - fine
UPDValue (fyi it's UDP) - fine
time - that value is a FILETIME so it is 8 bytes long. definitely not an int.
verfile - that's fine just remember that BNCSUtil's CheckRevision() wants the mpq number, not the whole file, use extractMPQNumber() function
valuestring - fine

in last field goes your checksum variable, which is the whole point of doing CheckRevision(), the return value simply tells you if the function succeeded or not.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.