# SwaggerHole | A Python3 Script Searching For Secret On Swaggerhub

**URL:** <https://onehack.st/t/swaggerhole-a-python3-script-searching-for-secret-on-swaggerhub/276690>\
**Category:** Tools & Scripts\
**Tags:** tools, programming\
**Created:** [February 29, 2024, 10:32pm UTC](https://onehack.st/t/swaggerhole-a-python3-script-searching-for-secret-on-swaggerhub/276690 "2024-02-29T22:32:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheStrength](https://onehack.st/user_avatar/onehack.st/thestrength/32/46753_2.png) [@TheStrength](https://onehack.st/u/TheStrength)\
**Post date:** [February 29, 2024, 10:32pm UTC](https://onehack.st/t/swaggerhole-a-python3-script-searching-for-secret-on-swaggerhub/276690/1 "2024-02-29T22:32:13Z")

</div>

[![logo](https://camo.githubusercontent.com/fc2eda485b07e87dcebd902fcaee5e88f23589276ef77d687cc23b3bc035c710/68747470733a2f2f692e6962622e636f2f337054567377432f6c6f676f2e706e67)](https://github.com/Liodeus/swaggerHole)

A python3 script searching for secret on swaggerhub

[Introduction](https://github.com/Liodeus/swaggerHole#introduction) • [Requirements](https://github.com/Liodeus/swaggerHole#requirements) • [Installation](https://github.com/Liodeus/swaggerHole#installation) • [Usage](https://github.com/Liodeus/swaggerHole#usage) • [Output explanation](https://github.com/Liodeus/swaggerHole#output-explanation) • [Thanks](https://github.com/Liodeus/swaggerHole#thanks)

Created by [Liodeus](https://liodeus.github.io/)

## Introduction

This tool is made to automate the process of retrieving secrets in the public APIs on [swaggerHub](https://app.swaggerhub.com/search). This tool is multithreaded and pipe mode is available 🙂

## Requirements

- python3 (sudo apt install python3)
- pip3 (sudo apt install python3-pip)

## Installation

pip3 install swaggerhole

or cloning this repository and running

git clone [https://github.com/Liodeus/swaggerHole.git](https://github.com/Liodeus/swaggerHole.git) pip3 install .

## Usage

\_\_\_\_\_ \_ \_\_ \_\_\_\_ \_ \_\_\_\_ \_ \_\_\_\_ \_ \_\_\_ \_\_\_\_\_ / _/| | /| / // \_\_ `// __`// \_\_ `// \_ \ / **/ (** ) | |/ |/ // // // // // // // \_\_// / /__/ | **/|** / \_,/ \ __, / \__ , / \_\_\_//_/ \_\_ \_\_ \_\_ / **/ /** / / / / /\_\_\_\_ / /\_\_\_ / /_/ // \_\_ \ / // \_ \ / \_\_ // /_/ // // **/ /_/ /_/ \_** _//_/ \_\_\_/ usage: swaggerhole [-h] [-s SEARCH] [-o OUT] [-t THREADS] [-j] [-q] [-du] [-de] optional arguments: -h, --help show this help message and exit -s SEARCH, --search SEARCH Term to search -o OUT, --out OUT Output directory -t THREADS, --threads THREADS Threads number (Default 25) -j, --json Json ouput -q, --quiet Remove banner -du, --deactivate\_url Deactivate the URL filtering -de, --deactivate\_email Deactivate the email filtering

### Search for secret about a domain

swaggerHole -s [test.com](http://test.com) echo [test.com](http://test.com) | swaggerHole

### Search for secret about a domain and output to json

swaggerHole -s [test.com](http://test.com) --json echo [test.com](http://test.com) | swaggerHole --json

### Search for secret about a domain and do it fast 🙂

swaggerHole -s [test.com](http://test.com) -t 100 echo [test.com](http://test.com) | swaggerHole -t 100

## Output explanation

### Normal output

`Finding_Type - Finding - [Swagger_Name][Date_Last_Update][Line:Number]`

### Json output

`{"Finding_Type": Finding, "File": File_path, "Date": Date_Last_Update, "Line": Number}`

### Deactivate url/email

Using -du or -de remove the filtering done by the tool. There is more false positive with those options.

## Thanks

TODO

## GitHub:

[https://github.com/Liodeus/swaggerHole](https://github.com/Liodeus/swaggerHole)
