curl / Mailing Lists / curl-library / Single Mail


Re: Ubiquiti

From: Frank Gevaerts <>
Date: Tue, 18 Apr 2017 17:19:36 +0200

On Tue, Apr 18, 2017 at 07:52:35AM -0600, Greg Stewart via curl-library wrote:
> I am working with Ubiquiti airMax products. I'm trying to get logged in and
> change the device configuration.

I actually had to do exactly that a few weeks ago. What I ended up doing is:

curl -s -k -b $COOKIEFILE -c $COOKIEFILE -o /dev/null
curl -s -k -b $COOKIEFILE -c $COOKIEFILE -o /dev/null -H 'Expect:' -F uri=/ -F username=ubnt -F password=ubnt -F country=56 -F ui_language=en_US -F lang_changed=no
cat picostation.cfg | curl -s -k -b $COOKIEFILE -c $COOKIEFILE -o /dev/null --referer '' -H 'Expect:' -F update_status=enabled -F 'hostname=PicoStation M2' -F adminname=ubnt -F cfgfile=@- -F cfgupload=Upload -F action=cfgupload
curl -s -k -b $COOKIEFILE -c $COOKIEFILE -o /dev/null

(the "cat picostation.cfg" is different, as we partly generate the config from another script)


"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
Received on 2017-04-18