emprax 1.8.0
Distributed OSINT Framework
Requires Python: >=3.10,<4.0

![](https://github.com/bitthebyte/emprax/blob/stable/images/banner-min.png?raw=true)

<p align="center">
    <a href="#" alt="Code Style">
        <img src="https://img.shields.io/badge/code%20style-black-000000.svg" />
    </a>
    <br>
    <a href="#" alt="Docs Build">
        <img src="https://github.com/bitthebyte/emprax/actions/workflows/pages/pages-build-deployment/badge.svg" />
    </a>
    <a href="#" alt="UI Docker Image">
        <img src="https://github.com/bitthebyte/emprax/actions/workflows/docker-publish-ui.yml/badge.svg" />
    </a>
    <a href="#" alt="Emprax Docker Image">
        <img src="https://github.com/bitthebyte/emprax/actions/workflows/docker-publish-base.yml/badge.svg" />
    </a>
    <a href="#" alt="Toolkit Docker Image ">
        <img src="https://github.com/bitthebyte/emprax/actions/workflows/docker-publish-toolkit.yml/badge.svg" />
    </a>
    <br>
    <a href="https://pypi.python.org/pypi/emprax/" alt="PyPI version">
        <img alt="PyPI" src="https://img.shields.io/pypi/v/emprax">
    </a>
    <a href="https://github.com/bitthebyte/emprax/" alt="Stars">
        <img src="https://img.shields.io/github/stars/bitthebyte/emprax" />
    </a>
    <a href="https://pepy.tech/badge/emprax/" alt="Downloads">
        <img src="https://img.shields.io/pypi/dm/emprax" />
    </a>
    <a href="https://github.com/bitthebyte/emprax/pulse" alt="Activity">
        <img src="https://img.shields.io/github/commit-activity/m/bitthebyte/emprax" />
    </a>
</p>

# Documentation
Emprax is a distributed open source intelligence as code.
it can scale a workflow horizontally to cover large scale
networks in minutes or even seconds

```python
from emprax.tasks.subfinder import subfinder, SubfinderIn
from emprax import flow


@flow
def workflow(domains: list[str]):
    scans = subfinder.map([
        SubfinderIn(domain=domain)
        for domain in domains
    ])
    
    for scan in scans:
        print(scan.result())


if __name__ == '__main__':
    workflow.local_run(domains=[
        "bitthebyte.com",
        "google.com",
        "indeed.com"
    ])
```
Emprax full documentation is available at: https://bitthebyte.github.io/Emprax/

# Command line
### Help
```commandline
$ emprax --help
Usage: emprax [OPTIONS] COMMAND [ARGS]...

    ________  _______  ____  ___   _  __
   / ____/  |/  / __ \/ __ \/   | | |/ /
  / __/ / /|_/ / /_/ / /_/ / /| | |   / 
 / /___/ /  / / ____/ _, _/ ___ |/   |  
/_____/_/  /_/_/   /_/ |_/_/  |_/_/|_|  
                                         
Options:                                 
  --help  Show this message and exit.    

Commands:
  deploy    Deploy To Kubernetes Cluster
  connect   Connect To API Server Within Kubernetes
  view      Show Current Profile Settings
  new       Create New Task Project Template
  fs        View/Modify Remote Storage (Deployed Mode Only)
  list      List Available Packages
  install   Invoke Task's 'Install' Function
  run       Invoke Task's Main Function
  build     Build Workflow Docker Image
  register  Register Workflow(s)
  version   Show Emprax Version
```

### Running Task from CLI
```commandline
$ emprax run subfinder --domain bitthebyte.com
```

### Task Help 
```commandline
$ emprax run subfinder --help
Usage: emprax run subfinder [OPTIONS]

Options:
  --domain TEXT        [required]
  --threads INTEGER    [default: 12]
  --timeout INTEGER    [default: 30]
  --recursive BOOLEAN  [default: False]
  --max_time INTEGER   [default: 10]
  --config TEXT
  -s, --silent         Decrease task logging level
  --help               Show this message and exit.
```

# Library

**Trusted or official tasks that are already bundled with every emprax docker image**


| Package                                   | URL                                           |
|-------------------------------------------|-----------------------------------------------|
| [emprax-subfinder](plugins/subfinder)     | https://github.com/projectdiscovery/subfinder |
| [emprax-nuclei](plugins/nuclei)           | https://github.com/projectdiscovery/nuclei    |
| [emprax-httpx](plugins/httpx)             | https://github.com/projectdiscovery/httpx     |
| [emprax-masscan](plugins/masscan)         | https://github.com/robertdavidgraham/masscan  |
| [emprax-gowitness](plugins/gowitness)     | https://github.com/sensepost/gowitness        |
| [emprax-aiodnsbrute](plugins/aiodnsbrute) | https://github.com/blark/aiodnsbrute          |
| [emprax-nmap](plugins/nmap)               | https://github.com/nmap/nmap                  |
| [emprax-ffuf](plugins/ffuf)               | https://github.com/ffuf/ffuf                  |


Would love your package to be included? [Open a new ticket](https://github.com/BitTheByte/Emprax/issues/new)

# Extending and Custom Tasks

Emprax provide a flexible extension system as it can load and manage user defined plugins
using its own namespace.

Start by creating your own python package using 
```commandline
$ emprax new
```

After following all the steps a new python package will be created from your task name
with the following directory structure: -
```text
[task_name]
   |_   emprax
       |_ tasks
          |_ [task_name]
             |_ * task related files
   |_ pyproject.toml
```
_You're free to customize and change all the files in `emprax/tasks/[task_name]` namespace_

To enable emprax to load and detect your package you'll just need install it as any normal python
package e.g. `pip install [task_name]`

To confirm that everything is working successfully use `emprax install` you'll be able to 
see your task loaded and ready to be installed.

Your task should be accessible under `emprax.tasks.[TASK_NAME]`.
Feel free to open a new PR with the modified changes or upload to pypi.