GD-Decompiled icon indicating copy to clipboard operation
GD-Decompiled copied to clipboard

this isn't really an issue more like a question

Open Jedi-Coder1 opened this issue 1 year ago • 30 comments

how does geometry dash download songs and what url does it use

Jedi-Coder1 avatar Nov 02 '23 16:11 Jedi-Coder1

  1. post songID=song id here&secret=Wmfd2893gb7 to http://www.boomlings.com/database/getGJSongInfo.php
  2. split response by ~|~
  3. find 10 at even index (counting from 0)
  4. url decode next item
  5. download song using url
example:
  1. $ wget --user-agent= "--post-data=songID=323384&secret=Wmfd2893gb7" --quiet --output-document=- http://www.boomlings.com/database/getGJSongInfo.php
    1~|~323384~|~2~|~Lunatic Princess (Raigon Mix)~|~3~|~4558~|~4~|~Raigon50~|~5~|~6.28~|~6~|~~|~10~|~http%3A%2F%2Faudio.ngfiles.com%2F323000%2F323384_Lunatic_Princess___DJ_Raig.mp3~|~7~|~
  2. indexstring
    01
    1323384
    22
    3Lunatic Princess (Raigon Mix)
    43
    54558
    64
    7Raigon50
    85
    96.28
    106
    11
    1210
    13http%3A%2F%2Faudio.ngfiles.com%2F323000%2F323384_Lunatic_Princess___DJ_Raig.mp3
    147
    15
  3. 10 is at index 12
  4. url decode http%3A%2F%2Faudio.ngfiles.com%2F323000%2F323384_Lunatic_Princess___DJ_Raig.mp3http://audio.ngfiles.com/323000/323384_Lunatic_Princess___DJ_Raig.mp3
  5. $ wget --no-verbose http://audio.ngfiles.com/323000/323384_Lunatic_Princess___DJ_Raig.mp3
    2023-11-02 20:10:27 URL:http://audio.ngfiles.com/323000/323384_Lunatic_Princess___DJ_Raig.mp3 [6582773/6582773] -> "323384_Lunatic_Princess___DJ_Raig.mp3" [1]

xBZZZZ avatar Nov 02 '23 18:11 xBZZZZ

thanks

Jedi-Coder1 avatar Nov 02 '23 18:11 Jedi-Coder1

it just says i've been blocked

Jedi-Coder1 avatar Nov 02 '23 19:11 Jedi-Coder1

That might be cloudflare, making the user agent empty will fix it

Wyliemaster avatar Nov 02 '23 19:11 Wyliemaster

how would i do that?

Jedi-Coder1 avatar Nov 02 '23 19:11 Jedi-Coder1

how would i do that?

what do you use to make http request?

xBZZZZ avatar Nov 02 '23 19:11 xBZZZZ

python why?

Jedi-Coder1 avatar Nov 02 '23 19:11 Jedi-Coder1

python why?

that's an entire programming language, which function from which library do you use?

xBZZZZ avatar Nov 02 '23 19:11 xBZZZZ

ok nvm but now getGJSongInfo just returns -1

Jedi-Coder1 avatar Nov 02 '23 19:11 Jedi-Coder1

python why?

that's an entire programming language, which function from which library do you use?

requests.post

Jedi-Coder1 avatar Nov 02 '23 19:11 Jedi-Coder1

ok nvm but now getGJSongInfo just returns -1

-1 means bad song id

-2 means Song is not allowed for use.

xBZZZZ avatar Nov 02 '23 19:11 xBZZZZ

i dont think https://www.newgrounds.com/audio/listen/33326 is not allowed is it?

Jedi-Coder1 avatar Nov 02 '23 19:11 Jedi-Coder1

i will first try a different song

Jedi-Coder1 avatar Nov 02 '23 19:11 Jedi-Coder1

yeah everything all song ids return -1

Jedi-Coder1 avatar Nov 02 '23 19:11 Jedi-Coder1

