pySilkroadSecurity exposes Drew's SilkroadSecurity API to Python 3.2 and above. It does not implement the API in Python code.
Precompiled Boost.Python 1.82 and pySilkroadSecurity libs for Python 3.11.2 x64 are included for Windows in the python
directory. You will need vcredist x64 if VS 2022 is not installed.
- Download and install Python 3.x x64
- Download and extract boost
- Open
x86 Native Tools Command Prompt for VS 2022
- Change to the extract boost directory
- Run
bootstrap.bat
- Run
b2 -j8 --build-type=complete stage
Compiling
git clone https://github.com/ProjectHax/pySilkroadSecurity.git
- Open
pySilkroadSecurity.sln
- Edit the VC++ directories for boost and Python
- Compile
- Copy
boost_python311-vc143-mt-x64-1_82.dll
fromboost/stage/lib
to the Python script folder - Copy
x64/Release/pySilkroadSecurity.pyd
to your Python script folder
- Install cmake, boost, python3 dev packages
git clone https://github.com/ProjectHax/pySilkroadSecurity.git
cd src
mkdir build && cd build
cmake ..
make
- Install Homebrew
brew install python3 boost boost-python3 cmake
- Follow the
*nix
steps
pySilkroadStats.py
This small project shows you how the SilkroadSecurity API is to be used from Python. It will connect to iSRO and display the server list. This can be easily added to by adding a few lines to log into the servers and join the game world.
pySilkroadProxy.py
This project accepts connections on TCP port 15779 and will create a proxy between the Silkroad client and the Silkroad game servers. This will allow you to view all packets going to and from Silkroad. This project can also be easily modified to filter packets for a private server; although, I would recommend rewriting the network code to not use select() if you end up needing to handle more than 100 simultaneous connections.
Copy pySilkroadSecurity.so and stream.py to your own project folder and import them like so:
from pySilkroadSecurity import SilkroadSecurity
from stream import *