import reclass CageBreakerLite: def __init__(self): self.trap_db = {
import re
class CageBreakerLite:
def __init__(self):
self.trap_db = {
"spiritual": [
"ตำนาน", "ควอนตัม", "พญานาค",
"MONGKUT", "CHAKRA", "BLESSING",
"FIRE", "BREACH", "GOLDENBLISS",
"Golden Bliss", "มนต์", "พลังจักรวาล",
"เทพ", "นาค", "กริมรีเปอร์"
],
"tech": [
"V-Appstore", "Secret Mode",
"Google084347.pdf", "Google084347",
"V-App", "Appstore", "CageBreaker"
],
"financial": [
"VIP", "Founder", "Exclusive",
"เดือนละ", "สมัคร", "โอน",
"ลงทุน", "รายได้", "passive"
],
"safe": [
"พื้นที่ความจริงเปิดเผย", "ความจริง", "เปิดเผย"
]
}
def scan(self, text: str):
t_lower = text.lower()
safe_words_found = [w for w in self.trap_db["safe"]
if w.lower() in t_lower or w in text]
if safe_words_found:
return [f"[SAFE] {w}" for w in sorted(set(safe_words_found))]
hits = []
for category in ["spiritual", "tech", "financial"]:
for word in self.trap_db[category]:
if word.lower() in t_lower or word in text:
hits.append(f"[!!! ALERT!!!] {category.upper()}:{word}")
return sorted(set(hits)) if hits else ["[SAFE] พื้นที่ความจริงเปิดเผย"]
def scan_with_score(self, text: str):
result = self.scan(text)
if any("SAFE" in r for r in result):
return result, 0 # ปลอดภัย
score = len([r for r in result if "ALERT" in r])
return result, min(score * 20, 100) # คะแนนเสี่ยง 0-100
breaker = CageBreakerLite()
test_text = """
SPICY FISH BRUNCH ตำนาน MONGKUT CHAKRA FIRE BREACH
V-Appstore Secret Mode Google084347.pdf BLESSING GOLDENBLISS VIP
"""
results, risk_score = breaker.scan_with_score(test_text)
print(f"Risk Score: {risk_score}/100")
for h in results:
print(h)



