Giter Site home page Giter Site logo

gd.docs's Introduction

book

GDDocs

Some documentation for Geometry Dash's servers, and the game itself.


GDDocs is a project built to openly give advanced information and readable information for aspiring developers looking to interface with Geometry Dash. Primarily, we aim to create this as a website for people to learn more about the inner workings of geometry dash, along with it's data.

The GDDocs website can be found here

Running/Building

You will require Node.js >=12 to debug and run this project.

GDDocs is built off of the docsify engine, outputted to a generator file to be able to work well on server environments, rather than GitHub pages. This is primarily to allow for easy domain usage and development in a place where it can always update, and be hosted upon locally rather than over GitHub's servers.

As such, rather than having to install using the package.json; (which we would recommended doing anyways using npm install,) the installation and such has been included in generator.js.

node generator.js

To debug it, you will need to properly clone or pull this repository.

Contributing

Contributions are preferably made to the documentation, rather than the simple generator.js file; unless need be. Contributions to all aspects of this project are preferred to be made over pull requests and issues. Ideas on what to contribute or read over can be read in the issues section of this repository.

gd.docs's People

Contributors

a-zalt avatar alex1304 avatar bernkastel02 avatar camila314 avatar cvolton avatar gdcolon avatar idkreally-3537 avatar kifilterfibercontext avatar kvba0000 avatar melowody avatar misterkirill avatar naoei avatar nekitdev avatar nihr4 avatar qimiko avatar quasar-kim avatar shikoshib avatar smjsgaming avatar ssolsta avatar thetechrobo avatar vftable avatar wegfan avatar woshizhazha120 avatar wyliemaster avatar xparadoxical avatar zohnannor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gd.docs's Issues

Add on the main page more links to articles

There are many pages on the site that cannot be found, the only way to access them is to use the direct URL or read the markdown file in this repo... Would be nice to access them using the main page.

Parameters for endpoints missing key information

Someone mentioned this in GDP, content for messages didn't specify xor step. Other endpoints are also probably missing key info.

Don't have time to look into it personally so making the issue just in case anyone wants to contribute

Typo in `_sidebar.md`

Clicking on the downloadGJMessage20 link leads to /endpoints/downloadGJMessageo20 instead of /endpoints/downloadGJMessage20

uploadFriendRequest20 broken

It redirects to UploadFriendRequest20, which makes it say unavailable. Its easy to fix, just change it to redirect to uploadFriendRequest20

#/encryption/gjp

when you click on gjp on #/endpoints/uploadGJComment21 its takes you nowhere

Almost all request markdowns in 'docs/endpoints/' need to be updated

Take any .md file in the endpoints directory and run the snippet and it will result in a 403 Forbidden.
Why? Because: 1. the 'User-Agent' header should be empty and 2. the base endpoint url should start with the www subdomain

# currently
import requests

data = {
    "secret": "Wmfd2893gb7",
    "targetAccountID": 173831
}

req = requests.post('http://boomlings.com/database/getGJUserInfo20.php', data=data)
print(req.text)
# what it should be
import requests

data = {
    "secret": "Wmfd2893gb7",
    "targetAccountID": 173831
}

req = requests.post('http://www.boomlings.com/database/getGJUserInfo20.php', data=data, headers={"User-Agent": ""})
print(req.text)

notice the www subdomain and headers argument
not a pressing issue but it isn't so good if the docs' code snippets don't work

I cant send requests to GD servers

Hi, I tried a code to upload an account comment on my account with a Python programm.
I did the following :

import requests
data = {
    "accountID": 14819640,
    "gjp": "my encrypted gjp here",
    "comment": "VGhpcyBjb21tZW50IHdhcyBzZW5kIHdpdGggYSBQeXRob24gcHJvZ3JhbW0gYnkgSEdTdHlsZSAh",
    "secret": "Wmfd2893gb7"
}
r = requests.post('http://boomlings.com/database/uploadGJAccComment20.php', data=data)
print(r.text)

