diff options
| author | Cassio de Campos <cassiopc@gmail.com> | 2017-08-29 13:47:38 +0000 |
|---|---|---|
| committer | Cassio de Campos <cassiopc@gmail.com> | 2017-08-29 13:47:38 +0000 |
| commit | 170ccee81310850a67e07a6ea9449d911abccf7b (patch) | |
| tree | 13541f0d33032f34e629a2255b428e68f96233d6 /tools/singlefilebkp.sh | |
| parent | 8e2300c6b8e672e36e53868a9bf5f72d903306b7 (diff) | |
| download | boca-170ccee81310850a67e07a6ea9449d911abccf7b.tar.gz boca-170ccee81310850a67e07a6ea9449d911abccf7b.zip | |
force internet control, force ipv4
Diffstat (limited to 'tools/singlefilebkp.sh')
| -rwxr-xr-x | tools/singlefilebkp.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/singlefilebkp.sh b/tools/singlefilebkp.sh index 2358a84..6cd9ba5 100755 --- a/tools/singlefilebkp.sh +++ b/tools/singlefilebkp.sh @@ -22,14 +22,14 @@ if [ "$1" == "" ]; then fi if [ -r "$1" ]; then -md=`wget --no-check-certificate -S https://$BOCASERVER/boca/index.php -O /dev/null --save-cookies /tmp/.cookie.txt --keep-session-cookies 2>&1 | grep PHPSESS | tail -n1 | cut -f2 -d'=' | cut -f1 -d';'` +md=`wget -4 --no-check-certificate -S https://$BOCASERVER/boca/index.php -O /dev/null --save-cookies /tmp/.cookie.txt --keep-session-cookies 2>&1 | grep PHPSESS | tail -n1 | cut -f2 -d'=' | cut -f1 -d';'` echo -n "User: " read user echo -n "Password: " read pass res=`echo -n $pass | md5sum - | cut -f1 -d' '` res=`echo -n "${res}${md}" | md5sum - | cut -f1 -d' '` -wget --no-check-certificate "https://$BOCASERVER/boca/index.php?name=${user}&password=${res}" --load-cookies /tmp/.cookie.txt --keep-session-cookies --save-cookies /tmp/.cookie.txt -O /tmp/.temp.txt 2>/dev/null >/dev/null +wget -4 --no-check-certificate "https://$BOCASERVER/boca/index.php?name=${user}&password=${res}" --load-cookies /tmp/.cookie.txt --keep-session-cookies --save-cookies /tmp/.cookie.txt -O /tmp/.temp.txt 2>/dev/null >/dev/null grep -qi incorrect /tmp/.temp.txt if [ $? == 0 ]; then echo User or password incorrect @@ -37,7 +37,7 @@ else nom=`echo -n $1 | perl -MURI::Escape -lne 'print uri_escape($_)'` echo -n "name=${nom}&data=" > /tmp/.temp.txt uuencode -m zzzzzzzzzz < $1 | grep -v "begin-base64.*zzzzzzzzzz" | perl -MURI::Escape -lne 'print uri_escape($_)' >> /tmp/.temp.txt -wget --no-check-certificate "https://$BOCASERVER/boca/team/getfile.php" --load-cookies /tmp/.cookie.txt --keep-session-cookies -O /dev/null --post-file=/tmp/.temp.txt >/dev/null 2>/dev/null +wget -4 --no-check-certificate "https://$BOCASERVER/boca/team/getfile.php" --load-cookies /tmp/.cookie.txt --keep-session-cookies -O /dev/null --post-file=/tmp/.temp.txt >/dev/null 2>/dev/null fi rm -f /tmp/.temp.txt rm -f /tmp/.cookie.txt |