Created
December 6, 2020 21:13
-
-
Save sunix/127aae0c786187697cf7e267826a4353 to your computer and use it in GitHub Desktop.
1fichier script login and download
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o xtrace; | |
wget --max-redirect=3 --content-disposition --progress=bar:force --load-cookies ~/.1fichier-cookie "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
read -p 'Login to 1fichier, Enter your mail: ' mail; | |
read -s -p 'Enter your password: ' pass; | |
curl 'https://1fichier.com/login.pl' \ | |
-H 'authority: 1fichier.com' \ | |
-H 'content-type: application/x-www-form-urlencoded' \ | |
--data-urlencode "mail=${mail}" \ | |
--data-urlencode "pass=${pass}" \ | |
--data-urlencode "lt=on" \ | |
--data-urlencode "purge=on" \ | |
--data-urlencode "valider=Envoyer" \ | |
--compressed \ | |
-c ~/.1fichier-cookie |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment