-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
209 lines (200 loc) · 7.6 KB
/
Copy pathindex.html
File metadata and controls
209 lines (200 loc) · 7.6 KB
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!doctype html>
<html>
<head>
<title>Scam Analyzer</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="index.css" />
<script type="importmap">
{
"imports": {
"@google/genai": "https://esm.sh/@google/genai@^0.8.0",
"marked": "https://esm.sh/marked@^15.0.8"
}
}
</script>
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
</head>
<body>
<main>
<header>
<h1>Scam Analyzer</h1>
<p>
Your AI-powered shield against digital fraud. Analyze files or
investigate entities online.
</p>
</header>
<!-- Step 1: File Upload -->
<h2>Step 1: Analyze Files (Optional)</h2>
<p class="section-description">
Upload documents, images, or reports to analyze if an app or website is
a potential scam.
</p>
<section class="upload-section">
<label for="file-input" class="file-label"
>Click to select files</label
>
<input
type="file"
id="file-input"
multiple
hidden
accept=".txt,.pdf,.har,.jpg,.jpeg,.png,.webp"
/>
<ul id="file-list"></ul>
<div id="file-summary"></div>
<div id="file-error-message"></div>
</section>
<button id="analyze-button" class="button-primary" disabled>
Analyze Files
</button>
<div class="divider">OR</div>
<!-- Step 2: Web Investigation -->
<h2>Step 2: Investigate Online (Optional)</h2>
<p class="section-description">
Enter a company name, URL, phone number, or any other detail to
research its legitimacy online.
</p>
<div class="search-input-group">
<input
type="text"
id="search-input"
placeholder="e.g., 'Is ExampleCorp legitimate?', 'example.com', '1-800-555-1234'"
/>
<button id="search-button" class="button-primary">Investigate</button>
</div>
<!-- Thinking process will show here temporarily -->
<section id="thinking-container" aria-live="polite" class="hidden"></section>
<!-- Search-only analysis results -->
<section
id="search-analysis-container"
class="hidden"
aria-live="polite"
></section>
<!-- File analysis results section with tabs -->
<section id="analysis-results" class="hidden">
<h2>File Analysis Report</h2>
<nav class="tabs">
<button class="tab-button active" data-tab="summary-tab">
Summary
</button>
<button class="tab-button" data-tab="details-tab">
Detailed Breakdown
</button>
<button class="tab-button" data-tab="workflow-tab">
Workflow Diagram
</button>
</nav>
<div class="tab-content">
<!-- Summary Tab -->
<div id="summary-tab" class="tab-panel active">
<div class="summary-grid">
<div class="summary-section">
<h3>Verdict</h3>
<p id="summary-verdict"></p>
</div>
<div class="summary-section risk-meter-wrapper">
<h3>Risk-O-Meter</h3>
<div class="risk-gauge-container">
<div class="risk-gauge-background"></div>
<div class="risk-gauge-needle" id="risk-gauge-fill"></div>
<div class="risk-gauge-center-pivot"></div>
</div>
<div class="risk-label" id="risk-label">Low Risk (0%)</div>
</div>
</div>
<div class="summary-section">
<h3>Threat Vector Analysis</h3>
<div class="threat-vectors">
<div class="threat-vector">
<span class="vector-label">Psychological Tactics</span>
<div class="vector-gauge">
<div class="vector-gauge-fill" id="psych-gauge"></div>
</div>
<span class="vector-score" id="psych-score">0%</span>
</div>
<div class="threat-vector">
<span class="vector-label">Technical Red Flags</span>
<div class="vector-gauge">
<div class="vector-gauge-fill" id="tech-gauge"></div>
</div>
<span class="vector-score" id="tech-score">0%</span>
</div>
<div class="threat-vector">
<span class="vector-label">Financial Scrutiny</span>
<div class="vector-gauge">
<div class="vector-gauge-fill" id="finance-gauge"></div>
</div>
<span class="vector-score" id="finance-score">0%</span>
</div>
<div class="threat-vector">
<span class="vector-label">Communication Analysis</span>
<div class="vector-gauge">
<div class="vector-gauge-fill" id="comm-gauge"></div>
</div>
<span class="vector-score" id="comm-score">0%</span>
</div>
</div>
</div>
<div class="summary-section">
<div class="section-header">
<h3>Key Red Flags</h3>
<button
id="download-red-flags-button"
class="button-secondary hidden"
title="Download as text file"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="currentColor"
viewBox="0 0 16 16"
>
<path
d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5"
/>
<path
d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708z"
/>
</svg>
Download
</button>
</div>
<div id="summary-red-flags"></div>
</div>
</div>
<!-- Detailed Breakdown Tab -->
<div id="details-tab" class="tab-panel content-container"></div>
<!-- Workflow Diagram Tab -->
<div id="workflow-tab" class="tab-panel">
<h2>Suspected Scam Workflow</h2>
<div
id="workflow-diagram-container"
class="content-container"
></div>
</div>
</div>
</section>
<!-- Final Whistleblower Report Section -->
<section id="final-analysis-section" class="hidden">
<h2>Next Step: Generate Whistleblower Report</h2>
<p class="section-description">
You have performed both a file analysis and a web investigation. You
can now combine these findings into a detailed report for authorities.
</p>
<button id="analyze-combined-button" class="button-primary">
Generate Whistleblower Report
</button>
<div
id="whistleblower-container"
class="whistleblower-results content-container"
aria-live="polite"
></div>
<button id="download-report-button" class="button-secondary hidden">
Download Report as Markdown
</button>
</section>
</main>
<script type="module" src="index.tsx"></script>
</body>
</html>