@masanto/hotku-mailhub
Version:
HOTKU MailHub - Professional Mass Email Verification Tool
311 lines (223 loc) ⢠8.49 kB
Markdown
# @masanto/hotku-mailhub



## š Professional Email Verification Library
HOTKU MailHub adalah library Node.js yang powerful untuk verifikasi email massal dengan arsitektur modular dan performa tinggi. Dirancang khusus untuk pengecekan kredensial Microsoft (Outlook, Hotmail, Live).
## ⨠Features
- ā
**Mass Email Verification** - Verifikasi ribuan email sekaligus
- š **Real-time Statistics** - Monitor progress secara langsung
- š¾ **Auto Save Results** - Simpan otomatis hasil ke file
- šØ **Beautiful CLI Interface** - UI yang menarik dengan color coding
- š **Retry Mechanism** - Otomatis retry untuk koneksi yang gagal
- š§ **Multiple Categories** - Kategorisasi hasil (Valid, Invalid, Custom, NFA, Retry)
- šļø **Modular Architecture** - Kode terorganisir dengan library terpisah
- š¦ **Easy Integration** - Mudah diintegrasikan ke project lain
## š ļø Installation
### NPM Package
```bash
npm install @masanto/hotku-mailhub
```
### Git Repository
```bash
git clone https://github.com/masanto/hotku-mailhub.git
cd hotku-mailhub
npm install
```
## š Usage
### 1. Command Line Interface (CLI)
```bash
# Install globally
npm install -g @masanto/hotku-mailhub
# Run CLI
hotku-mailhub
# Or run locally
npx @masanto/hotku-mailhub
```
### 2. As a Library in Your Project
```javascript
const { MailHubApp, MassChecker, FileHandler, Display } = require('@masanto/hotku-mailhub');
// Basic usage
const app = new MailHubApp();
await app.run();
// Advanced usage - Custom implementation
const checker = new MassChecker();
// Load combos from file
const combos = FileHandler.parseComboFile('./combo.txt');
// Process mass checking
await checker.processMass('./combo.txt', {
outputDir: './my-results'
});
// Get results
const stats = checker.getStats();
const results = checker.getResults();
```
### 3. Programmatic Usage
```javascript
const { MicrosoftAuth } = require('@masanto/hotku-mailhub/lib/microsoft-auth');
// Single email verification
const auth = new MicrosoftAuth();
const [status, canary] = await auth.verify('email@outlook.com', 'password123');
console.log('Status:', status); // ok, fail, nfa, custom, retry
console.log('Canary:', canary);
```
## š Project Structure
```
@masanto/hotku-mailhub/
āāā index.js # Main entry point
āāā package.json # Package configuration
āāā lib/ # Core libraries
ā āāā microsoft-auth.js # Microsoft authentication
āāā src/ # Main source code
ā āāā mass-checker.js # Mass checking engine
āāā utils/ # Utility functions
ā āāā file-handler.js # File operations
ā āāā display.js # Console formatting
āāā config/ # Configuration
āāā app-config.js # App settings
```
## šÆ API Documentation
### MassChecker
```javascript
const { MassChecker } = require('@masanto/hotku-mailhub');
const checker = new MassChecker();
// Process mass checking
await checker.processMass(comboPath, options);
// Get statistics
const stats = checker.getStats();
// Returns: { valid: 0, invalid: 0, custom: 0, nfa: 0, retry: 0 }
// Get all results
const results = checker.getResults();
// Returns: Array of result objects
// Reset checker state
checker.reset();
```
### MicrosoftAuth
```javascript
const MicrosoftAuth = require('@masanto/hotku-mailhub/lib/microsoft-auth');
const auth = new MicrosoftAuth();
// Verify credentials
const [status, canary] = await auth.verify(email, password);
// status: 'ok' | 'fail' | 'nfa' | 'custom' | 'retry'
```
### FileHandler
```javascript
const { FileHandler } = require('@masanto/hotku-mailhub');
// Parse combo file
const combos = FileHandler.parseComboFile('./combo.txt');
// Returns: [{ email: 'test@email.com', password: 'pass123' }]
// Save results
FileHandler.saveResults(results, 'output.txt', 'ok');
// Save categorized results
FileHandler.saveCategorizedResults(results, './results');
```
### Display
```javascript
const { Display } = require('@masanto/hotku-mailhub');
// Show banner
Display.showBanner();
// Show progress
Display.showProgress(current, total, stats);
// Show messages
Display.showSuccess('Operation completed!');
Display.showError('Something went wrong!');
Display.showInfo('Information message');
Display.showWarning('Warning message');
```
## š File Formats
### Combo File Format
```
email1@outlook.com:password123
user@hotmail.com:mypassword
test@live.com:testpass456
```
### Result Categories
| Status | Description | Saved to File |
|--------|-------------|---------------|
| `ok` | Valid credentials | ā |
| `fail` | Invalid credentials | ā |
| `custom` | Custom verification needed | ā |
| `nfa` | Need Further Action | ā |
| `retry` | Network error/retry needed | ā |
## š§ Configuration
```javascript
const config = require('@masanto/hotku-mailhub/config/app-config');
// Modify settings
config.defaults.timeout = 120000; // 2 minutes
config.defaults.delay = 2000; // 2 seconds between requests
config.defaults.outputDir = './my-results';
```
## š Examples
### Basic CLI Usage
```bash
# Create combo file
echo "user1@outlook.com:pass123" > combo.txt
echo "user2@hotmail.com:pass456" >> combo.txt
# Run checker
npx @masanto/hotku-mailhub
# Enter path: combo.txt
# Results saved to valid.txt and ./results/
```
### Advanced Integration
```javascript
const { MassChecker, FileHandler, Display } = require('@masanto/hotku-mailhub');
class MyEmailChecker {
constructor() {
this.checker = new MassChecker();
}
async checkEmails(combos) {
Display.showBanner();
// Create temporary combo file
const comboFile = './temp-combo.txt';
const comboLines = combos.map(c => `${c.email}:${c.password}`).join('\n');
require('fs').writeFileSync(comboFile, comboLines);
// Process
await this.checker.processMass(comboFile);
// Get results
const results = this.checker.getResults();
const validResults = results.filter(r => r.status === 'ok');
// Cleanup
require('fs').unlinkSync(comboFile);
return validResults;
}
}
// Usage
const checker = new MyEmailChecker();
const validAccounts = await checker.checkEmails([
{ email: 'test@outlook.com', password: 'pass123' },
{ email: 'user@hotmail.com', password: 'pass456' }
]);
console.log('Valid accounts:', validAccounts.length);
```
## š Security & Ethics
- ā ļø **Legal Use Only**: Tool ini hanya untuk testing kredensial yang sah
- š« **No Illegal Activities**: Jangan gunakan untuk aktivitas ilegal
- š **Respect ToS**: Ikuti terms of service dari provider email
- ā±ļø **Rate Limiting**: Gunakan delay yang wajar untuk menghindari blocking
- š”ļø **Responsible Use**: Gunakan dengan etika dan tanggung jawab
## š¤ Contributing
1. Fork repository
2. Create feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to branch (`git push origin feature/AmazingFeature`)
5. Open Pull Request
## š License
MIT License - see [LICENSE](LICENSE) file for details
## šØāš» Authors & Contributors
- **masanto** - *Main Author* - [@masanto](https://github.com/masanto)
- **Not-ISellStuff** - *Original Developer* - HOTKU Brand
## š Links
- [NPM Package](https://www.npmjs.com/package/@masanto/hotku-mailhub)
- [GitHub Repository](https://github.com/masanto/hotku-mailhub)
- [Issue Tracker](https://github.com/masanto/hotku-mailhub/issues)
- [Documentation](https://github.com/masanto/hotku-mailhub#readme)
## š Changelog
### v1.0.0
- Initial release
- Microsoft authentication support
- Mass checking functionality
- CLI interface
- Modular architecture
- NPM package
---
**š„ HOTKU MailHub** - Professional email verification solution by masanto