first commit
This commit is contained in:
11
livebox.sh
Executable file
11
livebox.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
clear
|
||||
curl -o /tmp/context -X GET -i -H "Content-type: application/json" -c /tmp/cookies.txt "http://192.168.1.1/homeAuthentication.html?username=admin&password=HYJcanGE"
|
||||
#curl -o /tmp/context -X POST -i -H "Content-type: application/json" -c /tmp/cookies.txt "http://192.168.1.1/authenticate?username=admin&password=HYJcanGE"
|
||||
ID=$(tail -n1 /tmp/context | sed 's/{"status":0,"data":{"contextID":"//1'| sed 's/"}}//1')
|
||||
curl -b /tmp/cookies.txt http://192.168.1.1/sysbus/Devices -o /tmp/getHosts.txt
|
||||
#curl -b /tmp/cookies.txt -X POST -H 'Content-Type: application/json' -H 'X-Context: '$ID'' -d '{"parameters":{}}' http://192.168.1.1/sysbus/Devices -o /tmp/getHosts.txt
|
||||
#curl -b /tmp/cookies.txt -X POST -H 'Content-Type: application/json' -H 'X-Context: '$ID'' -d '{"parameters":{}}' http://192.168.1.1/sysbus/Hosts:getDevices -o /tmp/getHosts.txt
|
||||
curl -i -b /tmp/cookies.txt -X POST http://192.168.1.1/logout
|
||||
rm /tmp/cookies.txt
|
||||
rm /tmp/context
|
||||
Reference in New Issue
Block a user