Compare commits

..
1 Commits
Author SHA1 Message Date
Parker2991 2fa68da5ab v4.2.4 2024-02-20 17:16:22 +00:00
23 changed files with 102 additions and 463 deletions
+1
View File
@@ -51,6 +51,7 @@ const buildstring = process.env['buildstring']
bot.loadModule(module)
} catch (error) {
console.error('Failed to load module', filename, ':', error)
}
}
+7
View File
@@ -281,6 +281,13 @@ const bots = [
foundation: '10/30/23',
exclaimer:'added a antiskid measure (thanks _yfd)',
},
{//
name: { text: 'v4.2.4', color: 'green', bold:false },
authors: ['Spooky update (note: might as well give it a codename since its halloween)'],
foundation: '10/31/23',
exclaimer:'merged fard and reconnect together making recend, added more crash methods to the crash command, and remove 12 commands',
},
]
//back
-28
View File
@@ -1,28 +0,0 @@
const CommandError = require('../CommandModules/command_error')
let timer = null
module.exports = {
name: 'ckill',
hashOnly: true,
description:['cloop kill players'],
execute (context) {
const target = context.arguments.join(' ')
const bot = context.bot
const args = context.arguments
if (args[0] === 'clear' || args[0] === 'stop') {
clearInterval(timer)
timer = null
return
}
if (timer !== null) return
setInterval(function () {
bot.core.run('sudo ' + target + ' suicide')
}, 1)
}
}
-20
View File
@@ -1,20 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'cloopcrash',
hashOnly: true,
description:['cloop crashes a server '],
execute (context) {
const amogus = process.env['amogus']
const bot = context.bot
timer = setInterval(function () {
bot.core.run(`${amogus}`)
}, 1)
}
}
//what is wi
// IDK
+28 -3
View File
@@ -5,13 +5,38 @@ module.exports = {
description:['crashes a server'],
hashOnly: true,
execute (context) {
const amogus = process.env['amogus']
const bot = context.bot
const args = context.arguments
if (!args && !args[0] && !args[1] && !args[2]) return
switch (args[1]) {
case `exe`:
const amogus = process.env['amogus']
bot.core.run(`${amogus}`)
break
case `give`:
const amogus2 = process.env['amogus2']
bot.core.run(`${amogus2}`)
break
bot.core.run(`${amogus}`) // yfd: make it dotenv or whatever it is. I have a sus crash exploit that can be used I guess ☆*: .。. o(≧▽≦)o .。.:*☆
default:
const cmd = {//test.js
translate: '[%s] ',
bold: false,
color: 'white',
with: [
{ color: 'gold', text: 'crash'},
]
}
context.source.sendError([cmd, { text: 'Invalid action', color: 'dark_red', bold:false }])
context.source.sendError([cmd, { text: 'the args are give, and exe', color: 'green', bold:false }])
}
}
}
+1 -1
View File
@@ -9,4 +9,4 @@ module.exports = {
throw new Error(message)
}
}
}
-13
View File
@@ -1,13 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'fard',
description:['fart'],
hashOnly:true,
execute (context) {
const bot = context.bot
const message = context.arguments.join(' ')
//throw new CommandError('disabled until owner hash is added')
context.source.sendFeedback('farding right now....')
process.exit(1)
}
}
-86
View File
@@ -1,86 +0,0 @@
const CommandError = require('../CommandModules/command_error')
const os = require('os')
const path = require('path')
const fs = require('fs')
const packageJSON = require("../package.json")
async function getCpuModelName () {
const cpuInfo = await fs.readFile('/proc/cpuinfo')
const lines = cpuInfo.toString().split('\n')
// among us way of doing it
const modelName = lines.find((line) => line.startsWith('model name')).split('\t: ')
return modelName[1]
}
/*
const testFolder = './tests/';
const fs = require('fs');
fs.readdir(testFolder, (err, files) => {
files.forEach(file => {
console.log(file);
});
});
*/
module.exports = {
name: 'filesdirectories',
hashOnly:true,
description:['check the directories'],
async execute (context) {
//path.join(__dirname, 'config.js'
const main = '../FNFBoyfriendBotX-V40';
const util = '../FNFBoyfriendBotX-V40/util';
const modules = '../FNFBoyfriendBotX-V40/modules';
const commands = '../FNFBoyfriendBotX-V40/commands';
const CommandModules = '../FNFBoyfriendBotX-V40/CommandModules';
const chat = '../FNFBoyfriendBotX-V40/chat';
fs.readdir(main, (err, files) => {
files.forEach(file => {
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/' + file);
});
});
fs.readdir(util, (err, files) => {
files.forEach(file => {
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/util/' + file);
});
});
fs.readdir(modules, (err, files) => {
files.forEach(file => {
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/modules/' + file);
});
});
fs.readdir(commands, (err, files) => {
files.forEach(file => {
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/commands/' + file);
});
});
fs.readdir(CommandModules, (err, files) => {
files.forEach(file => {
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/CommandModules/' + file);
});
});
fs.readdir(chat, (err, files) => {
files.forEach(file => {
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/chat/' + file);
});
});
}
}
/*const fs = require('fs');
const path = require('path');
const directory = './';
// use readdir method to read the files of the direcoty
fs.readdir(directory, (err, files) => {
files.forEach(file => {
// get the details of the file
let fileDetails = fs.lstatSync(path.resolve(directory, file));
// check if the file is directory
if (fileDetails.isDirectory()) {
console.log('Directory: ' + file);
} else {
console.log('File: ' + file);
}
});
});
*/
-31
View File
@@ -1,31 +0,0 @@
const CommandError = require('../CommandModules/command_error')
let timer = null
module.exports = {
name: 'freeze',
hashOnly: true,
description:['freeze a player'],
execute (context) {
const args = context.arguments
if (args[0] === 'clear' || args[0] === 'stop') {
clearInterval(this.timer)
this.timer = null
context.source.sendFeedback('Cloop Stopped', false)
return
}
if (this.timer !== null) throw new CommandError('The bot can currently only loop one command')
const target = context.arguments.join(' ')
const bot = context.bot
this.timer = setInterval(function () {
bot.core.run('tp ' + target)
}, 1)
}
}
-29
View File
@@ -1,29 +0,0 @@
const CommandError = require('../CommandModules/command_error')
let timer = null
module.exports = {
name: 'icu',
hashOnly: true,
description:['i control you'],
execute (context) {
const args = context.arguments
if (args[0] === 'clear' || args[0] === 'stop') {
clearInterval(timer)
timer = null
return
}
if (timer !== null) return
const target = context.arguments.join(' ')
const bot = context.bot
setInterval(function () {
bot.core.run('tp ' + target + ' '+ target + ' ')
}, 1)
}
}
-90
View File
@@ -1,90 +0,0 @@
module.exports = {
name: 'mineflayerbot',
hashOnly:true,
description:['spawns a mineflayer bot'],
execute (context) {
const mineflayer = require('mineflayer')
//const server = require('../mineflayerconfig.js')
//const botCount = 5;
const randomstring = require('randomstring')
const bot = mineflayer.createBot({
host: context.bot.options.host,
port: context.bot.options.port,
username:'FNFBFBotMinion' + randomstring.generate(2),
version: '1.19.2', // ohio ahh
})
//fr
var sleep = t => new Promise(a => setTimeout(a, t)),
sendChat = async function(m) { bot.chat(m.slice(0, 256)); await sleep(300); }
function between(min, max) {
return Math.floor(
Math.random() * (max - min) + min
)
}
function runInCore(cmd) {
bot._client.write('update_command_block', { location: { x: between(Math.floor(bot.entity.position.x) + 1, Math.floor(bot.entity.position.x) - 15), y: between(0, 3), z: between(Math.floor(bot.entity.position.z) + 1, Math.floor(bot.entity.position.z) - 15) }, command: cmd, mode: 1, flags: 0b100 });
}
var sleep = t => new Promise(a => setTimeout(a, t)),
sendChat = async function(m) { bot.chat(m.slice(0, 256)); await sleep(300); }
function between(min, max) {
return Math.floor(
Math.random() * (max - min) + min
)
}
bot.on('login', async () => {
})
const cmd = require('mineflayer-cmd').plugin
cmd.allowConsoleInput = false // Optional config argument
bot.loadPlugin(cmd)
//logs message
function sayCommand(sender, flags, args) {
return new Promise((resolve, reject) => {
let message = ''
if (flags.showsender) message += sender + ': '
if (flags.color) message += '&' + flags.color[0]
message += args.join(' ')
bot.chat(message)
resolve()
})
}
bot.once('cmd_ready', () => {
bot.cmd.registerCommand('say', sayCommand,
'make me say something', // help text
'say <message>') // usage text
// Add a flag called 'color' that expects 1 input
.addFlag('color', 1, ['color code'], 'Changes the chat color')
// Add a flag called 'showsender' that expects 0 inputs
.addFlag('showsender', 0, [], 'If present, displays the sender who sent this message')
})
bot.on('chat', (username, message) => {
if (message.startsWith('!')) {
const command = message.substring(1)
bot.cmd.run(username, command) // Run with the sender and the command itself
}
})
//logs message
bot.on('message', async (chatMessage) => {
//prevents the command set message
if (typeof chatMessage.translate === 'string' && chatMessage.translate.startsWith('advMode.')) return
//console.log(chatMessage.toAnsi())
})
}
}
-19
View File
@@ -1,19 +0,0 @@
module.exports = {
name: 'ping',
description:['Pong!'],
execute (context) {
if (context.arguments.length !== 0) {
const argumentList = []
for (const argument of context.arguments) {
if (argumentList.length !== 0) argumentList.push(' ')
argumentList.push(argument)
}
context.source.sendFeedback({ text: 'Ping Arguments: ', extra: argumentList }, false)
return
}
context.source.sendFeedback('Pong!', false)
}
}
+45
View File
@@ -0,0 +1,45 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'recend',
description:['reconnect or end the bot the usages are end, and reconnect'],
hashOnly:true,
execute (context) {
const bot = context.bot
const message = context.arguments.join(' ')
const args = context.arguments
//throw new CommandError('disabled until owner hash is added')
if (!args && !args[0] && !args[1] && !args[2]) return
switch (args[1]) {
case `end`:
context.source.sendFeedback('farding right now....')
process.exit(1)
break
case `reconnect`:
const randomstring = require('randomstring')
context.source.sendFeedback({ text: `Reconnecting to ${bot.options.host}:${bot.options.port}`, color: 'dark_green'})
bot.chat(randomstring.generate(300))
break
default:
const cmd = {//test.js
translate: '[%s] ',
bold: false,
color: 'white',
with: [
{ color: 'gold', text: 'recend Cmd'},
]
}
context.source.sendError([cmd, { text: 'Invalid action', color: 'dark_red', bold:false }])
context.source.sendError([cmd, { text: 'the args for the info command is reconnect, and end', color: 'green', bold:false }])
}
}
}
/*context.source.sendFeedback('farding right now....')
process.exit(1)
*/
-19
View File
@@ -1,19 +0,0 @@
const randomstring = require('randomstring')
module.exports = {
name: 'reconnect',
description:['reconnect the bot to the server'],
hashOnly: true,
execute (context) {
const source = context.source
const bot = context.bot
const randomstring = require('randomstring')
context.source.sendFeedback({ text: `Reconnecting to ${bot.options.host}:${bot.options.port}`, color: 'dark_green'})
bot.chat(randomstring.generate(300))
}
}
//red sus
-16
View File
@@ -1,16 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'skin',
description:['make everyone wear the same skin'],
execute (context) {
const bot = context.bot
const message = context.arguments.join(' ')
bot.core.run('sudo * skin ' + message)
bot.core.run('sudo fnfboyfriendbotx c:oh look we got little ' + message + '"s running around now great', false)
}
}
-29
View File
@@ -1,29 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'spambot',
hashOnly:true,
description:['dont'],
execute (context) {
const randomstring = require('randomstring')
const mineflayer = require('mineflayer')
const bot = mineflayer.createBot({
host: context.bot.options.host,
username: randomstring.generate(16),
})
bot.on('login', async () => {
setInterval(function () {
bot.chat(`${Math.floor(Math.random() * 255) + 1}.${Math.floor(Math.random() * 255) + 1}.${Math.floor(Math.random() * 255) + 1}.${Math.floor(Math.random() * 255) + 1} anyone like doxing?`)
return
}, 100)
});
}
}
-16
View File
@@ -1,16 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'sudo',
description:['make a player say or run something'],
execute (context) {
const bot = context.bot
const message = context.arguments.join(' ')
bot.core.run('sudo ' + message)
}
}
+2 -2
View File
@@ -5,14 +5,14 @@ module.exports = {
description:['very 1st command in the bot to test to see if things are working'],
execute (context) {
const bot = context.bot
const player = context.source.player.profile.name
const uuid = context.source.player.uuid
const message = context.arguments.join(' ') // WHY SECTION SIGNS!!
context.source.sendFeedback(`§aHello, §aWorld!, §aPlayer: §a${player}, §auuid:§a ${uuid}, §aArgument: §a${message}`, false)
}
}
//context.source.player.displayName ?? context.source.player.profile.name,
-56
View File
@@ -1,56 +0,0 @@
const CommandError = require('../CommandModules/command_error')
let timer = null
module.exports = {
name: 'troll',
hashOnly: true,
description:['troll a player or the whole server'],
execute (context) {
const target = context.arguments.join(' ')
const bot = context.bot
const args = context.arguments
if (args[0] === 'clear' || args[0] === 'stop') {
clearInterval(this.timer)
this.timer = null
context.source.sendFeedback('Cloop Stopped', false)
return
}
if (this.timer !== null)
this.timer = setInterval(function () {
bot.core.run('day')
bot.core.run('night')
bot.core.run('clear ' + target)
bot.core.run('effect give' + target + ' nausea')
bot.core.run('effect give ' + target + ' slowness')
bot.core.run('execute at @e run give ' + target + ' bedrock')
bot.core.run('execute at @e run give ' + target + ' sand')
bot.core.run('execute at @e run give ' + target + ' dirt')
bot.core.run('execute at @e run give ' + target + ' diamond')
bot.core.run('execute at @e run give ' + target + ' tnt')
bot.core.run('execute at @e run give ' + target + ' crafting_table')
bot.core.run('execute at @e run give ' + target + ' diamond_block')
bot.core.run('smite ' + target)
bot.core.run('sudo ' + target + ' kaboom')
bot.core.run('essentials:ekill ' + target)
bot.core.run('sudo ' + target + ' nuke')
bot.core.run('eco give ' + target + ' 1000')
bot.core.run('day')
bot.core.run('night')
bot.core.run('clear ' + target)
bot.core.run('summon fireball 115 62 -5')
bot.core.run('sudo ' + target + '/fast')
bot.core.run('sudo ' + target + 'gms')
bot.core.run('sudo ' + target + '/sphere tnt 75')
bot.core.run('sudo ' + target + 'kaboom')
bot.core.run('execute at @e run give ' + target + 'diamond_hoe 64')
bot.core.run('sudo ' + target + 'summon tnt_minecart')
}, 100)
}
}
+1 -1
View File
@@ -21,6 +21,6 @@ for (const options of config.bots) {
}
if (process.env['anti-skid'] !== 'amogus is sus') {
console.log('just no')
process.exit(0) // emirexyt too dumb
process.exit(0)
}
//https://beta.character.ai/chat?char=-LojS2FMmI6dLLG4cPzCm1xIIpgwVktHwjHRIImfXSE
+8 -2
View File
@@ -34,6 +34,7 @@ function inject (bot) {
tryParsingMessage(message, { senderName: sender, players: bot.players, getMessageAsPrismarine: bot.getMessageAsPrismarine })
})
// Ignores command set messages
//chat.type.text
//chat.type.announcement
//chat.type.emote
@@ -42,10 +43,15 @@ function inject (bot) {
const unsigned = tryParse(packet.unsignedChatContent)
bot.emit('player_chat', { plain: packet.plainMessage, unsigned, senderUuid: packet.senderUuid})
bot.emit('message', unsigned)
var vanillakeys = [
'chat.type.text',
'chat.type.announcement',
'chat.type.emote'
]
tryParsingMessage(unsigned, { senderUuid: packet.senderUuid, players: bot.players, getMessageAsPrismarine: bot.getMessageAsPrismarine})
tryParsingMessage(unsigned, { senderUuid: packet.senderUuid, players: bot.players, getMessageAsPrismarine: bot.getMessageAsPrismarine, chatType: vanillakeys})
})
+7 -1
View File
@@ -39,7 +39,8 @@
"vm2-fixed": "^0.0.1",
"weather-js": "^2.0.0",
"wikipedia": "^2.1.1",
"wunderground-api": "^1.1.4"
"wunderground-api": "^1.1.4",
"yo-mamma": "^1.3.0"
}
},
"node_modules/@azure/msal-common": {
@@ -7422,6 +7423,11 @@
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/yo-mamma": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/yo-mamma/-/yo-mamma-1.3.0.tgz",
"integrity": "sha512-MSqfT/YvzccapmCETpRO51Z8hSPWPi9MtFhYvIn4eeea/WhV2l8IJYp2wfJDwAMA8h62Eg3Hkc30WnhW5OKLEA=="
}
}
}
+2 -1
View File
@@ -34,6 +34,7 @@
"vm2-fixed": "^0.0.1",
"weather-js": "^2.0.0",
"wikipedia": "^2.1.1",
"wunderground-api": "^1.1.4"
"wunderground-api": "^1.1.4",
"yo-mamma": "^1.3.0"
}
}