gddocs icon indicating copy to clipboard operation
gddocs copied to clipboard

Does comment chk contain comment type or not?

Open xparadoxical opened this issue 1 year ago • 1 comments

The docs seem to say both. The CHK page says the comment chk includes type but uploadGJComment21 doesn't say to include 0, which does have effect, as all chk inputs are converted to strings. uploadGJAccComment20 says the chk is unknown, and also what's weird is that it has a cType parameter, which looks wrong because the endpoint "posts an account comment", not a level comment.

xparadoxical avatar Jun 07 '23 23:06 xparadoxical

uploadGJAccComment20 says the chk is unknown, and also what's weird is that it has a cType parameter, which looks wrong because the endpoint "posts an account comment", not a level comment
yes there is cType parameter, here is request that geometry dash sends when I comment bruh on my account:
POST http://www.boomlings.com/database/uploadGJAccComment20.php HTTP/1.1
Host: www.boomlings.com
Accept: */*
Proxy-Connection: Keep-Alive
Content-Length: 210
Content-Type: application/x-www-form-urlencoded

gameVersion=21&binaryVersion=35&gdw=0&accountID=13467032&gjp=CENSORED&userName=xbzzzz&comment=YnJ1aA==&secret=Wmfd2893gb7&cType=1&chk=VlpQDAgEDlFbCFdYV1xSAVwHCgkBWlFaBVZfBgEICwoCCFdQDQBbUw==
(replaced gjp with CENSORED)
uploadGJAccComment20 says the chk is unknown
import hashlib,binascii,itertools,base64

def uploadGJAccComment20_chk(username:bytes,encoded_comment:bytes)->bytes:
    return base64.urlsafe_b64encode(bytes(a^b for a,b in zip(itertools.cycle(b"29481"),binascii.b2a_hex(hashlib.sha1(b"%b%b001xPT6iUrtws0J"%(username,encoded_comment)).digest()))))
@Wyliemaster :arrow_up::arrow_up::arrow_up:

xBZZZZ avatar Dec 01 '23 18:12 xBZZZZ