-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from BNETDocs/refactor
Refactoring
- Loading branch information
Showing
49 changed files
with
5,169 additions
and
4,064 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.o | ||
/src/bncsutil/libbncsutil.so |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,58 @@ | ||
# BNCSUtil | ||
## Preface | ||
**BNCSUtil** is the **B**attle.**N**et **C**hat **S**ervice **Util**ity which | ||
aids applications trying to logon to Battle.net™ v1 using the binary | ||
aids applications trying to logon to Classic Battle.net™ using the binary | ||
protocol. Specifically, BNCSUtil has functions that help with the cryptography | ||
of game versions, keys, and passwords. | ||
|
||
## Installing | ||
Simply place the .so or .dll file in the same directory as the application that | ||
wishes to use it. If this does not work, install the file into the system | ||
Simply place the `.so` or `.dll` file in the same directory as the application | ||
that wishes to use it. If this does not work, install the file into the system | ||
library directory. | ||
|
||
On Windows, this directory is: | ||
### Windows | ||
Copy the file to: | ||
|
||
``` | ||
C:\Windows\System32 | ||
``` | ||
|
||
On Linux, this directory is: | ||
### Linux | ||
If you just have the `.so` file, copy it to: | ||
|
||
``` | ||
/usr/lib/ | ||
``` | ||
|
||
And run: | ||
|
||
``` | ||
sudo ldconfig | ||
``` | ||
|
||
If you have just compiled from source, run this instead: | ||
|
||
``` | ||
sudo make install | ||
``` | ||
|
||
## Building | ||
### Windows | ||
The official build of BNCSUtil for Windows is produced using Visual Studio 2005 | ||
using the solution file in the `vc8_build` folder. The `vc7_build` is no longer | ||
officially used or supported. | ||
using the solution file in the `vc8_build` folder. | ||
|
||
BNCSUtil requires GMP. | ||
|
||
### Linux | ||
To build: | ||
``` | ||
./configure | ||
cd src/bncsutil | ||
make clean | ||
make | ||
make install | ||
``` | ||
|
||
If you have a fresh checkout or are having build-related issues, run the | ||
following to (re)generate the configure script: | ||
``` | ||
autoreconf -if | ||
``` | ||
If you are having build related issues, ensure that: | ||
|
||
Note that to use `autoreconf` you will need to have GNU `autotools` installed. | ||
- You have the `gcc` package installed. | ||
- You have the `glibc` development package installed. | ||
- You have the `gmp` development package installed. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.3.1 | ||
1.3.2 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
SHELL = /bin/sh | ||
SYSTEM = $(shell uname) | ||
CXX = g++ | ||
CXXFLAGS = -Wall -O3 -I ../ -Wno-multichar -fPIC | ||
CXXOBJ = bsha1.o cdkeydecoder.o checkrevision.o decodekey.o file.o libinfo.o oldauth.o | ||
CC = gcc | ||
CCFLAGS = -Wall -O3 -I ../ -Wno-multichar -fPIC | ||
CCOBJ = nls.o pe.o sha1.o stack.o | ||
|
||
ifeq ($(SYSTEM),Darwin) | ||
LDFLAGS = -dynamiclib -lgmp -L/opt/local/lib | ||
TARGET = libbncsutil.dylib | ||
else | ||
LDFLAGS = -shared -lgmp | ||
TARGET = libbncsutil.so | ||
endif | ||
|
||
$(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) | ||
|
||
install: $(TARGET) | ||
mkdir -p /usr/include/bncsutil | ||
cp *.h /usr/include/bncsutil | ||
cp $(TARGET) /usr/lib | ||
ldconfig |
Oops, something went wrong.