Web Requests - HTTP Flashcards
HTTP Fundamentals
What does HTTP stand for?
HyperText Transfer Protocol
What is the primary purpose of HTTP?
To access World Wide Web resources
What are the two main components of HTTP communication?
Client and server
What is the default port for HTTP communication?
Port 80
What does FQDN stand for?
Fully Qualified Domain Name
What is a URL?
Uniform Resource Locator
Fill in the blank: The main mandatory fields in a URL are the _______ and the _______.
[scheme], [host]
What is the role of a DNS server in HTTP requests?
To resolve the domain and return its IP address
What HTTP request is typically sent to access the root path?
GET request
What status code indicates a successful HTTP request?
200 OK
What tool is primarily used for sending web requests in web penetration testing?
cURL
What does the cURL command ‘curl -O [url]’ do?
Downloads a page and saves it using the remote file name
What does the ‘-s’ flag in cURL do?
Silent mode; suppresses output
True or False: cURL renders HTML, JavaScript, and CSS like a web browser.
False
What is the purpose of the ‘-i’ flag in cURL?
To include protocol response headers in the output
List the components of a URL and their descriptions.
- Scheme: Identifies the protocol (http://, https://)
- User Info: Optional credentials (admin:password@)
- Host: Resource location (hostname or IP address)
- Port: Communication port (:80)
- Path: Resource path (/dashboard.php)
- Query String: Parameters for requests (?login=true)
- Fragments: Sections within the resource (#status)
What command would you use to see all options available with cURL?
curl -h
What happens if no port is specified in a URL?
HTTP defaults to port 80 and HTTPS defaults to port 443
Fill in the blank: The query string in a URL starts with a _______ and consists of a parameter and a value.
[question mark]
What is the significance of the ‘index.html’ file in an HTTP request?
It is returned by the server when a request for the root path is received
What does the command ‘curl -o [filename] [url]’ do?
Writes the output to a specified file instead of stdout
What is the command to view the full cURL manual page?
man curl