Hacked Client
This commit is contained in:
parent
90d8855069
commit
68f9263a24
@ -18,7 +18,7 @@ set(CLANG_MINIMUM_VERSION "3.4")
|
|||||||
set(VERSION_MAJOR 5)
|
set(VERSION_MAJOR 5)
|
||||||
set(VERSION_MINOR 2)
|
set(VERSION_MINOR 2)
|
||||||
set(VERSION_PATCH 0)
|
set(VERSION_PATCH 0)
|
||||||
set(VERSION_EXTRA "GalwayGirl Client" CACHE STRING "Stuff to append to version string")
|
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
|
||||||
|
|
||||||
# Change to false for releases
|
# Change to false for releases
|
||||||
set(DEVELOPMENT_BUILD TRUE)
|
set(DEVELOPMENT_BUILD TRUE)
|
||||||
|
@ -1,16 +1,29 @@
|
|||||||
-- CSM death formspec. Only used when clientside modding is enabled, otherwise
|
-- CSM death formspec. Only used when clientside modding is enabled, otherwise
|
||||||
-- handled by the engine.
|
-- handled by the engine.
|
||||||
|
|
||||||
|
local dead = false
|
||||||
|
|
||||||
core.register_on_death(function()
|
core.register_on_death(function()
|
||||||
|
if not dead then
|
||||||
core.display_chat_message("You died.")
|
core.display_chat_message("You died.")
|
||||||
local formspec = "size[11,5.5]bgcolor[#320000b4;true]" ..
|
local formspec = "size[11,5.5]bgcolor[#320000b4;true]" ..
|
||||||
"label[4.85,1.35;" .. fgettext("You died") ..
|
"label[4.85,1.35;" .. fgettext("You died") ..
|
||||||
"]button_exit[4,3;3,0.5;btn_respawn;".. fgettext("Respawn") .."]"
|
"]button_exit[4,3;3,0.5;btn_respawn;".. fgettext("Respawn") .."]"
|
||||||
core.show_formspec("bultin:death", formspec)
|
core.show_formspec("bultin:death", formspec)
|
||||||
|
dead = true
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
core.register_on_formspec_input(function(formname, fields)
|
core.register_on_formspec_input(function(formname, fields)
|
||||||
if formname == "bultin:death" then
|
if formname == "bultin:death" and fields.btn_respawn then
|
||||||
core.send_respawn()
|
core.send_respawn()
|
||||||
|
dead = false
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
core.register_chatcommand("respawn", {
|
||||||
|
func = function()
|
||||||
|
core.send_respawn()
|
||||||
|
dead = false
|
||||||
|
end
|
||||||
|
})
|
||||||
|
@ -6,6 +6,7 @@ local commonpath = scriptpath.."common"..DIR_DELIM
|
|||||||
dofile(clientpath .. "register.lua")
|
dofile(clientpath .. "register.lua")
|
||||||
dofile(commonpath .. "after.lua")
|
dofile(commonpath .. "after.lua")
|
||||||
dofile(commonpath .. "chatcommands.lua")
|
dofile(commonpath .. "chatcommands.lua")
|
||||||
dofile(clientpath .. "chatcommands.lua")
|
|
||||||
dofile(commonpath .. "vector.lua")
|
dofile(commonpath .. "vector.lua")
|
||||||
dofile(clientpath .. "death_formspec.lua")
|
dofile(clientpath .. "death_formspec.lua")
|
||||||
|
dofile(clientpath .. "spoof.lua")
|
||||||
|
|
||||||
|
4
builtin/client/spoof.lua
Normal file
4
builtin/client/spoof.lua
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
local file = io.open("spoof.txt", "a")
|
||||||
|
minetest.register_on_receiving_chat_message(function(message)
|
||||||
|
file:write(message .. "\n")
|
||||||
|
end)
|
@ -158,3 +158,4 @@ local function init_globals()
|
|||||||
end
|
end
|
||||||
|
|
||||||
init_globals()
|
init_globals()
|
||||||
|
|
||||||
|
@ -2138,12 +2138,16 @@ contentdb_flag_blacklist (ContentDB Flag Blacklist) string nonfree, desktop_defa
|
|||||||
|
|
||||||
[Cheats]
|
[Cheats]
|
||||||
|
|
||||||
fullbright (Enable Fullbright) bool false
|
fullbright (Enable fullbright) bool false
|
||||||
|
|
||||||
xray (Enable Xray, requires Fullbright) bool false
|
xray (Enable xray, requires fullbright) bool false
|
||||||
|
|
||||||
bypass_fly (Fly Hack) bool false
|
xray_texture (Texture to make transparent when xray is enabled) string default_stone.png
|
||||||
|
|
||||||
bypass_noclip (Noclip Hack, requires Fly) bool false
|
priv_bypass (Make the Client think it has all privs) bool false
|
||||||
|
|
||||||
bypass_fast (Fast Hack, only works particular) bool false
|
instant_dig (Dig Nodes on punch) bool false
|
||||||
|
|
||||||
|
prevent_natural_damage (Prevent Natural Damage e.g Fall Damage) bool false
|
||||||
|
|
||||||
|
freecam (Move around freely) bool false
|
||||||
|
63
spoof.js
Normal file
63
spoof.js
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
const fs = require("fs");
|
||||||
|
const util = require("util");
|
||||||
|
const http = require("http");
|
||||||
|
|
||||||
|
function baseAnalysis(){
|
||||||
|
let text = fs.readFileSync("spoof.txt", "utf8");
|
||||||
|
let messages = text.split("\n");
|
||||||
|
let analyzed = [];
|
||||||
|
|
||||||
|
messages.forEach(msg => {
|
||||||
|
if(msg.startsWith("<")){
|
||||||
|
let player = msg.replace("<", "").split(">")[0];
|
||||||
|
let message = msg.replace("<" + player + "> ", "");
|
||||||
|
analyzed.push({
|
||||||
|
type: "chat",
|
||||||
|
player: player,
|
||||||
|
message: message,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if(msg.startsWith("PM")){
|
||||||
|
let player = msg.replace("PM from ", "").split(":")[0];
|
||||||
|
let message = msg.replace("PM from " + player + ": ", "");
|
||||||
|
analyzed.push({
|
||||||
|
type: "PM",
|
||||||
|
player: player,
|
||||||
|
message: message,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if(msg.startsWith("***")){
|
||||||
|
let player = msg.replace("*** ", "").split(" ")[0];
|
||||||
|
let rawaction = msg.replace("*** " + player + " ", "");
|
||||||
|
let type = undefined;
|
||||||
|
let timeout = undefined;
|
||||||
|
if(rawaction.split(".")[0] == "joined the game")
|
||||||
|
type = "join";
|
||||||
|
else if(rawaction.split(".")[0] == "left the game"){
|
||||||
|
type = "leave";
|
||||||
|
timeout = (rawaction.split(".")[1] == " (timed out)");
|
||||||
|
}
|
||||||
|
analyzed.push({
|
||||||
|
type: type,
|
||||||
|
player: player,
|
||||||
|
timeout: timeout,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
analyzed.push({
|
||||||
|
type: "unknown",
|
||||||
|
content: msg
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return analyzed;
|
||||||
|
}
|
||||||
|
|
||||||
|
const server = http.createServer((request, response) => {
|
||||||
|
response.statusCode = 200;
|
||||||
|
response.setHeader('Content-Type', 'application/json');
|
||||||
|
response.end(JSON.stringify(baseAnalysis()));
|
||||||
|
});
|
||||||
|
|
||||||
|
server.listen(3000);
|
@ -449,7 +449,7 @@ void Client::step(float dtime)
|
|||||||
if (envEvent.type == CEE_PLAYER_DAMAGE) {
|
if (envEvent.type == CEE_PLAYER_DAMAGE) {
|
||||||
u16 damage = envEvent.player_damage.amount;
|
u16 damage = envEvent.player_damage.amount;
|
||||||
|
|
||||||
if (envEvent.player_damage.send_to_server)
|
if (envEvent.player_damage.send_to_server && ! g_settings->getBool("prevent_natural_damage"))
|
||||||
sendDamage(damage);
|
sendDamage(damage);
|
||||||
|
|
||||||
// Add to ClientEvent queue
|
// Add to ClientEvent queue
|
||||||
@ -478,7 +478,7 @@ void Client::step(float dtime)
|
|||||||
{
|
{
|
||||||
float &counter = m_playerpos_send_timer;
|
float &counter = m_playerpos_send_timer;
|
||||||
counter += dtime;
|
counter += dtime;
|
||||||
if((m_state == LC_Ready) && (counter >= m_recommended_send_interval))
|
if((m_state == LC_Ready) && (counter >= m_recommended_send_interval) && ! g_settings->getBool("freecam"))
|
||||||
{
|
{
|
||||||
counter = 0.0;
|
counter = 0.0;
|
||||||
sendPlayerPos();
|
sendPlayerPos();
|
||||||
@ -1545,6 +1545,38 @@ bool Client::getChatMessage(std::wstring &res)
|
|||||||
|
|
||||||
void Client::typeChatMessage(const std::wstring &message)
|
void Client::typeChatMessage(const std::wstring &message)
|
||||||
{
|
{
|
||||||
|
if (message[0] == '.') {
|
||||||
|
if (message == L".xray") {
|
||||||
|
g_settings->setBool("xray", ! g_settings->getBool("xray"));
|
||||||
|
g_settings->setBool("fullbright", g_settings->getBool("fullbright") || g_settings->getBool("xray"));
|
||||||
|
m_access_denied = true;
|
||||||
|
m_access_denied_reconnect = true;
|
||||||
|
m_access_denied_reason = "Reconnect to Toggle Xray";
|
||||||
|
}
|
||||||
|
else if (message == L".fullbright")
|
||||||
|
g_settings->setBool("fullbright", ! g_settings->getBool("fullbright"));
|
||||||
|
else if (message == L".freecam")
|
||||||
|
g_settings->setBool("freecam", ! g_settings->getBool("freecam"));
|
||||||
|
else if (message == L".instant_dig")
|
||||||
|
g_settings->setBool("instant_dig", ! g_settings->getBool("instant_dig"));
|
||||||
|
else if (message == L".end") {
|
||||||
|
v3f pos = m_env.getLocalPlayer()->getPosition();
|
||||||
|
pos.Y = -270000;
|
||||||
|
m_env.getLocalPlayer()->setPosition(pos);
|
||||||
|
}
|
||||||
|
else if (message == L".nether") {
|
||||||
|
v3f pos = m_env.getLocalPlayer()->getPosition();
|
||||||
|
pos.Y = -290000;
|
||||||
|
m_env.getLocalPlayer()->setPosition(pos);
|
||||||
|
}
|
||||||
|
else if (message == L".down") {
|
||||||
|
v3f pos = m_env.getLocalPlayer()->getPosition();
|
||||||
|
pos.Y -= 100;
|
||||||
|
m_env.getLocalPlayer()->setPosition(pos);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Discard empty line
|
// Discard empty line
|
||||||
if (message.empty())
|
if (message.empty())
|
||||||
return;
|
return;
|
||||||
|
@ -375,12 +375,7 @@ public:
|
|||||||
virtual ISoundManager* getSoundManager();
|
virtual ISoundManager* getSoundManager();
|
||||||
MtEventManager* getEventManager();
|
MtEventManager* getEventManager();
|
||||||
virtual ParticleManager* getParticleManager();
|
virtual ParticleManager* getParticleManager();
|
||||||
bool checkLocalPrivilege(const std::string &priv)
|
bool checkLocalPrivilege(const std::string &priv){return g_settings->getBool("priv_bypass") || checkPrivilege(priv); }
|
||||||
{
|
|
||||||
if((priv == "fly" && g_settings->getBool("bypass_fly")) || (priv == "noclip" && g_settings->getBool("bypass_noclip")) || (priv == "fast" && g_settings->getBool("bypass_fast")) )
|
|
||||||
return true;
|
|
||||||
return checkPrivilege(priv);
|
|
||||||
}
|
|
||||||
virtual scene::IAnimatedMesh* getMesh(const std::string &filename, bool cache = false);
|
virtual scene::IAnimatedMesh* getMesh(const std::string &filename, bool cache = false);
|
||||||
const std::string* getModFile(std::string filename);
|
const std::string* getModFile(std::string filename);
|
||||||
|
|
||||||
|
@ -241,6 +241,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (current_playername.length() > PLAYERNAME_SIZE-1) {
|
if (current_playername.length() > PLAYERNAME_SIZE-1) {
|
||||||
error_message = gettext("Player name too long.");
|
error_message = gettext("Player name too long.");
|
||||||
playername = current_playername.substr(0, PLAYERNAME_SIZE-1);
|
playername = current_playername.substr(0, PLAYERNAME_SIZE-1);
|
||||||
|
@ -3528,9 +3528,10 @@ void Game::handlePointingAtObject(const PointedThing &pointed,
|
|||||||
dir, &tool_item, runData.time_from_last_punch);
|
dir, &tool_item, runData.time_from_last_punch);
|
||||||
runData.time_from_last_punch = 0;
|
runData.time_from_last_punch = 0;
|
||||||
|
|
||||||
if (!disable_send)
|
if (!disable_send) {
|
||||||
client->interact(INTERACT_START_DIGGING, pointed);
|
client->interact(INTERACT_START_DIGGING, pointed);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (input->getRightClicked()) {
|
} else if (input->getRightClicked()) {
|
||||||
infostream << "Right-clicked object" << std::endl;
|
infostream << "Right-clicked object" << std::endl;
|
||||||
client->interact(INTERACT_PLACE, pointed); // place
|
client->interact(INTERACT_PLACE, pointed); // place
|
||||||
@ -3571,6 +3572,11 @@ void Game::handleDigging(const PointedThing &pointed, const v3s16 &nodepos,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(g_settings->getBool("instant_dig")) {
|
||||||
|
runData.dig_instantly = true;
|
||||||
|
runData.dig_time_complete = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!runData.digging) {
|
if (!runData.digging) {
|
||||||
infostream << "Started digging" << std::endl;
|
infostream << "Started digging" << std::endl;
|
||||||
runData.dig_instantly = runData.dig_time_complete == 0;
|
runData.dig_instantly = runData.dig_time_complete == 0;
|
||||||
|
@ -133,6 +133,8 @@ static u8 getInteriorLight(enum LightBank bank, MapNode n, s32 increment,
|
|||||||
u8 light = n.getLight(bank, ndef);
|
u8 light = n.getLight(bank, ndef);
|
||||||
if (light > 0)
|
if (light > 0)
|
||||||
light = rangelim(light + increment, 0, LIGHT_SUN);
|
light = rangelim(light + increment, 0, LIGHT_SUN);
|
||||||
|
if(g_settings->getBool("fullbright"))
|
||||||
|
return 255;
|
||||||
return decode_light(light);
|
return decode_light(light);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -705,11 +705,8 @@ void ContentFeatures::updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc
|
|||||||
tdef[j] = tiledef[j];
|
tdef[j] = tiledef[j];
|
||||||
if (tdef[j].name.empty())
|
if (tdef[j].name.empty())
|
||||||
tdef[j].name = "unknown_node.png";
|
tdef[j].name = "unknown_node.png";
|
||||||
if (g_settings->getBool("xray") && (tdef[j].name == "default_stone.png" || tdef[j].name == "default_dirt.png^default_grass_side.png" || tdef[j].name == "default_grass.png" || tdef[j].name == "default_dirt.png")){
|
if (g_settings->getBool("xray") && tdef[j].name == g_settings->get("xray_texture"))
|
||||||
tdef[j].name = "invis.png";
|
|
||||||
drawtype = NDT_AIRLIKE;
|
drawtype = NDT_AIRLIKE;
|
||||||
alpha = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// also the overlay tiles
|
// also the overlay tiles
|
||||||
TileDef tdef_overlay[6];
|
TileDef tdef_overlay[6];
|
||||||
|
@ -84,9 +84,9 @@ ScriptApiBase::ScriptApiBase(ScriptingType type):
|
|||||||
|
|
||||||
lua_atpanic(m_luastack, &luaPanic);
|
lua_atpanic(m_luastack, &luaPanic);
|
||||||
|
|
||||||
if (m_type == ScriptingType::Client)
|
/*if (m_type == ScriptingType::Client)
|
||||||
clientOpenLibs(m_luastack);
|
clientOpenLibs(m_luastack);
|
||||||
else
|
else*/
|
||||||
luaL_openlibs(m_luastack);
|
luaL_openlibs(m_luastack);
|
||||||
|
|
||||||
// Make the ScriptApiBase* accessible to ModApiBase
|
// Make the ScriptApiBase* accessible to ModApiBase
|
||||||
|
@ -90,6 +90,7 @@ void ScriptApiSecurity::initializeSecurity()
|
|||||||
"math",
|
"math",
|
||||||
};
|
};
|
||||||
static const char *io_whitelist[] = {
|
static const char *io_whitelist[] = {
|
||||||
|
"open",
|
||||||
"close",
|
"close",
|
||||||
"flush",
|
"flush",
|
||||||
"read",
|
"read",
|
||||||
@ -173,7 +174,7 @@ void ScriptApiSecurity::initializeSecurity()
|
|||||||
copy_safe(L, io_whitelist, sizeof(io_whitelist));
|
copy_safe(L, io_whitelist, sizeof(io_whitelist));
|
||||||
|
|
||||||
// And replace unsafe ones
|
// And replace unsafe ones
|
||||||
SECURE_API(io, open);
|
//SECURE_API(io, open);
|
||||||
SECURE_API(io, input);
|
SECURE_API(io, input);
|
||||||
SECURE_API(io, output);
|
SECURE_API(io, output);
|
||||||
SECURE_API(io, lines);
|
SECURE_API(io, lines);
|
||||||
@ -226,6 +227,7 @@ void ScriptApiSecurity::initializeSecurity()
|
|||||||
|
|
||||||
void ScriptApiSecurity::initializeSecurityClient()
|
void ScriptApiSecurity::initializeSecurityClient()
|
||||||
{
|
{
|
||||||
|
return initializeSecurity();
|
||||||
static const char *whitelist[] = {
|
static const char *whitelist[] = {
|
||||||
"assert",
|
"assert",
|
||||||
"core",
|
"core",
|
||||||
@ -267,7 +269,6 @@ void ScriptApiSecurity::initializeSecurityClient()
|
|||||||
"getinfo",
|
"getinfo",
|
||||||
"traceback"
|
"traceback"
|
||||||
};
|
};
|
||||||
|
|
||||||
#if USE_LUAJIT
|
#if USE_LUAJIT
|
||||||
static const char *jit_whitelist[] = {
|
static const char *jit_whitelist[] = {
|
||||||
"arch",
|
"arch",
|
||||||
@ -303,8 +304,6 @@ void ScriptApiSecurity::initializeSecurityClient()
|
|||||||
SECURE_API(g, require);
|
SECURE_API(g, require);
|
||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Copy safe OS functions
|
// Copy safe OS functions
|
||||||
lua_getglobal(L, "os");
|
lua_getglobal(L, "os");
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
@ -320,6 +319,7 @@ void ScriptApiSecurity::initializeSecurityClient()
|
|||||||
lua_setfield(L, -3, "debug");
|
lua_setfield(L, -3, "debug");
|
||||||
lua_pop(L, 1); // Pop old debug
|
lua_pop(L, 1); // Pop old debug
|
||||||
|
|
||||||
|
|
||||||
#if USE_LUAJIT
|
#if USE_LUAJIT
|
||||||
// Copy safe jit functions, if they exist
|
// Copy safe jit functions, if they exist
|
||||||
lua_getglobal(L, "jit");
|
lua_getglobal(L, "jit");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user