# NEXUS OSINT Configuration Guide

## Using the --config Flag

The `--config` flag provides an interactive menu to configure your NEXUS OSINT tool settings.

### Basic Usage

```bash
nexus --config
# or
nexus -c
```

### Configuration Options

#### 1. Configure API Keys
Set up your API keys for enhanced functionality:

- **Shodan API Key**: For IP/Domain analysis
- **AbuseIPDB API Key**: For IP reputation checking
- **Hunter API Key**: For email investigation
- **HaveIBeenPwned API Key**: For breach checking

#### 2. Configure Output Settings
Customize how results are saved and displayed:

- **Output Format**: json, txt, csv
- **Verbose Output**: yes/no
- **Auto-save Results**: yes/no
- **Output Directory**: Default is "results"

#### 3. Configure Search Settings
Optimize search performance:

- **Max Concurrent Requests**: 1-50 (default: 20)
- **Request Timeout**: 5-60 seconds (default: 15)
- **Request Delay**: 0.1-5.0 seconds (default: 0.5)

#### 4. View Current Configuration
Display all current settings including configured API keys.

#### 5. Reset to Defaults
Reset all settings to default values.

#### 0. Save and Exit
Save changes and exit the configuration menu.

### Example Configuration Session

```bash
$ nexus --config

=== NEXUS OSINT Configuration ===
Configure your API keys and settings

Configuration Options:
  1. Configure API Keys
  2. Configure Output Settings
  3. Configure Search Settings
  4. View Current Configuration
  5. Reset to Defaults
  0. Save and Exit

Enter your choice (0-5): 1

=== API Key Configuration ===
Enter your API keys (press Enter to skip):

Shodan API Key [[HIDDEN]]: your_shodan_api_key_here
AbuseIPDB API Key [[HIDDEN]]: your_abuseipdb_api_key_here
Hunter API Key [[HIDDEN]]: your_hunter_api_key_here
HaveIBeenPwned API Key []: your_hibp_api_key_here

[+] API keys updated!
```

### Getting API Keys

#### Shodan
1. Visit https://account.shodan.io/
2. Sign up for a free account
3. Get your API key from the dashboard

#### AbuseIPDB
1. Visit https://www.abuseipdb.com/
2. Sign up for a free account
3. Get your API key from the dashboard

#### Hunter
1. Visit https://hunter.io/
2. Sign up for an account
3. Get your API key from the dashboard

#### HaveIBeenPwned
1. Visit https://haveibeenpwned.com/API/Key
2. Purchase an API key (paid service)

### Configuration File

Your settings are saved in `config.json` in the NEXUS OSINT directory. The file contains:

```json
{
  "api_keys": {
    "shodan": "your_api_key",
    "abuseipdb": "your_api_key",
    "hunter": "your_api_key",
    "haveibeenpwned": "your_api_key"
  },
  "output": {
    "format": "json",
    "verbose": true,
    "save_results": true,
    "output_dir": "results"
  },
  "username_search": {
    "max_concurrent": 20,
    "timeout": 15,
    "retry_attempts": 3,
    "request_delay": 0.5
  }
}
```

### Tips

- API keys are hidden in the view for security
- Press Enter to skip any field
- Use Ctrl+C to cancel configuration
- Changes are only saved when you choose "Save and Exit"
- Backup your config.json file before major changes
