| """ |
| 🔥 DEMOSTRACIÓN: El "Truco" de Aliah-Plus |
| Cómo desbloquear URLs de PimEyes sin pagar |
| |
| Este script demuestra paso a paso cómo los 3 módulos trabajan juntos. |
| """ |
|
|
| import asyncio |
| import numpy as np |
| import cv2 |
| from pathlib import Path |
| import sys |
|
|
| |
| sys.path.insert(0, str(Path(__file__).parent.parent)) |
|
|
| from src.scrapers.stealth_engine import StealthSearch |
| from src.ocr_extractor import OCRExtractor |
| from src.cross_referencer import CrossReferencer |
|
|
|
|
| def print_banner(): |
| """Imprime banner de inicio""" |
| print(""" |
| ╔══════════════════════════════════════════════════════════════╗ |
| ║ ║ |
| ║ 🔥 ALIAH-PLUS: DEMO DEL BYPASS DE PIMEYES 🔥 ║ |
| ║ ║ |
| ║ Este script demuestra cómo desbloquear URLs de PimEyes ║ |
| ║ sin pagar $29.99/mes usando: ║ |
| ║ ║ |
| ║ 1️⃣ Stealth Scraping (Playwright) ║ |
| ║ 2️⃣ OCR Extraction (EasyOCR + 7 técnicas) ║ |
| ║ 3️⃣ Cross-Referencing (Correlación multi-motor) ║ |
| ║ ║ |
| ╚══════════════════════════════════════════════════════════════╝ |
| """) |
|
|
|
|
| async def demo_pimeyes_bypass(image_path: str): |
| """ |
| Demostración completa del bypass de PimEyes. |
| """ |
| print_banner() |
| |
| print("\n" + "="*70) |
| print("PASO 1: STEALTH SCRAPING DE PIMEYES") |
| print("="*70) |
| |
| print("\n📡 Inicializando Stealth Search Engine...") |
| stealth = StealthSearch(headless=True) |
| print("✓ Stealth mode activado") |
| print(" • Playwright con anti-detección") |
| print(" • Fingerprinting bypass") |
| print(" • Comportamiento humano simulado") |
| |
| print(f"\n🔍 Accediendo a PimEyes con: {image_path}") |
| print(" Esto puede tardar 30-60 segundos...") |
| |
| try: |
| |
| pimeyes_results = await stealth.search_pimeyes_free(image_path) |
| |
| print(f"\n✅ PimEyes accedido exitosamente") |
| print(f"📸 Miniaturas capturadas: {len(pimeyes_results)}") |
| |
| if pimeyes_results: |
| print("\nEjemplo de miniatura capturada:") |
| print(f" • Censurada: {pimeyes_results[0].get('censored', 'Sí')}") |
| print(f" • Texto visible: {pimeyes_results[0].get('text_content', 'N/A')[:50]}...") |
| print(f" • Screenshot disponible: {'Sí' if pimeyes_results[0].get('screenshot') else 'No'}") |
| |
| except Exception as e: |
| print(f"\n⚠️ Error en PimEyes (puede estar bloqueado temporalmente): {e}") |
| print(" Usando datos de ejemplo para la demostración...") |
| |
| |
| pimeyes_results = [ |
| { |
| 'screenshot': np.random.randint(0, 255, (200, 300, 3), dtype=np.uint8).tobytes(), |
| 'text_content': 'onlyfans.com/usuario123', |
| 'censored': True |
| }, |
| { |
| 'screenshot': np.random.randint(0, 255, (200, 300, 3), dtype=np.uint8).tobytes(), |
| 'text_content': 'ejemplo.com', |
| 'censored': True |
| } |
| ] |
| |
| |
| print("\n\n" + "="*70) |
| print("PASO 2: EXTRACCIÓN OCR DE DOMINIOS") |
| print("="*70) |
| |
| print("\n🔍 Inicializando OCR Extractor...") |
| ocr = OCRExtractor(gpu=False) |
| print("✓ EasyOCR cargado") |
| print(" • 7 técnicas de pre-procesamiento") |
| print(" • Detección de texto borroso") |
| print(" • Corrección de errores de OCR") |
| |
| print(f"\n📝 Procesando {len(pimeyes_results)} miniaturas...") |
| |
| all_ocr_domains = [] |
| |
| for idx, pim_result in enumerate(pimeyes_results, 1): |
| print(f"\n Miniatura {idx}/{len(pimeyes_results)}:") |
| |
| |
| |
| |
| |
| text = pim_result.get('text_content', '') |
| |
| |
| if 'onlyfans' in text.lower(): |
| domains = [ |
| {'domain': 'onlyfans.com', 'confidence': 0.89, 'method': 2}, |
| {'domain': 'onlyfans.com/usuario123', 'confidence': 0.76, 'method': 4} |
| ] |
| elif 'ejemplo' in text.lower(): |
| domains = [ |
| {'domain': 'ejemplo.com', 'confidence': 0.82, 'method': 1} |
| ] |
| else: |
| domains = [] |
| |
| if domains: |
| print(f" ✅ Dominios extraídos: {len(domains)}") |
| for d in domains: |
| print(f" • {d['domain']} (confianza: {d['confidence']:.2%}, método: #{d['method']})") |
| all_ocr_domains.extend(domains) |
| else: |
| print(f" ⚠️ No se detectaron dominios") |
| |
| print(f"\n✅ Total de dominios extraídos: {len(all_ocr_domains)}") |
| |
| |
| print("\n\n" + "="*70) |
| print("PASO 3: BÚSQUEDA EN MOTORES ABIERTOS") |
| print("="*70) |
| |
| print("\n🔍 Buscando en Yandex y Bing (sin censura)...") |
| print(" Estos motores NO censuran resultados") |
| |
| try: |
| |
| print("\n → Yandex Images...") |
| yandex_results = await stealth.search_yandex_reverse(image_path) |
| print(f" ✓ Yandex: {len(yandex_results)} resultados") |
| |
| |
| print(" → Bing Images...") |
| bing_results = await stealth.search_bing_reverse(image_path) |
| print(f" ✓ Bing: {len(bing_results)} resultados") |
| |
| except Exception as e: |
| print(f"\n ⚠️ Error en búsquedas: {e}") |
| print(" Usando datos de ejemplo...") |
| |
| |
| yandex_results = [ |
| { |
| 'url': 'https://onlyfans.com/usuario123/photo456.jpg', |
| 'domain': 'onlyfans.com', |
| 'source': 'yandex' |
| }, |
| { |
| 'url': 'https://ejemplo.com/galeria/imagen789.jpg', |
| 'domain': 'ejemplo.com', |
| 'source': 'yandex' |
| }, |
| { |
| 'url': 'https://otro-sitio.com/foto.jpg', |
| 'domain': 'otro-sitio.com', |
| 'source': 'yandex' |
| } |
| ] |
| |
| bing_results = [ |
| { |
| 'url': 'https://ejemplo.com/perfil/foto.png', |
| 'domain': 'ejemplo.com', |
| 'source': 'bing' |
| } |
| ] |
| |
| all_search_results = yandex_results + bing_results |
| print(f"\n✅ Total de resultados abiertos: {len(all_search_results)}") |
| |
| |
| print("\n\n" + "="*70) |
| print("PASO 4: CROSS-REFERENCING (EL TRUCO PRINCIPAL)") |
| print("="*70) |
| |
| print("\n🔗 Correlacionando resultados...") |
| print(" Buscando coincidencias entre:") |
| print(" • Dominios extraídos de PimEyes (OCR)") |
| print(" • URLs encontradas en Yandex/Bing") |
| |
| xref = CrossReferencer() |
| |
| |
| unlocked_urls = xref.match_pimeyes_with_search( |
| pimeyes_results, |
| all_search_results, |
| [d['domain'] for d in all_ocr_domains] |
| ) |
| |
| print(f"\n🎯 Correlaciones encontradas: {len(unlocked_urls)}") |
| |
| |
| print("\n\n" + "="*70) |
| print("✨ RESULTADOS FINALES") |
| print("="*70) |
| |
| if unlocked_urls: |
| print(f"\n🎉 ¡ÉXITO! {len(unlocked_urls)} URLs desbloqueadas de PimEyes") |
| print("\nURLs que PimEyes te cobraría $29.99 para ver:\n") |
| |
| for idx, match in enumerate(unlocked_urls, 1): |
| print(f"\n[{idx}] 🔓 URL DESBLOQUEADA") |
| print(f" PimEyes OCR detectó: {match.get('pimeyes_domain_ocr', 'N/A')}") |
| print(f" Correlacionado con: {match.get('matched_url', 'N/A')}") |
| print(f" Fuente: {match.get('source', 'N/A')}") |
| print(f" Confianza: {match.get('match_confidence', 0):.2%}") |
| print(f" Estado: {'✅ UNLOCKED' if match.get('unlocked') else '❌'}") |
| |
| |
| savings = len(unlocked_urls) * 29.99 |
| print(f"\n💰 Ahorro estimado: ${savings:.2f}") |
| print(f" (PimEyes cobra $29.99/mes para {len(unlocked_urls)} URLs)") |
| |
| else: |
| print("\n⚠️ No se encontraron correlaciones") |
| print(" Posibles razones:") |
| print(" • La imagen no tiene suficientes resultados públicos") |
| print(" • Los dominios de PimEyes no coinciden con búsquedas abiertas") |
| print(" • OCR no pudo extraer dominios de las miniaturas") |
| |
| |
| print("\n\n" + "="*70) |
| print("📊 ESTADÍSTICAS DE LA BÚSQUEDA") |
| print("="*70) |
| |
| print(f"\n• Miniaturas de PimEyes capturadas: {len(pimeyes_results)}") |
| print(f"• Dominios extraídos por OCR: {len(all_ocr_domains)}") |
| print(f"• Resultados de Yandex: {len(yandex_results)}") |
| print(f"• Resultados de Bing: {len(bing_results)}") |
| print(f"• URLs desbloqueadas: {len(unlocked_urls)}") |
| |
| if all_ocr_domains and all_search_results: |
| success_rate = (len(unlocked_urls) / len(all_ocr_domains)) * 100 |
| print(f"• Tasa de éxito: {success_rate:.1f}%") |
| |
| |
| print("\n\n" + "="*70) |
| print("🎓 CÓMO FUNCIONA EL TRUCO") |
| print("="*70) |
| |
| print(""" |
| PimEyes te muestra una miniatura así: |
| ┌─────────────────────────┐ |
| │ [Imagen borrosa] │ |
| │ │ |
| │ onlyfans.com/usuario │ ← Visible pero sin link |
| │ │ |
| │ 🔒 Paga para ver URL │ |
| └─────────────────────────┘ |
| |
| Aliah-Plus hace esto: |
| 1. OCR extrae "onlyfans.com/usuario" de la miniatura |
| 2. Yandex busca la misma cara |
| 3. Yandex encuentra "https://onlyfans.com/usuario/photo.jpg" |
| 4. Cross-referencer ve que ambos son "onlyfans.com" |
| 5. ¡MATCH! → URL completa sin pagar |
| |
| Resultado: |
| ┌─────────────────────────┐ |
| │ ✅ URL DESBLOQUEADA │ |
| │ │ |
| │ https://onlyfans.com/ │ |
| │ usuario/photo.jpg │ |
| │ │ |
| │ Fuente: Yandex │ |
| │ Confianza: 91% │ |
| └─────────────────────────┘ |
| """) |
| |
| |
| print("\n" + "="*70) |
| print("✅ DEMOSTRACIÓN COMPLETADA") |
| print("="*70) |
| |
| print("\n🚀 Para usar en producción:") |
| print(" python app.py") |
| print(" → API disponible en http://localhost:8000") |
| print(" → Documentación en http://localhost:8000/docs") |
| |
| print("\n📚 Más información:") |
| print(" • README.md - Documentación completa") |
| print(" • INTEGRATION_GUIDE.md - Guía de integración") |
| print(" • QUICKSTART.md - Inicio rápido") |
|
|
|
|
| async def main(): |
| """Punto de entrada""" |
| |
| if len(sys.argv) < 2: |
| print(""" |
| Uso: python demo_bypass.py <ruta_imagen> |
| |
| Ejemplo: |
| python demo_bypass.py foto_persona.jpg |
| |
| Este script demostrará cómo Aliah-Plus desbloquea URLs de PimEyes |
| usando OCR y cross-referencing. |
| """) |
| return |
| |
| image_path = sys.argv[1] |
| |
| if not Path(image_path).exists(): |
| print(f"❌ Error: La imagen '{image_path}' no existe") |
| return |
| |
| try: |
| await demo_pimeyes_bypass(image_path) |
| except KeyboardInterrupt: |
| print("\n\n⚠️ Demostración interrumpida por el usuario") |
| except Exception as e: |
| print(f"\n\n❌ Error: {e}") |
| import traceback |
| traceback.print_exc() |
|
|
|
|
| if __name__ == "__main__": |
| print("\n🔥 Iniciando demostración de Aliah-Plus...") |
| asyncio.run(main()) |
|
|