Note that the comment is URL-Safe Base64 Encoded.
The account ID is my Geometry Dash account ID (I fond it on https://gdbrowser.com/u/HGStyle)
But here is the response on an online HTML code viewer : https://codebeautify.org/htmlviewer/y2245a045

CloudFlare is blocking my request. But why ?
I allready tried using the package cloudscraper because this package bypasses CloudFlare verification, but it does not work.
I tried with a proxy too, and with custom User-Agent in headers, but it still does not work.
Can someone help me please ?
Thanks in advance !

Incorrect algorithm

AES padding is incorrect. You can use the code in GDCrypto as a reference, iirc it's called "doPKCS7" and "removePKCS7".

Undocumented String in getGJLevels21.php?

After the end of every request from getGJLevels21.php, there seems to be this weird UUID thing. (f424a5e278a6971ea4af35b2324cd1ad8c5c8166)

Does anyone know what this is?

submitGJUserInfo.php is not documented

submitGJUserInfo.php is a file that's used in the "restore" functionality before the current save system was implemented. You can't make the server process the data anymore, but it's still found in both the game's code and on the servers. As far as I know it's not documented anywhere. I've made a pull request #116 that adds documentation for it as well as fixing the GJP issue (which several previous issues have adressed)

accounts/changeusername.php

i'm new to github so i don't know if this is the appropriate place to ask. how would i send a change username request without using the account management website?

Modyfing GD's APK File

So I've been messing around decompiled gd apk files and found out that some of things in .so files are not encoded and you can freely edit them. And my question is how to change from boomlings servers to my servers. Because when i change http://www.boomlings.com to my url and then compile it just crashes after start. thanks for anwser

light bg formula is wrong

hi so this is something unrelated to my pull request that i found, light bg does NOT use the hsv v value to interpolate but it actually uses the sum of the r, g and b. i did find this in 1.9's code but 2.1 seems to behave identically from my testing.
almost-python pseudocode below for how it actually works, assuming rgb values are 0-255 and hsv's sv values are 0-100:

def lightBG(background: RGB, player1: RGB):
    hsv = background.toHSV()
    hsv.s -= 20 # pretend this is clamped between 0 and 100
    hsv.v += 20 # this too
    lightBG = hsv.toRGB()
    f = (background.r + background.g + background.b) / 150
    if f < 1:
        lightBG.r = lightBG.r * f + player1.r * (1 - f)
        lightBG.g = lightBG.g * f + player1.g * (1 - f)
        lightBG.b = lightBG.b * f + player1.b * (1 - f)
    return rgb

i found the hsv offsets in 1.9's PlayLayer::getLightBGColor and the actual interpolation was done in PlayLayer::updateVisibility, no idea if they're in the same functions in 2.1 though

`getGJLevelScores211.php` chk inputs are incorrect

https://github.com/gd-programming/gd.docs/blob/docs/docs/encoding/checks.md#level-leaderboard table is incorrect:

## [Level Leaderboard][get_level_leaderboard]
| name | description |
|---------------|---------------------------------------------------------------------------|
| `accountID` | The account ID of the user requesting. |
| `levelID` | ID of the level to find leaderboard for. |
| `percent` | The record percentage on the level. |
| `jumps` | The total count of jumps on the level. |
| `attempts` | The total count of attempts spent. |
| `seed` | See [generating leaderboard seed][leaderboard_seed] for more information. |
| `differences` | Personal best differences, e.g `0 -> 13 -> 100 => 13,87`. |
| `unknown` | Unknown functionality. Set to `1`. |
| `coins` | The coins count on the level. |
| `timelyID` | The timely ID of the level (`0` if not timely). |
| `seed` | [Random String][random_string]. |

here is my theory what inputs to chk sha1 hash are: https://docs.google.com/spreadsheets/d/1waEPGS9qCFvSQxfA4fysIHf9YrOm9KxHycszvJcL3vs/edit (blue background cells) but that's just a theory a game theory!

Scam website hacker

The website has been redirecting me to a scam website with this ww25 at the start, no https:// just that
Please change it to another link

GJP Page returns a 404 Page.

On the uploadGJComment21 page I clicked the GJP thing to see details about that, but it took me to the 404 page for some reason.

Diamond Count

I was looking at the server response for a user, and I noticed that there doesn't seem to be a diamond count anywhere. Does the server return that somewhere else?

no info about `Save` and `Load` account

I am talking about these:Account menu


GD does two requests to two different servers:

Save

  1. requestresponse
    POST /database/getAccountURL.php HTTP/1.1
    Host: www.boomlings.com
    Accept: */*
    Content-Length: 44
    Content-Type: application/x-www-form-urlencoded
    Connection: close
    
    accountID=13467032&type=1&secret=Wmfd2893gb7
    
    HTTP/1.1 200 OK
    Date: Mon, 23 Jan 2023 16:12:09 GMT
    Content-Type: text/html
    Connection: close
    X-Powered-By: PHP/5.3.10-1ubuntu3.48
    Vary: Accept-Encoding
    CF-Cache-Status: DYNAMIC
    Server: cloudflare
    CF-RAY: 78e1cf2de921c03a-VNO
    Content-Length: 26
    
    http://www.robtopgames.net
    
  2. requestresponse
    POST /database/accounts/backupGJAccountNew.php HTTP/1.1
    Host: www.robtopgames.net
    Accept: */*
    Content-Length: 569473
    Content-Type: application/x-www-form-urlencoded
    Expect: 100-continue
    Connection: close
    
    userName=xBZZZZ&password=[my password here]&gameVersion=21&binaryVersion=35&gdw=0&saveData=[encoded CCGameManager.dat without xor];[encoded CCLocalLevels.dat without xor]&secret=Wmfv3899gc9
    
    HTTP/1.1 100 Continue
    
    HTTP/1.1 200 OK
    Date: Mon, 23 Jan 2023 16:12:11 GMT
    Content-Type: text/html; charset=UTF-8
    Connection: close
    CF-Cache-Status: DYNAMIC
    Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=Bab3xCirc1nvQiwvQm%2BWPZRwcG1bxz0OptTVVkTU2Xl9KPl6fURHztQdF5%2FoPAxoZrtWrKJk%2F9cM40uaTiE0NOX4Dh21JAFLyXawDT5%2FcrzydFLTu1BINVf3o5pkv%2BgU5EcDtlc%3D"}],"group":"cf-nel","max_age":604800}
    NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    Server: cloudflare
    CF-RAY: 78e1cf3c6fbebc15-VNO
    Content-Length: 1
    
    1
    

Load

  1. requestresponse
    POST /database/getAccountURL.php HTTP/1.1
    Host: www.boomlings.com
    Accept: */*
    Content-Length: 44
    Content-Type: application/x-www-form-urlencoded
    Connection: close
    
    accountID=13467032&type=2&secret=Wmfd2893gb7
    
    HTTP/1.1 200 OK
    Date: Mon, 23 Jan 2023 16:07:30 GMT
    Content-Type: text/html
    Connection: close
    X-Powered-By: PHP/5.3.10-1ubuntu3.48
    Vary: Accept-Encoding
    CF-Cache-Status: DYNAMIC
    Server: cloudflare
    CF-RAY: 78e1c85da9cfffe8-VNO
    Content-Length: 26
    
    http://www.robtopgames.net
    
  2. requestresponse
    POST /database/accounts/syncGJAccountNew.php HTTP/1.1
    Host: www.robtopgames.net
    Accept: */*
    Content-Length: 102
    Content-Type: application/x-www-form-urlencoded
    Connection: close
    
    userName=xBZZZZ&password=[my password here]&secret=Wmfv3899gc9&gameVersion=21&binaryVersion=35&gdw=0
    
    HTTP/1.1 200 OK
    Date: Mon, 23 Jan 2023 16:07:30 GMT
    Content-Type: text/html; charset=UTF-8
    Connection: close
    Vary: Accept-Encoding
    CF-Cache-Status: DYNAMIC
    Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=rmD3XKjnEDBNGUPuwmqqy%2BLuG1YF8q7bLTHagiQb4KI%2FOB8rAF5WITfWgjOFQYPWJ%2BJiAfXSNAQspn4PoMUIUOFqFmUaVOkJnFsf3TJcEnrCxA%2FMAtqzMuDZKL14r0p%2Betw2nR4%3D"}],"group":"cf-nel","max_age":604800}
    NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    Server: cloudflare
    CF-RAY: 78e1c85e9dffc035-VNO
    Content-Length: 48877
    
    [encoded CCGameManager.dat without xor];[encoded CCLocalLevels.dat without xor];21;35;[I don't know];[I don't know]
    

Most urls in example dosen't use www

Boomlings servers require to use www, however in most examples, it's uses no www
Example:
(https://wyliemaster.github.io/gddocs/#/endpoints/levels/getGJLevelScoresPlat)

import requests

data = {
    "accountID": 173831, # DevExit's account ID
    "gjp": "********", # This would be DevExit's password encoded with GJP encryption
    "levelID": 98170000,
      "type": 1, # Leaving this out would only show friends. This shows global.
    "secret": "Wmfd2893gb7"
}

req = requests.post("http://boomlings.com/database/getGJLevelScoresPlat.php", data=data)
print(req.text)

How it should be:

import requests

data = {
    "accountID": 173831, # DevExit's account ID
    "gjp": "********", # This would be DevExit's password encoded with GJP encryption
    "levelID": 98170000,
      "type": 1, # Leaving this out would only show friends. This shows global.
    "secret": "Wmfd2893gb7"
}

req = requests.post("http://www.boomlings.com/database/getGJLevelScoresPlat.php", data=data)
print(req.text)

By doing a search-replace it could be easily fixed

(i'm not on my main computer, so I can't really try to do a pr)

Uh oh, you did a fucky wucky

A error that occurs when visiting the gamesave part of the site.

Error:

Uh oh, you did a fucky wucky
Wonder how you got here. Maybe an invalid link?

I'd suggest reporting about it to the team as best as you can.

Just having question.

I found in data folder in server database this level data and I have question how is it encoded? I'm asking it here because Discord link in documentation doesnt work. Code:

Add documentation for various enumerations

This involves numerical values that by themselves are not self-explanatory, e.g. 1 representing the Ship, when interpreted as a gamemode, 4 representing the XL length of a level, etc.

chk of level leaderboard maybe is changed.

When i try to check the chk of level leaderboard with my GDPS...

This is my code.

        //variables
        $attempts = $s1 - 8354;
        $jumps = $s2 - 3991;
        $coins = $s9 - 5819;
        $seconds = $s3 - 4085;
        $played = empty($s6) ? 0 : 1;

        //best differences
        $bd = base64_decode($s6);
        $bd = $XOR->cipher($bd, 41274);

        //check chk
        $chk = base64_decode($chk);
        $chk = $XOR->cipher($chk, 39673);

        $hash = $accountID . $levelID . $percent . $jumps . $attempts . $s4 . $bd . "1" . $coins . $s10 . $s7;
        $hash = sha1($hash . "yPg6pUrtWn0J");

        if ($hash !== $chk) return -1;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.