quasarr 1.24.1__py3-none-any.whl → 1.25.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of quasarr might be problematic. Click here for more details.
- quasarr/api/captcha/__init__.py +122 -55
- quasarr/providers/obfuscated.py +15 -15
- quasarr/providers/version.py +1 -1
- quasarr/providers/web_server.py +8 -1
- {quasarr-1.24.1.dist-info → quasarr-1.25.0.dist-info}/METADATA +3 -3
- {quasarr-1.24.1.dist-info → quasarr-1.25.0.dist-info}/RECORD +10 -10
- {quasarr-1.24.1.dist-info → quasarr-1.25.0.dist-info}/WHEEL +0 -0
- {quasarr-1.24.1.dist-info → quasarr-1.25.0.dist-info}/entry_points.txt +0 -0
- {quasarr-1.24.1.dist-info → quasarr-1.25.0.dist-info}/licenses/LICENSE +0 -0
- {quasarr-1.24.1.dist-info → quasarr-1.25.0.dist-info}/top_level.txt +0 -0
quasarr/api/captcha/__init__.py
CHANGED
|
@@ -182,14 +182,28 @@ def setup_captcha_routes(app):
|
|
|
182
182
|
|
|
183
183
|
return f'''
|
|
184
184
|
<div>
|
|
185
|
+
<!-- Info section explaining the process -->
|
|
186
|
+
<div style="background: #1a3a1a; border: 2px solid #2d5a2d; border-radius: 8px; padding: 16px; margin-bottom: 24px;">
|
|
187
|
+
<h3 style="margin-top: 0; color: #6fbf6f;">ℹ️ How This Works:</h3>
|
|
188
|
+
<p style="margin-bottom: 8px;">
|
|
189
|
+
1. Click the link below to open {provider_name}
|
|
190
|
+
</p>
|
|
191
|
+
<p style="margin-top: 0; margin-bottom: 8px;">
|
|
192
|
+
2. Solve any CAPTCHAs on their site to reveal the download links
|
|
193
|
+
</p>
|
|
194
|
+
<p style="margin-top: 0; margin-bottom: 0;">
|
|
195
|
+
3. <b>With the userscript installed</b>, links are automatically sent back to Quasarr!
|
|
196
|
+
</p>
|
|
197
|
+
</div>
|
|
198
|
+
|
|
185
199
|
<!-- One-time setup section - visually separated -->
|
|
186
200
|
<div id="setup-instructions" style="background: #2a2a2a; border: 2px solid #444; border-radius: 8px; padding: 16px; margin-bottom: 24px;">
|
|
187
|
-
<h3 style="margin-top: 0; color: #58a6ff;"
|
|
201
|
+
<h3 style="margin-top: 0; color: #58a6ff;">📦 First Time Setup:</h3>
|
|
188
202
|
<p style="margin-bottom: 8px;">
|
|
189
203
|
<a href="https://www.tampermonkey.net/" target="_blank" rel="noopener noreferrer">1. Install Tampermonkey</a>
|
|
190
204
|
</p>
|
|
191
205
|
<p style="margin-top: 0; margin-bottom: 12px;">
|
|
192
|
-
<a href="{userscript_url}" target="_blank">2. Install
|
|
206
|
+
<a href="{userscript_url}" target="_blank">2. Install the {provider_name} userscript</a>
|
|
193
207
|
</p>
|
|
194
208
|
<p style="margin-top: 0;">
|
|
195
209
|
<button id="hide-setup-btn" type="button" style="background: #444; color: #fff; border: 1px solid #666; padding: 6px 12px; border-radius: 4px; cursor: pointer;">
|
|
@@ -198,29 +212,59 @@ def setup_captcha_routes(app):
|
|
|
198
212
|
</p>
|
|
199
213
|
</div>
|
|
200
214
|
|
|
201
|
-
<!-- Hidden "show instructions"
|
|
215
|
+
<!-- Hidden "show instructions" button -->
|
|
202
216
|
<div id="show-instructions-link" style="display: none; margin-bottom: 16px;">
|
|
203
|
-
<
|
|
217
|
+
<button id="show-setup-btn" type="button" style="background: #444; color: #fff; border: 1px solid #666; padding: 6px 12px; border-radius: 4px; cursor: pointer;">
|
|
218
|
+
ℹ️ Show setup instructions
|
|
219
|
+
</button>
|
|
204
220
|
</div>
|
|
205
221
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
<input type="hidden" name="title" value="{title}" />
|
|
211
|
-
<input type="hidden" name="password" value="{password}" />
|
|
212
|
-
|
|
213
|
-
<div>
|
|
214
|
-
<strong>Paste the download links (one per line):</strong>
|
|
215
|
-
<textarea id="links-input" name="links" rows="5" style="width: 100%; padding: 8px; font-family: monospace; resize: vertical;"></textarea>
|
|
216
|
-
</div>
|
|
222
|
+
<!-- Primary action - the quick transfer link -->
|
|
223
|
+
<p>
|
|
224
|
+
{render_button(f"Open {provider_name} & Get Download Links", "primary", {"onclick": f"location.href='{url_with_quick_transfer_params}'"})}
|
|
225
|
+
</p>
|
|
217
226
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
227
|
+
<!-- Manual submission - collapsible -->
|
|
228
|
+
<div style="margin-top: 20px; padding-top: 20px; border-top: 2px solid #444;">
|
|
229
|
+
<details id="manualSubmitDetails">
|
|
230
|
+
<summary id="manualSubmitSummary" style="cursor: pointer; color: #888;">Show Manual Submission</summary>
|
|
231
|
+
<div style="margin-top: 16px;">
|
|
232
|
+
<p style="color: #888; font-size: 0.9em;">
|
|
233
|
+
If the userscript doesn't work, you can manually paste the links below:
|
|
234
|
+
</p>
|
|
235
|
+
<form id="bypass-form" action="/captcha/bypass-submit" method="post" enctype="multipart/form-data">
|
|
236
|
+
<input type="hidden" name="package_id" value="{package_id}" />
|
|
237
|
+
<input type="hidden" name="title" value="{title}" />
|
|
238
|
+
<input type="hidden" name="password" value="{password}" />
|
|
239
|
+
|
|
240
|
+
<div>
|
|
241
|
+
<strong>Paste the download links (one per line):</strong>
|
|
242
|
+
<textarea id="links-input" name="links" rows="5" style="width: 100%; padding: 8px; font-family: monospace; resize: vertical;"></textarea>
|
|
243
|
+
</div>
|
|
244
|
+
|
|
245
|
+
<div>
|
|
246
|
+
{render_button("Submit", "primary", {"type": "submit"})}
|
|
247
|
+
</div>
|
|
248
|
+
</form>
|
|
249
|
+
</div>
|
|
250
|
+
</details>
|
|
251
|
+
</div>
|
|
222
252
|
</div>
|
|
223
253
|
<script>
|
|
254
|
+
// Handle manual submission toggle text
|
|
255
|
+
const manualDetails = document.getElementById('manualSubmitDetails');
|
|
256
|
+
const manualSummary = document.getElementById('manualSubmitSummary');
|
|
257
|
+
|
|
258
|
+
if (manualDetails && manualSummary) {{
|
|
259
|
+
manualDetails.addEventListener('toggle', () => {{
|
|
260
|
+
if (manualDetails.open) {{
|
|
261
|
+
manualSummary.textContent = 'Hide Manual Submission';
|
|
262
|
+
}} else {{
|
|
263
|
+
manualSummary.textContent = 'Show Manual Submission';
|
|
264
|
+
}}
|
|
265
|
+
}});
|
|
266
|
+
}}
|
|
267
|
+
|
|
224
268
|
// Handle setup instructions hide/show
|
|
225
269
|
const hideSetup = localStorage.getItem('{storage_key}');
|
|
226
270
|
const setupBox = document.getElementById('setup-instructions');
|
|
@@ -239,8 +283,7 @@ def setup_captcha_routes(app):
|
|
|
239
283
|
}});
|
|
240
284
|
|
|
241
285
|
// Show setup instructions again
|
|
242
|
-
document.getElementById('show-setup-btn').addEventListener('click', function(
|
|
243
|
-
e.preventDefault();
|
|
286
|
+
document.getElementById('show-setup-btn').addEventListener('click', function() {{
|
|
244
287
|
localStorage.setItem('{storage_key}', 'false');
|
|
245
288
|
setupBox.style.display = 'block';
|
|
246
289
|
showLink.style.display = 'none';
|
|
@@ -358,6 +401,12 @@ def setup_captcha_routes(app):
|
|
|
358
401
|
</body>
|
|
359
402
|
</html>""")
|
|
360
403
|
|
|
404
|
+
@app.get('/captcha/filecrypt.user.js')
|
|
405
|
+
def serve_filecrypt_user_js():
|
|
406
|
+
content = obfuscated.filecrypt_user_js()
|
|
407
|
+
response.content_type = 'application/javascript'
|
|
408
|
+
return content
|
|
409
|
+
|
|
361
410
|
@app.get('/captcha/junkies.user.js')
|
|
362
411
|
def serve_junkies_user_js():
|
|
363
412
|
sj = shared_state.values["config"]("Hostnames").get("sj")
|
|
@@ -379,12 +428,6 @@ def setup_captcha_routes(app):
|
|
|
379
428
|
response.content_type = 'application/javascript'
|
|
380
429
|
return content
|
|
381
430
|
|
|
382
|
-
@app.get('/captcha/filecrypt.user.js')
|
|
383
|
-
def serve_filecrypt_user_js():
|
|
384
|
-
content = obfuscated.filecrypt_user_js()
|
|
385
|
-
response.content_type = 'application/javascript'
|
|
386
|
-
return content
|
|
387
|
-
|
|
388
431
|
def render_filecrypt_bypass_section(url, package_id, title, password):
|
|
389
432
|
"""Render the bypass UI section for both cutcaptcha and circle captcha pages"""
|
|
390
433
|
|
|
@@ -402,18 +445,32 @@ def setup_captcha_routes(app):
|
|
|
402
445
|
)
|
|
403
446
|
|
|
404
447
|
return f'''
|
|
405
|
-
<div style="margin-top: 40px; padding-top: 20px; border-top: 2px solid #ccc;">
|
|
448
|
+
<div style="margin-top: 40px; padding-top: 20px; border-top: 2px solid #ccc; max-width: 370px; margin-left: auto; margin-right: auto;">
|
|
406
449
|
<details id="bypassDetails">
|
|
407
450
|
<summary id="bypassSummary">Show CAPTCHA Bypass</summary><br>
|
|
408
451
|
|
|
452
|
+
<!-- Info section explaining the process -->
|
|
453
|
+
<div style="background: #1a3a1a; border: 2px solid #2d5a2d; border-radius: 8px; padding: 16px; margin-bottom: 24px;">
|
|
454
|
+
<h3 style="margin-top: 0; color: #6fbf6f;">ℹ️ How This Works:</h3>
|
|
455
|
+
<p style="margin-bottom: 8px;">
|
|
456
|
+
1. Click the button below to open FileCrypt directly
|
|
457
|
+
</p>
|
|
458
|
+
<p style="margin-top: 0; margin-bottom: 8px;">
|
|
459
|
+
2. Solve any CAPTCHAs on their site to reveal the download links
|
|
460
|
+
</p>
|
|
461
|
+
<p style="margin-top: 0; margin-bottom: 0;">
|
|
462
|
+
3. <b>With the userscript installed</b>, links are automatically sent back to Quasarr!
|
|
463
|
+
</p>
|
|
464
|
+
</div>
|
|
465
|
+
|
|
409
466
|
<!-- One-time setup section - visually separated -->
|
|
410
467
|
<div id="setup-instructions" style="background: #2a2a2a; border: 2px solid #444; border-radius: 8px; padding: 16px; margin-bottom: 24px;">
|
|
411
|
-
<h3 style="margin-top: 0; color: #58a6ff;"
|
|
468
|
+
<h3 style="margin-top: 0; color: #58a6ff;">📦 First Time Setup:</h3>
|
|
412
469
|
<p style="margin-bottom: 8px;">
|
|
413
470
|
<a href="https://www.tampermonkey.net/" target="_blank" rel="noopener noreferrer">1. Install Tampermonkey</a>
|
|
414
471
|
</p>
|
|
415
472
|
<p style="margin-top: 0; margin-bottom: 12px;">
|
|
416
|
-
<a href="/captcha/filecrypt.user.js" target="_blank">2. Install
|
|
473
|
+
<a href="/captcha/filecrypt.user.js" target="_blank">2. Install the FileCrypt userscript</a>
|
|
417
474
|
</p>
|
|
418
475
|
<p style="margin-top: 0;">
|
|
419
476
|
<button id="hide-setup-btn" type="button" style="background: #444; color: #fff; border: 1px solid #666; padding: 6px 12px; border-radius: 4px; cursor: pointer;">
|
|
@@ -422,32 +479,43 @@ def setup_captcha_routes(app):
|
|
|
422
479
|
</p>
|
|
423
480
|
</div>
|
|
424
481
|
|
|
425
|
-
<!-- Hidden "show instructions"
|
|
482
|
+
<!-- Hidden "show instructions" button -->
|
|
426
483
|
<div id="show-instructions-link" style="display: none; margin-bottom: 16px;">
|
|
427
|
-
<
|
|
484
|
+
<button id="show-setup-btn" type="button" style="background: #444; color: #fff; border: 1px solid #666; padding: 6px 12px; border-radius: 4px; cursor: pointer;">
|
|
485
|
+
ℹ️ Show setup instructions
|
|
486
|
+
</button>
|
|
428
487
|
</div>
|
|
429
488
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
<input type="hidden" name="title" value="{title}" />
|
|
435
|
-
<input type="hidden" name="password" value="{password}" />
|
|
436
|
-
|
|
437
|
-
<div>
|
|
438
|
-
<strong>Paste the download links (one per line):</strong>
|
|
439
|
-
<textarea id="links-input" name="links" rows="5" style="width: 100%; padding: 8px; font-family: monospace; resize: vertical;"></textarea>
|
|
440
|
-
</div>
|
|
441
|
-
|
|
442
|
-
<div>
|
|
443
|
-
<strong>Or upload DLC file:</strong><br>
|
|
444
|
-
<input type="file" id="dlc-file" name="dlc_file" accept=".dlc" />
|
|
445
|
-
</div>
|
|
489
|
+
<!-- Primary action button -->
|
|
490
|
+
<p>
|
|
491
|
+
{render_button("Open FileCrypt & Get Download Links", "primary", {"onclick": f"location.href='{url_with_quick_transfer_params}'"})}
|
|
492
|
+
</p>
|
|
446
493
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
494
|
+
<!-- Manual submission section -->
|
|
495
|
+
<div style="margin-top: 24px; padding-top: 20px; border-top: 2px solid #444;">
|
|
496
|
+
<p style="color: #888; font-size: 0.9em; margin-bottom: 16px;">
|
|
497
|
+
If the userscript doesn't work, you can manually paste the links or upload a DLC file:
|
|
498
|
+
</p>
|
|
499
|
+
<form id="bypass-form" action="/captcha/bypass-submit" method="post" enctype="multipart/form-data">
|
|
500
|
+
<input type="hidden" name="package_id" value="{package_id}" />
|
|
501
|
+
<input type="hidden" name="title" value="{title}" />
|
|
502
|
+
<input type="hidden" name="password" value="{password}" />
|
|
503
|
+
|
|
504
|
+
<div>
|
|
505
|
+
<strong>Paste the download links (one per line):</strong>
|
|
506
|
+
<textarea id="links-input" name="links" rows="5" style="width: 100%; padding: 8px; font-family: monospace; resize: vertical;"></textarea>
|
|
507
|
+
</div>
|
|
508
|
+
|
|
509
|
+
<div>
|
|
510
|
+
<strong>Or upload DLC file:</strong><br>
|
|
511
|
+
<input type="file" id="dlc-file" name="dlc_file" accept=".dlc" />
|
|
512
|
+
</div>
|
|
513
|
+
|
|
514
|
+
<div>
|
|
515
|
+
{render_button("Submit", "primary", {"type": "submit"})}
|
|
516
|
+
</div>
|
|
517
|
+
</form>
|
|
518
|
+
</div>
|
|
451
519
|
</details>
|
|
452
520
|
</div>
|
|
453
521
|
<script>
|
|
@@ -483,8 +551,7 @@ def setup_captcha_routes(app):
|
|
|
483
551
|
}});
|
|
484
552
|
|
|
485
553
|
// Show setup instructions again
|
|
486
|
-
document.getElementById('show-setup-btn').addEventListener('click', function(
|
|
487
|
-
e.preventDefault();
|
|
554
|
+
document.getElementById('show-setup-btn').addEventListener('click', function() {{
|
|
488
555
|
localStorage.setItem('hideFileCryptSetupInstructions', 'false');
|
|
489
556
|
setupBox.style.display = 'block';
|
|
490
557
|
showLink.style.display = 'none';
|
|
@@ -764,7 +831,7 @@ def setup_captcha_routes(app):
|
|
|
764
831
|
reloadSection.style.display = "block";
|
|
765
832
|
});
|
|
766
833
|
}
|
|
767
|
-
''' + obfuscated.
|
|
834
|
+
''' + obfuscated.cutcaptcha_custom_js() + f'''</script>
|
|
768
835
|
<div>
|
|
769
836
|
<h1><img src="{images.logo}" type="image/png" alt="Quasarr logo" class="logo"/>Quasarr</h1>
|
|
770
837
|
<p id="package-title" style="max-width: 370px; word-wrap: break-word; overflow-wrap: break-word;"><b>Package:</b> {title}</p>
|