nvm guys i found the issue

Jedi-Coder1 avatar Nov 02 '23 19:11 Jedi-Coder1

i just forgot how to add the data to the post request

Jedi-Coder1 avatar Nov 02 '23 19:11 Jedi-Coder1

whoops

Jedi-Coder1 avatar Nov 02 '23 19:11 Jedi-Coder1

thanks for the help tho

Jedi-Coder1 avatar Nov 02 '23 19:11 Jedi-Coder1

yeah everything all song ids return -1

this works:

requests.post(
	url='http://www.boomlings.com/database/getGJSongInfo.php',
	data='songID=33326&secret=Wmfd2893gb7',
	headers={
		'user-agent':'',
		'content-type':'application/x-www-form-urlencoded'
	}
).text

it was wrong content-type

xBZZZZ avatar Nov 02 '23 19:11 xBZZZZ

yeah i got it all sorted out with

import requests

headers = {
    'User-Agent': ''
}
data = {
    "songID": "829776",
    "secret": "Wmfd2893gb7"
}

r = requests.post("https://www.boomlings.com/database/getGJSongInfo.php", headers=headers, data=data)
print(r.text)

Jedi-Coder1 avatar Nov 02 '23 19:11 Jedi-Coder1

what does error code: 1005 mean?

Jedi-Coder1 avatar Nov 02 '23 19:11 Jedi-Coder1

what does error code: 1005 mean?

which song id you tried?

xBZZZZ avatar Nov 02 '23 20:11 xBZZZZ

i used 895195 which is https://www.newgrounds.com/audio/listen/895195

Jedi-Coder1 avatar Nov 02 '23 20:11 Jedi-Coder1

i used 895195 which is https://www.newgrounds.com/audio/listen/895195

works for me:

>>> requests.post(
...     url='http://www.boomlings.com/database/getGJSongInfo.php',
...     data='songID=895195&secret=Wmfd2893gb7',
...     headers={
...             'user-agent':'',
...             'content-type':'application/x-www-form-urlencoded'
...     }
... ).text
'1~|~895195~|~2~|~Cosmic Growl~|~3~|~347~|~4~|~DJVI~|~5~|~7.09~|~6~|~~|~10~|~https%3A%2F%2Faudio.ngfiles.com%2F895000%2F895195_Cosmic-Growl.mp3%3Ff1575046798~|~7~|~'

does downloading that song in vanilla geometry dash work?

xBZZZZ avatar Nov 02 '23 20:11 xBZZZZ

yeah i can download the song in gd

Jedi-Coder1 avatar Nov 02 '23 20:11 Jedi-Coder1

what does error code: 1005 mean?

pernament ip block (cloudflare)

SergeyMC9730 avatar Nov 07 '23 06:11 SergeyMC9730

what does error code: 1005 mean?

pernament ip block (cloudflare)

DAMN

Jedi-Coder1 avatar Nov 07 '23 16:11 Jedi-Coder1

yeah i can download the song in gd

if 1005 = ip blocked then why can you download song in gd? do you use proxy in your download script?

xBZZZZ avatar Nov 08 '23 15:11 xBZZZZ

yeah i can download the song in gd

if 1005 = ip blocked then why can you download song in gd? do you use proxy in your download script?

yeah I'm doing for my friend who has ngfiles blocked

Jedi-Coder1 avatar Nov 08 '23 22:11 Jedi-Coder1

try to add the line not starting with #:

#import requests
#
#headers = {
#    'User-Agent': '',
#    'Content-Type': 'application/x-www-form-urlencoded'
#}
#data = {
#    "songID": "829776",
#    "secret": "Wmfd2893gb7"
#}
#
#r = requests.post("https://www.boomlings.com/database/getGJSongInfo.php", 
#    headers=headers, data=data,
      cookies={"gd": "1"}             # add this line, it may help (discovered its use using wireshark)
#)
#print(r.text)

HGStyle avatar Jan 16 '24 18:01 HGStyle