-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetPicoList.sh
10 lines (9 loc) · 1.16 KB
/
getPicoList.sh
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
# show how many device you have
# usage: bash getPicoList.sh <user> <passwd>
curl -s -D /tmp/pico_$1 -d "username=$1&Password=$2" https://www.picobrew.com/account/loginAjax.cshtml?returnURL=https://www.picobrew.com/Account/Login.cshtml > /dev/null
curl -s -b /tmp/pico_$1 https://www.picobrew.com/Members/User/EditSettings.cshtml | grep ZymaticID | cut -d'(' -f2 | cut -d')' -f1 | sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g; s/#'/\'"'"'/g; s/“/\"/g; s/”/\"/g;'
#<div ng-controller="userEquipmentController" ng-init="init([],[{"ZymaticID":2318,"UID":"f242fa170000","Serial":"20160526002137","Alias":"boku no pico","Firmware":"1.1.14","ProfileID":15073}],[])">
#[],[{"ZymaticID":2318,"UID":"f242fa170000","Serial":"20160526002137","Alias":"boku no pico","Firmware":"1.1.14","ProfileID":15073}],[]
#html decode
#[],[{"ZymaticID":2318,"UID":"f242fa170000","Serial":"20160526002137","Alias":"boku no pico","Firmware":"1.1.14","ProfileID":15073}],[]