00:00
00:00
Newgrounds Background Image Theme

GasGrass just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

How to download any audio track on NG without a download button (PLEASE FIX)

6,932 Views | 3 Replies

I'd like to blow the whistle on something I've known about for years now and have even messaged multiple site admins about, including Tom himself (back on December 19, 2019). None of these people have replied or seemed to have done anything about it, despite all of these messages being sent over 2 years ago, so hopefully this post will motivate the admins to fix the problem quickly, since I'm now attempting to spread this information in public. This vulnerability is also partly why I haven't uploaded any audio to NG in over a year, because I have songs that are Creative-Commons-licensed but want people to buy, and this may make it easier and/or less time-consuming for people to not compensate me and still get my tracks.


If you don't know what Inspect Element does, it's a feature that lets you look at the client-side code of a webpage, among other things, and I used it on NG to discover this vulnerability. For this reason, I may have technically broken NG's Terms of Service, but in this case, it may be for the long-term benefit of the site.


So, you click on a song submission that has no public download button, and from there, there are a couple ways to download it.


~~~~~~~~


The first way only seems to work if the name of the submission hasn't changed since the submission was first published, and it's by typing in the following URL (replace the "[number]"s with the things that they're referring to):

https://audio.ngfiles.com/[1]/[2]_[3].mp3


[1]: The numerical ID of the audio track in the URL of the regular page, except with each of the last 3 digits replaced with zeros. If the track ID has less than 3 digits, then it's 00 if the ID is 2 digits long, or 0 if the ID is a single digit.


[2]: The numerical ID of the track without any changes.


[3]: The title of the submission, preserving capital letters, but replacing spaces with hyphens, and replacing unsafe URL characters (such as & and @) with an abbreviation of what they're called in English (e.g. & --> amp; this is the only one I know, but if I wanted to, I could find what more of these characters are turned into in the URL).


~~~~~~~~


The second way to bypass the lack of a download button is to enter Inspect mode (in Chromium-based browsers, this can be done by pressing F12) and make your way through the HTML code of the webpage. I'm not going to say here whether or not you should do this, but this is likely against NG's ToS. It's not like they can do much to enforce the "don't go through the code" rule in most cases, though, and it seems rather unlikely that they'll permaban you for pressing F12 and looking through some of the raw HTML of the website. I don't know for sure, though.


In Inspect mode, go to the HTML code (which should already be showing) and do the following:

Expand the code at the line that starts with "<body" if it isn't already.

Expand the "outer" class.

Expand the "body-main" class.

Expand the "body-center" class, and then the single element that's shown inside of it.

Expand the "body-guts top", then the "column-wide-right", then the "pod embed" class.

In that class, there should be 2 JavaScript links, and right underneath, there should be a line that says "<script>". Expand the code at that line, and a JS script within the HTML itself should appear.

Near the very beginning of this script should be the URL of the audio file with some added backslashes and also text after the ".mp3". Remove those things and you should have a working link.


~~~~~~~~


Enter the URL you got from either of these methods and if you're on desktop, you should see a thing where you can play the audio file, unless you used the first method and the name of the submission was changed like I mentioned before (if this happens, the second method should work). I'm not sure about with Gecko-based browsers (Gecko is Firefox's web engine) or other browsers, but in Chromium-based browsers (like Edge, Brave, and Chrome), this thing should have a triple-dot on the right side. If you click on it, you should see an option to download the file. If you're on the Android version of Google Chrome, the file may just download immediately.


To show that this works, here's one of my own songs on NG that is available to purchase. Because you can buy it, I chose not to add the download button on the regular NG page for it). However, I'm fine with using it as an example here, since I barely make any money from my music anyway.


The regular link is https://www.newgrounds.com/audio/listen/899197.

But if you wanted to download it, despite there being no download button on the page, you could go to https://audio.ngfiles.com/899000/899197_Aqua-Regia.mp3.


Sure, you could just capture the audio as you played the song on NG, but these methods are usually much shorter to do. If NG didn't use public URLs to play the audio files from, then that should fix the issue. This solution can likely be well-executed, since if you were able to do this on a program like SoundCloud or Bandcamp, think of how many people would be using a browser add-on or manually going through the webpage code to grab the audio file directly.


I hope this changes in at least the somewhat near future, and I hope they don't yeet me from the site for this post.



BBS Signature

I mean, couldn't you just "view source" and then search for the mp3 in amongst the source files?


Or install some browser add-on that automatically finds files of interest?


Or run something like Wireshark and find it that way?


I mean if people want to get something they'll probably get it anyway. If the bytes go from some server to your computer, it'll be pretty hard to prevent someone copying those bytes elsewhere, and likely involve requiring a TPM module, and alienate anyone without that. And for what purpose? Too much effort too little need for it.


Want to play Flash games on Newgrounds again? See here


I'd like to blow the whistle on something


iu_594427_2360410.gif


You completely lack any kind of understanding of how anything works. If you don't want people "illegally" downloading your songs, don't upload them to the internet, you dummy.


Why do you think online sellers only let you play a short part of a song? Because in order to play music on the listener's speakers, it first has to be downloaded to their computer.



\ / Bunny ears didn't happen by accident

BBS Signature