Quantcast
Channel: Tomato Firmware
Viewing all articles
Browse latest Browse all 5181

Downloading config via curl - single byte difference

$
0
0
So I'm trying to automate taking a backup of config and /etc/ via a script. The file is downloaded and saved - but if I compare it with a file saved from a browser, it shows a difference in 1 byte. My script below:

Code:
#! /bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo $DIR
pushd $DIR
creds=$(cat .creds |tr -d '\n'|base64)
id=$(curl -s 'http://192.168.1.1/admin-config.asp' -H "Authorization: Basic $creds" | grep -Po "TID[0-9a-f]+")
curl -s...
Downloading config via curl - single byte difference

Viewing all articles
Browse latest Browse all 5181

Trending Articles