CURL
Curl is a command line based tool that can use various protocols for transferring data from a server to a client. It is popularly used as a command line browser to access a website. Some of the popular protocols supported by CURL are,
DICT FTP(S) Gopher HTTP(S) IMAP Kerberos LDAP MQTT POP3 RTSP RTMP SCP SMTP SMB
This is a popular tool for hacking since it can be liberally used in manipulating HTTP requests. This is particularly useful in cases of testing APIs as the requests can be modified to the detail to exploit a server's API.
HTTP
A webserver/website can be accessed using curl by using the following command,
Additional parameters can be included in the curl command to achieve the following,
Here is an example command using the above commands,
curl -sX POST http://example.com/api/v1/admin/settings --cookie "PHPSESSID=vgvgl6uod6rs8218132ntc0bmb" -H "Content-Type: application/json" -d@message.json
Another example,
curl -d '{"password":"fake","username":"admin"}' -H 'Content-Type: application/json' http://192.168.2.11/users/v1/login
Last updated