flitrx commited on
Commit
94c5fae
·
verified ·
1 Parent(s): 0dd3084

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +302 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Dws3
3
- emoji: 📈
4
- colorFrom: yellow
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: dws3
3
+ emoji: 🐳
4
+ colorFrom: red
5
+ colorTo: pink
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,302 @@
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>OnionScraper - Dark Web Search</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script>
9
+ tailwind.config = {
10
+ theme: {
11
+ extend: {
12
+ colors: {
13
+ neon: {
14
+ green: '#39FF14',
15
+ pink: '#FF10F0',
16
+ blue: '#00F5FF',
17
+ },
18
+ bgray: '#808080',
19
+ }
20
+ }
21
+ }
22
+ }
23
+ </script>
24
+ <style>
25
+ @import url('https://fonts.googleapis.com/css2?family=Major+Mono+Display&family=Share+Tech+Mono&display=swap');
26
+
27
+ body {
28
+ font-family: 'Share Tech Mono', monospace;
29
+ background-color: #808080;
30
+ color: #39FF14;
31
+ }
32
+
33
+ .title-font {
34
+ font-family: 'Major Mono Display', monospace;
35
+ }
36
+
37
+ .neon-glow {
38
+ text-shadow: 0 0 5px #39FF14, 0 0 10px #39FF14;
39
+ }
40
+
41
+ .neon-border {
42
+ box-shadow: 0 0 5px #39FF14, 0 0 10px #39FF14;
43
+ border: 1px solid #39FF14;
44
+ }
45
+
46
+ .neon-btn {
47
+ transition: all 0.3s ease;
48
+ }
49
+
50
+ .neon-btn:hover {
51
+ box-shadow: 0 0 15px #39FF14, 0 0 25px #39FF14;
52
+ transform: translateY(-2px);
53
+ }
54
+
55
+ .result-card {
56
+ transition: all 0.3s ease;
57
+ }
58
+
59
+ .result-card:hover {
60
+ transform: translateY(-5px);
61
+ box-shadow: 0 0 15px #39FF14, 0 0 25px #39FF14;
62
+ }
63
+
64
+ .tor-check {
65
+ animation: pulse 2s infinite;
66
+ }
67
+
68
+ @keyframes pulse {
69
+ 0% {
70
+ box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.7);
71
+ }
72
+ 70% {
73
+ box-shadow: 0 0 0 10px rgba(57, 255, 20, 0);
74
+ }
75
+ 100% {
76
+ box-shadow: 0 0 0 0 rgba(57, 255, 20, 0);
77
+ }
78
+ }
79
+
80
+ .loading {
81
+ display: inline-block;
82
+ width: 20px;
83
+ height: 20px;
84
+ border: 3px solid rgba(57, 255, 20, 0.3);
85
+ border-radius: 50%;
86
+ border-top-color: #39FF14;
87
+ animation: spin 1s ease-in-out infinite;
88
+ }
89
+
90
+ @keyframes spin {
91
+ to { transform: rotate(360deg); }
92
+ }
93
+ </style>
94
+ </head>
95
+ <body class="min-h-screen">
96
+ <div class="container mx-auto px-4 py-8">
97
+ <!-- Header -->
98
+ <header class="text-center mb-12">
99
+ <h1 class="title-font text-5xl md:text-6xl mb-4 neon-glow text-neon-green">OnionScraper</h1>
100
+ <p class="text-xl text-neon-blue">Dark Web Search Engine Interface</p>
101
+ </header>
102
+
103
+ <!-- Tor Status -->
104
+ <div id="torStatus" class="max-w-2xl mx-auto mb-8 p-4 rounded-lg bg-gray-700 text-center">
105
+ <div class="flex justify-center items-center mb-2">
106
+ <div id="torIndicator" class="w-4 h-4 rounded-full bg-red-500 mr-2 tor-check"></div>
107
+ <span id="torStatusText" class="text-neon-pink">Checking Tor connection...</span>
108
+ </div>
109
+ <p id="torInstructions" class="text-neon-blue hidden">
110
+ Please connect to Tor network to use this service.
111
+ <a href="https://www.torproject.org/download/" target="_blank" class="text-neon-green underline">Download Tor Browser</a>
112
+ </p>
113
+ </div>
114
+
115
+ <!-- Search Form -->
116
+ <div class="max-w-3xl mx-auto mb-12">
117
+ <form id="searchForm" class="flex flex-col md:flex-row gap-4">
118
+ <input
119
+ type="text"
120
+ id="searchQuery"
121
+ placeholder="Enter your search query..."
122
+ class="flex-grow px-4 py-3 rounded-lg bg-gray-700 text-neon-green neon-border focus:outline-none focus:ring-2 focus:ring-neon-green"
123
+ disabled
124
+ >
125
+ <button
126
+ type="submit"
127
+ id="searchBtn"
128
+ class="px-6 py-3 rounded-lg bg-gray-700 text-neon-green neon-border neon-btn font-bold disabled:opacity-50 disabled:cursor-not-allowed"
129
+ disabled
130
+ >
131
+ Search Dark Web
132
+ </button>
133
+ </form>
134
+ </div>
135
+
136
+ <!-- Results Section -->
137
+ <div id="resultsSection" class="hidden">
138
+ <h2 class="text-2xl text-neon-pink mb-6 neon-glow">Search Results</h2>
139
+ <div id="resultsContainer" class="grid grid-cols-1 md:grid-cols-2 gap-6">
140
+ <!-- Results will be inserted here -->
141
+ </div>
142
+ <div id="loadingIndicator" class="text-center py-8 hidden">
143
+ <div class="loading mx-auto mb-4"></div>
144
+ <p class="text-neon-blue">Scraping dark web resources...</p>
145
+ </div>
146
+ <div id="noResults" class="text-center py-8 hidden">
147
+ <p class="text-neon-pink">No results found. Try a different search term.</p>
148
+ </div>
149
+ </div>
150
+
151
+ <!-- Footer -->
152
+ <footer class="mt-16 text-center text-sm text-neon-blue">
153
+ <p>Warning: This interface provides access to dark web content. Use at your own risk.</p>
154
+ <p class="mt-2">Always ensure you're using Tor network for anonymity and security.</p>
155
+ </footer>
156
+ </div>
157
+
158
+ <script>
159
+ document.addEventListener('DOMContentLoaded', function() {
160
+ const torStatus = document.getElementById('torStatus');
161
+ const torIndicator = document.getElementById('torIndicator');
162
+ const torStatusText = document.getElementById('torStatusText');
163
+ const torInstructions = document.getElementById('torInstructions');
164
+ const searchForm = document.getElementById('searchForm');
165
+ const searchQuery = document.getElementById('searchQuery');
166
+ const searchBtn = document.getElementById('searchBtn');
167
+ const resultsSection = document.getElementById('resultsSection');
168
+ const resultsContainer = document.getElementById('resultsContainer');
169
+ const loadingIndicator = document.getElementById('loadingIndicator');
170
+ const noResults = document.getElementById('noResults');
171
+
172
+ // Check Tor connectivity
173
+ checkTorConnection();
174
+
175
+ // Function to check Tor connection
176
+ function checkTorConnection() {
177
+ // We'll attempt to fetch a known Tor-only resource
178
+ fetch('https://check.torproject.org/api/ip', {
179
+ method: 'GET',
180
+ mode: 'no-cors'
181
+ })
182
+ .then(() => {
183
+ // If we get here, we're probably not using Tor (since the request would fail otherwise)
184
+ showTorStatus(false);
185
+ })
186
+ .catch(() => {
187
+ // This is the expected path when using Tor
188
+ // Now verify with a more reliable method
189
+ verifyTor();
190
+ });
191
+ }
192
+
193
+ // More reliable Tor verification
194
+ function verifyTor() {
195
+ // Create an image element that points to a Tor-only resource
196
+ const img = new Image();
197
+ img.onload = function() {
198
+ // If the image loads, we're probably using Tor
199
+ showTorStatus(true);
200
+ };
201
+ img.onerror = function() {
202
+ // If the image fails to load, we're not using Tor
203
+ showTorStatus(false);
204
+ };
205
+ img.src = 'http://x.onion/1x1.png';
206
+ }
207
+
208
+ // Update UI based on Tor status
209
+ function showTorStatus(isConnected) {
210
+ if (isConnected) {
211
+ torIndicator.classList.remove('bg-red-500');
212
+ torIndicator.classList.add('bg-green-500');
213
+ torStatusText.textContent = 'Tor connection active';
214
+ torInstructions.classList.add('hidden');
215
+ searchQuery.disabled = false;
216
+ searchBtn.disabled = false;
217
+ } else {
218
+ torIndicator.classList.remove('bg-green-500');
219
+ torIndicator.classList.add('bg-red-500');
220
+ torStatusText.textContent = 'Tor connection not detected';
221
+ torInstructions.classList.remove('hidden');
222
+ searchQuery.disabled = true;
223
+ searchBtn.disabled = true;
224
+ }
225
+ }
226
+
227
+ // Handle search form submission
228
+ searchForm.addEventListener('submit', function(e) {
229
+ e.preventDefault();
230
+ const query = searchQuery.value.trim();
231
+
232
+ if (query) {
233
+ performSearch(query);
234
+ }
235
+ });
236
+
237
+ // Perform the search using ahmia.fi API
238
+ function performSearch(query) {
239
+ // Show loading state
240
+ resultsSection.classList.remove('hidden');
241
+ resultsContainer.innerHTML = '';
242
+ loadingIndicator.classList.remove('hidden');
243
+ noResults.classList.add('hidden');
244
+
245
+ // We need to use a proxy to bypass CORS since ahmia.fi doesn't allow direct access
246
+ const proxyUrl = 'https://cors-anywhere.herokuapp.com/';
247
+ const searchUrl = `https://ahmia.fi/search/?q=${encodeURIComponent(query)}`;
248
+
249
+ fetch(proxyUrl + searchUrl, {
250
+ headers: {
251
+ 'X-Requested-With': 'XMLHttpRequest'
252
+ }
253
+ })
254
+ .then(response => {
255
+ if (!response.ok) throw new Error('Network response was not ok');
256
+ return response.text();
257
+ })
258
+ .then(html => {
259
+ // Parse the HTML response
260
+ const parser = new DOMParser();
261
+ const doc = parser.parseFromString(html, 'text/html');
262
+
263
+ // Extract results
264
+ const resultElements = doc.querySelectorAll('.result');
265
+
266
+ if (resultElements.length > 0) {
267
+ resultElements.forEach(result => {
268
+ const title = result.querySelector('h4 a')?.textContent || 'No title';
269
+ const url = result.querySelector('h4 a')?.href || '#';
270
+ const description = result.querySelector('p')?.textContent || 'No description available';
271
+
272
+ // Create result card
273
+ const resultCard = document.createElement('div');
274
+ resultCard.className = 'result-card p-4 rounded-lg bg-gray-700 neon-border';
275
+ resultCard.innerHTML = `
276
+ <h3 class="text-xl text-neon-green mb-2 truncate">${title}</h3>
277
+ <a href="${url}" target="_blank" rel="noopener noreferrer" class="text-neon-blue text-sm block mb-2 truncate">${url}</a>
278
+ <p class="text-gray-300">${description}</p>
279
+ `;
280
+
281
+ resultsContainer.appendChild(resultCard);
282
+ });
283
+ } else {
284
+ noResults.classList.remove('hidden');
285
+ }
286
+ })
287
+ .catch(error => {
288
+ console.error('Error:', error);
289
+ noResults.textContent = 'Error fetching results. Please try again.';
290
+ noResults.classList.remove('hidden');
291
+ })
292
+ .finally(() => {
293
+ loadingIndicator.classList.add('hidden');
294
+ });
295
+ }
296
+
297
+ // Periodically check Tor connection
298
+ setInterval(checkTorConnection, 30000);
299
+ });
300
+ </script>
301
+ <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/dws3" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
302
+ </html>
prompts.txt ADDED
File without changes