Zenohack.com Sniper -

app.use('/api', require('./routes/api')); app.get('/', (req, res) => res.render('index'));

app.use(express.json()); app.use(express.urlencoded({ extended: true })); app.use(session({ secret: process.env.SESSION_SECRET, resave: false, saveUninitialized: true })); app.use(express.static('public')); app.set('view engine', 'ejs');

// Random delays to avoid detection const randomDelay = (min, max) => Math.random() * (max - min) + min;

// 7. Place order await Promise.all([ page.click('#place-order'), page.waitForNavigation({ waitUntil: 'networkidle2' }) ]); Zenohack.com Sniper

// Get all tasks router.get('/tasks', async (req, res) => { const tasks = await Task.find().populate('profileId'); res.json(tasks); });

module.exports = router; views/index.ejs <!DOCTYPE html> <html> <head> <title>Zenohack Sniper</title> <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2/dist/tailwind.min.css" rel="stylesheet"> </head> <body class="bg-gray-900 text-white"> <div class="container mx-auto p-8"> <h1 class="text-3xl font-bold mb-6">⚡ Zenohack.com Sniper</h1> <div class="grid grid-cols-2 gap-6"> <div class="bg-gray-800 p-4 rounded"> <h2 class="text-xl mb-2">Create Task</h2> <form id="taskForm"> <input type="text" placeholder="Task Name" id="name" class="w-full p-2 mb-2 bg-gray-700 rounded"> <input type="text" placeholder="Product URL" id="url" class="w-full p-2 mb-2 bg-gray-700 rounded"> <input type="number" placeholder="Max Price" id="price" class="w-full p-2 mb-2 bg-gray-700 rounded"> <input type="text" placeholder="Size" id="size" class="w-full p-2 mb-2 bg-gray-700 rounded"> <select id="profileId" class="w-full p-2 mb-2 bg-gray-700 rounded"></select> <button type="submit" class="bg-blue-600 p-2 rounded w-full">Create Sniper</button> </form> </div> <div class="bg-gray-800 p-4 rounded"> <h2 class="text-xl mb-2">Active Tasks</h2> <div id="taskList"></div> </div> </div> </div> <script> async function loadProfiles() { const res = await fetch('/api/profiles'); const profiles = await res.json(); const select = document.getElementById('profileId'); profiles.forEach(p => { const option = document.createElement('option'); option.value = p._id; option.textContent = p.name; select.appendChild(option); }); } document.getElementById('taskForm').addEventListener('submit', async (e) => { e.preventDefault(); const task = { name: document.getElementById('name').value, productUrl: document.getElementById('url').value, maxPrice: parseFloat(document.getElementById('price').value), size: document.getElementById('size').value, profileId: document.getElementById('profileId').value }; await fetch('/api/tasks', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(task) }); loadTasks(); }); async function loadTasks() { const res = await fetch('/api/tasks'); const tasks = await res.json(); const container = document.getElementById('taskList'); container.innerHTML = tasks.map(t => ` <div class="bg-gray-700 p-2 mb-2 rounded"> <b>${t.name}</b> - ${t.status} <button onclick="runTask('${t._id}')" class="bg-green-600 px-2 py-1 rounded ml-2">Run Now</button> </div> `).join(''); } window.runTask = async (id) => { await fetch(`/api/tasks/${id}/run`, { method: 'POST' }); loadTasks(); }; loadProfiles(); loadTasks(); </script> </body> </html> 7. Main App Entry app.js require('dotenv').config(); const express = require('express'); const mongoose = require('mongoose'); const session = require('express-session'); const app = express(); mongoose.connect(process.env.MONGODB_URI);

// 5. Go to checkout await page.goto(process.env.ZENOHACK_CHECKOUT_URL, { waitUntil: 'networkidle2' }); Go to checkout await page

// 4. Add to cart await page.click('#add-to-cart'); await page.waitForSelector('.cart-notification', { timeout: 3000 }); log('Item added to cart', 'success');

module.exports = { snipeTask }; const axios = require('axios'); async function sendDiscord(message) { if (!process.env.DISCORD_WEBHOOK_URL) return; await axios.post(process.env.DISCORD_WEBHOOK_URL, { content: message }); }

// 6. Fill billing info await page.type('#fullName', profile.billing.fullName); await page.type('#address', profile.billing.address); await page.type('#city', profile.billing.city); await page.type('#zip', profile.billing.zip); await page.type('#cardNumber', profile.billing.cardNumber); await page.type('#expiry', profile.billing.expiry); await page.type('#cvv', profile.billing.cvv); Select size if needed if (task

// Run task immediately router.post('/tasks/:id/run', async (req, res) => { const task = await Task.findById(req.params.id); if (!task) return res.status(404).json({ error: 'Task not found' }); task.status = 'running'; await task.save(); snipeTask(task).finally(async () => { task.status = 'completed'; task.runs += 1; task.lastRun = new Date(); await task.save(); }); res.json({ message: 'Sniper started' }); });

module.exports = { sendDiscord }; routes/api.js const express = require('express'); const router = express.Router(); const Task = require('../models/Task'); const Profile = require('../models/Profile'); const { snipeTask } = require('../services/sniper'); // Create sniper task router.post('/tasks', async (req, res) => { const task = await Task.create(req.body); res.json(task); });

const log = (msg, type = 'info') => { Log.create({ taskId: task._id, message: msg, type }); console.log( [${task.name}] ${msg} ); };

// 3. Select size if needed if (task.size) { await page.select('select[name="size"]', task.size); await page.waitForTimeout(randomDelay(200, 500)); }