AI prompts
base on Network reconnaissance and asset discovery tool # Reconya
Network reconnaissance and asset discovery tool built with Go and HTMX.

## Overview
Reconya discovers and monitors devices on your network with real-time updates. Suitable for network administrators, security professionals, and home users.
### Features
- Network scanning with nmap integration
- Device identification (MAC addresses, vendor detection, hostnames)
- Real-time monitoring and event logging
- Web-based dashboard
- Device fingerprinting
## Community
Join our community for support, discussions, and updates:
[](https://discord.gg/rWnz3GJ3)
[](https://www.reddit.com/r/reconya/)
## Important Notice: Docker Implementation Status
ā ļø **Docker networking has been moved to experimental status due to fundamental limitations.**
The fundamental limitation is Docker's network architecture. Even with comprehensive MAC discovery methods, privileged mode, and enhanced capabilities, Docker containers cannot reliably access Layer 2 (MAC address) information across different network segments.
**For full functionality, including complete MAC address discovery, please use the local installation method below.**
Docker files have been moved to the `experimental/` directory for those who want to experiment with containerized deployment, but local installation is the recommended approach.
## Prerequisites
Before installing reconYa, ensure you have the following installed on your system:
- **Go 1.21 or later** - [Download Go](https://golang.org/dl/)
- **Node.js 18 or later** - [Download Node.js](https://nodejs.org/)
- **nmap** - Network scanning tool (instructions below)
## Local Installation (Recommended)
### One-Command Installation
The easiest way to install reconYa with all dependencies:
```bash
git clone https://github.com/Dyneteq/reconya.git
cd reconya
npm run install
```
This will:
- Detect your operating system (macOS, Windows, Debian, or Red Hat-based)
- Install all required dependencies (Go, Node.js, nmap)
- Configure nmap permissions for MAC address detection
- Set up the reconYa application
- Install all Node.js dependencies
**After installation, use these commands:**
```bash
npm run start # Start reconYa
npm run stop # Stop reconYa
npm run status # Check service status
npm run uninstall # Uninstall reconYa
```
Then open your browser to: `http://localhost:3000`
Default login: `admin` / `password`
### Manual Installation
If you prefer to install manually or the script doesn't work on your system:
#### Prerequisites
1. **Install Go** (1.21 or later): https://golang.org/dl/
2. **Install Node.js** (18 or later): https://nodejs.org/
3. **Install nmap**:
```bash
# macOS
brew install nmap
# Ubuntu/Debian
sudo apt-get install nmap
# RHEL/CentOS/Fedora
sudo yum install nmap # or dnf install nmap
```
4. **Grant nmap privileges** (for MAC address detection):
```bash
sudo chown root:admin $(which nmap)
sudo chmod u+s $(which nmap)
```
#### Setup & Run
1. **Clone the repository:**
```bash
git clone https://github.com/Dyneteq/reconya.git
cd reconya
```
2. **Setup backend:**
```bash
cd backend
cp .env.example .env
# Edit .env file to set your network range and credentials
go mod download
```
3. **Start the application:**
```bash
cd backend
go run ./cmd
```
**Windows users:** If you encounter SQLite CGO errors, use:
```bash
cd backend
CGO_ENABLED=1 go run ./cmd
```
Or simply double-click `scripts/start-windows.bat` from the project root.
4. **Access the application:**
- Open your browser to: `http://localhost:3008`
- Default login: `admin` / `password` (check your `.env` file for custom credentials)
## How to Use
1. Login with your credentials (default: `admin` / `password`)
2. Devices will automatically appear as they're discovered on your network
3. Click on devices to see details including:
- MAC addresses and vendor information
- Open ports and running services
- Operating system fingerprints
- Device screenshots (for web services)
4. Use the network map to visualize device locations
5. Monitor the event log for network activity
## Configuration
Edit the `backend/.env` file to customize:
```bash
LOGIN_USERNAME=admin
LOGIN_PASSWORD=your_secure_password
NETWORK_RANGE="192.168.1.0/24" # Set to your actual network range
DATABASE_NAME="reconya-dev"
JWT_SECRET_KEY="your_jwt_secret"
SQLITE_PATH="data/reconya-dev.db"
```
## Architecture
- **Backend**: Go API with HTMX templates and SQLite database (Port 3008)
- **Web Interface**: HTMX templates with Bootstrap styling served directly from backend
- **Scanning**: Multi-strategy network discovery with nmap integration
- **Database**: SQLite for device storage and event logging
## Scanning Algorithm
### Discovery Process
Reconya uses a multi-layered scanning approach that combines nmap integration with native Go implementations:
**1. Network Discovery (Every 30 seconds)**
- Multiple nmap strategies with automatic fallback
- ICMP ping sweeps (privileged mode)
- TCP connect probes to common ports (fallback)
- ARP table lookups for MAC address resolution
**2. Device Identification**
- IEEE OUI database for vendor identification
- Multi-method hostname resolution (DNS, NetBIOS, mDNS)
- Operating system fingerprinting via nmap
- Device type classification based on ports and vendors
**3. Port Scanning (Background workers)**
- Top 100 ports scan for active services
- Service detection and banner grabbing
- Concurrent scanning with worker pool pattern
**4. Web Service Detection**
- Automatic discovery of HTTP/HTTPS services
- Screenshot capture using headless Chrome
- Service metadata extraction (titles, server headers)
## Troubleshooting
### Common Issues
**Installation problems**
- Run `npm run status` to check what's missing
- Ensure you have Node.js 14+ installed
- Try running `npm run install` again
**No devices found**
- Verify your network range is correct in `backend/.env` file
- Run `npm run status` to check if nmap is installed and configured
- Check that you're on the same network segment as target devices
**Services won't start**
- Run `npm run stop` to kill any stuck processes
- Check `npm run status` for dependency issues
- Ensure ports 3000 and 3008 are available
**Missing MAC addresses**
- Run `npm run status` to verify nmap permissions
- MAC addresses only visible on same network segment
- Some devices may not respond to ARP requests
**Permission denied errors**
- The installer should handle nmap permissions automatically
- If issues persist, manually run: `sudo chmod u+s $(which nmap)`
**Services keep crashing**
- Check if dependencies are properly installed with `npm run status`
- Verify your `.env` configuration is correct
- Try stopping and restarting: `npm run stop && npm run start`
**Windows SQLite CGO Error**
- If you see "Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work":
```bash
cd backend
CGO_ENABLED=1 go run ./cmd
# or for building:
make build-cgo
```
- Ensure you have a C compiler installed (like TDM-GCC or Visual Studio Build Tools)
## Uninstalling reconYa
To completely remove reconYa and optionally its dependencies:
```bash
npm run uninstall
```
The uninstall process will:
- Stop any running reconYa processes
- Remove application files and data
- Remove nmap setuid permissions
- Optionally remove system dependencies (Go, Node.js, nmap)
**Note:** You'll be asked for confirmation before removing system dependencies since they might be used by other applications.
## Experimental Docker Support
Docker files are available in the `experimental/` directory but are not recommended due to network isolation limitations that prevent proper MAC address discovery. Use local installation for full functionality.
## Contributing
1. Fork the repository
2. Create feature branch
3. Make changes and test
4. Submit pull request
## License
Creative Commons Attribution-NonCommercial 4.0 International License. Commercial use requires permission.
## š Please check my other projects!
- **[Tududi](https://tududi.com)** - Self-hosted task management with hierarchical organization, multi-language support, and Telegram integration
- **[BreachHarbor](https://breachharbor.com)** - Cybersecurity suite for digital asset protection
- **[Hevetra](https://hevetra.com)** - Digital tracking for child health milestones", Assign "at most 3 tags" to the expected json: {"id":"14147","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"