Posting file via cURL

The gear needed for wardriving

5 posts • Page 1 of 1

Postby xenoxaos » Tue Apr 08, 2014 9:40 am

Has anyone had any success with uploading a file using cURL? I figure I would have to login and get the cookie, then use that to post the file in another cURL request.

EDIT:
After a bit of trial and error, I was able to successfully get this accomplished. And with the new site design, the URL has changed

curl --cookie "auth=COOKIE_DATA_FROM_YOUR_BROWSER" --form stumblefile=@FILENAME --form Send=Send --form observer=YOUR_USERNAME https://wigle.net/upload

As long as the cookie isn't set to expire, you should be able to add this to any bash script or whatever to automatically upload your files.

Postby strasharo » Wed Mar 02, 2016 10:01 am

Just managed to do it like this:

Code: Select all

curl -F observer=MYUSERNAME -F password=MYPASSWORD -F stumblefile=@./Kismet-20160301-22-30-03-1.gpsxml.gz -F Send=Send https://wigle.net/gps/gps/main/confirmfile/

Postby ViperVirus » Sun Oct 09, 2016 4:45 pm

Just managed to do it like this:

Code: Select all

curl -F observer=MYUSERNAME -F password=MYPASSWORD -F stumblefile=@./Kismet-20160301-22-30-03-1.gpsxml.gz -F Send=Send https://wigle.net/gps/gps/main/confirmfile/
Currently that works but it may not in the future as at the top of the site your posting to it says "NOTE: this version of the site is slated for deactivation!"

Postby strasharo » Sun Oct 09, 2016 5:32 pm

This message has been there for ages.

Postby strasharo » Tue May 15, 2018 7:07 am

Since the old API is now gone, here's how to post a file using the new one via curl:

Code: Select all

curl -i -H 'Accept:application/json' -u <token> --basic -F file=@./<filename> -F donate=true https://api.wigle.net/api/v2/file/upload
Just replace the file name with the file you are going to upload and the auth token with the one visible in the sample curl field here:
https://wigle.net/account

Or you can skip the token part and just upload the file anonymously.

5 posts • Page 1 of 1

Return to “Net Hugging Hardware and Software”

Who is online

Users browsing this forum: No registered users and 12 guests