Skip to content

Instantly share code, notes, and snippets.

@tosiara
Last active October 20, 2021 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tosiara/4a279e3ca866e5a854418ce9e1c3e91f to your computer and use it in GitHub Desktop.
Save tosiara/4a279e3ca866e5a854418ce9e1c3e91f to your computer and use it in GitHub Desktop.
OpenWRT login curl

Login using curl:

curl -sw '%{http_code}' -o /dev/null -X POST -F "luci_username=root" -F "luci_password=root" http://192.168.1.1/cgi-bin/luci

The result will be 403 if the password is incorrect, or 302 in case of success

The session cookie looks like:

Set-Cookie: sysauth=xxxxxxxxxxxxxxxxxxxxxxxxxxxx; path=/cgi-bin/luci/; SameSite=Strict; HttpOnly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment