curl / Mailing Lists / curl-library / Single Mail

curl-library

Ubiquiti

From: Greg Stewart via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 18 Apr 2017 07:52:35 -0600

I am working with Ubiquiti airMax products. I'm trying to get logged in and
change the device configuration. I can't get logged in using the
commandline or libcurl. I ultimately want to run this code from the ESP32
using c. Libcurl is running on the ESP32. The content type is:
multipart/form-data;
boundary=-----------------------------1965831050686548255386886454

I used httpfox on firefox to capture the http post request. The raw post
data is:

-----------------------------8836643981898118181802691882
Content-Disposition: form-data; name="uri"

-----------------------------8836643981898118181802691882
Content-Disposition: form-data; name="username"

ubnt
-----------------------------8836643981898118181802691882
Content-Disposition: form-data; name="password"

ubnt
-----------------------------8836643981898118181802691882--

The url I'm working with is https://192.168.135.22/login.cgi.

The boundary value changes with each request. I tried this command from the
command line just to see if I could get it working from there.

curl -X POST -H "Content-Type: multipart/form-data;
boundary=----------------------------8836643981898118181802691882"
--data-binary @test.txt https://192.168.135.22/login.cgi -k

where test.txt contained the form data above.

Any ideas?

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-04-18