mcrapet/plowshare-modules-legacy

How can I use cookies extracted from browser for plowup?

Closed this issue · 2 comments

When I try to upload with plowup to depositfiles, it always asks for a captcha solving. When I solve the captcha from imgur, it doesn't recognize it for some reason. However I am able to login with my browser, and with cURL too

curl -s 'https://dfiles.eu/api/user/login' -c ~/dfiles-cookie.txt -H 'Origin: http://dfiles.eu' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Referer: http://dfiles.eu/login.php?return=%2F' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' --data 'login=mylogin&password=mypassword&recaptcha_challenge_field=&recaptcha_response_field=' --compressed -L 

I tried to modify the modul depositfiles.sh and hardcode my cookie file. When I made my cookie file with cURL using the above command line, it worked, however when I extracted the cookie data from browser with extract_cookie Ruby script found on github it doesn't worked.

Would be nice if I could attach my own cookie file with an option for uploading as well not only for downloading.

In depositfiles_upload(), right after depositfiles_login, just add:

cat /tmp/my_dumped_cookie_file_from_firefox > "$COOKIEFILE"

Let's close this.