Начинающий
-
Автор темы
- #1
Перед прочтением основного контента ниже, пожалуйста, обратите внимание на обновление внутри секции Майна на нашем форуме. У нас появились:
- бесплатные читы для Майнкрафт — любое использование на свой страх и риск;
- маркетплейс Майнкрафт — абсолютно любая коммерция, связанная с игрой, за исключением продажи читов (аккаунты, предоставления услуг, поиск кодеров читов и так далее);
- приватные читы для Minecraft — в этом разделе только платные хаки для игры, покупайте группу "Продавец" и выставляйте на продажу свой софт;
- обсуждения и гайды — всё тот же раздел с вопросами, но теперь модернизированный: поиск нужных хаков, пати с игроками-читерами и другая полезная информация.
Спасибо!
Тут некоторые люди "ломают" голову чтобы обойти каптчу на фантайме, сделаю их жизнь чуточку легче
Использованные библиотеки:
mineflayer: создание бота
jimp: создание и обработка карт
pngjs-image: для цвета
Чтобы скачать их вам нужно скачать nodejs и прописать в консоли в вашем проекте:
1. npm init -y
2. npm install mineflayer jimp pngjs-image
Файл maps.js
Использованные библиотеки:
mineflayer: создание бота
jimp: создание и обработка карт
pngjs-image: для цвета
Чтобы скачать их вам нужно скачать nodejs и прописать в консоли в вашем проекте:
1. npm init -y
2. npm install mineflayer jimp pngjs-image
bot.js:
const mine = require('mineflayer');
const path = require('node:path');
const Jimp = require('jimp');
const { data } = require("./maps");
const fs = require("node:fs");
// создание переменных для карт
let solved = false;
const mapData = {};
const mapBuffers = [];
const mc = mine.createBot({
host: 'mc.funtime.su',
port: 25565,
version: '1.21.4',
username: 'Username11111',
});
mc.on("entityUpdate", (entity) => {
if (entity.displayName === "Item Frame") {
// 1.18+ (components)
// {
// itemCount: 1,
// itemId: 982,
// addedComponentCount: 1,
// removedComponentCount: 0,
// components: [ { type: 'map_id', data: 63 } ],
// removeComponents: []
// }
// 1.16.5 (nbtData)
// {
// present: true,
// itemId: 733,
// itemCount: 1,
// nbtData: { type: 'compound', name: '', value: { map: [Object] } }
// }
entity.metadata.forEach((itemData) => {
// На версиях выше 1.18 использовать components, на 1.16.5 nbtData
if (itemData && itemData.components) {
const { x, y, z } = entity.position;
const mapId = itemData.components[0].data;
// В версиях выше 1.18 использовать metadata[9], на 1.16.5 metadata[8]
const rotation = 360 - entity.metadata[9] * 90;
mapData[[ICODE]${x},${y},${z}[/ICODE]] = { mapId, rotation };
}
});
}
});
mc._client.on("map", (packet) => {
const mapId = packet.itemDamage;
if (typeof packet.data != "undefined" && packet.data) {
mapBuffers[mapId] = data(packet.data).toBlobSync();
setTimeout(() => solveMaps(), 1000);
}
});
mc._client.on("map", (packet) => {
const mapId = packet.itemDamage;
if (typeof packet.data != "undefined" && packet.data) {
mapBuffers[mapId] = data(packet.data).toBlobSync();
setTimeout(() => solveMaps(), 1000);
}
});
async function solveMaps() {
if (!solved) {
solved = true;
try {
const mapSize = 128;
if (mapBuffers.length >= 8000) return;
const imageWidth = mapSize * 4;
const imageHeight = mapSize * 3;
const image = await new Jimp(imageWidth, imageHeight);
const sortedCoordinates = Object.keys(mapData).sort((a, b) => {
const [ax, ay, az] = a.split(",").map((coord) => parseInt(coord));
const [bx, by, bz] = b.split(",").map((coord) => parseInt(coord));
return az !== bz ? az - bz : ax !== bx ? ax - bx : ay - by;
});
for (let i = 0; i < sortedCoordinates.length; i++) {
const [x, y, z] = sortedCoordinates[i]
.split(",")
.map((coord) => parseInt(coord));
const { mapId, rotation } = mapData[sortedCoordinates[i]];
let xIndex, yIndex;
if (z === 5) {
xIndex = 2 - (x - 4);
yIndex = 1 - (y - 252);
} else {
xIndex = x - 4;
yIndex = z - 5;
}
const mapImage = await Jimp.read(mapBuffers[mapId]);
mapImage.rotate(rotation, false);
image.blit(mapImage, xIndex * mapSize, yIndex * mapSize);
}
const resultBuffer = await image.getBufferAsync(Jimp.MIME_JPEG);
// Создание файла, я сделаю его с названием ника бота
const resultPath = path.join(
__dirname,
[ICODE]./result_${mc.username}.jpg[/ICODE],
);
fs.writeFileSync(resultPath, resultBuffer);
setTimeout(() => {
// тут уже идёт обработка вашей каптчи, можете кидать файл себе в дискорд или в телеграм
console.log(resultPath);
// setTimeout(() => {
// тут можешь раскоментить чтобы удалять файл
// fs.unlink(resultPath, () => {});
// }, 1000);
}, 2000);
} catch (e) {}
}
}
maps.js:
const { createImage } = require('pngjs-image');
const colors = [
{ red: 0, green: 0, blue: 0, alpha: 0 },
{ red: 89, green: 125, blue: 39, alpha: 255 },
{ red: 109, green: 153, blue: 48, alpha: 255 },
{ red: 127, green: 178, blue: 56, alpha: 255 },
{ red: 67, green: 94, blue: 29, alpha: 255 },
{ red: 174, green: 164, blue: 115, alpha: 255 },
{ red: 213, green: 201, blue: 140, alpha: 255 },
{ red: 247, green: 233, blue: 163, alpha: 255 },
{ red: 130, green: 123, blue: 86, alpha: 255 },
{ red: 140, green: 140, blue: 140, alpha: 255 },
{ red: 171, green: 171, blue: 171, alpha: 255 },
{ red: 199, green: 199, blue: 199, alpha: 255 },
{ red: 105, green: 105, blue: 105, alpha: 255 },
{ red: 180, green: 0, blue: 0, alpha: 255 },
{ red: 220, green: 0, blue: 0, alpha: 255 },
{ red: 255, green: 0, blue: 0, alpha: 255 },
{ red: 135, green: 0, blue: 0, alpha: 255 },
{ red: 112, green: 112, blue: 180, alpha: 255 },
{ red: 138, green: 138, blue: 220, alpha: 255 },
{ red: 160, green: 160, blue: 255, alpha: 255 },
{ red: 84, green: 84, blue: 135, alpha: 255 },
{ red: 117, green: 117, blue: 117, alpha: 255 },
{ red: 144, green: 144, blue: 144, alpha: 255 },
{ red: 167, green: 167, blue: 167, alpha: 255 },
{ red: 88, green: 88, blue: 88, alpha: 255 },
{ red: 0, green: 87, blue: 0, alpha: 255 },
{ red: 0, green: 106, blue: 0, alpha: 255 },
{ red: 0, green: 124, blue: 0, alpha: 255 },
{ red: 0, green: 65, blue: 0, alpha: 255 },
{ red: 180, green: 180, blue: 180, alpha: 255 },
{ red: 220, green: 220, blue: 220, alpha: 255 },
{ red: 255, green: 255, blue: 255, alpha: 255 },
{ red: 135, green: 135, blue: 135, alpha: 255 },
{ red: 115, green: 118, blue: 129, alpha: 255 },
{ red: 141, green: 144, blue: 158, alpha: 255 },
{ red: 164, green: 168, blue: 184, alpha: 255 },
{ red: 86, green: 88, blue: 97, alpha: 255 },
{ red: 106, green: 76, blue: 54, alpha: 255 },
{ red: 130, green: 94, blue: 66, alpha: 255 },
{ red: 151, green: 109, blue: 77, alpha: 255 },
{ red: 79, green: 57, blue: 40, alpha: 255 },
{ red: 79, green: 79, blue: 79, alpha: 255 },
{ red: 96, green: 96, blue: 96, alpha: 255 },
{ red: 112, green: 112, blue: 112, alpha: 255 },
{ red: 59, green: 59, blue: 59, alpha: 255 },
{ red: 45, green: 45, blue: 180, alpha: 255 },
{ red: 55, green: 55, blue: 220, alpha: 255 },
{ red: 64, green: 64, blue: 255, alpha: 255 },
{ red: 33, green: 33, blue: 135, alpha: 255 },
{ red: 100, green: 84, blue: 50, alpha: 255 },
{ red: 123, green: 102, blue: 62, alpha: 255 },
{ red: 143, green: 119, blue: 72, alpha: 255 },
{ red: 75, green: 63, blue: 38, alpha: 255 },
{ red: 180, green: 177, blue: 172, alpha: 255 },
{ red: 220, green: 217, blue: 211, alpha: 255 },
{ red: 255, green: 252, blue: 245, alpha: 255 },
{ red: 135, green: 133, blue: 129, alpha: 255 },
{ red: 152, green: 89, blue: 36, alpha: 255 },
{ red: 186, green: 109, blue: 44, alpha: 255 },
{ red: 216, green: 127, blue: 51, alpha: 255 },
{ red: 114, green: 67, blue: 27, alpha: 255 },
{ red: 125, green: 53, blue: 152, alpha: 255 },
{ red: 153, green: 65, blue: 186, alpha: 255 },
{ red: 178, green: 76, blue: 216, alpha: 255 },
{ red: 94, green: 40, blue: 114, alpha: 255 },
{ red: 72, green: 108, blue: 152, alpha: 255 },
{ red: 88, green: 132, blue: 186, alpha: 255 },
{ red: 102, green: 153, blue: 216, alpha: 255 },
{ red: 54, green: 81, blue: 114, alpha: 255 },
{ red: 161, green: 161, blue: 36, alpha: 255 },
{ red: 197, green: 197, blue: 44, alpha: 255 },
{ red: 229, green: 229, blue: 51, alpha: 255 },
{ red: 121, green: 121, blue: 27, alpha: 255 },
{ red: 89, green: 144, blue: 17, alpha: 255 },
{ red: 109, green: 176, blue: 21, alpha: 255 },
{ red: 127, green: 204, blue: 25, alpha: 255 },
{ red: 67, green: 108, blue: 13, alpha: 255 },
{ red: 170, green: 89, blue: 116, alpha: 255 },
{ red: 208, green: 109, blue: 142, alpha: 255 },
{ red: 242, green: 127, blue: 165, alpha: 255 },
{ red: 128, green: 67, blue: 87, alpha: 255 },
{ red: 53, green: 53, blue: 53, alpha: 255 },
{ red: 65, green: 65, blue: 65, alpha: 255 },
{ red: 76, green: 76, blue: 76, alpha: 255 },
{ red: 40, green: 40, blue: 40, alpha: 255 },
{ red: 108, green: 108, blue: 108, alpha: 255 },
{ red: 132, green: 132, blue: 132, alpha: 255 },
{ red: 153, green: 153, blue: 153, alpha: 255 },
{ red: 81, green: 81, blue: 81, alpha: 255 },
{ red: 53, green: 89, blue: 108, alpha: 255 },
{ red: 65, green: 109, blue: 132, alpha: 255 },
{ red: 76, green: 127, blue: 153, alpha: 255 },
{ red: 40, green: 67, blue: 81, alpha: 255 },
{ red: 89, green: 44, blue: 125, alpha: 255 },
{ red: 109, green: 54, blue: 153, alpha: 255 },
{ red: 127, green: 63, blue: 178, alpha: 255 },
{ red: 67, green: 33, blue: 94, alpha: 255 },
{ red: 36, green: 53, blue: 125, alpha: 255 },
{ red: 44, green: 65, blue: 153, alpha: 255 },
{ red: 51, green: 76, blue: 178, alpha: 255 },
{ red: 27, green: 40, blue: 94, alpha: 255 },
{ red: 72, green: 53, blue: 36, alpha: 255 },
{ red: 88, green: 65, blue: 44, alpha: 255 },
{ red: 102, green: 76, blue: 51, alpha: 255 },
{ red: 54, green: 40, blue: 27, alpha: 255 },
{ red: 72, green: 89, blue: 36, alpha: 255 },
{ red: 88, green: 109, blue: 44, alpha: 255 },
{ red: 102, green: 127, blue: 51, alpha: 255 },
{ red: 54, green: 67, blue: 27, alpha: 255 },
{ red: 108, green: 36, blue: 36, alpha: 255 },
{ red: 132, green: 44, blue: 44, alpha: 255 },
{ red: 153, green: 51, blue: 51, alpha: 255 },
{ red: 81, green: 27, blue: 27, alpha: 255 },
{ red: 17, green: 17, blue: 17, alpha: 255 },
{ red: 21, green: 21, blue: 21, alpha: 255 },
{ red: 25, green: 25, blue: 25, alpha: 255 },
{ red: 13, green: 13, blue: 13, alpha: 255 },
{ red: 176, green: 168, blue: 54, alpha: 255 },
{ red: 215, green: 205, blue: 66, alpha: 255 },
{ red: 250, green: 238, blue: 77, alpha: 255 },
{ red: 132, green: 126, blue: 40, alpha: 255 },
{ red: 64, green: 154, blue: 150, alpha: 255 },
{ red: 79, green: 188, blue: 183, alpha: 255 },
{ red: 92, green: 219, blue: 213, alpha: 255 },
{ red: 48, green: 115, blue: 112, alpha: 255 },
{ red: 52, green: 90, blue: 180, alpha: 255 },
{ red: 63, green: 110, blue: 220, alpha: 255 },
{ red: 74, green: 128, blue: 255, alpha: 255 },
{ red: 39, green: 67, blue: 135, alpha: 255 },
{ red: 0, green: 153, blue: 40, alpha: 255 },
{ red: 0, green: 187, blue: 50, alpha: 255 },
{ red: 0, green: 217, blue: 58, alpha: 255 },
{ red: 0, green: 114, blue: 30, alpha: 255 },
{ red: 91, green: 60, blue: 34, alpha: 255 },
{ red: 111, green: 74, blue: 42, alpha: 255 },
{ red: 129, green: 86, blue: 49, alpha: 255 },
{ red: 68, green: 45, blue: 25, alpha: 255 },
{ red: 79, green: 1, blue: 0, alpha: 255 },
{ red: 96, green: 1, blue: 0, alpha: 255 },
{ red: 112, green: 2, blue: 0, alpha: 255 },
{ red: 59, green: 1, blue: 0, alpha: 255 },
{ red: 147, green: 124, blue: 113, alpha: 255 },
{ red: 180, green: 152, blue: 138, alpha: 255 },
{ red: 209, green: 177, blue: 161, alpha: 255 },
{ red: 110, green: 93, blue: 85, alpha: 255 },
{ red: 112, green: 57, blue: 25, alpha: 255 },
{ red: 137, green: 70, blue: 31, alpha: 255 },
{ red: 159, green: 82, blue: 36, alpha: 255 },
{ red: 84, green: 43, blue: 19, alpha: 255 },
{ red: 105, green: 61, blue: 76, alpha: 255 },
{ red: 128, green: 75, blue: 93, alpha: 255 },
{ red: 149, green: 87, blue: 108, alpha: 255 },
{ red: 78, green: 46, blue: 57, alpha: 255 },
{ red: 79, green: 76, blue: 97, alpha: 255 },
{ red: 96, green: 93, blue: 119, alpha: 255 },
{ red: 112, green: 108, blue: 138, alpha: 255 },
{ red: 59, green: 57, blue: 73, alpha: 255 },
{ red: 131, green: 93, blue: 25, alpha: 255 },
{ red: 160, green: 114, blue: 31, alpha: 255 },
{ red: 186, green: 133, blue: 36, alpha: 255 },
{ red: 98, green: 70, blue: 19, alpha: 255 },
{ red: 72, green: 82, blue: 37, alpha: 255 },
{ red: 88, green: 100, blue: 45, alpha: 255 },
{ red: 103, green: 117, blue: 53, alpha: 255 },
{ red: 54, green: 61, blue: 28, alpha: 255 },
{ red: 112, green: 54, blue: 55, alpha: 255 },
{ red: 138, green: 66, blue: 67, alpha: 255 },
{ red: 160, green: 77, blue: 78, alpha: 255 },
{ red: 84, green: 40, blue: 41, alpha: 255 },
{ red: 40, green: 28, blue: 24, alpha: 255 },
{ red: 49, green: 35, blue: 30, alpha: 255 },
{ red: 57, green: 41, blue: 35, alpha: 255 },
{ red: 30, green: 21, blue: 18, alpha: 255 },
{ red: 95, green: 75, blue: 69, alpha: 255 },
{ red: 116, green: 92, blue: 84, alpha: 255 },
{ red: 135, green: 107, blue: 98, alpha: 255 },
{ red: 71, green: 56, blue: 51, alpha: 255 },
{ red: 61, green: 64, blue: 64, alpha: 255 },
{ red: 75, green: 79, blue: 79, alpha: 255 },
{ red: 87, green: 92, blue: 92, alpha: 255 },
{ red: 46, green: 48, blue: 48, alpha: 255 },
{ red: 86, green: 51, blue: 62, alpha: 255 },
{ red: 105, green: 62, blue: 75, alpha: 255 },
{ red: 122, green: 73, blue: 88, alpha: 255 },
{ red: 64, green: 38, blue: 46, alpha: 255 },
{ red: 53, green: 43, blue: 64, alpha: 255 },
{ red: 65, green: 53, blue: 79, alpha: 255 },
{ red: 76, green: 62, blue: 92, alpha: 255 },
{ red: 40, green: 32, blue: 48, alpha: 255 },
{ red: 53, green: 35, blue: 24, alpha: 255 },
{ red: 65, green: 43, blue: 30, alpha: 255 },
{ red: 76, green: 50, blue: 35, alpha: 255 },
{ red: 40, green: 26, blue: 18, alpha: 255 },
{ red: 53, green: 57, blue: 29, alpha: 255 },
{ red: 65, green: 70, blue: 36, alpha: 255 },
{ red: 76, green: 82, blue: 42, alpha: 255 },
{ red: 40, green: 43, blue: 22, alpha: 255 },
]
/*export const data = (data) => {
const size = Math.sqrt(data.length)
const image = createImage(size, size)
data.forEach(async (val, idx) => {
await image.setAtIndex(idx, getColor(val - 3))
})
return image
}*/
module.exports.data = data => {
const size = Math.sqrt(data.length)
const image = createImage(size, size)
data.forEach(async (val, idx) => {
await image.setAtIndex(idx, getColor(val - 3))
})
return image;
}
function getColor(colorId) {
if (!colors[colorId]) {
return { red: 0, green: 0, blue: 0, alpha: 0 }
} else {
return colors[colorId]
}
}