-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
46 lines (40 loc) · 1.56 KB
/
Copy pathindex.js
File metadata and controls
46 lines (40 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const mineflayer = require('mineflayer')
const express = require('express')
const app = express()
const port = 3000
app.get('/addbot', (req, res) => {
if (req.header('type') == 'premium') {
if (req.header('auth') == 'ms') {
const bot = mineflayer.createBot({
host: req.header('ip'),
username: req.header('username'),
password: req.header('password'),
port: req.header('port'),
version: req.header('version'),
auth: 'microsoft'
})
} else if (req.header('auth') == 'mojang') {
const bot = mineflayer.createBot({
host: req.header('ip'),
username: req.header('username'),
password: req.header('password'),
port: req.header('port'),
version: req.header('version'),
auth: 'mojang'
})
}
} else if (req.header('type') == 'cracked') {
const bot = mineflayer.createBot({
host: req.header('ip'),
username: req.header('username'),
password: req.header('password'),
version: req.header('version')
})
bot.on('kicked', console.log)
bot.on('error', console.log)
res.send(`Logged in on ${req.headers.ip} with username ${req.header('username')}`)
}
})
app.listen(port || 3000, () => {
console.log(`🔥 Server online at 127.0.0.1:${port}`)
})