A minimalist REST API wrapper for python's subprocess API.
Project description
Flask-Shell2HTTP
A minimalist Flask extension that serves as a REST API wrapper for python's subprocess API.
- Convert any command-line tool into a REST API service.
- Execute pre-defined shell commands asynchronously and securely via flask's endpoints.
- Designed for development, prototyping or remote control.
Inspired by the work of awesome folks over at msoap/shell2http.
Use Cases
- Set a script that runs on a succesful POST request to an endpoint of your choice. See Example code.
- Map a base command to an endpoint and pass dynamic arguments to it. See Example code.
- Can also process multiple uploaded files in one command. See Example code.
- This is useful for internal docker-to-docker communications if you have lots of different binaries. See real-life example.
- Currently, all commands are run asynchronously, so result is not available directly. An option would be provided for this in future release.
Note: This extension is primarily meant for executing long-running shell commands/scripts (like nmap, code-analysis' tools) in background from an HTTP request and getting the result at a later time.
Documentation / Quick Start
Read the Quickstart from the documentation to get started!
Why?
This was initially made to integrate various command-line tools easily with IntelOwl.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Flask-Shell2HTTP-1.1.1.tar.gz
.
File metadata
- Download URL: Flask-Shell2HTTP-1.1.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f780d0e2f7bf7b4bb350bd8757974d7966001e3e07737f788e04c35f7b6bd998 |
|
MD5 | fbd7a44d125d824bf9dc79e6e8ac5d51 |
|
BLAKE2b-256 | b0fc0b0b8a2b5b08ae8a8dd0d07d83229127e31ad8897519d9d126770eab7435 |
File details
Details for the file Flask_Shell2HTTP-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: Flask_Shell2HTTP-1.1.1-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02d1c9fcb6c6f6c9dbe0c1f25f676239f3bb8e07925185df633a720b674e9409 |
|
MD5 | 3bcd63f4afbfdff783cf14e6abdb75ef |
|
BLAKE2b-256 | 6c988c3846bd158388e65d14875bc811b2265ec88a3a0bb027050d88f1c9ca64 |