• Welcome to Valhalla Legends Archive.
 

see if ive got this right...

Started by gotcha_ass, January 29, 2003, 12:47 PM

Previous topic - Next topic

gotcha_ass

Ok wen I log packets they look like this:

FF 51 32 34 etc.

but in actuallity its this:

FF513234

right? ok then can I use this code to extract the PacketID, Length, and Data from a packet??

'im leaving some declerations out for sake of space

PacketID = Mid(packet, 3, 2)
PacketLen = Mid(packet, 4, 4)
PacketData = Mid(packet, 9, PacketLen)

I have a feeling this is wrong but its my first try at making my own code.

iago

#1
FF 51 32 34
that's 4 bytes, a byte is 2 hex characters

ID = 51, which is mid(String, 2, 1)
Length = &h3432, I'm not sure how to extract that in VB, makeword() or something..
and that data is everything else, mid(String, 5, Length) or mid(String, 5, &h3432) in this case
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


gotcha_ass

ohh ok I gotcha

do you add the 2bytes that make the length or jus put them together??

I found this code to get the PacketID
PacketID = Asc(Mid(Data, 2, 1))

But why do they use the Asc, whis returns the ANSI character code of the 1st letter in the string??

Mesiah / haiseM

#3
iago, it would be simple to extract it, by using mid

PacketLength = "&h" & mid(packet, 3, 2)

somethin like that should make a simple dword, since data is not received in hex!!!!!!!!!!!!!!

those spaces your packet loggers show you, are not there!
]HighBrow Innovations
Coming soon...

AIM Online Status: 

Arta

Gotcha:

You're trying to make a bot whilst having absolutely no knowledge, from what I can tell, of the systems you are using. You need to put the bot aside, and do some reading - about binary and hex, and number systems in general; about how data is stored, transmitted, and displayed; about how to take data, generally speaking, and process it to extract the information you need -- This is basic knowledge that you need before you can attempt to write any kind of complex application, and while your attempts are laudible, they are also somewhat absurd. You clearly have the drive and interest to learn, so why not do it properly? Give yourself a good grounding in these fundamental computing principles and then return to Battle.net -- hopefully with far greater understanding of what you're doing.

You'll benefit in the longrun from having a little patience and learning to walk before you try running.