Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,18 @@ pip-delete-this-directory.txt
# Local config / API keys
.env
*.env
.mx_osint_config.json
config.json
secrets.json
keys.json
.mx_osint_config.json
tokens.json
credentials.json
*.local.json
*.config.json
*.key
*.pem

# OS junk
# OS files
.DS_Store
Thumbs.db

Expand Down
44 changes: 31 additions & 13 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Migration Instructions

MeXiCOSINT now uses a production-style `src/` package layout.
MeXiCOSINT now uses a production-style `src/` package layout and an installable console command.

## What changed

- `mexicosint_v2.2.5.py` was replaced by `src/mexicosint/main.py`.
- The command-line entry point is now `src/mexicosint/cli.py`.
- Existing helper modules moved from `modules/` to `src/mexicosint/modules/`.
- The versioned script was replaced by `src/mexicosint/main.py`.
- The command-line interface lives in `src/mexicosint/cli.py`.
- The package entry point is `mexicosint = mexicosint.cli:run` in `pyproject.toml`.
- Existing helper modules live in `src/mexicosint/modules/`.
- Service-facing wrappers live in `src/mexicosint/services/`.
- Shared helpers live in `src/mexicosint/utils/`.
- Package metadata and the console script are defined in `pyproject.toml`.
- Local IFT data moved into `src/mexicosint/data/` so it can be packaged.
- Local IFT data lives in `src/mexicosint/data/` so it can be packaged.
- The legacy `bin/mexicosint` shell launcher was removed; use the installed `mexicosint` command instead.

## Install for development

Expand All @@ -20,27 +21,34 @@ source venv/bin/activate
pip install -e .
```

Optional explicit dependency install for development:

```bash
pip install -r requirements.txt
```

## Run after migration

Use the installed command:

```bash
mexicosint 5512345678
mexicosint --number 5512345678
mexicosint --number +525512345678
mexicosint --ip 8.8.8.8
mexicosint --dummy-test 5512345678
mexicosint -b 5512345678
mexicosint --dummy-test --number 5512345678
mexicosint -b --number 5512345678
```

Run without installing:
The positional number form remains available for compatibility:

```bash
PYTHONPATH=src python3 -m mexicosint 5512345678
mexicosint 5512345678
```

Or use the repository launcher:
Run without installing:

```bash
bash bin/mexicosint 5512345678
PYTHONPATH=src python3 -m mexicosint --number 5512345678
```

## Import changes
Expand All @@ -53,3 +61,13 @@ from mexicosint.modules.ift_sns import consultar
from mexicosint.modules.quienhabla import consultar as consultar_quienhabla
from mexicosint.services.scanner import run_phone_scan
```

## Safe migration steps

1. Create a branch before changing structure.
2. Move source files under `src/mexicosint/`.
3. Convert script execution to `src/mexicosint/cli.py` and `src/mexicosint/main.py`.
4. Configure `pyproject.toml` with the `mexicosint` console script.
5. Install with `pip install -e .` in a virtual environment.
6. Run `mexicosint --number 5512345678` and `PYTHONPATH=src python3 -m mexicosint --number 5512345678`.
7. Remove references to legacy shell launchers from docs and scripts.
51 changes: 26 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ La herramienta puede validar números, analizar formatos mexicanos, consultar fu
- Enriquecimiento opcional mediante APIs externas
- Procesamiento relacionado con IFT/SNS
- Soporte para módulo QuienHabla.mx
- Launcher para ejecutar la herramienta sin escribir el nombre completo del script
- CLI instalable con el comando `mexicosint`
- Configuración local de API keys
- Soporte para reportes o salidas generadas según la versión

Expand All @@ -45,8 +45,6 @@ La herramienta puede validar números, analizar formatos mexicanos, consultar fu

```text
MeXiCOSINT/
├── bin/
│ └── mexicosint
├── docs/
│ ├── INSTALL.md
│ ├── USAGE.md
Expand All @@ -69,6 +67,7 @@ MeXiCOSINT/
│ └── validation.py
├── pyproject.toml
├── requirements.txt
├── MIGRATION.md
├── .gitignore
├── LICENSE
└── README.md
Expand All @@ -82,62 +81,59 @@ Clona el repositorio:

```bash
git clone https://github.com/KiMiGuel/MeXiCOSINT.git
```

Entra a la carpeta del proyecto:

```bash
cd MeXiCOSINT
```

Crea un entorno virtual:
Crea y activa un entorno virtual:

```bash
python3 -m venv venv
```

Activa el entorno virtual:

```bash
source venv/bin/activate
```

Instala las dependencias:
Instala el paquete en modo editable:

```bash
pip install -r requirements.txt
pip install -e .
```

Instala el paquete en modo editable:
También puedes instalar las dependencias explícitas para desarrollo:

```bash
pip install -e .
pip install -r requirements.txt
```

---

## Uso

Ejecuta MeXiCOSINT usando el launcher:
Ejecuta MeXiCOSINT con el comando instalado:

```bash
mexicosint --number 5512345678
mexicosint --number +525512345678
mexicosint -b --number 5512345678
```

El número posicional se mantiene por compatibilidad:

```bash
mexicosint 5512345678
mexicosint -b 5512345678
```

Tambien puedes usar el launcher del repositorio sin instalar el comando global:
Modo IP directo:

```bash
bash bin/mexicosint 5512345678
mexicosint --ip 8.8.8.8
```

O ejecutar el modulo del paquete:
Ejecutar sin instalar el comando global:

```bash
PYTHONPATH=src python3 -m mexicosint 5512345678
PYTHONPATH=src python3 -m mexicosint --number 5512345678
```

Use `-b`, `--compact-banner`, or the legacy `--small-banner` flag to force the compact ASCII banner.
Usa `-b`, `--compact-banner` o el alias heredado `--small-banner` para forzar el banner compacto.

---

Expand All @@ -148,6 +144,7 @@ Use `-b`, `--compact-banner`, or the legacy `--small-banner` flag to force the c
| [Guía de instalación](docs/INSTALL.md) | Instrucciones de instalación para Kali, Debian, Ubuntu y sistemas similares |
| [Guía de uso](docs/USAGE.md) | Uso básico y notas de ejecución |
| [Guía de configuración](docs/CONFIG.md) | Configuración local y manejo de API keys |
| [Migración](MIGRATION.md) | Cambios de estructura para el paquete instalable |

---

Expand Down Expand Up @@ -178,6 +175,10 @@ No subas archivos como:
config.json
secrets.json
keys.json
tokens.json
credentials.json
*.local.json
*.config.json
.mx_osint_config.json
```

Expand Down
16 changes: 0 additions & 16 deletions bin/mexicosint

This file was deleted.

Loading