stck-lzm / badown

badown (bash-downloader for mediafire, zippyshare & mega)
GNU General Public License v3.0
60 stars 15 forks source link

Zippyshare Algo is changed again, So downloads are broken #5

Closed rokibhasansagar closed 3 years ago

rokibhasansagar commented 3 years ago

Zippyshare changed the algo something like this -

((random%random + a + b + c + d + 5/5), where b=a+1, c=b+1, d=d*2, with predefined a=1 and d=2

I have worked on a workaround with some nasty code changes,

function zippyshare {
   wget -q -O .badown.tmp $1
   # www part
   var0=$(echo $1 | awk -F".com" '{print $1".com"}')
   cat .badown.tmp | grep -B8 "dlbutton" > .badown2.tmp
   # /d/RANDOM/ part
   var1=$(cat .badown2.tmp | grep href | grep document.getElementById | awk -F'"' '{print $2}')
   # Math parts starts here
   var2modulo=$(cat .badown2.tmp | grep "%" | awk -F'(' '{print $3}' | awk -F' ' '{print $1}')
   var3a=$(cat .badown2.tmp | grep "var a = function" | awk -F' ' '{print $6}' | awk -F'}' '{print $1}')
   var3bp=$(cat .badown2.tmp | grep "var b = function" | awk -F' ' '{print $8}' | awk -F'}' '{print $1}')
   var3b=$((var3a + var3bp))
   var3cp=$(cat .badown2.tmp | grep "var c = function" | awk -F' ' '{print $8}' | awk -F'}' '{print $1}')
   var3c=$((var3b + var3cp))
   var3dp=$(cat .badown2.tmp | grep omg | grep "class=" | awk -F'"' '{print $4}')
   var3d=$((var3dp * 2))
   # Last part, filename with leading slash
   varfn=$(cat .badown2.tmp | grep href | grep document.getElementById | awk -F';' '{print $1}' | awk -F'"' '{print $4}')
   # Final file URL
   file_url=$(echo $var0 $var1 $((var2modulo + var3a + var3b + var3c + var3d + (5/5) )) $varfn | tr -d ' ')
   file_name=$(printf '%b' "$(echo $file_url | awk -F'/' '{gsub("%","\\x");gsub("+"," ");print $NF}')")
   rm .badown.tmp .badown2.tmp
   file_down $file_url "$file_name"
}

Yaah, I know, it's too bad coding. But I think you can do better that me.

Please fix on your end ASAP with https://github.com/stck-lzm/badown/issues/6 too. Thanks for this awesome script.

stck-lzm commented 3 years ago

fixed zippy f15a3019

rokibhasansagar commented 3 years ago

Zippy now changes their algo every month (or maybe even every 3 weeks). So please keep an eye of their site for next change. If I see any new change, I'll report here ASAP. ✌️

stck-lzm commented 3 years ago

maybe have some bot that try everyday to upload and download file to check code is doing ok or look for javascript interpreter in bash idk