![]() |
|
Download files through mega without js - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Hacking (https://sinister.li/Forum-Hacking) +--- Forum: Tutorials (https://sinister.li/Forum-Tutorials) +--- Thread: Download files through mega without js (/Thread-Download-files-through-mega-without-js) |
Download files through mega without js - VBQL - 10-16-2017 Going on a streak rn cuz I have nothing else better to do This is small script, which will allow you download from mega.nz through tor, without JavaScript. I don't know the who is the original author of this, but I've made several modifications to make this work (it was old script). Code: #!/bin/bash
# usage $ ./mega.sh 'https://mega.nz/#!link!key'
id=$(echo "$1" | \
awk -F '!' '{print $2}')
key=$(echo "$1" | \
awk -F '!' '{print $3}' | \
sed -e 's/-/+/g' -e 's/_/\//g' -e 's/,//g')
b64_hex_key=$(echo -n $key | \
base64 --decode --ignore-garbage 2> /dev/null | \
xxd -p | tr -d '\n')
key[0]=$(( 0x${b64_hex_key:00:16} ^ 0x${b64_hex_key:32:16} ))
key[1]=$(( 0x${b64_hex_key:16:16} ^ 0x${b64_hex_key:48:16} ))
key=$(printf "%016x" ${key[*]})
json_data=$(torsocks curl -s --request POST --data-binary '[{"a":"g","g":1,"p":"'$id'"}]' 'https://eu.api.mega.co.nz/cs')
echo $json_data | \
awk -F '"' '{print $6}' | \
sed -e 's/-/+/g' -e 's/_/\//g' -e 's/,//g' | \
base64 --decode --ignore-garbage 2> /dev/null | \It uses torsocks - make sure you have tor service running! Code: ./mega.sh 'https://mega.nz/#!0LYnQTYZ!fKz1gtY_nNuw-gaKTRElNjIF8nprVvm5Fy6S5Ql5_A0'RE: Download files through mega without js - mothered - 10-16-2017 Alternatively, to enable/disable JavaScript In the Tor browser (as per your session needs at the time), enter "about:config" (no quotes) In the address bar and enter "javascript.enabled" (again without quotes) In the search bar. Enable/disable as needed. That aside, I'll check your code later today. Thank you. RE: Download files through mega without js - zorrophreak - 10-16-2017 Hm, looking through it, the line with reference to "mega.co.nz" may need to be altered to mega.nz but I'm not certain as I haven't worked with the MEGA API as of yet. Definitely looks interesting and I'll check it out more in a bit |