-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetPicoId.sh
12 lines (11 loc) · 1.21 KB
/
getPicoId.sh
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
# show first device id you have
# usage: bash getPicoId.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
#<div ng-controller="userEquipmentController" ng-init="init([],[{"ZymaticID":1234,"UID":"xxx2xx170000","Serial":"20160526001234","Alias":"xxxxxxname","Firmware":"1.1.14","ProfileID":12345}],[])">
#[],[{"ZymaticID":1234,"UID":"xxx2xx170000","Serial":"20160526001234","Alias":"xxxxxxname","Firmware":"1.1.14","ProfileID":12345}],[]
#html decode
#[],[{"ZymaticID":1234,"UID":"xxx2xx170000","Serial":"20160526001234","Alias":"xxxxxxname","Firmware":"1.1.14","ProfileID":12345}],[]
curl -s -b /tmp/pico_$1 https://www.picobrew.com/Members/User/EditSettings.cshtml | grep ZymaticID | sed 's/ZymaticID":/\`/g' |cut -d'`' -f2 | cut -d',' -f1
#1234