You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-11Lines changed: 17 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,22 @@
1
1
# Flask-Shell2HTTP
2
2
3
-
A minimalist REST API wrapper for python's subprocess API.<br/>
4
-
Execute shell commands asynchronously and safely from flask's endpoints.
3
+
[](https://pypi.org/project/Flask-Shell2HTTP/)
4
+
5
+
A minimalist [Flask](https://github.com/pallets/flask) extension that serves as a REST API wrapper for python's subprocess API.<br/>
6
+
7
+
-**Convert any command-line tool into a REST API service.**
8
+
- Execute shell commands asynchronously and safely from flask's endpoints.
5
9
6
10
Inspired by the work of awesome folks over at [msoap/shell2http](https://github.com/msoap/shell2http).
7
11
8
-
## You can use this for
12
+
## Use Cases
13
+
14
+
- Set a script that runs on a succesful POST request to an endpoint of your choice. See [Example code](examples/run_script.py).
15
+
- Map a base command to an endpoint and pass dynamic arguments to it. See [Example code](examples/basic.py).
16
+
- Can also process multiple uploaded files in one command. See [Example code](examples/multiple_files.py).
17
+
- Currently, all commands are run asynchronously, so result is not available directly. An option would be provided for this in future release.
9
18
10
-
- Set a script that runs on a succesful POST request to an endpoint of your choice. See [Example code](examples/run_script.py)
11
-
- Map a base command to an endpoint and passing dynamic arguments to it. See [Example code](examples/basic.py)
12
-
- Can also process uploaded files. See [Example code](examples/multiple_files.py)
13
-
- Choose to run a command asynchronously or not. (upcoming feature)
19
+
> Note: This module is primarily meant for running long-running shell commands/scripts (like nmap, code-analysis' tools) in background and getting the result at a later time.
14
20
15
21
## Quick Start
16
22
@@ -23,7 +29,7 @@ Inspired by the work of awesome folks over at [msoap/shell2http](https://github.
23
29
#### Install
24
30
25
31
```bash
26
-
$ pip install flask_shell2http flask_executor
32
+
$ pip install flask flask_shell2http
27
33
```
28
34
29
35
#### Example
@@ -93,8 +99,8 @@ Returns result in JSON,
93
99
94
100
## Why?
95
101
96
-
This was made to integrate various command-line tools easily with [IntelOwl](https://github.com/intelowlproject/IntelOwl).
102
+
This was initially made to integrate various command-line tools easily with [IntelOwl](https://github.com/intelowlproject/IntelOwl).
97
103
98
-
## Various examples
104
+
## Example usage
99
105
100
-
You can find various examples under [examples](examples/)
106
+
You can find various examples under [examples](examples/).
0 commit comments