Skip to content

Commit 8e2bfb3

Browse files
committed
feat: Production-ready NameMC Sniper v2.0
- Ultra-fast sniping: 40 workers, 8ms precision - Multi-token support for mass sniping - Intelligent rate limiting with per-token tracking - Advanced time synchronization and error recovery - Oracle VPS optimization and proxy support - Updated documentation and performance metrics
1 parent 0f53bf1 commit 8e2bfb3

14 files changed

Lines changed: 1802 additions & 174 deletions

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ env.bak/
3131
venv.bak/
3232

3333
# Configuration files (may contain sensitive data)
34-
config.yaml
35-
*.yaml
3634
!config.yaml.example
3735
!requirements.txt
3836

Main.py

Lines changed: 108 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import sys
1515
import signal
1616
from pathlib import Path
17-
from datetime import datetime
17+
from datetime import datetime, timezone
1818

1919
import click
2020
from rich.console import Console
@@ -277,21 +277,28 @@ def snipe_at(config, username, drop_window):
277277
console.print(f"[red]Your input: '{drop_window}'[/red]")
278278
console.print(f"[red]Expected: M/D/YYYY • H∶MM∶SS AM/PM[/red]")
279279
return
280-
# Treat as local time - assume it's already in the correct local timezone
281-
# Convert to UTC by adding the local timezone offset
280+
# NameMC displays times in the user's local timezone
281+
# Convert from local timezone to UTC
282282
import time
283+
from datetime import datetime, timezone, timedelta
284+
285+
# Get the user's local timezone offset
283286
local_offset_seconds = -time.timezone if time.daylight == 0 else -time.altzone
284287
local_offset = timedelta(seconds=local_offset_seconds)
285288
local_tz = timezone(local_offset)
286289

287-
# Apply local timezone to parsed time
290+
# Apply user's local timezone to parsed time
288291
parsed_time = parsed_time.replace(tzinfo=local_tz)
289292
parsed_time = parsed_time.astimezone(timezone.utc)
290293

291-
# Check if time is in the future
294+
# Check if time is in the future (allow 60 seconds grace period for clock drift)
292295
now = datetime.now(timezone.utc)
293-
if parsed_time <= now:
296+
grace_period = timedelta(seconds=60)
297+
if parsed_time <= (now - grace_period):
294298
console.print(f"[red]Error: Drop window time must be in the future.[/red]")
299+
console.print(f"[yellow]Current time: {now.strftime('%Y-%m-%d %H:%M:%S UTC')}[/yellow]")
300+
console.print(f"[yellow]Your time: {parsed_time.strftime('%Y-%m-%d %H:%M:%S UTC')}[/yellow]")
301+
console.print(f"[yellow]Tip: Your system clock may be slow. Try a time 1+ minutes in the future.[/yellow]")
295302
return
296303

297304
time_until = (parsed_time - now).total_seconds()
@@ -330,6 +337,101 @@ async def run_snipe():
330337

331338
asyncio.run(run_snipe())
332339

