m1d1 / fritzbox7490_backup Goto Github PK
View Code? Open in Web Editor NEWbackup phonebook/s, configuration and phone assets remotely from your fritzbox with a bash-shell script
License: MIT License
backup phonebook/s, configuration and phone assets remotely from your fritzbox with a bash-shell script
License: MIT License
Hi,
i tried a lot of different backup scripts for FritzOs 7.50 and nothings works. the curl result just is always empty. Rebooting the router and updating phonebooks by bash script works fine.
If you have an idea how to upate to latest, please let me know. i checked the form input argument names and values and they did not change. messed around 2 hours for that, giving up at the moment :-(
my script, reduced to the needs:
#!/bin/bash
URL=https://192.168.188.1
USER=theuser
PASSWD=pwd
EXPORT_PW=pwd2
CURLUSERPASSSTRING="--user ${USER}:${PASSWD}"
CHALLENGE=`curl -s -k ${CURLUSERPASSSTRING} "${URL}/login_sid.lua" | grep Challenge | sed -e 's/.*<Challenge>//' | sed -e 's/<\/Challenge>.*//'`
DATE=`date +"%d.%m.%Y %H:%M:%S"`
if [ -z "${CHALLENGE}" ] ; then
echo "Error getting challenge using ${URL}" >&2
else
MD5=$(echo -n ${CHALLENGE}"-"${PASSWD} | perl -p -e 'use Encode qw/encode/; print encode("UTF-16LE","$_"); $_="";' | md5sum -b | awk '{print substr($0,1,32)}')
RESPONSE=${CHALLENGE}"-"${MD5}
SID=`curl -s -i -k ${CURLUSERPASSSTRING} -d 'response='${RESPONSE} -d 'page=' -d 'username='${USER} ${URL}/login_sid.lua | grep SID | sed -e 's/.*<SID>//' | sed -e 's/<\/SID>.*//'`
curl -k ${CURLUSERPASSSTRING} --form "sid=${SID}" --form "ImportExportPassword=${EXPORT_PW}" --form "ConfigExport=" ${URL}/cgi-bin/firmwarecfg
fi
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.