This project provides a FastAPI wrapper around the Interactsh tool, offering an easy-to-use API interface for generating URLs for out-of-band (OOB) interaction testing and retrieving interaction logs. The service is containerized using Docker, simplifying deployment and execution.
- Generate OOB URLs: Easily generate unique URLs for OOB testing with Interactsh.
- Fetch Interactions: Retrieve detailed logs of interactions, including caller IP and timestamps, optionally filtered by time range.
- Docker
- Docker Compose
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
-
Clone the Repository
Start by cloning this repository to your local machine:
git clone https://github.com/Addy-codes/FastAPIWrapper cd FastAPIWrapper
-
Build and Run with Docker Compose
Use Docker Compose to build and run the application:
docker-compose up --build
This command builds the Docker image and starts the service. The API will be accessible at
http://127.0.0.1/docs
.
- GET
/api/getURL
: Generates and returns a unique URL for OOB testing. - GET
/api/getInteractions
: Retrieves interaction logs for the specified URL. Supports optional query parameters for start and end timestamps to filter interactions within a specific time range.
FastAPI generates interactive API documentation using Swagger UI. Once the application is running, you can visit http://127.0.0.1/docs
in your web browser to access the documentation, try out the API endpoints, and view their responses.
- Get the url from getURL endpoint:
- Copy the url and paste it in the browser to interact with it:
-
Interactions can be viewed using the getInteractions endpoint (make sure to paste the above generated url).
-
Note: Browsers automatically request additional resources like /favicon.ico after loading the main page. This behavior explains why you see multiple entries for what seems like a single interaction. When a user visits a website, the browser often makes several requests behind the scenes:
- You can also filter the interactions using timestamps:
To modify the application or add new features, you can edit the Python files located in the project directory. The main components are:
app/main.py
: FastAPI application setup and route inclusion.app/routes.py
: API route definitions.app/utils.py
: Utility functions for interacting with Interactsh and processing data.