mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-08-01 16:40:24 +00:00
Place useful parts of the surrounding repos into sica-fondt by layer, per the
body model (Ada = membrane; brain/endocrine/capabilities/knowledge non-Ada):
- brain/ LLM reasoning + providers (dapr, hermes, MoMoA)
- capabilities/ REPRAG sidecars: hermes tools/skills, dapr tools, parallel
dispatch, A51 channels, and the OSINT cluster
- knowledge/ LORAG corpus: 754 cyber-skills, agency personas, secure-coding,
MITRE ATT&CK data
- reference/ defensive threat-reference (C3, shhbruh doc) + AdaYaml parser
License handling: AGPL sources (worldosint, advanced_evolution, mercury,
Reticulum) and GPL DeTTECT are SPEC-only clean-room/port descriptions — no
copyleft code copied. MIT/Apache/data parts copied as working trees.
Safety: shhbruh escape/persistence material and C3 covert-C2 kept as reference
only, not wired into the running organism. See CONSOLIDATION.md.
https://claude.ai/code/session_01UehUqEXXJJCsHoA4voCU5c
2.7 KiB
2.7 KiB
API Reference: Email Header Analysis Tools
Python email Module
Parsing EML Files
import email
from email import policy
with open("phishing.eml", "r") as f:
msg = email.message_from_file(f, policy=policy.default)
msg["From"] # From header
msg["To"] # To header
msg["Subject"] # Subject line
msg["Message-ID"] # Unique message identifier
msg["Reply-To"] # Reply-To address
msg["Return-Path"] # Envelope sender
msg.get_all("Received") # All Received headers (list)
msg.get_all("Authentication-Results") # Auth results
Body and Attachment Extraction
body = msg.get_body(preferencelist=("html", "plain"))
content = body.get_content()
for part in msg.walk():
if part.get_content_disposition() == "attachment":
filename = part.get_filename()
data = part.get_payload(decode=True)
dig - DNS Record Lookup
SPF Record
dig TXT example.com +short
# Output: "v=spf1 include:_spf.google.com ~all"
DKIM Record
dig TXT selector1._domainkey.example.com +short
DMARC Record
dig TXT _dmarc.example.com +short
# Output: "v=DMARC1; p=reject; rua=mailto:dmarc@example.com"
pyspf - SPF Validation (Python)
Syntax
import spf
result, explanation = spf.check2(
i="203.0.113.45", # Sending IP
s="sender@example.com", # Envelope sender
h="mail.example.com" # HELO hostname
)
# Results: pass, fail, softfail, neutral, none, temperror, permerror
dkimpy - DKIM Verification (Python)
Syntax
import dkim
with open("email.eml", "rb") as f:
message = f.read()
result = dkim.verify(message)
# Returns True/False
AbuseIPDB - IP Reputation
API Endpoint
curl -G "https://api.abuseipdb.com/api/v2/check" \
-H "Key: YOUR_API_KEY" \
-H "Accept: application/json" \
-d "ipAddress=203.0.113.45" -d "maxAgeInDays=90"
Response Fields
| Field | Description |
|---|---|
abuseConfidenceScore |
0-100 confidence of abuse |
totalReports |
Number of abuse reports |
countryCode |
Source country |
isp |
Internet service provider |
VirusTotal - Domain/URL Reputation
Domain Lookup
curl -H "x-apikey: YOUR_KEY" \
"https://www.virustotal.com/api/v3/domains/suspicious.com"
URL Scan
curl -X POST "https://www.virustotal.com/api/v3/urls" \
-H "x-apikey: YOUR_KEY" \
-d "url=http://suspicious-url.com/login"
whois - Domain Registration
Syntax
whois suspicious-domain.com
Key Fields
Registrar- Domain registrarCreation Date- When domain was registeredRegistrant- Domain owner infoName Server- Authoritative DNS servers