-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-page.html
More file actions
416 lines (373 loc) · 16.9 KB
/
Copy pathtest-page.html
File metadata and controls
416 lines (373 loc) · 16.9 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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Privately Extension Test Page</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
line-height: 1.6;
}
.test-section {
margin: 20px 0;
padding: 15px;
border: 1px solid #ddd;
border-radius: 5px;
}
.test-section h3 {
color: #333;
margin-top: 0;
}
input, textarea {
width: 100%;
padding: 10px;
margin: 5px 0;
border: 1px solid #ccc;
border-radius: 3px;
}
.test-data {
background-color: #f5f5f5;
padding: 10px;
margin: 10px 0;
border-radius: 3px;
font-family: monospace;
}
[contenteditable] {
border: 1px solid #ccc;
padding: 10px;
min-height: 100px;
background-color: #fff;
}
.category {
background-color: #e8f4fd;
border-left: 4px solid #2196F3;
}
</style>
</head>
<body>
<h1>🔒 Privately Extension Test Page</h1>
<p>This page contains various types of sensitive data to test the Privately extension detection and replacement functionality.</p>
<!-- Email Testing -->
<div class="test-section category">
<h3>📧 Email Addresses</h3>
<input type="email" value="john.doe@company.com">
<input type="email" value="jane_doe123@gmail.com">
<input type="email" value="support@my-company.co.uk">
<div class="test-data">
Test emails: alex.smith@example.org, jane_doe123@gmail.com, support@my-company.co.uk
</div>
</div>
<!-- Phone Testing -->
<div class="test-section category">
<h3>📱 Singapore Phone Numbers</h3>
<input type="tel" value="+65 9123 4567">
<input type="tel" value="65-8234-5678">
<input type="tel" value="91234567">
<input type="tel" value="+65 3123 4567">
<div class="test-data">
Test phones: +65 9123 4567, 65-8234-5678, 91234567, +65 3123 4567
</div>
</div>
<!-- URL Testing -->
<div class="test-section category">
<h3>🌐 URLs</h3>
<input type="url" value="https://google.com">
<input type="url" value="http://github.com">
<input type="url" value="www.facebook.com">
<input type="url" value="https://www.linkedin.com/profile">
<div class="test-data">
Test URLs: https://google.com, http://github.com, www.facebook.com, https://www.linkedin.com/profile
</div>
</div>
<!-- IP Address Testing -->
<div class="test-section category">
<h3>🌍 IP Addresses</h3>
<input type="text" value="192.168.1.100">
<input type="text" value="10.0.0.1">
<input type="text" value="172.16.0.5">
<input type="text" value="203.116.43.22">
<div class="test-data">
Test IPs: 192.168.1.100, 10.0.0.1, 172.16.0.5, 203.116.43.22, 2001:db8::1
</div>
</div>
<!-- NRIC Testing -->
<div class="test-section category">
<h3>🆔 Singapore NRIC</h3>
<input type="text" value="S1234567A">
<input type="text" value="T9876543B">
<input type="text" value="F5555555C">
<input type="text" value="G1111111D">
<div class="test-data">
Test NRICs: S1234567A, T9876543B, F5555555C, G1111111D, M2222222E
</div>
</div>
<!-- UEN Testing -->
<div class="test-section category">
<h3>🏢 Singapore UEN</h3>
<input type="text" value="12345678A">
<input type="text" value="123456789B">
<input type="text" value="T12AB3456C">
<input type="text" value="S34CD5678E">
<div class="test-data">
Test UENs: 12345678A, 123456789B, T12AB3456C, S34CD5678E, R56EF7890F
</div>
</div>
<!-- Postal Code Testing -->
<div class="test-section category">
<h3>📮 Singapore Postal Codes</h3>
<input type="text" value="123456">
<input type="text" value="567890">
<input type="text" value="238900">
<input type="text" value="018989">
<div class="test-data">
Test postal codes: 123456, 567890, 238900, 018989, 654321
</div>
</div>
<!-- Credit Card Testing -->
<div class="test-section category">
<h3>💳 Credit Card Numbers</h3>
<input type="text" value="4242 4242 4242 4242">
<input type="text" value="5555555555554444">
<input type="text" value="4111-1111-1111-1111">
<input type="text" value="378282246310005">
<div class="test-data">
Test cards: 4242 4242 4242 4242, 5555555555554444, 4111-1111-1111-1111, 378282246310005
</div>
</div>
<!-- IBAN Testing -->
<div class="test-section category">
<h3>🏦 IBAN Numbers</h3>
<input type="text" value="GB82WEST12345698765432">
<input type="text" value="DE89370400440532013000">
<input type="text" value="FR1420041010050500013M02606">
<div class="test-data">
Test IBANs: GB82WEST12345698765432, DE89370400440532013000, FR1420041010050500013M02606
</div>
</div>
<!-- JWT Testing -->
<div class="test-section category">
<h3>🔑 JWT Tokens</h3>
<input type="text" value="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.signature" style="font-family: monospace; font-size: 12px;">
<div class="test-data">
Test JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
</div>
</div>
<!-- AWS Key Testing -->
<div class="test-section category">
<h3>☁️ AWS Access Keys</h3>
<input type="text" value="AKIAIOSFODNN7EXAMPLE">
<input type="text" value="AKIAI44QH8DHBEXAMPLE">
<input type="text" value="AKIA1234567890ABCDEF">
<div class="test-data">
Test AWS keys: AKIAIOSFODNN7EXAMPLE, AKIAI44QH8DHBEXAMPLE, AKIA1234567890ABCDEF
</div>
</div>
<!-- Secret Testing -->
<div class="test-section category">
<h3>🔐 Secrets & API Keys</h3>
<input type="text" value='api_key="sk_live_1234567890abcdef"'>
<input type="text" value="password=MySecretPass123">
<input type="text" value="token: bearer_abc123xyz789">
<div class="test-data">
Test secrets: api_key="sk_live_1234567890abcdef", password=MySecretPass123, token: bearer_abc123xyz789
</div>
</div>
<!-- Private Key Testing -->
<div class="test-section category">
<h3>🗝️ Private Keys</h3>
<textarea>-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA1234567890abcdefghijklmnopqrstuvwxyz
-----END RSA PRIVATE KEY-----</textarea>
<div class="test-data">
Test private key:
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA1234567890abcdefghijklmnopqrstuvwxyz
-----END RSA PRIVATE KEY-----
</div>
</div>
<!-- Auth Header Testing -->
<div class="test-section category">
<h3>🔒 Authorization Headers</h3>
<input type="text" value="Authorization: Bearer eyJhbGci">
<input type="text" value="Authorization: Basic dXNlcjpwYXNz">
<div class="test-data">
Test headers: Authorization: Bearer eyJhbGci, Authorization: Basic dXNlcjpwYXNz
</div>
</div>
<!-- Cookie Testing -->
<div class="test-section category">
<h3>🍪 Set-Cookie Headers</h3>
<input type="text" value="Set-Cookie: sessionid=abcd1234; HttpOnly">
<input type="text" value="Set-Cookie: auth_token=xyz789">
<div class="test-data">
Test cookies: Set-Cookie: sessionid=abcd1234; HttpOnly, Set-Cookie: auth_token=xyz789
</div>
</div>
<!-- File Path Testing -->
<div class="test-section category">
<h3>📁 File Paths</h3>
<input type="text" value="/home/user/documents/secret.txt">
<input type="text" value="C:\Users\John\Documents\private.doc">
<input type="text" value="/var/log/sensitive.log">
<div class="test-data">
Test paths: /home/user/documents/secret.txt, C:\Users\John\Documents\private.doc, /var/log/sensitive.log
</div>
</div>
<!-- UUID Testing -->
<div class="test-section category">
<h3>🆔 UUIDs</h3>
<input type="text" value="550e8400-e29b-41d4-a716-446655440000">
<input type="text" value="6ba7b810-9dad-11d1-80b4-00c04fd430c8">
<div class="test-data">
Test UUIDs: 550e8400-e29b-41d4-a716-446655440000, 6ba7b810-9dad-11d1-80b4-00c04fd430c8
</div>
</div>
<!-- Base64 Testing -->
<div class="test-section category">
<h3>📋 Base64 Long Strings</h3>
<input type="text" value="VGhpcyBpcyBhIHZlcnkgbG9uZyBiYXNlNjQgZW5jb2RlZCBzdHJpbmcgdGhhdCBzaG91bGQgYmUgZGV0ZWN0ZWQ=" style="font-family: monospace; font-size: 11px;">
<div class="test-data">
Test base64: VGhpcyBpcyBhIHZlcnkgbG9uZyBiYXNlNjQgZW5jb2RlZCBzdHJpbmcgdGhhdCBzaG91bGQgYmUgZGV0ZWN0ZWQ=
</div>
</div>
<!-- Hex Testing -->
<div class="test-section category">
<h3>🔢 Long Hex Strings</h3>
<input type="text" value="deadbeefcafebabe1234567890abcdef9876543210fedcba0987654321abcdef12345678" style="font-family: monospace; font-size: 11px;">
<div class="test-data">
Test hex: deadbeefcafebabe1234567890abcdef9876543210fedcba0987654321abcdef12345678
</div>
</div>
<!-- ContentEditable Testing -->
<div class="test-section category">
<h3>✏️ ContentEditable Field</h3>
<div contenteditable="true">john@example.com, +65 9123 4567, 4242 4242 4242 4242</div>
<div contenteditable="true">https://admin.secret.com, S1234567A, AKIAIOSFODNN7EXAMPLE</div>
<div contenteditable="true">John Smith lives at 123 Main Street and works with Mary Johnson</div>
</div>
<!-- NAME Testing -->
<div class="test-section category">
<h3>👤 Names (ONNX Model)</h3>
<input type="text" value="John Smith">
<input type="text" value="Mary Johnson Wilson">
<input type="text" value="David Chen">
<input type="text" value="Sarah Miller Brown">
<div class="test-data">
Test names: John Smith, Mary Johnson Wilson, David Chen, Sarah Miller Brown
</div>
</div>
<!-- ADDRESS Testing -->
<div class="test-section category">
<h3>🏠 Addresses (ONNX Model)</h3>
<input type="text" value="123 Main Street">
<input type="text" value="456 Orchard Road">
<input type="text" value="789 Marina Boulevard">
<input type="text" value="321 Commonwealth Avenue">
<div class="test-data">
Test addresses: 123 Main Street, 456 Orchard Road, 789 Marina Boulevard, 321 Commonwealth Avenue
</div>
</div>
<!-- Mixed Data Testing -->
<div class="test-section category">
<h3>🔀 Realistic AI Prompt - Customer Support</h3>
<textarea placeholder="Test realistic AI scenario" rows="12">Hi Claude, I need help writing a professional email response to an angry customer. Here are the details:
Customer: John Smith (email: john.smith@techcorp.com, phone: +65 9234 5678)
Issue: Failed payment with card 4532 1234 5678 9012
Order ID: ORD-550e8400-e29b-41d4-a716-446655440000
Customer NRIC: S1234567A for verification
The customer lives at 123 Marina Bay Street, Singapore 018989 and has been trying to reach our support team. His colleague Mary Johnson (mary.j@techcorp.com) also contacted us about this issue.
Our internal system shows:
- API Key: AKIAIOSFODNN7EXAMPLE (used for payment processing)
- Session Token: eyJhbGciOiJIUzI1NiJ9.payload.signature
- Database record: SELECT * FROM customers WHERE nric='S1234567A'
- Server IP: 192.168.1.100 (internal payment gateway)
- Log file: /var/log/payments/failed_transactions.log
Additional context:
- Previous successful payment: 4111 1111 1111 1111
- Bank account: GB82WEST12345698765432
- Authorization header: Authorization: Bearer abc123def456xyz789
Please help me draft a professional apology email that addresses the payment failure and provides next steps. The email should be empathetic but not reveal any internal technical details.</textarea>
</div>
<!-- AI Chat Scenario -->
<div class="test-section category">
<h3>🤖 Realistic AI Chat - Personal Assistant</h3>
<textarea placeholder="Test personal assistant scenario" rows="10">Hey ChatGPT! I'm planning a business trip and need your help organizing everything. Here are my details:
Personal Info:
- Name: David Wilson Chen
- Email: david.wilson@mycompany.org
- Phone: +65 8765 4321
- NRIC: T9876543B
- Address: 456 Orchard Road, Singapore 567890
Travel Details:
- Credit Card: 5555 5555 5555 4444 (for bookings)
- IBAN: DE89370400440532013000 (company account)
- Corporate card: 4000 0000 0000 0002
I need you to help me:
1. Draft emails to clients (including sarah.miller@clientco.com and mike.brown@partners.net)
2. Create expense reports with receipts
3. Plan meetings with colleagues John Anderson and Lisa Thompson
My assistant's contact: jennifer.lee@mycompany.org, phone +65 6123 4567
Can you help create a professional itinerary and draft the necessary communications?</textarea>
</div>
<!-- Data Analysis Prompt -->
<div class="test-section category">
<h3>📊 Realistic AI Prompt - Data Analysis</h3>
<textarea placeholder="Test data analysis scenario" rows="8">I'm working on a customer analysis project and need help with Python code. Here's my sample dataset:
customers = [
{"name": "Alice Johnson", "email": "alice.j@corp.com", "phone": "+65 9111 2222", "nric": "S1111111A", "card": "4242 4242 4242 4242"},
{"name": "Bob Smith Wilson", "email": "bob.smith@company.net", "phone": "+65 8333 4444", "nric": "T2222222B", "card": "5555 5555 5555 4444"},
{"name": "Carol Lee", "email": "carol.lee@business.org", "phone": "+65 9555 6666", "nric": "F3333333C", "address": "789 Raffles Place, Singapore 048621"}
]
Database connection:
- Host: 10.0.0.1
- Auth token: eyJhbGciOiJIUzI1NiJ9.dGVzdA.signature
- API key: AKIAI44QH8DHBEXAMPLE
Can you help me write pandas code to analyze customer spending patterns while ensuring data privacy?</textarea>
</div>
<div style="margin-top: 40px; padding: 20px; background-color: #f0f8ff; border-radius: 5px;">
<h3>🧪 Quick Testing Instructions:</h3>
<ol>
<li><strong>Load the extension</strong> and make sure it's enabled in Chrome</li>
<li><strong>Open browser console</strong> (F12) to see debug logs</li>
<li><strong>Simply click on any input field</strong> - they're pre-filled with test data!</li>
<li><strong>Look for tooltips</strong> that should appear immediately when you focus on a field</li>
<li><strong>Test the Replace button</strong> in the tooltips to see data replacement</li>
<li><strong>Check console logs</strong> for detection details and any errors</li>
<li><strong>Try different fields</strong> to test various data types</li>
</ol>
<div style="margin-top: 15px; padding: 10px; background-color: #e8f5e8; border-radius: 3px;">
<strong>💡 Pro Tips:</strong>
<ul style="margin: 5px 0;">
<li>Each input field contains real test data - just click to activate!</li>
<li>Watch the console for detailed detection logs</li>
<li>Try fields near the browser edges to test tooltip positioning</li>
<li>The contenteditable fields contain multiple data types at once</li>
</ul>
</div>
</div>
<script>
// Add some interactivity for testing
document.addEventListener('DOMContentLoaded', function() {
console.log('Test page loaded - Privately extension should be active');
// Add click handlers to test data boxes for easy copying
document.querySelectorAll('.test-data').forEach(element => {
element.style.cursor = 'pointer';
element.title = 'Click to copy test data';
element.addEventListener('click', function() {
navigator.clipboard.writeText(this.textContent.trim()).then(() => {
const original = this.style.backgroundColor;
this.style.backgroundColor = '#90EE90';
setTimeout(() => {
this.style.backgroundColor = original;
}, 200);
});
});
});
});
</script>
</body>
</html>