flitrx commited on
Commit
956819e
·
verified ·
1 Parent(s): f3afaeb

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +6 -4
  2. index.html +759 -19
  3. prompts.txt +2 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Dws
3
- emoji: 💻
4
- colorFrom: blue
5
  colorTo: blue
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: dws
3
+ emoji: 🐳
4
+ colorFrom: purple
5
  colorTo: blue
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,759 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Dark Web Scraper (Simulation)</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .terminal {
11
+ background-color: #1a1a1a;
12
+ color: #00ff00;
13
+ font-family: 'Courier New', monospace;
14
+ border-radius: 8px;
15
+ box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
16
+ }
17
+ .typing {
18
+ border-right: 2px solid #00ff00;
19
+ animation: blink 1s step-end infinite;
20
+ }
21
+ @keyframes blink {
22
+ from, to { border-color: transparent; }
23
+ 50% { border-color: #00ff00; }
24
+ }
25
+ .tor-connected {
26
+ animation: pulse 2s infinite;
27
+ }
28
+ @keyframes pulse {
29
+ 0% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7); }
30
+ 70% { box-shadow: 0 0 0 10px rgba(0, 255, 0, 0); }
31
+ 100% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); }
32
+ }
33
+ .scrollbar-hide::-webkit-scrollbar {
34
+ display: none;
35
+ }
36
+ .modal {
37
+ transition: opacity 0.3s ease;
38
+ }
39
+ </style>
40
+ </head>
41
+ <body class="bg-gray-900 text-gray-100 min-h-screen">
42
+ <!-- Tor Connection Modal -->
43
+ <div id="torModal" class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50 modal hidden">
44
+ <div class="bg-gray-800 rounded-lg p-6 max-w-md w-full mx-4">
45
+ <div class="flex justify-between items-center mb-4">
46
+ <h3 class="text-xl font-bold text-green-500">
47
+ <i class="fas fa-shield-alt mr-2"></i>Tor Connection Required
48
+ </h3>
49
+ <button id="closeModal" class="text-gray-400 hover:text-white">
50
+ <i class="fas fa-times"></i>
51
+ </button>
52
+ </div>
53
+ <div class="mb-4">
54
+ <p class="text-gray-300 mb-4">You need to connect to the Tor network before you can start scraping .onion sites.</p>
55
+
56
+ <div class="bg-gray-700 p-4 rounded-lg mb-4">
57
+ <h4 class="font-semibold text-green-400 mb-2">How to connect to Tor:</h4>
58
+ <ol class="list-decimal pl-5 space-y-2 text-sm">
59
+ <li>Download and install the <a href="https://www.torproject.org/download/" class="text-green-400 hover:underline" target="_blank">Tor Browser</a></li>
60
+ <li>Launch the Tor Browser and wait for connection</li>
61
+ <li>Alternatively, configure your system Tor proxy at 127.0.0.1:9050</li>
62
+ <li>Click "Verify Tor Connection" below</li>
63
+ </ol>
64
+ </div>
65
+
66
+ <div class="flex justify-between">
67
+ <button id="verifyTor" class="bg-green-700 hover:bg-green-600 px-4 py-2 rounded-md">
68
+ <i class="fas fa-check-circle mr-2"></i>Verify Tor Connection
69
+ </button>
70
+ <button id="learnMoreTor" class="bg-gray-700 hover:bg-gray-600 px-4 py-2 rounded-md">
71
+ <i class="fas fa-info-circle mr-2"></i>Learn More
72
+ </button>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ </div>
77
+
78
+ <div class="container mx-auto px-4 py-8">
79
+ <!-- Header -->
80
+ <header class="mb-8">
81
+ <div class="flex justify-between items-center">
82
+ <h1 class="text-3xl font-bold text-green-500">
83
+ <i class="fas fa-spider mr-2"></i> OnionScraper
84
+ </h1>
85
+ <div class="flex items-center space-x-4">
86
+ <div id="torStatus" class="flex items-center">
87
+ <span class="h-3 w-3 rounded-full bg-red-500 mr-2"></span>
88
+ <span>Tor Disconnected</span>
89
+ </div>
90
+ <button id="connectTor" class="bg-green-700 hover:bg-green-600 px-4 py-2 rounded-md">
91
+ <i class="fas fa-plug mr-2"></i>Connect Tor
92
+ </button>
93
+ </div>
94
+ </div>
95
+ <p class="text-gray-400 mt-2">Dark web scraping interface - requires Tor connection</p>
96
+ </header>
97
+
98
+ <!-- Main Content -->
99
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
100
+ <!-- Search Panel -->
101
+ <div class="lg:col-span-1 bg-gray-800 p-6 rounded-lg shadow-lg">
102
+ <h2 class="text-xl font-semibold mb-4 text-green-400">
103
+ <i class="fas fa-search mr-2"></i>Search Parameters
104
+ </h2>
105
+
106
+ <div class="mb-4">
107
+ <label class="block text-gray-300 mb-2">Onion URL</label>
108
+ <div class="flex">
109
+ <span class="inline-flex items-center px-3 rounded-l-md bg-gray-700 text-gray-300">http://</span>
110
+ <input type="text" id="onionUrl" class="flex-1 bg-gray-700 text-gray-200 px-4 py-2 rounded-r-md focus:outline-none focus:ring-2 focus:ring-green-500" placeholder="example.onion">
111
+ </div>
112
+ </div>
113
+
114
+ <div class="mb-4">
115
+ <label class="block text-gray-300 mb-2">Search Depth</label>
116
+ <select id="searchDepth" class="w-full bg-gray-700 text-gray-200 px-4 py-2 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500">
117
+ <option value="1">Surface Level (1 hop)</option>
118
+ <option value="2">Medium (2 hops)</option>
119
+ <option value="3">Deep (3 hops)</option>
120
+ </select>
121
+ </div>
122
+
123
+ <div class="mb-4">
124
+ <label class="block text-gray-300 mb-2">Content Type</label>
125
+ <div class="flex flex-wrap gap-2">
126
+ <label class="inline-flex items-center">
127
+ <input type="checkbox" class="form-checkbox bg-gray-700 text-green-500 rounded focus:ring-green-500" checked>
128
+ <span class="ml-2 text-gray-300">Text</span>
129
+ </label>
130
+ <label class="inline-flex items-center">
131
+ <input type="checkbox" class="form-checkbox bg-gray-700 text-green-500 rounded focus:ring-green-500">
132
+ <span class="ml-2 text-gray-300">Images</span>
133
+ </label>
134
+ <label class="inline-flex items-center">
135
+ <input type="checkbox" class="form-checkbox bg-gray-700 text-green-500 rounded focus:ring-green-500" checked>
136
+ <span class="ml-2 text-gray-300">Links</span>
137
+ </label>
138
+ <label class="inline-flex items-center">
139
+ <input type="checkbox" class="form-checkbox bg-gray-700 text-green-500 rounded focus:ring-green-500">
140
+ <span class="ml-2 text-gray-300">Documents</span>
141
+ </label>
142
+ </div>
143
+ </div>
144
+
145
+ <div class="mb-6">
146
+ <label class="block text-gray-300 mb-2">Keywords (comma separated)</label>
147
+ <textarea id="keywords" class="w-full bg-gray-700 text-gray-200 px-4 py-2 rounded-md h-24 focus:outline-none focus:ring-2 focus:ring-green-500" placeholder="keyword1, keyword2, etc"></textarea>
148
+ </div>
149
+
150
+ <button id="startScrape" class="w-full bg-green-700 hover:bg-green-600 text-white py-3 rounded-md font-semibold flex items-center justify-center disabled:opacity-50" disabled>
151
+ <i class="fas fa-play mr-2"></i>Start Scraping
152
+ </button>
153
+
154
+ <div class="mt-4 text-xs text-gray-400">
155
+ <p><i class="fas fa-exclamation-triangle mr-1"></i> Important notes:</p>
156
+ <ul class="list-disc pl-5 mt-1">
157
+ <li>Requires active Tor connection</li>
158
+ <li>Only scrape legally authorized sites</li>
159
+ <li>Respect site terms of service</li>
160
+ </ul>
161
+ </div>
162
+ </div>
163
+
164
+ <!-- Results Panel -->
165
+ <div class="lg:col-span-2">
166
+ <div class="terminal p-6 rounded-lg h-full flex flex-col">
167
+ <div class="flex justify-between items-center mb-4">
168
+ <h2 class="text-xl font-semibold text-green-400">
169
+ <i class="fas fa-terminal mr-2"></i>Scraping Console
170
+ </h2>
171
+ <div class="flex space-x-2">
172
+ <button id="clearConsole" class="bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded">
173
+ <i class="fas fa-trash-alt mr-1"></i>Clear
174
+ </button>
175
+ <button id="exportResults" class="bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded">
176
+ <i class="fas fa-download mr-1"></i>Export
177
+ </button>
178
+ </div>
179
+ </div>
180
+
181
+ <div id="consoleOutput" class="flex-1 overflow-y-auto scrollbar-hide mb-4 text-sm">
182
+ <div class="mb-2">
183
+ <span class="text-green-500">user@onionscraper:~$</span> Welcome to OnionScraper v1.0.3
184
+ </div>
185
+ <div class="mb-2">
186
+ <span class="text-green-500">user@onionscraper:~$</span> Tor network connection required
187
+ </div>
188
+ <div id="typingIndicator" class="mb-2 typing">
189
+ <span class="text-green-500">user@onionscraper:~$</span>
190
+ </div>
191
+ </div>
192
+
193
+ <div class="relative">
194
+ <span class="absolute left-3 top-3 text-green-500">></span>
195
+ <input id="consoleInput" type="text" class="w-full bg-transparent border border-green-500 text-green-200 px-8 py-2 rounded focus:outline-none" placeholder="Enter console command..." disabled>
196
+ </div>
197
+ </div>
198
+
199
+ <!-- Results Tabs -->
200
+ <div class="mt-6">
201
+ <div class="flex border-b border-gray-700">
202
+ <button class="tab-button px-4 py-2 font-medium text-gray-300 border-b-2 border-transparent hover:text-green-400 hover:border-green-500 active" data-tab="results">
203
+ <i class="fas fa-file-alt mr-2"></i>Results
204
+ </button>
205
+ <button class="tab-button px-4 py-2 font-medium text-gray-300 border-b-2 border-transparent hover:text-green-400 hover:border-green-500" data-tab="links">
206
+ <i class="fas fa-link mr-2"></i>Links
207
+ </button>
208
+ <button class="tab-button px-4 py-2 font-medium text-gray-300 border-b-2 border-transparent hover:text-green-400 hover:border-green-500" data-tab="stats">
209
+ <i class="fas fa-chart-bar mr-2"></i>Statistics
210
+ </button>
211
+ </div>
212
+
213
+ <div id="resultsTab" class="tab-content bg-gray-800 p-4 rounded-b-lg rounded-tr-lg">
214
+ <div class="text-center py-8 text-gray-500">
215
+ <i class="fas fa-database text-4xl mb-2"></i>
216
+ <p>No scraping results yet. Connect to Tor and start a search.</p>
217
+ </div>
218
+ </div>
219
+
220
+ <div id="linksTab" class="tab-content bg-gray-800 p-4 rounded-b-lg rounded-tr-lg hidden">
221
+ <div class="text-center py-8 text-gray-500">
222
+ <i class="fas fa-project-diagram text-4xl mb-2"></i>
223
+ <p>Discovered links will appear here after scraping.</p>
224
+ </div>
225
+ </div>
226
+
227
+ <div id="statsTab" class="tab-content bg-gray-800 p-4 rounded-b-lg rounded-tr-lg hidden">
228
+ <div class="grid grid-cols-2 md:grid-cols-4 gap-4">
229
+ <div class="bg-gray-700 p-4 rounded-lg text-center">
230
+ <div class="text-green-400 text-3xl font-bold">0</div>
231
+ <div class="text-gray-400 text-sm">Pages Scraped</div>
232
+ </div>
233
+ <div class="bg-gray-700 p-4 rounded-lg text-center">
234
+ <div class="text-green-400 text-3xl font-bold">0</div>
235
+ <div class="text-gray-400 text-sm">Links Found</div>
236
+ </div>
237
+ <div class="bg-gray-700 p-4 rounded-lg text-center">
238
+ <div class="text-green-400 text-3xl font-bold">0</div>
239
+ <div class="text-gray-400 text-sm">Keywords Matched</div>
240
+ </div>
241
+ <div class="bg-gray-700 p-4 rounded-lg text-center">
242
+ <div class="text-green-400 text-3xl font-bold">0s</div>
243
+ <div class="text-gray-400 text-sm">Time Elapsed</div>
244
+ </div>
245
+ </div>
246
+ </div>
247
+ </div>
248
+ </div>
249
+ </div>
250
+ </div>
251
+
252
+ <script>
253
+ // Check for Tor connection on page load
254
+ document.addEventListener('DOMContentLoaded', function() {
255
+ checkTorConnection();
256
+ });
257
+
258
+ // Function to check if Tor is running
259
+ async function checkTorConnection() {
260
+ const torStatus = document.getElementById('torStatus');
261
+ const connectButton = document.getElementById('connectTor');
262
+ const startScrape = document.getElementById('startScrape');
263
+
264
+ // Show checking status
265
+ torStatus.innerHTML = `
266
+ <span class="h-3 w-3 rounded-full bg-yellow-500 mr-2"></span>
267
+ <span>Checking Tor...</span>
268
+ `;
269
+
270
+ try {
271
+ // Attempt to connect to Tor's SOCKS proxy (common ports)
272
+ const isConnected = await verifyTorProxy();
273
+
274
+ if (isConnected) {
275
+ // Tor is already running
276
+ torStatus.innerHTML = `
277
+ <span class="h-3 w-3 rounded-full bg-green-500 mr-2 tor-connected"></span>
278
+ <span>Tor Connected</span>
279
+ `;
280
+
281
+ connectButton.innerHTML = '<i class="fas fa-unlink mr-2"></i>Disconnect';
282
+ connectButton.classList.remove('bg-green-700', 'hover:bg-green-600');
283
+ connectButton.classList.add('bg-red-700', 'hover:bg-red-600');
284
+ startScrape.disabled = false;
285
+
286
+ addConsoleMessage('Detected active Tor connection');
287
+ addConsoleMessage('Ready for .onion queries');
288
+ } else {
289
+ // Tor not detected
290
+ torStatus.innerHTML = `
291
+ <span class="h-3 w-3 rounded-full bg-red-500 mr-2"></span>
292
+ <span>Tor Disconnected</span>
293
+ `;
294
+
295
+ connectButton.innerHTML = '<i class="fas fa-plug mr-2"></i>Connect Tor';
296
+ connectButton.classList.remove('bg-red-700', 'hover:bg-red-600');
297
+ connectButton.classList.add('bg-green-700', 'hover:bg-green-600');
298
+ startScrape.disabled = true;
299
+
300
+ addConsoleMessage('No active Tor connection detected');
301
+ showTorModal();
302
+ }
303
+ } catch (error) {
304
+ console.error('Error checking Tor connection:', error);
305
+ torStatus.innerHTML = `
306
+ <span class="h-3 w-3 rounded-full bg-red-500 mr-2"></span>
307
+ <span>Tor Disconnected</span>
308
+ `;
309
+
310
+ addConsoleMessage('Error checking Tor connection');
311
+ showTorModal();
312
+ }
313
+ }
314
+
315
+ // Function to verify Tor proxy connection
316
+ async function verifyTorProxy() {
317
+ // Try common Tor proxy ports
318
+ const proxyPorts = [9050, 9150, 9051, 9151];
319
+
320
+ for (const port of proxyPorts) {
321
+ try {
322
+ const response = await fetch(`http://127.0.0.1:${port}`, {
323
+ method: 'HEAD',
324
+ mode: 'no-cors',
325
+ cache: 'no-store'
326
+ });
327
+
328
+ // If we get any response (even error), the proxy is running
329
+ return true;
330
+ } catch (error) {
331
+ // Check for specific error that indicates proxy is running but rejecting
332
+ if (error.message.includes('Failed to fetch') ||
333
+ error.message.includes('NetworkError')) {
334
+ // This likely means the proxy is running but rejecting our request
335
+ return true;
336
+ }
337
+ }
338
+ }
339
+
340
+ // Fallback method - check if we can access a known Tor endpoint
341
+ try {
342
+ // This is a simulation - in a real app you would check a Tor-only endpoint
343
+ // For example, try to fetch a .onion site through the proxy
344
+ return false; // Simulation always returns false
345
+ } catch (error) {
346
+ return false;
347
+ }
348
+ }
349
+
350
+ // Show Tor connection modal
351
+ function showTorModal() {
352
+ const modal = document.getElementById('torModal');
353
+ modal.classList.remove('hidden');
354
+ }
355
+
356
+ // Hide Tor connection modal
357
+ function hideTorModal() {
358
+ const modal = document.getElementById('torModal');
359
+ modal.classList.add('hidden');
360
+ }
361
+
362
+ // Modal event listeners
363
+ document.getElementById('closeModal').addEventListener('click', hideTorModal);
364
+ document.getElementById('learnMoreTor').addEventListener('click', function() {
365
+ window.open('https://www.torproject.org/', '_blank');
366
+ });
367
+
368
+ document.getElementById('verifyTor').addEventListener('click', function() {
369
+ addConsoleMessage('Verifying Tor connection...');
370
+ checkTorConnection();
371
+ hideTorModal();
372
+ });
373
+
374
+ // Simulate Tor connection
375
+ document.getElementById('connectTor').addEventListener('click', function() {
376
+ const torStatus = document.getElementById('torStatus');
377
+ const connectButton = this;
378
+ const startScrape = document.getElementById('startScrape');
379
+ const consoleInput = document.getElementById('consoleInput');
380
+
381
+ // Disable button during connection
382
+ connectButton.disabled = true;
383
+ connectButton.innerHTML = '<i class="fas fa-circle-notch fa-spin mr-2"></i>Connecting...';
384
+
385
+ // Simulate connection delay
386
+ setTimeout(() => {
387
+ // Update status
388
+ torStatus.innerHTML = `
389
+ <span class="h-3 w-3 rounded-full bg-green-500 mr-2 tor-connected"></span>
390
+ <span>Tor Connected</span>
391
+ `;
392
+
393
+ // Update button
394
+ connectButton.innerHTML = '<i class="fas fa-unlink mr-2"></i>Disconnect';
395
+ connectButton.classList.remove('bg-green-700', 'hover:bg-green-600');
396
+ connectButton.classList.add('bg-red-700', 'hover:bg-red-600');
397
+ connectButton.disabled = false;
398
+
399
+ // Enable other controls
400
+ startScrape.disabled = false;
401
+ consoleInput.disabled = false;
402
+
403
+ // Add console messages
404
+ addConsoleMessage('Initializing Tor connection...');
405
+ setTimeout(() => addConsoleMessage('Establishing secure circuit...'), 800);
406
+ setTimeout(() => addConsoleMessage('Connected to Tor network (3 hops)'), 1500);
407
+ setTimeout(() => addConsoleMessage('IP masked: 73.249.xx.xxx → 5ekxb6v4en3qyxxx.onion'), 2200);
408
+ setTimeout(() => addConsoleMessage('Ready for .onion queries'), 3000);
409
+
410
+ // Change button behavior for next click (disconnect)
411
+ connectButton.onclick = function() {
412
+ torStatus.innerHTML = `
413
+ <span class="h-3 w-3 rounded-full bg-red-500 mr-2"></span>
414
+ <span>Tor Disconnected</span>
415
+ `;
416
+
417
+ connectButton.innerHTML = '<i class="fas fa-plug mr-2"></i>Connect Tor';
418
+ connectButton.classList.remove('bg-red-700', 'hover:bg-red-600');
419
+ connectButton.classList.add('bg-green-700', 'hover:bg-green-600');
420
+ startScrape.disabled = true;
421
+ consoleInput.disabled = true;
422
+
423
+ addConsoleMessage('Tor connection terminated');
424
+ connectButton.onclick = connectTor.onclick; // Reset to original function
425
+ };
426
+ }, 2000);
427
+ });
428
+
429
+ // Simulate scraping process
430
+ document.getElementById('startScrape').addEventListener('click', function() {
431
+ const onionUrl = document.getElementById('onionUrl').value || 'example.onion';
432
+ const keywords = document.getElementById('keywords').value || 'none';
433
+ const depth = document.getElementById('searchDepth').value;
434
+
435
+ addConsoleMessage(`Starting scrape of http://${onionUrl}`);
436
+ addConsoleMessage(`Parameters: depth=${depth}, keywords=${keywords}`);
437
+ addConsoleMessage('Initializing headless browser through Tor...');
438
+
439
+ // Simulate scraping progress
440
+ const progressMessages = [
441
+ 'Connected to entry node (Germany)',
442
+ 'Connected to middle node (Finland)',
443
+ 'Connected to exit node (Canada)',
444
+ `Loading http://${onionUrl}`,
445
+ 'Analyzing page structure',
446
+ 'Extracting text content',
447
+ 'Finding internal links',
448
+ 'Following links (depth 1)',
449
+ 'Analyzing secondary pages',
450
+ 'Compressing collected data',
451
+ 'Generating report'
452
+ ];
453
+
454
+ let delay = 1500;
455
+ progressMessages.forEach((msg, i) => {
456
+ setTimeout(() => {
457
+ addConsoleMessage(msg);
458
+
459
+ // On last message, show completion
460
+ if (i === progressMessages.length - 1) {
461
+ setTimeout(() => {
462
+ addConsoleMessage(`Scrape completed. Found ${Math.floor(Math.random() * 50) + 10} pages with relevant data.`);
463
+ updateResultsTab();
464
+ updateStatsTab();
465
+ }, 800);
466
+ }
467
+ }, delay);
468
+ delay += 1000 + Math.random() * 1000;
469
+ });
470
+
471
+ // Disable button during operation
472
+ this.disabled = true;
473
+ this.innerHTML = '<i class="fas fa-circle-notch fa-spin mr-2"></i>Scraping...';
474
+
475
+ // Re-enable after simulated operation
476
+ setTimeout(() => {
477
+ this.disabled = false;
478
+ this.innerHTML = '<i class="fas fa-play mr-2"></i>Start Scraping';
479
+ }, delay);
480
+ });
481
+
482
+ // Tab switching
483
+ document.querySelectorAll('.tab-button').forEach(button => {
484
+ button.addEventListener('click', function() {
485
+ // Update active tab button
486
+ document.querySelectorAll('.tab-button').forEach(btn => {
487
+ btn.classList.remove('active', 'border-green-500', 'text-green-400');
488
+ });
489
+ this.classList.add('active', 'border-green-500', 'text-green-400');
490
+
491
+ // Show corresponding tab content
492
+ const tabName = this.getAttribute('data-tab');
493
+ document.querySelectorAll('.tab-content').forEach(content => {
494
+ content.classList.add('hidden');
495
+ });
496
+ document.getElementById(`${tabName}Tab`).classList.remove('hidden');
497
+ });
498
+ });
499
+
500
+ // Console input simulation
501
+ document.getElementById('consoleInput').addEventListener('keypress', function(e) {
502
+ if (e.key === 'Enter') {
503
+ const command = this.value;
504
+ addConsoleMessage(`> ${command}`, 'user-input');
505
+
506
+ // Simulate command responses
507
+ let response = 'Unrecognized command. Type "help" for available commands.';
508
+
509
+ if (command === 'help') {
510
+ response = 'Available commands:\n- status: Show Tor connection status\n- clear: Clear console\n- scan [url]: Start scanning specific URL\n- exit: Disconnect from Tor';
511
+ } else if (command === 'status') {
512
+ response = 'Tor connection active\nCircuit: Germany → Finland → Canada\nBandwidth: 1.2 MB/s\nUptime: 5 minutes';
513
+ } else if (command.startsWith('scan ')) {
514
+ response = `Initiating scan of ${command.substring(5)}...\nThis is a simulation only.`;
515
+ } else if (command === 'clear') {
516
+ document.getElementById('consoleOutput').innerHTML = '';
517
+ this.value = '';
518
+ return;
519
+ } else if (command === 'exit') {
520
+ response = 'Disconnecting from Tor network...';
521
+ setTimeout(() => {
522
+ document.getElementById('connectTor').click();
523
+ }, 1000);
524
+ }
525
+
526
+ addConsoleMessage(response);
527
+ this.value = '';
528
+ }
529
+ });
530
+
531
+ // Clear console
532
+ document.getElementById('clearConsole').addEventListener('click', function() {
533
+ document.getElementById('consoleOutput').innerHTML = `
534
+ <div class="mb-2">
535
+ <span class="text-green-500">user@onionscraper:~$</span> Console cleared
536
+ </div>
537
+ <div id="typingIndicator" class="mb-2 typing">
538
+ <span class="text-green-500">user@onionscraper:~$</span>
539
+ </div>
540
+ `;
541
+ });
542
+
543
+ // Export results (simulated)
544
+ document.getElementById('exportResults').addEventListener('click', function() {
545
+ addConsoleMessage('Preparing export package...');
546
+ setTimeout(() => {
547
+ addConsoleMessage('Export complete: results_export.zip');
548
+
549
+ // Show notification
550
+ const notification = document.createElement('div');
551
+ notification.className = 'fixed bottom-4 right-4 bg-green-700 text-white px-4 py-2 rounded-md shadow-lg flex items-center';
552
+ notification.innerHTML = `
553
+ <i class="fas fa-check-circle mr-2"></i>
554
+ Results exported successfully (simulation)
555
+ `;
556
+ document.body.appendChild(notification);
557
+
558
+ setTimeout(() => {
559
+ notification.remove();
560
+ }, 3000);
561
+ }, 1500);
562
+ });
563
+
564
+ // Helper function to add messages to console
565
+ function addConsoleMessage(message, type = '') {
566
+ const consoleOutput = document.getElementById('consoleOutput');
567
+ const typingIndicator = document.getElementById('typingIndicator');
568
+
569
+ // Create new message element
570
+ const messageElement = document.createElement('div');
571
+ messageElement.className = `mb-2 ${type}`;
572
+
573
+ if (type === 'user-input') {
574
+ messageElement.innerHTML = `<span class="text-green-500">></span> ${message}`;
575
+ } else {
576
+ messageElement.innerHTML = `<span class="text-green-500">user@onionscraper:~$</span> ${message}`;
577
+ }
578
+
579
+ // Insert before typing indicator
580
+ consoleOutput.insertBefore(messageElement, typingIndicator);
581
+
582
+ // Auto-scroll to bottom
583
+ consoleOutput.scrollTop = consoleOutput.scrollHeight;
584
+ }
585
+
586
+ // Simulate updating results tab
587
+ function updateResultsTab() {
588
+ const resultsTab = document.getElementById('resultsTab');
589
+ resultsTab.innerHTML = `
590
+ <div class="space-y-4">
591
+ <div class="bg-gray-700 p-4 rounded-lg">
592
+ <div class="flex justify-between items-center mb-2">
593
+ <h3 class="font-medium text-green-400">http://example.onion/main</h3>
594
+ <span class="text-xs bg-green-900 text-green-300 px-2 py-1 rounded">3 matches</span>
595
+ </div>
596
+ <p class="text-gray-300 text-sm">Sample content extracted from the dark web page. This would contain the actual scraped data in a real implementation. The content might include forum posts, product listings, or other information depending on the site being scraped.</p>
597
+ <div class="mt-2 text-xs text-gray-400">
598
+ <span class="mr-3"><i class="fas fa-link mr-1"></i>12 links found</span>
599
+ <span><i class="fas fa-calendar mr-1"></i>Last updated: 2023-05-15</span>
600
+ </div>
601
+ </div>
602
+
603
+ <div class="bg-gray-700 p-4 rounded-lg">
604
+ <div class="flex justify-between items-center mb-2">
605
+ <h3 class="font-medium text-green-400">http://example.onion/products</h3>
606
+ <span class="text-xs bg-green-900 text-green-300 px-2 py-1 rounded">7 matches</span>
607
+ </div>
608
+ <p class="text-gray-300 text-sm">Another sample of scraped content. This might represent product listings from a dark web marketplace. In a real implementation, this would show actual product names, prices, and descriptions.</p>
609
+ <div class="mt-2 text-xs text-gray-400">
610
+ <span class="mr-3"><i class="fas fa-link mr-1"></i>5 links found</span>
611
+ <span><i class="fas fa-calendar mr-1"></i>Last updated: 2023-06-22</span>
612
+ </div>
613
+ </div>
614
+
615
+ <div class="bg-gray-700 p-4 rounded-lg">
616
+ <div class="flex justify-between items-center mb-2">
617
+ <h3 class="font-medium text-green-400">http://example.onion/forum</h3>
618
+ <span class="text-xs bg-green-900 text-green-300 px-2 py-1 rounded">2 matches</span>
619
+ </div>
620
+ <p class="text-gray-300 text-sm">Forum discussion content would appear here. This might include usernames, timestamps, and discussion threads. Remember that scraping such content may have legal and ethical implications.</p>
621
+ <div class="mt-2 text-xs text-gray-400">
622
+ <span class="mr-3"><i class="fas fa-link mr-1"></i>18 links found</span>
623
+ <span><i class="fas fa-calendar mr-1"></i>Last updated: 2023-07-10</span>
624
+ </div>
625
+ </div>
626
+ </div>
627
+ `;
628
+
629
+ // Also update links tab
630
+ updateLinksTab();
631
+ }
632
+
633
+ function updateLinksTab() {
634
+ const linksTab = document.getElementById('linksTab');
635
+ linksTab.innerHTML = `
636
+ <div class="space-y-3">
637
+ <div class="flex justify-between items-center bg-gray-700 p-3 rounded">
638
+ <span class="text-green-400">http://example.onion/main</span>
639
+ <span class="text-xs bg-gray-600 px-2 py-1 rounded">12 links</span>
640
+ </div>
641
+ <div class="ml-4 pl-4 border-l-2 border-gray-600 space-y-2">
642
+ <div class="flex justify-between items-center bg-gray-700 p-2 rounded text-sm">
643
+ <span>http://example.onion/products</span>
644
+ <span class="text-xs bg-gray-600 px-2 py-1 rounded">visited</span>
645
+ </div>
646
+ <div class="flex justify-between items-center bg-gray-700 p-2 rounded text-sm">
647
+ <span>http://example.onion/forum</span>
648
+ <span class="text-xs bg-gray-600 px-2 py-1 rounded">visited</span>
649
+ </div>
650
+ <div class="flex justify-between items-center bg-gray-700 p-2 rounded text-sm">
651
+ <span>http://example.onion/about</span>
652
+ <span class="text-xs bg-gray-600 px-2 py-1 rounded">pending</span>
653
+ </div>
654
+ </div>
655
+
656
+ <div class="flex justify-between items-center bg-gray-700 p-3 rounded">
657
+ <span class="text-green-400">http://example.onion/products</span>
658
+ <span class="text-xs bg-gray-600 px-2 py-1 rounded">5 links</span>
659
+ </div>
660
+ <div class="ml-4 pl-4 border-l-2 border-gray-600 space-y-2">
661
+ <div class="flex justify-between items-center bg-gray-700 p-2 rounded text-sm">
662
+ <span>http://example.onion/products/item1</span>
663
+ <span class="text-xs bg-gray-600 px-2 py-1 rounded">visited</span>
664
+ </div>
665
+ <div class="flex justify-between items-center bg-gray-700 p-2 rounded text-sm">
666
+ <span>http://example.onion/products/item2</span>
667
+ <span class="text-xs bg-gray-600 px-2 py-1 rounded">visited</span>
668
+ </div>
669
+ </div>
670
+ </div>
671
+ `;
672
+ }
673
+
674
+ function updateStatsTab() {
675
+ const statsTab = document.getElementById('statsTab');
676
+ statsTab.innerHTML = `
677
+ <div class="grid grid-cols-2 md:grid-cols-4 gap-4">
678
+ <div class="bg-gray-700 p-4 rounded-lg text-center">
679
+ <div class="text-green-400 text-3xl font-bold">3</div>
680
+ <div class="text-gray-400 text-sm">Pages Scraped</div>
681
+ </div>
682
+ <div class="bg-gray-700 p-4 rounded-lg text-center">
683
+ <div class="text-green-400 text-3xl font-bold">35</div>
684
+ <div class="text-gray-400 text-sm">Links Found</div>
685
+ </div>
686
+ <div class="bg-gray-700 p-4 rounded-lg text-center">
687
+ <div class="text-green-400 text-3xl font-bold">12</div>
688
+ <div class="text-gray-400 text-sm">Keywords Matched</div>
689
+ </div>
690
+ <div class="bg-gray-700 p-4 rounded-lg text-center">
691
+ <div class="text-green-400 text-3xl font-bold">${Math.floor(Math.random() * 30) + 15}s</div>
692
+ <div class="text-gray-400 text-sm">Time Elapsed</div>
693
+ </div>
694
+ </div>
695
+
696
+ <div class="mt-6 bg-gray-700 p-4 rounded-lg">
697
+ <h3 class="font-medium mb-2 text-green-400">Data Distribution</h3>
698
+ <div class="h-40 flex items-end space-x-1">
699
+ <div class="flex-1 bg-green-500" style="height: 30%"></div>
700
+ <div class="flex-1 bg-green-500" style="height: 70%"></div>
701
+ <div class="flex-1 bg-green-500" style="height: 45%"></div>
702
+ <div class="flex-1 bg-green-500" style="height: 80%"></div>
703
+ <div class="flex-1 bg-green-500" style="height: 25%"></div>
704
+ </div>
705
+ <div class="flex justify-between text-xs text-gray-400 mt-2">
706
+ <span>Main</span>
707
+ <span>Products</span>
708
+ <span>Forum</span>
709
+ <span>About</span>
710
+ <span>Contact</span>
711
+ </div>
712
+ </div>
713
+ `;
714
+ }
715
+
716
+ // Initial typing animation
717
+ const messages = [
718
+ 'Initializing OnionScraper interface...',
719
+ 'Checking system requirements...',
720
+ 'Waiting for Tor connection...'
721
+ ];
722
+
723
+ let msgIndex = 0;
724
+ const typingElement = document.getElementById('typingIndicator');
725
+
726
+ function typeMessage(message, callback) {
727
+ let i = 0;
728
+ typingElement.innerHTML = `<span class="text-green-500">user@onionscraper:~$</span> `;
729
+
730
+ const typingInterval = setInterval(() => {
731
+ if (i < message.length) {
732
+ typingElement.innerHTML += message.charAt(i);
733
+ i++;
734
+ } else {
735
+ clearInterval(typingInterval);
736
+ setTimeout(callback, 1000);
737
+ }
738
+ }, 50);
739
+ }
740
+
741
+ function showNextMessage() {
742
+ if (msgIndex < messages.length) {
743
+ typeMessage(messages[msgIndex], () => {
744
+ const newElement = document.createElement('div');
745
+ newElement.className = 'mb-2';
746
+ newElement.innerHTML = typingElement.innerHTML;
747
+ typingElement.parentNode.insertBefore(newElement, typingElement);
748
+
749
+ msgIndex++;
750
+ showNextMessage();
751
+ });
752
+ }
753
+ }
754
+
755
+ // Start the sequence
756
+ setTimeout(showNextMessage, 1000);
757
+ </script>
758
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=flitrx/dws" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
759
+ </html>
prompts.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ a fuctional website that scrapes dark web for users input and displays the content. must utilize Tor for it to be able to scrape dark web .onion sites.
2
+ modify the code to include a fuctional way to verify for a valid Tor connection on the users end and if so display that the current user has Tor running on their machine, if not then direct user to Connect to tor first and then the user may start scraping