Skip to content

Files

Latest commit

c0a068c · Aug 31, 2023

History

History

0x10-python-network_0

0x10. Python - Network #0

Description

This project covers the basics of networking and HTTP using Python and Bash scripting. It includes various tasks related to making HTTP requests using curl, understanding URLs, HTTP methods, headers, cookies, and more.

Learning Objectives

By completing this project, you'll gain an understanding of:

  • What a URL is
  • What HTTP is
  • How to read a URL
  • HTTP request methods and response status codes
  • HTTP headers and cookies
  • Making requests using curl
  • Sending data in HTTP requests (POST parameters, JSON data)
  • Network fundamentals and scripting basics

Project Structure

The project consists of several tasks that need to be completed using both Bash and Python scripts. Each task focuses on a specific concept related to networking and HTTP.

Requirements

  • All scripts are tested on Ubuntu 20.04 LTS.
  • All Bash scripts must be exactly 3 lines long.
  • Python scripts should be compatible with Python 3.8.5.
  • Use of curl for making HTTP requests.
  • Follow code style using pycodestyle.
  • Documentation for modules, classes, and functions is mandatory.

Tasks

  • Task 0: Display the size of the body of an HTTP response.
  • Task 1: Display the body of an HTTP response with a 200 status code.
  • Task 2: Send a DELETE request and display the body of the response.
  • Task 3: Display all HTTP methods the server will accept.
  • Task 4: Display the body of an HTTP response with a custom header.
  • Task 5: Send a POST request with specific parameters and display the response.
  • Task 6: Implement a function to find a peak in an unsorted list of integers.
  • Task 7: Display only the status code of an HTTP response.
  • Task 8: Send a JSON POST request and display the response.
  • Task 9: Make a request to get a specific response.

How to Use

  1. Clone the repository:

    git clone https://github.com/mugambi12/0x10-python-network_0.git
  2. Navigate to the task you want to run:

    cd 0x10-python-network_0
  3. Run the script (replace script_name.sh with the actual script name):

    ./script_name.sh arguments

License

This project is licensed under the MIT License - see the LICENSE file for details.