flask-Humanify 0.1.3.2__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flask_humanify-0.1.3.2/flask_Humanify.egg-info → flask_humanify-0.2.0}/PKG-INFO +14 -4
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0}/README.md +9 -4
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0/flask_Humanify.egg-info}/PKG-INFO +14 -4
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0}/flask_Humanify.egg-info/SOURCES.txt +8 -2
- flask_humanify-0.2.0/flask_Humanify.egg-info/requires.txt +7 -0
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0}/flask_humanify/__init__.py +1 -1
- flask_humanify-0.2.0/flask_humanify/datasets/ai_dogs.pkl +0 -0
- flask_humanify-0.2.0/flask_humanify/datasets/animals.pkl +0 -0
- flask_humanify-0.2.0/flask_humanify/datasets/characters.pkl +0 -0
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0}/flask_humanify/features/rate_limiter.py +1 -1
- flask_humanify-0.2.0/flask_humanify/humanify.py +535 -0
- flask_humanify-0.2.0/flask_humanify/memory_server.py +836 -0
- flask_humanify-0.2.0/flask_humanify/secret_key.bin +0 -0
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0}/flask_humanify/templates/access_denied.html +32 -25
- flask_humanify-0.2.0/flask_humanify/templates/audio_challenge.html +208 -0
- flask_humanify-0.2.0/flask_humanify/templates/grid_challenge.html +232 -0
- flask_humanify-0.1.3.2/flask_humanify/templates/oneclick_captcha.html → flask_humanify-0.2.0/flask_humanify/templates/one_click_challenge.html +48 -45
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0}/flask_humanify/templates/rate_limited.html +32 -25
- flask_humanify-0.2.0/flask_humanify/utils.py +508 -0
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0}/pyproject.toml +2 -2
- flask_humanify-0.1.3.2/flask_Humanify.egg-info/requires.txt +0 -2
- flask_humanify-0.1.3.2/flask_humanify/humanify.py +0 -158
- flask_humanify-0.1.3.2/flask_humanify/ipset.py +0 -315
- flask_humanify-0.1.3.2/flask_humanify/utils.py +0 -88
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0}/LICENSE +0 -0
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0}/MANIFEST.in +0 -0
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0}/flask_Humanify.egg-info/dependency_links.txt +0 -0
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0}/flask_Humanify.egg-info/top_level.txt +0 -0
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0}/flask_humanify/datasets/ipset.json +0 -0
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0}/setup.cfg +0 -0
- {flask_humanify-0.1.3.2 → flask_humanify-0.2.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: flask-Humanify
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.2.0
|
4
4
|
Summary: Protect against bots and DDoS attacks
|
5
5
|
Author-email: TN3W <tn3w@protonmail.com>
|
6
6
|
License-Expression: Apache-2.0
|
@@ -27,6 +27,11 @@ Description-Content-Type: text/markdown
|
|
27
27
|
License-File: LICENSE
|
28
28
|
Requires-Dist: Flask
|
29
29
|
Requires-Dist: netaddr
|
30
|
+
Requires-Dist: opencv-python-headless
|
31
|
+
Requires-Dist: numpy
|
32
|
+
Requires-Dist: cryptography
|
33
|
+
Requires-Dist: scipy
|
34
|
+
Requires-Dist: pydub
|
30
35
|
Dynamic: license-file
|
31
36
|
|
32
37
|
<h1 align="center">flask-Humanify</h1>
|
@@ -40,10 +45,10 @@ from flask import Flask
|
|
40
45
|
from flask_Humanify import Humanify
|
41
46
|
|
42
47
|
app = Flask(__name__)
|
43
|
-
humanify = Humanify(app)
|
48
|
+
humanify = Humanify(app, challenge_type="one_click", captcha_dataset="ai_dogs")
|
44
49
|
|
45
50
|
# Register the middleware to deny access to bots
|
46
|
-
humanify.register_middleware(action="
|
51
|
+
humanify.register_middleware(action="challenge")
|
47
52
|
|
48
53
|
@app.route("/")
|
49
54
|
def index():
|
@@ -57,6 +62,7 @@ if __name__ == "__main__":
|
|
57
62
|
```
|
58
63
|
|
59
64
|
Not using the middleware:
|
65
|
+
|
60
66
|
```python
|
61
67
|
@app.route("/")
|
62
68
|
def index():
|
@@ -64,24 +70,28 @@ def index():
|
|
64
70
|
A route that is protected against bots and DDoS attacks.
|
65
71
|
"""
|
66
72
|
if humanify.is_bot:
|
67
|
-
return humanify.
|
73
|
+
return humanify.challenge()
|
68
74
|
return "Hello, Human!"
|
69
75
|
```
|
70
76
|
|
71
77
|
## Usage
|
72
78
|
|
73
79
|
### Installation
|
80
|
+
|
74
81
|
Install the package with pip:
|
82
|
+
|
75
83
|
```bash
|
76
84
|
pip install flask-humanify --upgrade
|
77
85
|
```
|
78
86
|
|
79
87
|
Import the extension:
|
88
|
+
|
80
89
|
```python
|
81
90
|
from flask_humanify import Humanify
|
82
91
|
```
|
83
92
|
|
84
93
|
Add the extension to your Flask app:
|
94
|
+
|
85
95
|
```python
|
86
96
|
app = Flask(__name__)
|
87
97
|
humanify = Humanify(app)
|
@@ -9,10 +9,10 @@ from flask import Flask
|
|
9
9
|
from flask_Humanify import Humanify
|
10
10
|
|
11
11
|
app = Flask(__name__)
|
12
|
-
humanify = Humanify(app)
|
12
|
+
humanify = Humanify(app, challenge_type="one_click", captcha_dataset="ai_dogs")
|
13
13
|
|
14
14
|
# Register the middleware to deny access to bots
|
15
|
-
humanify.register_middleware(action="
|
15
|
+
humanify.register_middleware(action="challenge")
|
16
16
|
|
17
17
|
@app.route("/")
|
18
18
|
def index():
|
@@ -26,6 +26,7 @@ if __name__ == "__main__":
|
|
26
26
|
```
|
27
27
|
|
28
28
|
Not using the middleware:
|
29
|
+
|
29
30
|
```python
|
30
31
|
@app.route("/")
|
31
32
|
def index():
|
@@ -33,25 +34,29 @@ def index():
|
|
33
34
|
A route that is protected against bots and DDoS attacks.
|
34
35
|
"""
|
35
36
|
if humanify.is_bot:
|
36
|
-
return humanify.
|
37
|
+
return humanify.challenge()
|
37
38
|
return "Hello, Human!"
|
38
39
|
```
|
39
40
|
|
40
41
|
## Usage
|
41
42
|
|
42
43
|
### Installation
|
44
|
+
|
43
45
|
Install the package with pip:
|
46
|
+
|
44
47
|
```bash
|
45
48
|
pip install flask-humanify --upgrade
|
46
49
|
```
|
47
50
|
|
48
51
|
Import the extension:
|
52
|
+
|
49
53
|
```python
|
50
54
|
from flask_humanify import Humanify
|
51
55
|
```
|
52
56
|
|
53
57
|
Add the extension to your Flask app:
|
58
|
+
|
54
59
|
```python
|
55
60
|
app = Flask(__name__)
|
56
61
|
humanify = Humanify(app)
|
57
|
-
```
|
62
|
+
```
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: flask-Humanify
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.2.0
|
4
4
|
Summary: Protect against bots and DDoS attacks
|
5
5
|
Author-email: TN3W <tn3w@protonmail.com>
|
6
6
|
License-Expression: Apache-2.0
|
@@ -27,6 +27,11 @@ Description-Content-Type: text/markdown
|
|
27
27
|
License-File: LICENSE
|
28
28
|
Requires-Dist: Flask
|
29
29
|
Requires-Dist: netaddr
|
30
|
+
Requires-Dist: opencv-python-headless
|
31
|
+
Requires-Dist: numpy
|
32
|
+
Requires-Dist: cryptography
|
33
|
+
Requires-Dist: scipy
|
34
|
+
Requires-Dist: pydub
|
30
35
|
Dynamic: license-file
|
31
36
|
|
32
37
|
<h1 align="center">flask-Humanify</h1>
|
@@ -40,10 +45,10 @@ from flask import Flask
|
|
40
45
|
from flask_Humanify import Humanify
|
41
46
|
|
42
47
|
app = Flask(__name__)
|
43
|
-
humanify = Humanify(app)
|
48
|
+
humanify = Humanify(app, challenge_type="one_click", captcha_dataset="ai_dogs")
|
44
49
|
|
45
50
|
# Register the middleware to deny access to bots
|
46
|
-
humanify.register_middleware(action="
|
51
|
+
humanify.register_middleware(action="challenge")
|
47
52
|
|
48
53
|
@app.route("/")
|
49
54
|
def index():
|
@@ -57,6 +62,7 @@ if __name__ == "__main__":
|
|
57
62
|
```
|
58
63
|
|
59
64
|
Not using the middleware:
|
65
|
+
|
60
66
|
```python
|
61
67
|
@app.route("/")
|
62
68
|
def index():
|
@@ -64,24 +70,28 @@ def index():
|
|
64
70
|
A route that is protected against bots and DDoS attacks.
|
65
71
|
"""
|
66
72
|
if humanify.is_bot:
|
67
|
-
return humanify.
|
73
|
+
return humanify.challenge()
|
68
74
|
return "Hello, Human!"
|
69
75
|
```
|
70
76
|
|
71
77
|
## Usage
|
72
78
|
|
73
79
|
### Installation
|
80
|
+
|
74
81
|
Install the package with pip:
|
82
|
+
|
75
83
|
```bash
|
76
84
|
pip install flask-humanify --upgrade
|
77
85
|
```
|
78
86
|
|
79
87
|
Import the extension:
|
88
|
+
|
80
89
|
```python
|
81
90
|
from flask_humanify import Humanify
|
82
91
|
```
|
83
92
|
|
84
93
|
Add the extension to your Flask app:
|
94
|
+
|
85
95
|
```python
|
86
96
|
app = Flask(__name__)
|
87
97
|
humanify = Humanify(app)
|
@@ -10,10 +10,16 @@ flask_Humanify.egg-info/requires.txt
|
|
10
10
|
flask_Humanify.egg-info/top_level.txt
|
11
11
|
flask_humanify/__init__.py
|
12
12
|
flask_humanify/humanify.py
|
13
|
-
flask_humanify/
|
13
|
+
flask_humanify/memory_server.py
|
14
|
+
flask_humanify/secret_key.bin
|
14
15
|
flask_humanify/utils.py
|
16
|
+
flask_humanify/datasets/ai_dogs.pkl
|
17
|
+
flask_humanify/datasets/animals.pkl
|
18
|
+
flask_humanify/datasets/characters.pkl
|
15
19
|
flask_humanify/datasets/ipset.json
|
16
20
|
flask_humanify/features/rate_limiter.py
|
17
21
|
flask_humanify/templates/access_denied.html
|
18
|
-
flask_humanify/templates/
|
22
|
+
flask_humanify/templates/audio_challenge.html
|
23
|
+
flask_humanify/templates/grid_challenge.html
|
24
|
+
flask_humanify/templates/one_click_challenge.html
|
19
25
|
flask_humanify/templates/rate_limited.html
|
Binary file
|
Binary file
|
Binary file
|