mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-10 17:26:17 +00:00
feat: Update account creation commands to clarify recovery email and 2FA setup options
This commit is contained in:
27
README.md
27
README.md
@@ -137,14 +137,17 @@ npm run creator
|
|||||||
# With referral link (earn rewards credit)
|
# With referral link (earn rewards credit)
|
||||||
npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE&ref=rafsrchae
|
npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE&ref=rafsrchae
|
||||||
|
|
||||||
# With recovery email for account security
|
# With recovery email (will prompt for verification code)
|
||||||
npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE -r backup@gmail.com
|
npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE -r backup@gmail.com
|
||||||
|
|
||||||
# With 2FA enabled automatically
|
# With 2FA enabled (will prompt for QR code scan)
|
||||||
npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE --2fa
|
npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE --2fa
|
||||||
|
|
||||||
# Full automation mode (skip all prompts)
|
# Skip all prompts (no recovery email or 2FA)
|
||||||
npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE -r backup@gmail.com -y --2fa
|
npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE -y
|
||||||
|
|
||||||
|
# Full security with auto-accept (requires manual code/QR scan)
|
||||||
|
npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE -r backup@gmail.com --2fa -y
|
||||||
```
|
```
|
||||||
|
|
||||||
**✨ Features:**
|
**✨ Features:**
|
||||||
@@ -162,8 +165,20 @@ npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE -r backup@gmail.co
|
|||||||
**🎛️ Command Arguments:**
|
**🎛️ Command Arguments:**
|
||||||
- `<url>` — Referral URL (optional)
|
- `<url>` — Referral URL (optional)
|
||||||
- `-r <email>` — Recovery email address
|
- `-r <email>` — Recovery email address
|
||||||
- `-y` — Auto-accept mode (skip prompts)
|
- `-y` — Auto-accept mode (skip interactive prompts)
|
||||||
- `--2fa` — Enable 2FA automatically
|
- `--2fa` — Enable 2FA setup
|
||||||
|
|
||||||
|
**⚙️ How Flags Work:**
|
||||||
|
|
||||||
|
| Command | Recovery Email | 2FA | Notes |
|
||||||
|
|---------|---------------|-----|-------|
|
||||||
|
| `npm run creator` | ❓ Prompts | ❓ Prompts | Interactive mode |
|
||||||
|
| `npm run creator -y` | ❌ Skipped | ❌ Skipped | No security features |
|
||||||
|
| `npm run creator -r email` | ✅ Uses email | ❓ Prompts | Only recovery |
|
||||||
|
| `npm run creator --2fa` | ❓ Prompts | ✅ Enabled | Only 2FA |
|
||||||
|
| `npm run creator -r email -y` | ✅ Uses email | ❌ Skipped | No prompt for 2FA |
|
||||||
|
| `npm run creator --2fa -y` | ❌ Skipped | ✅ Enabled | No prompt for recovery |
|
||||||
|
| `npm run creator -r email --2fa -y` | ✅ Uses email | ✅ Enabled | Full automation |
|
||||||
|
|
||||||
**📋 What happens:**
|
**📋 What happens:**
|
||||||
1. Creates Microsoft account (email, password, birthdate, names)
|
1. Creates Microsoft account (email, password, birthdate, names)
|
||||||
|
|||||||
@@ -631,17 +631,23 @@ export class AccountCreator {
|
|||||||
let recoveryCode: string | undefined
|
let recoveryCode: string | undefined
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Setup recovery email if requested
|
// Setup recovery email (interactive if no -r flag and no -y flag)
|
||||||
const emailResult = await this.setupRecoveryEmail(confirmedEmail)
|
if (this.recoveryEmail || !this.autoAccept) {
|
||||||
if (emailResult) recoveryEmailUsed = emailResult
|
const emailResult = await this.setupRecoveryEmail(confirmedEmail)
|
||||||
|
if (emailResult) recoveryEmailUsed = emailResult
|
||||||
|
} else {
|
||||||
|
log(false, 'CREATOR', 'Skipping recovery email setup (-y without -r)', 'log', 'gray')
|
||||||
|
}
|
||||||
|
|
||||||
// Setup 2FA if requested
|
// Setup 2FA (only if --2fa flag OR interactive prompt accepts)
|
||||||
if (this.enable2FA || (!this.autoAccept && await this.ask2FASetup())) {
|
if (this.enable2FA || (!this.autoAccept && await this.ask2FASetup())) {
|
||||||
const tfaResult = await this.setup2FA()
|
const tfaResult = await this.setup2FA()
|
||||||
if (tfaResult) {
|
if (tfaResult) {
|
||||||
totpSecret = tfaResult.totpSecret
|
totpSecret = tfaResult.totpSecret
|
||||||
recoveryCode = tfaResult.recoveryCode
|
recoveryCode = tfaResult.recoveryCode
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
log(false, 'CREATOR', 'Skipping 2FA setup', 'log', 'gray')
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log(false, 'CREATOR', `Post-setup error: ${error}`, 'warn', 'yellow')
|
log(false, 'CREATOR', `Post-setup error: ${error}`, 'warn', 'yellow')
|
||||||
@@ -2208,7 +2214,7 @@ ${JSON.stringify(accountData, null, 2)}`
|
|||||||
/**
|
/**
|
||||||
* Setup recovery email for the account
|
* Setup recovery email for the account
|
||||||
*/
|
*/
|
||||||
private async setupRecoveryEmail(currentEmail: string): Promise<string | undefined> {
|
private async setupRecoveryEmail(_currentEmail: string): Promise<string | undefined> {
|
||||||
try {
|
try {
|
||||||
log(false, 'CREATOR', '📧 Setting up recovery email...', 'log', 'cyan')
|
log(false, 'CREATOR', '📧 Setting up recovery email...', 'log', 'cyan')
|
||||||
|
|
||||||
|
|||||||
@@ -54,20 +54,32 @@ npm run creator https://rewards.bing.com/welcome?rh=YOUR_CODE -r backup@gmail.co
|
|||||||
| `-y` | Auto-accept mode (skip prompts) | `-y` |
|
| `-y` | Auto-accept mode (skip prompts) | `-y` |
|
||||||
| `--2fa` | Enable 2FA automatically | `--2fa` |
|
| `--2fa` | Enable 2FA automatically | `--2fa` |
|
||||||
|
|
||||||
|
**⚠️ Important: How `-y` Works**
|
||||||
|
|
||||||
|
The `-y` flag **skips interactive prompts**, but **respects the flags you provide**:
|
||||||
|
|
||||||
|
- `npm run creator -y` → Skips recovery email AND 2FA (nothing setup)
|
||||||
|
- `npm run creator -r email@example.com -y` → Uses recovery email, skips 2FA
|
||||||
|
- `npm run creator --2fa -y` → Skips recovery email, forces 2FA
|
||||||
|
- `npm run creator -r email@example.com --2fa -y` → Uses both (full automation)
|
||||||
|
|
||||||
**Examples:**
|
**Examples:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Minimal (no options)
|
# Minimal (no options, will prompt for everything)
|
||||||
npm run creator
|
npm run creator
|
||||||
|
|
||||||
# With referral only
|
# With referral only (will prompt for recovery email & 2FA)
|
||||||
npm run creator https://rewards.bing.com/welcome?rh=B395E9D7
|
npm run creator https://rewards.bing.com/welcome?rh=B395E9D7
|
||||||
|
|
||||||
# With recovery email (will be asked for code)
|
# With recovery email (will be asked for code, then prompts for 2FA)
|
||||||
npm run creator -r mybackup@gmail.com
|
npm run creator -r mybackup@gmail.com
|
||||||
|
|
||||||
# Full automation with 2FA
|
# Full automation with 2FA (no prompts, but requires manual code entry)
|
||||||
npm run creator https://rewards.bing.com/welcome?rh=B395E9D7 -r backup@gmail.com -y --2fa
|
npm run creator https://rewards.bing.com/welcome?rh=B395E9D7 -r backup@gmail.com --2fa -y
|
||||||
|
|
||||||
|
# Skip everything (fastest, no security features)
|
||||||
|
npm run creator https://rewards.bing.com/welcome?rh=B395E9D7 -y
|
||||||
```
|
```
|
||||||
|
|
||||||
### Interactive Flow
|
### Interactive Flow
|
||||||
|
|||||||
Reference in New Issue
Block a user