340+
@cli.command()
341+
@click.option('--username', '-u', required=True, help='Username to snipe')
342+
@click.option('--times', '-t', required=True, multiple=True, help='Drop times in NameMC format "M/D/YYYY • H∶MM∶SS AM/PM" (can specify multiple)')
343+
@click.option('--config', '-c', default='config.yaml', help='Configuration file path')
344+
def snipe_fallback(username, times, config):
345+
"""Snipe a username with multiple fallback drop times"""
346+
if len(times) < 2:
347+
console.print("[red]❌ Please provide at least 2 drop times for fallback sniping[/red]")
348+
console.print("[yellow]Example: python Main.py snipe-fallback -u Username -t \"12/25/2024 • 3∶30∶00 PM\" -t \"12/25/2024 • 3∶31∶00 PM\"[/yellow]")
349+
return
350+
351+
# Load configuration
352+
config_manager = ConfigManager(config)
353+
try:
354+
app_config = config_manager.load_config()
355+
except Exception as e:
356+
console.print(f"[red]❌ Failed to load config: {e}[/red]")
357+
return
358+
359+
# Override username in config
360+
app_config.snipe.target_username = username
361+
362+
# Parse drop times using NameMC format
363+
drop_times = []
364+
for time_str in times:
365+
try:
366+
# Parse NameMC format: "9/30/2025 • 11∶46∶32 PM"
367+
if '•' not in time_str or '∶' not in time_str:
368+
console.print(f"[red]❌ Invalid NameMC format: '{time_str}'[/red]")
369+
console.print("[yellow]Use format: M/D/YYYY • H∶MM∶SS AM/PM[/yellow]")
370+
return
371+
372+
# Clean the format: replace NameMC special characters
373+
import time as time_module
374+
from datetime import timedelta
375+
376+
clean_window = time_str.replace('•', '').replace('∶', ':').strip()
377+
parsed_time = datetime.strptime(clean_window, '%m/%d/%Y %I:%M:%S %p')
378+
379+
# NameMC displays times in the user's local timezone, convert to UTC
380+
# Get the user's local timezone offset
381+
local_offset_seconds = -time_module.timezone if time_module.daylight == 0 else -time_module.altzone
382+
local_offset = timedelta(seconds=local_offset_seconds)
383+
local_tz = timezone(local_offset)
384+
385+
# Set as local time, then convert to UTC
386+
parsed_time = parsed_time.replace(tzinfo=local_tz)
387+
parsed_time = parsed_time.astimezone(timezone.utc)
388+
389+
# Allow 60 second grace period for clock drift
390+
now = datetime.now(timezone.utc)
391+
grace_period = timedelta(seconds=60)
392+
if parsed_time <= (now - grace_period):
393+
console.print(f"[red]❌ Drop time '{time_str}' is in the past![/red]")
394+
console.print(f"[yellow]Tip: Your system clock may be slow. Try a time 1+ minutes in the future.[/yellow]")
395+
return
396+
397+
drop_times.append(parsed_time)
398+
except ValueError:
399+
console.print(f"[red]❌ Invalid NameMC format: '{time_str}'[/red]")
400+
console.print("[yellow]Use format: M/D/YYYY • H∶MM∶SS AM/PM[/yellow]")
401+
console.print("[yellow]Example: 12/25/2024 • 3∶30∶00 PM[/yellow]")
402+
return
403+
404+
# Sort drop times
405+
drop_times.sort()
406+
407+
# Display summary
408+
console.print(f"[cyan]Fallback Snipe Configuration:[/cyan]")
409+
console.print(f"Username: [bold]{username}[/bold]")
410+
console.print(f"Drop Windows: [bold]{len(drop_times)}[/bold]")
411+
for i, dt in enumerate(drop_times, 1):
412+
console.print(f" {i}. {dt.strftime('%Y-%m-%d %H:%M:%S UTC')}")
413+
414+
async def run_fallback_snipe():
415+
console.print(f"[cyan]Starting fallback sniper for username: {username}[/cyan]")
416+
417+
# Create and run sniper
418+
sniper = UsernameSniper(app_config)
419+
result = await sniper.snipe_with_fallback(drop_times, username)
420+
421+
# Display results
422+
if result.success:
423+
console.print(Panel.fit(
424+
f"SUCCESS! Claimed username '{username}' using fallback system!",
425+
style="bold green"
426+
))
427+
else:
428+
console.print(Panel.fit(
429+
f"FAILED to claim '{username}' after {len(drop_times)} drop windows.\nError: {result.error_message or 'All windows failed'}",
430+
style="bold red"
431+
))
432+
433+
asyncio.run(run_fallback_snipe())
434+
333435
@cli.command()
334436
@click.option('--config', '-c', default='config.yaml', help='Configuration file path')
335437
def test_token(config):

README.md

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
<div align="center">
44

