feat(security): deploy OpenCanary honeypot on VLAN 50 with Gotify and Discord alerting
This commit is contained in:
24
scripts/check_snarfhome_response.py
Normal file
24
scripts/check_snarfhome_response.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import urllib.request
|
||||
import ssl
|
||||
import sys
|
||||
|
||||
sys.stdout.reconfigure(encoding='utf-8')
|
||||
|
||||
ctx = ssl.create_default_context()
|
||||
ctx.check_hostname = False
|
||||
ctx.verify_mode = ssl.CERT_NONE
|
||||
|
||||
req = urllib.request.Request("https://snarfhome.snarfnet.net/")
|
||||
try:
|
||||
with urllib.request.urlopen(req, timeout=5, context=ctx) as r:
|
||||
print("Status:", r.getcode())
|
||||
print("Headers:", dict(r.headers))
|
||||
content = r.read().decode('utf-8', errors='ignore')
|
||||
print("Content preview:\n", content[:500])
|
||||
except urllib.error.HTTPError as e:
|
||||
print("HTTPError:", e.code)
|
||||
print("Headers:", dict(e.headers))
|
||||
print("Body:\n", e.read().decode('utf-8', errors='ignore')[:500])
|
||||
except Exception as e:
|
||||
print("Exception:", e)
|
||||
|
||||
Reference in New Issue
Block a user