nanopy-sync 1.5.3
Blockchain sync tool with LevelDB + SQLite backup
Requires Python: >=3.8
Keywords: blockchain sync nanopy leveldb sqlite backup

# NanoPy Sync

Sync NanoPy blockchain to your local machine with dual storage:
- **LevelDB**: Primary fast key-value store (like geth)
- **SQLite**: Queryable backup with SHA256 verification

## Install

```bash
pip install nanopy-sync
```

## Usage

```bash
# Sync blockchain (downloads all blocks + transactions)
nanopy-sync sync --network testnet

# Live sync (follow new blocks)
nanopy-sync live --network testnet

# Start web explorer (view synced data in browser)
nanopy-sync serve --port 8080

# Check status
nanopy-sync status --network testnet

# Export SHA256 hashes
nanopy-sync export --output hashes.txt

# Verify integrity
nanopy-sync verify

# Search block/tx/address
nanopy-sync search 1000
nanopy-sync search 0x123...abc
```

## Filesystem Scan (NEW in 1.2.0)

```bash
# Scan local folder and compute SHA256 of all files
nanopy-sync scan-local /path/to/folder -e "*.log" -e "node_modules"

# Scan remote server via SSH
nanopy-sync scan-remote ubuntu@51.68.125.99:/home/nvidia -e "*.log"

# List all scans
nanopy-sync scan-list

# Show scan details
nanopy-sync scan-show 1

# Compare two scans (detect changes)
nanopy-sync scan-diff --scan1 1 --scan2 2
```

## Watch Mode (NEW in 1.2.2)

```bash
# Watch folder for changes (auto-scan every 60s)
nanopy-sync watch /path/to/folder --interval 60

# Watch with exclusions
nanopy-sync watch C:\Users\me\Documents -e "*.tmp" -e "*.log"

# Watch password/config files for tampering
nanopy-sync watch /etc --interval 30 -e "*.log"
```

The watch mode:
- Scans immediately on start
- Re-scans every N seconds
- Alerts when files are added/removed/modified
- Shows SHA256 changes for modified files

## Features

- Dual storage: LevelDB (speed) + SQLite (queries)
- SHA256 hash of every block and transaction
- Web explorer UI for browsing local data
- Integrity verification
- Live sync mode
- Address transaction history
- Export/backup capabilities
- **Filesystem SHA256 scanning** (local + SSH remote)
- **Scan diff** to detect file changes
- **Watch mode** for real-time change detection
- **Password dictionary** from SHA256 hashes

## Password Dictionary (NEW in 1.3.0)

```bash
# Scan files to create SHA256 dictionary
nanopy-sync scan-local C:\Users\me\AppData\Roaming\Code

# List dictionary entries
nanopy-sync pwd-list --scan-id 1 --limit 20

# Get password by index (raw SHA256)
nanopy-sync pwd-get --scan-id 1 --index 0

# Get human-readable password
nanopy-sync pwd-get --scan-id 1 --index 0 --human --length 16

# Generate NEW passwords by combining hashes
nanopy-sync pwd-gen --scan-id 1 --seed "github.com" --human

# Generate multiple passwords
nanopy-sync pwd-gen --scan-id 1 --count 5 --human --length 20

# Find password by filename
nanopy-sync pwd-find --scan-id 1 --file "settings.json"
```

## Brute Force Cracker (NEW in 1.3.5)

```bash
# Generate 5000 passwords and store in SQLite + LevelDB
nanopy-sync pwd-gen-db --scan-id 1 --count 5000

# Crack password using stored passwords
nanopy-sync pwd-crack-db "target123" --scan-id 1

# Try combinations of stored passwords
nanopy-sync pwd-crack-db "target123" --combine --depth 2

# Show password database stats
nanopy-sync pwd-stats
```

## LEARNING AI BRUTE FORCE (NEW in 1.4.0)

Self-improving password generator that learns patterns as it runs:

