Code Monkey home page Code Monkey logo

dphish-challenge's Introduction

dPhish-Challenge

Get Information about IPAddress

Description

This is a simple python script to get information about an IP Address. It uses the ipinfo.io API to get the information.

Instructions to Run the Code

  1. Clone the repository or download the code.
git clone https://github.com/faresemad/dPhish-Challenge.git
  1. Create a virtual environment and install the requirements.
# Create and activate a virtual environment (optional)
python3 -m venv venv
# For Windows:
venv\Scripts\activate
# For Unix/macOS:
source venv/bin/activate
  1. Install the requirements.
pip install -r requirements/local.txt
  1. Install make and docker if not already installed.
  • install make for Windows
    • https://gnuwin32.sourceforge.net/packages/make.htm
  • install make for linux
    • On Ubuntu:
      sudo apt-get install make
  • install docker for Windows
    • https://docs.docker.com/docker-for-windows/install/
  • install docker for linux
    • https://docs.docker.com/engine/install/ubuntu/
  1. Build Project
  • Build the project using the following command:
    • With make:
      make build
    • Without make:
      docker-compose -f docker-compose.yml build
  1. Run the code
  • Run the code using the following command:
    • With make:
      make run
    • Without make:
      docker-compose -f docker-compose.yml up

API Endpoints

  1. api/scanner/ip-addresses/

    • Method: POST
    • Description: Get information about an IP Address.
    • Request:
      • Content-Type: application/json
      • Body:
        {
          "address": "<IP Address>, e.g."
        }
    • Response:
      • Content-Type: application/json
      • Body:
        {
          "message": "IPs are being processed"
        }
  2. api/scanner/ip-addresses/<id>/

    • Method: GET
    • Description: Get information about an IP Address.
    • Request:
      • Content-Type: application/json
    • Response:
      • Content-Type: application/json
      • Body:
        {
          "ip": "<IP Address>",
          "loc": "<Latitude, Longitude>",
          "org": "<Organization>",
          "city": "<City>",
          "readme": "<Readme>",
          "region": "<Region>",
          "country": "<Country>",
          "timezone": "<Timezone>"
        }

dphish-challenge's People

Contributors

faresemad avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.