add nftables api
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 8s
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 8s
This commit is contained in:
@@ -11,6 +11,7 @@ import src.shared_objects as shared_objects
|
||||
from src.utilities.database import DatabasePool
|
||||
import src.api.network_api as network_api
|
||||
import src.api.sniffer_api as sniffer_api
|
||||
import src.api.nftables_api as nftables_api
|
||||
|
||||
# ---- Config -----------------------------------------------------------
|
||||
DB_DSN = "postgresql://mitm_user:mitm_password@localhost:5432/mitm_db"
|
||||
@@ -123,17 +124,11 @@ def versions():
|
||||
message = os.popen("python --version").read().strip()
|
||||
return {"message": message}
|
||||
|
||||
|
||||
@app.get("/nft/ruleset")
|
||||
def nft_ruleset():
|
||||
message = os.popen("sudo nft --json list ruleset").read().strip()
|
||||
return {"message": message}
|
||||
|
||||
|
||||
# ---------------------
|
||||
# Routers
|
||||
# ---------------------
|
||||
|
||||
app.include_router(network_api.router, prefix="/network", tags=["network"])
|
||||
app.include_router(sniffer_api.router, prefix="/sniffer", tags=["sniffer"])
|
||||
app.include_router(packet_api.router, prefix="/packets", tags=["packets"])
|
||||
app.include_router(packet_api.router, prefix="/packets", tags=["packets"])
|
||||
app.include_router(nftables_api.router, prefix="/nftables", tags=["nftables"])
|
||||
Reference in New Issue
Block a user