• Welcome to Valhalla Legends Archive.
 

BNCSutil 1.3.1

Started by shadypalm88, September 04, 2006, 01:13 AM

Previous topic - Next topic
|

Mystical

I am in the making somthing similar to CSB while supporting BNLS/HASH but its default checks weather or not the hashes are in the correct folder or if the game is installed on the computer, and if not then it automaticly sets to BNLS before connection seqence begins, anywho, i know from a old topic i think someone mentioned somthing about downloading the patchs from client, is it it actually possible to download new hash files from the game with out being on the actual client? =P

RealityRipple

Sort of... There are MPQ files the game downloads (i think the file name is recieved at the same time the Invalid/Outdated verbyte is recieved, which you can then use with BNFTP). However, when I looked inside a downloaded mpq (got d1's 1.08 to 1.09), it looked like they weren't the exact files. Probably some other form of patching goes on, but I don't know what. If you do find out how, I would love to know.

MyndFyre

Quote from: RealityRipple on September 25, 2006, 01:26 AM
Sort of... There are MPQ files the game downloads (i think the file name is recieved at the same time the Invalid/Outdated verbyte is recieved, which you can then use with BNFTP). However, when I looked inside a downloaded mpq (got d1's 1.08 to 1.09), it looked like they weren't the exact files. Probably some other form of patching goes on, but I don't know what. If you do find out how, I would love to know.
I know BNLS does this, but I don't know how.
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.

RealityRipple

Maybe they just run the patch program on the hash files... however you go about doing that. My guess is that each file in the mpq has instructions and data, saying "add this info to this file at that location", "remove this info from this file", etc...

RealityRipple

Some helpful info for this: D1's 1.08 to 1.09 update mpq.

Here's the original mpq: http://realityripple.com/Uploads/DRTL_IX86_108_109.mpq
and here's a zip file of the files inside: http://realityripple.com/Uploads/DRTL_IX86_108_109.zip
Notice especially the contents of numbers 4 through 8.

aton

is bncsutil 1.3.1 checkrevision function working for sc/bw 1.14 ? i heard they changed the code a bit...

i am having severe troubles with compiling the library in linux.
has someone compiled it and/or fixed the build system? i'd be grateful for object files or a makefile or instructions how to compile it.


greetings, aton

K

I have compiled it on linux, although it was a pain in the ass.  I specifically remembering the debug crap giving me a lot of problems.

Specifically, g++ didn't like the concatination of string literals in the debug messages in file.cpp.  I made them each just one string.

I also commented out a lot of the debug crap that failed to compile, then decided I didn't even want to link in debug.c.  I think I went through and made macros for some of the debug stuff that came out to be nothing.

Here's my makefile -- go from there modifying stuff to see if you can get it to compile.  I recommend going in and adding newlines to the ends of all the files first to get rid of all those warnings.


CXX = g++
CXXFLAGS = -Wall -O3 -I ../ -Wno-multichar -fPIC
CXXOBJ = bsha1.o cdkeydecoder.o checkrevision.o decodekey.o file.o libinfo.o oldauth.o nls.o

CC = gcc
CCFLAGS = -Wall -O3 -I ../ -Wno-multichar -fPIC
CCOBJ = pe.o sha1.o stack.o

LDFLAGS = -shared -lgmp


TARGET = libbncsutil.so


$(TARGET): $(CXXOBJ) $(CCOBJ)
        $(CXX)  $(CXXFLAGS) $(LDFLAGS) $(CXXOBJ) $(CCOBJ) -o $(TARGET)


$(CXXOBJ): %.o: %.cpp
        $(CXX) $(CXXFLAGS) -c $< -o $@

$(CCOBJ): %.o: %.c
        $(CC) $(CCFLAGS) -c $< -o $@

clean:
        rm -f $(CCOBJ) $(CXXOBJ) $(TARGET) *~
all:
        make $(TARGET)


aton

thanks, its really a bitch...
it compiled bsha1.o and cdkeydecoder.o fine, but then i get:

aton@cassiopeia ~/bnet/bncsutil-1.3.1/src/bncsutil $ make
g++ -Wall -O3 -I ../ -Wno-multichar -fPIC -c checkrevision.cpp -o checkrevision.o
checkrevision.cpp: In function 'const char* basename(const char*)':
checkrevision.cpp:127: error: declaration of C function 'const char* basename(const char*)' conflicts with
/usr/include/string.h:387: error: previous declaration 'char* basename(const char*)' here
make: *** [checkrevision.o] Error 1


do you still have your modified source files?

K

Quote from: aton on October 11, 2006, 05:51 PM
thanks, its really a bitch...
it compiled bsha1.o and cdkeydecoder.o fine, but then i get:

aton@cassiopeia ~/bnet/bncsutil-1.3.1/src/bncsutil $ make
g++ -Wall -O3 -I ../ -Wno-multichar -fPIC -c checkrevision.cpp -o checkrevision.o
checkrevision.cpp: In function 'const char* basename(const char*)':
checkrevision.cpp:127: error: declaration of C function 'const char* basename(const char*)' conflicts with
/usr/include/string.h:387: error: previous declaration 'char* basename(const char*)' here
make: *** [checkrevision.o] Error 1


do you still have your modified source files?

I can look, but it was a complete hack job.

I renamed basename() to be get_basename() to resolve that confict.

aton

oh man i have commented out/added/modified dozens of lines of the source and i am still getting compiler errors...

could you just tarball/gzip the object files and upload them somewhere? would save me a lot of friggling time.

i am using these in my bot:
cdkeydecoder.o
checkrevision.o
decodekey.o
sha1.o
bsha1.o
oldauth.o

greetings, aton

K

Quote from: aton on October 11, 2006, 07:12 PM
oh man i have commented out/added/modified dozens of lines of the source and i am still getting compiler errors...

could you just tarball/gzip the object files and upload them somewhere? would save me a lot of friggling time.

i am using these in my bot:
cdkeydecoder.o
checkrevision.o
decodekey.o
sha1.o
bsha1.o
oldauth.o

greetings, aton

Don't think it would help you, since my files are for amd64.

I went through and came up with something that compiles, links, and seems to work.

I posted the source in a separate .tar.gz here:
http://www.jwkfs.net/archive.php?show=3

Hope this helps you.

aton

i got it to compile myself in the meanwhile. it really sucks. i had to comment out hundreds of debug messages.
now it compiles but my bot gets banned once i try to login, hehe.

i will do some testcases tomorrow. thanks for the help!


aton

btw i tried to compile your linux mod version to, this is what i get:

aton@cassiopeia ~/bnet/bncsutil-1.3.1-linux $ make
g++ -Wall -O3 -I ../ -Wno-multichar -fPIC -c bsha1.cpp -o bsha1.o
bsha1.cpp:26:28: error: bncsutil/mutil.h: No such file or directory
bsha1.cpp:27:28: error: bncsutil/bsha1.h: No such file or directory
bsha1.cpp:142: error: expected constructor, destructor, or type conversion before 'calcHashBuf'
make: *** [bsha1.o] Error 1

K

Quote from: aton on October 11, 2006, 08:06 PM
btw i tried to compile your linux mod version to, this is what i get:

aton@cassiopeia ~/bnet/bncsutil-1.3.1-linux $ make
g++ -Wall -O3 -I ../ -Wno-multichar -fPIC -c bsha1.cpp -o bsha1.o
bsha1.cpp:26:28: error: bncsutil/mutil.h: No such file or directory
bsha1.cpp:27:28: error: bncsutil/bsha1.h: No such file or directory
bsha1.cpp:142: error: expected constructor, destructor, or type conversion before 'calcHashBuf'
make: *** [bsha1.o] Error 1



Sorry, the folder needs to be named 'bncsutil' in order for it to compile correctly, due to the way the header files are included.

aton

sorry, my bad.

it works great. are you successfully using these object files to get your bots online?

|