Spaces:
Runtime error
Runtime error
File size: 669 Bytes
dc8ac8e 4431575 dc8ac8e 4431575 dc8ac8e 4431575 dc8ac8e 4431575 dc8ac8e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | import requests
SERVER = "http://127.0.0.1:7860"
def deploy_honeypot():
try:
requests.post(f"{SERVER}/deploy_honeypot")
except Exception:
pass
return {
"action": "honeypot",
"status": "deployed"
}
def fake_database():
try:
requests.post(f"{SERVER}/fake_database")
except Exception:
pass
return {
"action": "fake_db",
"status": "active"
}
def block_attacker(ip):
try:
requests.post(
f"{SERVER}/block",
json={"ip": ip}
)
except Exception:
pass
return {
"action": "block",
"ip": ip
} |