A modern, hacker-style web application for proactive security reconnaissance using the FOFA API.
English โข ็ฎไฝไธญๆ โข ็น้ซไธญๆ
Features โข Installation โข Documentation โข Contributing
- ๐ Complete FOFA API Integration - All API endpoints supported
- ๐พ Query History - Save and manage your search queries
- ๐ Result Storage - Store query results in SQLite database
- ๐ Export Results - Export results in JSON, TXT, or CSV formats
- ๐ API Key Management - Secure API key storage
- ๐จ Hacker-Style UI - Modern, professional interface with terminal aesthetics
- Frontend: React + TypeScript + Vite
- Backend: Node.js + Express + TypeScript
- Database: SQLite (better-sqlite3)
- Node.js 18+
- npm or yarn
# Install dependencies
npm install
# Copy environment file (optional)
cp .env.example .env
# Run development server (both frontend and backend)
npm run devThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3002 (default, configurable via
.env)
- Start the application:
npm run dev - Navigate to the Settings page (CONFIG in sidebar)
- Enter your FOFA API Key from https://fofa.info/user/personal
- Click "SAVE" to store your credentials
- Note: Your email will be automatically retrieved from your account info
npm run buildAfter building, you can run the production server:
# Start the server
npm run build:server
# The server will run on port 3002 (or PORT from .env)
# The server will automatically serve the frontend build from dist/client# Build and start the container
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the container
docker-compose downThe application will be available at http://localhost:3002
# Build the image
docker build -t fofa-sentinel .
# Run the container
docker run -d \
--name fofa-sentinel \
-p 3002:3002 \
-v $(pwd)/data:/app/data \
fofa-sentinel
# View logs
docker logs -f fofa-sentinel
# Stop the container
docker stop fofa-sentinel
docker rm fofa-sentinelYou can set environment variables in docker-compose.yml or pass them when running:
docker run -d \
--name fofa-sentinel \
-p 3002:3002 \
-e PORT=3002 \
-v $(pwd)/data:/app/data \
fofa-sentinelNote: The database will be persisted in the ./data directory. Make sure this directory exists and has proper permissions.
- Environment Variables - Configuration guide
- Troubleshooting - Common issues and solutions
- Contributing - How to contribute
- Changelog - Version history
fofa/
โโโ src/
โ โโโ server/ # Backend server
โ โ โโโ index.ts # Server entry point
โ โ โโโ routes/ # API routes
โ โ โโโ db/ # Database setup
โ โ โโโ services/ # Business logic
โ โโโ client/ # Frontend React app
โ โ โโโ components/ # React components
โ โ โโโ pages/ # Page components
โ โ โโโ hooks/ # Custom hooks
โ โ โโโ utils/ # Utilities
โ โโโ shared/ # Shared types
โโโ docs/ # Documentation
โโโ .github/ # GitHub templates and workflows
โโโ data/ # SQLite database files
โโโ public/ # Static assets
POST /api/fofa/search- Search hostsPOST /api/fofa/stats- Get statisticsPOST /api/fofa/host- Host aggregationGET /api/fofa/account- Account informationPOST /api/fofa/search-after- Search after (pagination)
GET /api/history- Get query historyGET /api/history/:id- Get specific queryDELETE /api/history/:id- Delete queryGET /api/results/:id- Get query resultsPOST /api/export/:id- Export results as TXTPOST /api/config/key- Save API keyGET /api/config/key- Get API key (masked)
Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- FOFA - For providing the excellent security search engine API
- Design inspiration from terminal and hacker aesthetics
If you find this project helpful, please consider giving it a โญ on GitHub!
Made with โค๏ธ by the FOFA Sentinel contributors
