This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| sysadminery:matrix [2023/12/04 15:38] – created adam | sysadminery:matrix [2025/11/04 08:05] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| < | < | ||
| ./new-user | ./new-user | ||
| + | </ | ||
| + | |||
| + | ====== curl as client ====== | ||
| + | |||
| + | you're on port 8448, which is unusual. | ||
| + | |||
| + | faq: how do I get an apostrophe? you can just glue strings, be they double-apostrophe or double-quote, | ||
| + | < | ||
| + | #password is asdf' | ||
| + | pw=' | ||
| + | </ | ||
| + | we're going to do the same to glue the password in. | ||
| + | |||
| + | username doesn' | ||
| + | |||
| + | < | ||
| + | pw=' | ||
| + | echo $pw | ||
| + | curl -XPOST -d ' | ||
| + | </ | ||
| + | that' | ||
| + | |||
| + | now for extra fun: get yourself '' | ||
| + | |||
| + | < | ||
| + | pw=' | ||
| + | username=' | ||
| + | echo $pw | ||
| + | token=$(curl -XPOST -d ' | ||
| + | echo $token | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | curl -XPOST \ | ||
| + | -d " | ||
| + | " | ||
| </ | </ | ||