### How it works
- **Genetic algorithms**: Population-based evolution with crossover and mutation
- **Markov chains**: Uses bigram/trigram frequencies to predict next characters
- **Pattern learning**: Analyzes patterns (ULLLDDD, CVCCVV) from generated passwords
- **Position-weighted selection**: Learns character frequency at each position
- **LevelDB persistence**: Learning state is saved and restored between sessions

### Phases
1. **Bootstrap**: Random generation to learn initial patterns
2. **Pattern-based**: Use common patterns with high weights
3. **Weighted**: Position-weighted character selection
4. **Markov**: Bigram/trigram chain generation
5. **Genetic**: Evolve population using crossover and mutation

### Features
- The more you run it, the smarter it gets!
- Learning state persisted in LevelDB (~/.nanopy-sync/learning_ai.ldb)
- Python backend for efficient computation
- JavaScript fallback for offline use

## HASHCAT GPU CRACKING (NEW in 1.5.0)

Crack hashes at GPU speed using hashcat integration:

```bash
# Check if hashcat is installed
nanopy-sync hashcat-check

# Generate hash from password (for testing)
nanopy-sync hashcat-gen "NVIDIA" --type sha256

# Crack SHA256 hash (6 uppercase letters)
nanopy-sync hashcat-crack <hash> --mask ?u?u?u?u?u?u

# Dictionary attack with wordlist
nanopy-sync hashcat-crack <hash> --attack wordlist --wordlist rockyou.txt

# Use scan filenames as wordlist
nanopy-sync hashcat-crack <hash> --attack wordlist --scan-id 1

# Bruteforce all chars, 1-8 length
nanopy-sync hashcat-crack <hash> --min-len 1 --max-len 8
```

## HASHCAT + LEARNING AI (NEW in 1.5.1)

Best of both worlds! Use Learning AI to generate smart wordlists, then crack with hashcat GPU:

```bash
# Crack using AI-generated wordlist + GPU
nanopy-sync hashcat-ai <hash> --length 6

# Force uppercase-only pattern (like NVIDIA)
nanopy-sync hashcat-ai <hash> --pattern UUUUUU

# Generate 500k intelligent candidates
nanopy-sync hashcat-ai <hash> --wordlist-size 500000

# Without brand names
nanopy-sync hashcat-ai <hash> --no-brands
```

## SMART PATTERN MODE (NEW in 1.5.2)

Use learned patterns from LevelDB as hashcat masks - no wordlist files needed!

```bash
# Smart pattern attack (learns from LevelDB)
nanopy-sync hashcat-smart <hash> --length 10

# Limit number of masks to try
nanopy-sync hashcat-smart <hash> --max-masks 100

# Set max time per mask (seconds)
nanopy-sync hashcat-smart <hash> --max-time 30
```

### How it works
1. LevelDB stores learned password patterns (LLDUULLD, UUUUUU, etc.)
2. Patterns converted to hashcat masks (?l?l?d?u?u?l?l?d)
3. Hashcat GPU generates AND tests combinations directly
4. No wordlist files - GPU does all the work!
5. Cracked passwords are learned for future sessions

### Pattern vs Bruteforce
| Password | Full Bruteforce | Smart Pattern |
|----------|-----------------|---------------|
| NVIDIA (6 upper) | 308M combos | 1 mask (?u x6) |
| ee3UtSyo6h (10 mixed) | 839 quadrillions | ~20T per pattern |

### Supported hash types
- MD5, SHA1, SHA256, SHA512
- NTLM, bcrypt
- Keccak-256 (Ethereum)

### Speed comparison
| Method | Speed | NVIDIA (6 chars) |
|--------|-------|------------------|
| JS Learning AI | ~50k/sec | ~1.7 hours |
| Python | ~10k/sec | ~8.5 hours |
| Hashcat GPU | ~20B/sec | **< 1 second** |
| Hashcat AI | Smart + GPU | **instant** (if in wordlist) |
| Smart Pattern | GPU masks | **instant** (if pattern known) |