5-
![NameMC Sniper Logo](https://img.shields.io/badge/NameMC-Sniper-blue?style=for-the-badge&logo=minecraft)
5+
<img width="1536" height="324" alt="assets_task_01k6cfgfnce75rr55xznbme123_1759208092_img_1" src="https://github.com/user-attachments/assets/cf0a9ba6-a318-424b-a163-82f34b9915b0" />
66

77
**A professional-grade Minecraft username sniper with advanced features**
88

99
[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://python.org)
1010
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
1111
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
1212

13-
[📚 Documentation](https://your-docs-website.com)[🚀 Quick Start](#quick-start)[⚙️ Configuration](#configuration)[🤝 Support](#support)
13+
[📚 Documentation](https://zwroee.github.io/NameMCSniper-Docs/)[🚀 Quick Start](https://zwroee.github.io/NameMCSniper-Docs/#quick-start)[⚙️ Configuration](https://zwroee.github.io/NameMCSniper-Docs/getting-started/configuration/)[🤝 Support](https://zwroee.github.io/NameMCSniper-Docs/legal/support/)
1414

1515
</div>
1616

@@ -21,20 +21,20 @@
2121
<td width="50%">
2222

2323
### 🎯 **Core Features**
24-
- **High-Speed Sniping** - 10 concurrent workers with 25ms precision
25-
- **Bearer Token Auth** - Secure Minecraft authentication
26-
- **Exact Timing** - Starts 0.1s before drop, runs 10.1s after
27-
- **Smart Proxy Rotation** - Health-checked proxy management
24+
- **Ultra-Fast Sniping** - 40 concurrent workers with 8ms precision
25+
- **Multi-Token Support** - Mass sniping with multiple accounts
26+
- **Intelligent Rate Limiting** - Per-token backoff strategies
27+
- **Smart Proxy Rotation** - Residential proxy support (user-provided)
2828
- **Rich CLI Interface** - Beautiful terminal with colors & tables
2929

3030
</td>
3131
<td width="50%">
3232

3333
### 🔧 **Advanced Features**
34-
- **Discord Integration** - Real-time notifications & embeds
35-
- **Countdown Notifications** - Multi-interval drop alerts
36-
- **Configuration Validation** - Built-in config error checking
37-
- **Comprehensive Logging** - Detailed file & console logs
34+
- **Time Synchronization** - NTP-based accurate timing
35+
- **Adaptive Delays** - Dynamic request timing optimization
36+
- **Network Optimization** - Oracle VPS performance tuning
37+
- **Error Recovery** - Graceful failure handling & retries
3838
- **Token Validation** - Test bearer tokens before sniping
3939

4040
</td>
@@ -86,10 +86,10 @@ python Main.py snipe-at -u "Username" -w "12/25/2024 • 3∶30∶00 PM" # Snip
8686
snipe:
8787
target_username: "YourDesiredUsername"
8888
bearer_token: "your_minecraft_bearer_token_here"
89-
start_sniping_at_seconds: 30
90-
max_snipe_attempts: 100
91-
request_delay_ms: 25
92-
concurrent_requests: 10
89+
start_sniping_at_seconds: 0
90+
max_snipe_attempts: 3000
91+
request_delay_ms: 8
92+
concurrent_requests: 40
9393

9494
# Discord Notifications
9595
discord:
@@ -175,6 +175,7 @@ The interactive menu features a professional Matrix-style interface with:
175175
- **Real-time Information** - Current time display and status updates
176176
- **User-friendly Navigation** - Simple number-based option selection
177177
- **Professional Styling** - Consistent green theme throughout
178+
<img width="1918" height="983" alt="Screenshot 2025-09-30 063615" src="https://github.com/user-attachments/assets/387111dd-6039-46c1-b04c-73687cbb761a" />
178179

179180
### Command Line Interface
180181

@@ -356,45 +357,45 @@ grep -i error logs/namemc_sniper_*.log
356357
grep -i "claim attempt" logs/namemc_sniper_*.log
357358
```
358359

359-
## 📚 Documentation
360-
361-
For comprehensive documentation, examples, and advanced configuration:
360+
## 🚀 Performance
362361

363-
**[📖 Visit our Documentation Website](https://your-docs-website.com)**
362+
### Optimized for Competitive Sniping
364363

365-
- 🎯 **Sniping Strategies** - Optimal settings for different scenarios
366-
- 🔧 **API Reference** - Complete function and class documentation
367-
- 📊 **Performance Tuning** - Advanced optimization techniques
368-
- 🤖 **Bot Integration** - Discord bot setup and commands
369-
- 📈 **Analytics** - Success rate tracking and statistics
364+
| Metric | Value | Description |
365+
|--------|-------|-------------|
366+
| **Concurrent Workers** | 40 | Simultaneous sniping threads |
367+
| **Request Delay** | 8ms | Ultra-fast request timing |
368+
| **Max Attempts** | 3000 | High-volume attempt capability |
369+
| **Proxy Support** | Unlimited | Residential proxy rotation (user-provided) |
370+
| **Rate Limiting** | Per-token | Intelligent backoff strategies |
371+
| **Time Sync** | NTP-based | Sub-second timing accuracy |
370372

371-
## 👥 Contributors
373+
### Infrastructure Compatibility
372374

373-
Special thanks to everyone who contributed to this project:
375+
- ✅ **Oracle VPS** - Optimized for 2+ OCPUs
376+
- ✅ **Residential Proxies** - Compatible with premium proxy providers
377+
- ✅ **Multi-Token** - Scale with multiple Microsoft accounts
378+
- ✅ **Global Timezones** - Automatic timezone detection
379+
- ✅ **Rate Limit Handling** - Smart 429 response management
374380

375-
### Core Contributors
376-
- **[Your Name]** - *Project Lead & Main Developer* - [@your-github](https://github.com/your-username)
377-
- **[Collaborator Name]** - *Architecture & Performance Optimization* - Contributed via pair programming sessions
381+
## 📚 Documentation
378382

379-
### How to Contribute
383+
For comprehensive documentation, examples, and advanced configuration:
380384

381-
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
385+
**[📖 Visit our Documentation Website](https://zwroee.github.io/NameMCSniper-Docs/)**
382386

383-
#### Development Setup
384-
```bash
385-
# Clone and setup development environment
386-
git clone https://github.com/your-username/NameMcSniper.git
387-
cd NameMcSniper
387+
- 🎯 **Sniping Strategies** - Multi-token and proxy optimization
388+
- 🔧 **API Reference** - Complete function and class documentation
389+
- 📊 **Performance Tuning** - Oracle VPS and rate limiting optimization
390+
- 🤖 **Discord Integration** - Webhook notifications and status updates
391+
- 📈 **Competitive Analysis** - Success rates against different sniper types
388392

389-
# Install development dependencies
390-
pip install -r requirements-dev.txt
393+
## 🫂 Authors
391394

392-
# Run tests
393-
python -m pytest tests/
395+
### Authors
396+
- **[zwroe]** - [@zwroee](https://github.com/zwroee)
397+
- **[light]** - [@zerolight18](https://github.com/zerolight18)
394398

395-
# Format code
396-
black .
397-
```
398399

399400
## 📄 License
400401

@@ -414,7 +415,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
414415

415416
### Getting Help
416417

417-
1. **📚 Check Documentation** - [docs website](https://your-docs-website.com)
418+
1. **📚 Check Documentation** - [docs website](https://zwroee.github.io/NameMCSniper-Docs/)
418419
2. **🔍 Search Issues** - Look for similar problems
419420
3. **📝 Create Issue** - Provide detailed information
420421
4. **💬 Discord Community** - Join our support server
@@ -432,6 +433,6 @@ When reporting bugs, please include:
432433

433434
**Made with ❤️ for the Minecraft community**
434435

435-
[⭐ Star this repo](https://github.com/your-username/NameMcSniper) • [🐛 Report Bug](https://github.com/your-username/NameMcSniper/issues) • [💡 Request Feature](https://github.com/your-username/NameMcSniper/issues)
436+
[⭐ Star this repo](https://github.com/zwroee/NameMcSniper) • [🐛 Report Bug](https://github.com/zwroee/NameMcSniper/issues) • [💡 Request Feature](https://github.com/zwroee/NameMcSniper/issues)
436437

437438
</div>

0 commit comments

Comments
 (0)