This commit is contained in:
Fijxu 2023-01-29 18:09:19 -03:00
commit 43cb2479a4
1 changed files with 33 additions and 0 deletions

33
README.md Normal file
View File

@ -0,0 +1,33 @@
# Battlebit API Endpoints
Some time ago i found the API URL when decompiling the game, but it was only accesible via the game, so that indicates that the game uses some specific headers like `User-Agent` or shit like that/
So, i dumped the game memory of Battlebit using GDB and a script, giving me almost 3GB of information about the game, so i found the Endpoints and some Headers of the Battlebit API that is used to fetch the servers and other information.
## Info
All requests are POST and HTTP/1.1
**URL**: api.battlebit.cloud
**Headers**:
- Host: `api.battlebit.cloud`
- User-Agent: `b32bf642b285cauf0663688e7078f892dc2d0843` (This is the user agent used in every request to the Battlebit API
- Content-Length: `16` (I think this is not really necesary)
Mandatory headers that are on every request
## Endpoints
- /Servers/GetServerList
- /Player/GetStats
- /Tokens/GetToken
- Exclusive Headers: `Connection: keep-alive` and `Content-Length: 478`
## Curl example:
```bash
curl -X POST https://api.battlebit.cloud/Servers/GetToken -H "User-Agent: b32bf642b285ca1f0663688e7078f892dc2d0843" -H "Host: api.battlebit.cloud" --http1.1
```
If you don't get any response it's because the server is down or something like that