Skip to content

Connects to a server on a TCP socket and logs the server's response to an HTTP GET request that you send it via the socket.

Notifications You must be signed in to change notification settings

SeanFitzpatrick0/Socket-GET-request

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Socket-GET-request

Connects to a server on a TCP socket and logs the server's response to an HTTP GET request that you send it via the socket. This program creates a socket and makes a GET request.

Whats here

Setup

To start clone this repo:

git clone https://github.com/SeanFitz1997/Socket-GET-request.git

Then to compile the files enter

make

If there is and issues enter

make clean && make

Example

(GET request)

./knock -h www.tcd.ie -p 80 -f output.txt

This will send an HTTP GET request to the webpage www.tcd.ie at the socket listening at port 80 and will record the response to the file _[output.txt].
(Usage)

./knock -?
or
./knock -H

Parameters

Required:

  • h, host: the DNS name or IP address of the host to contact
  • p, port: the TCP port on the server to which to connect Optional:
  • w, web: make an HTTP GET request for the "/" resource
  • f, file: store any output received from socket in file
  • H, help: produce a usage message such as that below
  • ?, help: produce a usage message such as that below

Important

  • The host input MUST be an IPv4 or IPv6 address or a Fully Qualified Domain Name (FQDN)
  • The port MUST be an integer between 1 and 65535
  • The mandatory parameters are the host and port.

About

Connects to a server on a TCP socket and logs the server's response to an HTTP GET request that you send it via the socket.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published