From 8e72b4e879726f8b889f8900ba0aa09beeb29212 Mon Sep 17 00:00:00 2001 From: Mohammad salman Date: Tue, 22 Apr 2025 23:31:35 +0530 Subject: [PATCH] pfSense --- docs/http.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docs/http.md diff --git a/docs/http.md b/docs/http.md new file mode 100644 index 0000000..f2ea9b9 --- /dev/null +++ b/docs/http.md @@ -0,0 +1,18 @@ +import random +from datetime import datetime + +if "action" in execution['input']: + print("Simulating pfSense API...") + return { + "status": "success", + "data": { + "id": f"fwrule_{random.randint(1000,9999)}", + "action": execution['input']['action'], + "src": execution['input'].get('src_ip', 'any'), + "dst": execution['input'].get('dst_ip', 'any'), + "protocol": execution['input'].get('protocol', 'tcp'), + "timestamp": datetime.now().isoformat() + } + } +else: + return {"error": "Missing action parameter"}