File size: 4,750 Bytes
efb4b95
 
 
 
 
 
 
 
6da26d2
efb4b95
7676cf9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cfa13bc
 
7676cf9
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
---
license: mit
title: Scam Verifier
sdk: gradio
emoji: πŸ’»
colorFrom: blue
colorTo: red
short_description: Verify wether the message is a scam or not
sdk_version: 5.42.0
---
# πŸ›‘οΈ Scam-Signal Verifier

A comprehensive web application that helps users identify potentially fraudulent messages, emails, and advertisements. Perfect for protecting students, elderly individuals, and anyone who wants to stay safe from online scams.

## 🌟 Features

### Multi-Agent Analysis System
- **Claim Extractor**: Parses messages for URLs, phone numbers, emails, and financial amounts
- **Pattern Verifier**: Analyzes content against known scam patterns and suspicious keywords
- **Risk Calculator**: Provides a comprehensive risk score (0-100) with clear classification
- **Human-Friendly Explainer**: Generates actionable recommendations and reporting templates

### Detection Capabilities
- **Phishing Emails**: Bank, PayPal, Amazon verification scams
- **Job Offer Scams**: Work-from-home and "easy money" schemes  
- **Investment Fraud**: Cryptocurrency and get-rich-quick schemes
- **Lottery/Prize Scams**: Fake winnings and inheritance claims
- **Urgency Tactics**: High-pressure language and artificial deadlines
- **Suspicious Domains**: Known malicious and shortened URLs

### User Experience
- Clean, modern interface with gradient design
- Real-time risk assessment with color-coded results
- Pre-loaded example scams for testing
- One-click report template generation
- Mobile-responsive design

## πŸš€ Quick Start

### Local Development
```bash
# Clone the repository
git clone <repository-url>
cd scam-signal-verifier

# Install dependencies
pip install -r requirements.txt

# Run the application
python app.py
```

### Docker Deployment
```bash
# Build the image
docker build -t scam-verifier .

# Run the container
docker run -p 7860:7860 scam-verifier
```

### Hugging Face Spaces
This app is optimized for Hugging Face Spaces deployment:
1. Upload all files to your Spaces repository
2. Set the Space to use Python/Gradio environment
3. The app will automatically start on port 7860

## 🎯 How It Works

### 1. Message Analysis
The system extracts key information from suspicious messages:
- URLs and domain reputation
- Contact information (phone, email)
- Financial references and amounts
- Suspicious keywords and phrases
- Urgency indicators and pressure tactics

### 2. Risk Assessment
Multi-factor scoring algorithm considers:
- **Keyword Score** (0-40 points): Suspicious language patterns
- **Urgency Score** (0-25 points): High-pressure tactics
- **Domain Risk** (0-20 points): Suspicious or shortened URLs
- **Contact Risk** (0-10 points): Multiple contact methods
- **Financial Risk** (0-15 points): Money-related content

### 3. Classification System
- **πŸ”΄ HIGH RISK (80-100)**: Obvious scam, avoid completely
- **🟑 MEDIUM RISK (50-79)**: Suspicious, verify independently  
- **🟒 LOW RISK (25-49)**: Minor concerns, stay cautious
- **βœ… MINIMAL RISK (0-24)**: Appears legitimate

## πŸ“Š Example Results

### High-Risk Phishing Email
```
Risk Score: 95/100 - HIGH RISK
Red Flags:
🚨 Contains 6 suspicious keywords/phrases
🚨 Uses high-pressure urgency tactics  
🚨 Uses suspicious domain: secure-bank-verify.net
🚨 Mentions money/financial transactions

Recommendations:
🚫 Do NOT click any links or provide personal information
πŸ“§ Report this message as spam/phishing
πŸ›‘οΈ Block the sender immediately
```

## πŸ›‘οΈ Safety Features

- **No External API Calls**: All analysis happens locally for privacy
- **Educational Focus**: Teaches users to recognize scam patterns
- **Report Generation**: Creates templates for reporting to authorities
- **Multiple Examples**: Pre-loaded scenarios for learning

## πŸ”§ Technical Stack

- **Backend**: Python Flask with modular analysis engine
- **Frontend**: Responsive HTML/CSS/JavaScript
- **Deployment**: Docker + Gunicorn for production
- **Security**: No data persistence, privacy-focused design

## πŸ“± Mobile Support

The interface is fully responsive and works seamlessly on:
- Desktop browsers
- Mobile phones
- Tablets
- Touch devices

## 🀝 Contributing

This is an educational tool designed to help people stay safe online. Feel free to:
- Report bugs or issues
- Suggest new scam patterns to detect
- Improve the UI/UX design
- Add new analysis features

## πŸ“„ License

Open source educational project. Use responsibly to help others stay safe from online scams.

## ⚠️ Disclaimer

This tool is for educational purposes and general guidance. It should not be the sole method for determining if something is a scam. Always use your best judgment and consult with relevant authorities when needed.

---

**Stay Safe Online! πŸ›‘οΈ**