• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - FrostWraith

#1
C/C++ Programming / Re: Couple questions
April 08, 2009, 09:47 AM
I don't typically use C++, I program in straight C (planning on making the move soon  ;)).  I do believe that the "delete" keyword should only be used when you are doing dynamic allocation, or in other words, when you allocate space to a pointer using the "new" keyword.  I could be wrong, but I think your array is allocated on the stack, and not the heap.

In C, its equivalent is malloc/free.

If you are afraid if your program will leak, just run it through valgrind or something and take a look yourself.
#2
News / Re: New Website
April 05, 2009, 11:13 PM
I haven't even gotten my confirmation email.  It's been close to a day  :(
#3
Try creating another socket?  Just run the connections on two different threads.
#4
I don't know what version this is but this is what I rummaged up:

http://rapidshare.com/files/189373010/BnetAuth.tar.gz
#5
Quote from: xpeh on January 16, 2009, 08:02 PM
Quote from: FrostWraith on January 16, 2009, 06:13 PM
I just use WPE Pro
?
google it.
and by the way stop hijacking all these topics, damn man

Original poster, you stated "If I treat the 0x0c value as total packet length".  Are you looking at single bytes as the length of the data, or a WORD sized variable.  Most of the bnet protocol uses WORD (2 byte, 16-bit) variables to describe length.

Edit: nvm seems that for d2gs, the lengths are stored in 1 byte.
#6
To answer zephs question:
http://forum.valhallalegends.com/index.php?board=17;action=display;threadid=4594
too bad its dead, but im sure somebody here still has it.  I just use WPE Pro
#7
You are receiving the message:
0x80000001: Realm is unavailable

http://www.bnetdocs.org/?op=packet&pid=237

Where are you getting the ip from?  You might not be extracting it correctly from the packet in which you receive it.
#8
Show your packet log.  Are you sure you are handling endianness correctly?
#9
The connection data for ROC and TFT is not much different, just some packets are larger because they contain multiple hashes.

Javaop is an open source bot written in Java that is cross platform
http://www.javaop.com/

There are others, but this was the one that came to mind the quickest.
#10
Back in the day when I did VB programming, here was how I declared it.
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
    (ByRef Destination As Any, ByRef Source As Any, ByVal numBytes As Long)
#11
Wow, I actually have it.  No guarantees it hasn't been modified.

http://frostwraith.no-ip.org/bnet/D2GSopenSource.zip
#12
Well for Warcraft III, it always says "Error writing to disk", even when not patching.  I get this when I try to connect.  Running as admin fixes this.
This could have to do with the installer I used.  I downloaded it from the blizzard.com/account thing.

With wireshark I did install winpcap with it but it just doesn't pick up on any available devices to listen on without running as admin.
Also, I only have v1.0.0, not 1.0.2, so that might have been changed.

Besides that, I do agree with you on the fact that programs should not have to be run as admin to function properly.
#13
There are tons of programs I use that have to run admin though because they won't work right otherwise.  One of which being the blizzard game Warcraft III.  Then there are others that it makes some sense to run as admin, like Wireshark.
#14
General Programming / Re: Targa Decompression
July 18, 2008, 08:58 PM
Quote0x01 - 1 byte of raw pixel data, (189, 173, 111)
0xB5 - Since its > 128 [meaning it's highest bit is set] its RLE, 0xB5 - 128 = 53. So you have 53 pixel of (168, 110, 129)
0x88 - Since its > 128 its RLE, 0x88 - 128 = 8. 8 pixels of (129, 90, 2)
I decided to use a premade tool to convert the image to a bmp and open it in paint to look at the pixels.  That first pixel is correct, but there aren't 53 consecutive pixels of the same color from the where the start is specified (bottom left i believe).
#15
General Programming / Targa Decompression
July 16, 2008, 04:55 PM
I decided to write a utility to do a number of things with a targa image, one of which is to decompress it.

Using the targa image that is contained in icons.bni, I am looking at the encoding it has.

00      00      0A      00      00      00      00      00      00      00
00      00      1C      00      18      01      18      00      01      BD
AD      6F      B5      A8      6E      81      88      81      5A      02


This snippet contains the tga header and a small amount of pixel data.
Noting the 0x0A (10), it has run-length encoding.

Question #1
From what I have read about RLE, I have found tutorials that are completely opposite of each other.  I am not sure which result is correct:

Example:
Data - AAAAAAAAAAAAABBCCCCCCCCCCCC

Would this be encoded as:
13A2B12C
or as
A13B2C12

Question #2
Looking at the data above, you can see the pixel data starts with this snippet:
01      BD      AD      6F      B5      A8      6E      81      88      81      5A      02
How would i separate this out?
1 pixel of BD, AD, 6F?
181 pixels! of  A8, 6E, 81?