тна Back to MegaDB Search

87linux | 15 points | Aug 10 2014 18:22:36

[Meta] Bash script to download files without a web browser | Megalinks MegaDB [Meta] Bash script to download files without a web browser

This would pretty much only be useful if you want to download things without a web browser, but if you're a better bash hacker than me, you might be able to continue an incomplete download. Good luck with that.

EDIT: Fixed to support spaces in the output file name

permalink


[-] Bludgeon_4_Bacon | 3 points | Aug 10 2014 19:31:03

Can you explain what this is and the benefits of using it? Total noob question

permalink

[-] 87linux | 3 points | Aug 10 2014 23:26:05

It removes the requirement of needing a web browser to download mega files. So you could download them on a raspberry pi or some other headless server.

permalink

[-] Bludgeon_4_Bacon | 1 points | Aug 10 2014 23:56:10

ahh ok thanks!

permalink

[-] tomarran | 1 points | Aug 11 2014 12:10:28

Top! Might try and knock together a web front end for this - dump in your mega link and it downloads it to a defined location.

How does this work with a folder of files?

permalink

[-] nolog | 1 points | Aug 12 2014 11:56:21

Very interesting and helpful! Did you find this out by yourself, analysing the source code?

EDIT: Another Question: On the new_url= line it doesn't seem to work for me. Downloading the data from that location with this POST content, gives me this:

[{"s":294074232,"at":"-fVDa5pBVny1d_NDpV3G7dDe_yg4IGqj6-Mg1733Sb1ox64OWCi-92o7TlG3KGg56bQD0tj2us4Wz8BV4KW7Qg"}]

and then running awk -F '"' '{print $10}' on it just gives an empty string, since there are just six double quotes.

permalink

[-] 87linux | 1 points | Aug 13 2014 02:03:20

Strange. Which file are you downloading? It should have given you one more JSON field called "g".

permalink

[-] nolog | 1 points | Aug 13 2014 17:00:22

I just took an arbitrary chosen link from this subreddit, I'm pretty sure it was [Tv Show] Hell On Wheels Season 4 Episode 1.

Strangely enough, now that I tried it again, I do indeed get the g parameter.

Did you find this procedure out all by yourself, analysing the source code? Because this is the first page I find about how the Mega web interface downloads and decrypts a file.

EDIT: Formatting

EDIT2: I've tried it anew, and now I don't get the g paramter anymore, but instead an additional e parameter with value -18. Seems like it doesn't always work.

permalink