3.0 KiB
3.0 KiB
Hasher - Quick Reference Card
🚀 Quick Commands
Development
npm run dev # Start development server (http://localhost:3000)
npm run build # Build for production
npm start # Start production server
npm run lint # Run ESLint
Bulk Indexing
npm run index-file <file> # Index wordlist file
npm run index-file <file> -- --batch-size N # Custom batch size
npm run index-file -- --help # Show help
🔍 Hash Detection Patterns
| Type | Length | Example |
|---|---|---|
| MD5 | 32 | 5f4dcc3b5aa765d61d8327deb882cf99 |
| SHA1 | 40 | 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 |
| SHA256 | 64 | 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8 |
| SHA512 | 128 | b109f3bbbc244eb82441917ed06d618b9008dd09b3befd1b5e07394c706a8bb9... |
🔌 API Quick Reference
Search/Generate
POST /api/search
Content-Type: application/json
{ "query": "password" }
Health Check
GET /api/health
🌐 URLs
- Web Interface: http://localhost:3000
- Search API: http://localhost:3000/api/search
- Health API: http://localhost:3000/api/health
- Redis: localhost:6379
📊 Redis Commands
# Test connection
redis-cli ping
# Get database stats
redis-cli INFO stats
# Count all keys
redis-cli DBSIZE
# List all hash documents
redis-cli KEYS "hash:plaintext:*"
# Get document
redis-cli GET "hash:plaintext:password"
# Clear all data (CAUTION!)
redis-cli FLUSHDB
🐛 Troubleshooting
| Problem | Solution |
|---|---|
| Can't connect to Redis | Check REDIS_HOST and REDIS_PORT env vars |
| Port 3000 in use | Use PORT=3001 npm run dev |
| Module not found | Run npm install |
| Build errors | Run npm run build to see details |
📁 Important Files
| File | Purpose |
|---|---|
app/page.tsx |
Main UI component |
app/api/search/route.ts |
Search endpoint |
lib/redis.ts |
Redis configuration |
# Optional
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=your-password
REDIS_DB=0
NODE_ENV=production
📝 Common Use Cases
Search for a hash
- Open http://localhost:3000
- Enter hash value
- Click Search
Generate hashes
- Open http://localhost:3000
- Enter plaintext
- Click Search
- Copy desired hash
Bulk index words
npm run index-file wordlist.txt
Check system health
curl http://localhost:3000/api/health
🎯 Sample Hashes (password)
- MD5:
5f4dcc3b5aa765d61d8327deb882cf99 - SHA1:
5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 - SHA256:
5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8
📚 Documentation Links
- README.md - Main documentation
- API.md - API reference
- DEPLOYMENT.md - Deployment guide
- TESTING.md - Testing guide
🆘 Get Help
npm run index-file -- --help # Indexer help
Version: 1.0.0
Project: Hasher
License: MIT