Skip to content

Instantly share code, notes, and snippets.

@sunix
Created December 6, 2020 21:13
Show Gist options
  • Save sunix/127aae0c786187697cf7e267826a4353 to your computer and use it in GitHub Desktop.
Save sunix/127aae0c786187697cf7e267826a4353 to your computer and use it in GitHub Desktop.
1fichier script login and download
#!/bin/bash
set -o xtrace;
wget --max-redirect=3 --content-disposition --progress=bar:force --load-cookies ~/.1fichier-cookie "$1"
#!/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