Files
navegator/scripts/clonar_perfil.sh
Developer 3253828fef
Tests / Lint (push) Has been cancelled
Tests / Unit Tests (push) Has been cancelled
Tests / E2E Tests (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Initial commit: navegator - Chrome CDP automation for LLMs
Add complete navegator system for stealthy browser automation:
- CDP client with WebSocket communication
- Browser API with navigation, storage, network, runtime
- Stealth flags and anti-detection scripts
- Persistent profile support
- Examples and comprehensive documentation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-24 23:33:07 +01:00

57 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# Script para clonar perfiles y usarlos en paralelo
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Uso: $0 <perfil-origen> <perfil-destino>"
echo ""
echo "Ejemplo:"
echo " $0 usuario-base usuario-clon-1"
echo ""
echo "Esto permite usar el mismo perfil en paralelo:"
echo " ./buscar -q 'golang' -profile usuario-clon-1 &"
echo " ./buscar -q 'python' -profile usuario-clon-2 &"
exit 1
fi
ORIGEN="$1"
DESTINO="$2"
PROFILES_DIR="${3:-$HOME/.navegator/profiles}"
ORIGEN_PATH="$PROFILES_DIR/$ORIGEN"
DESTINO_PATH="$PROFILES_DIR/$DESTINO"
# Verificar que origen existe
if [ ! -d "$ORIGEN_PATH" ]; then
echo "❌ Error: El perfil '$ORIGEN' no existe en $PROFILES_DIR"
exit 1
fi
# Verificar que destino no existe
if [ -d "$DESTINO_PATH" ]; then
echo "⚠️ El perfil '$DESTINO' ya existe. ¿Sobrescribir? (y/N)"
read -r respuesta
if [ "$respuesta" != "y" ] && [ "$respuesta" != "Y" ]; then
echo "Cancelado."
exit 0
fi
rm -rf "$DESTINO_PATH"
fi
# Copiar perfil
echo "📋 Clonando perfil..."
cp -r "$ORIGEN_PATH" "$DESTINO_PATH"
# Limpiar archivos de lock y sesión
echo "🧹 Limpiando locks..."
rm -f "$DESTINO_PATH/SingletonLock"
rm -f "$DESTINO_PATH/SingletonSocket"
rm -f "$DESTINO_PATH/SingletonCookie"
rm -f "$DESTINO_PATH/DevToolsActivePort"
echo "✅ Perfil clonado: $ORIGEN$DESTINO"
echo ""
echo "Ahora puedes usar ambos en paralelo:"
echo " ./buscar -q 'query1' -profile $ORIGEN &"
echo " ./buscar -q 'query2' -profile $DESTINO &"