Skip to main content

WAF Middleware for Flask

Đây là thư viện tường lửa ứng dụng Web (WAF) mạnh mẽ dành cho Flask, được xây dựng như một đồ án chuyên ngành.

Tính năng Chính

  • Chống Injection: Ngăn chặn SQL Injection, Command Injection.
  • Chống Web Attacks: XSS (Cross-Site Scripting), LFI (Local File Inclusion).
  • Phòng thủ Logic:
    • Honeypot: Bẫy hacker và tự động Ban IP.
    • GeoIP: Chặn truy cập từ các quốc gia không mong muốn.
    • Anti-CSRF: Bảo vệ người dùng khỏi giả mạo request.
  • Chống DDoS: Rate Limiting (Giới hạn tần suất truy cập).
  • Hệ thống Cảnh báo: Tích hợp Bot Telegram báo cáo thời gian thực.

Cài đặt

Bạn có thể cài đặt thư viện thông qua file .whl (đã đóng gói):

pip install waf_middleware-1.0.0-py3-none-any.whl
Hướng dẫn Sử dụng
Tích hợp WAF vào ứng dụng Flask của bạn chỉ với 2 dòng code:

Python

from flask import Flask
from waf_middleware import Firewall

app = Flask(__name__)

# Cấu hình Secret Key (Bắt buộc cho Session)
app.config['SECRET_KEY'] = 'your-secret-key'

# Khởi chạy WAF
# Lưu ý: Điền Token Telegram trong file cấu hình nếu muốn nhận cảnh báo
waf = Firewall(app)

@app.route('/')
def index():
    return "Web này đã được bảo vệ bởi WAF Middleware!"

if __name__ == "__main__":
    app.run(debug=True)
Yêu cầu hệ thống
Python 3.8+

Flask

SQLAlchemy

Requests

Tác giả: Nguyễn Hoài Thoại

Metadata

Release files for waf-middleware-hoaithoai35 1.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for waf-middleware-hoaithoai35 1.1.9
File Size Uploaded Provenance Actions
waf_middleware_hoaithoai35-1.1.9.tar.gz 8.9 kB Without provenance Details for waf_middleware_hoaithoai35-1.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for waf-middleware-hoaithoai35 1.1.9
File Interpreter ABI Platform Actions
waf_middleware_hoaithoai35-1.1.9-py3-none-any.whl Python 3 none any Details for waf_middleware_hoaithoai35-1.1.9-py3-none-any.whl

Total release size: 18.2 kB

Release files / waf_middleware_hoaithoai35-1.1.9.tar.gz

Download URL waf_middleware_hoaithoai35-1.1.9.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cfc4065366be6253ee427099dc55727fcbea9cdadd0f3166a63056f7291be1ba
BLAKE2b-256 checksum
How to use checksums
c348f237bb1907c536285772b0f7ee2ecfa12c1270b9949cae50d1d6bbe082c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / waf_middleware_hoaithoai35-1.1.9-py3-none-any.whl

Download URL waf_middleware_hoaithoai35-1.1.9-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf2e2d75ec4f1185ac85901d079f2036d29601a468559b8b624e864f23c4c647
BLAKE2b-256 checksum
How to use checksums
e0d2e3f9cd881a65481331d3255db136044f149cfa3dda95eef36c1627405222
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for waf-middleware-hoaithoai35 1.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.9 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page