Skip to content

Instantly share code, notes, and snippets.

@lennyRBLX
lennyRBLX / tachiyomi_cbz_merger.lua
Created August 15, 2022 15:42
Merges Tachiyomi CBZ chapters. Requires Lua 5.1
require("zip")
-- credits: https://stackoverflow.com/questions/2829175/how-to-extract-files-from-a-zip-file-using-lua
function extract(zipPath, zipFilename, destinationPath)
local zfile, err = zip.open(zipPath .. zipFilename)
-- iterate through each file insize the zip file
for file in zfile:files() do
local currFile, err = zfile:open(file.filename)
local currFileContents = currFile:read("*a") -- read entire contents of current file
@lennyRBLX
lennyRBLX / seh_via_veh.cpp
Last active May 15, 2022 08:22
Full SEH with VEH
// deprecated for manual_exception_handling repo
#pragma once
#include <Windows.h>
#include <cstdint>
#include <memory>
#include <iostream>
#include <vector>
#include <cassert>
@lennyRBLX
lennyRBLX / fixing_validatehwnd_call.cpp
Created July 8, 2020 14:36
Gives code examples for all the necessary steps in order to call ValidateHwnd or any other Validate method in win32kbase.
// for examples sake, lets say all of these are pre defined: ValidateHwnd, wnd_handle
void* ethread::get_win32() {
return PsGetThreadWin32Thread(ethr);
}
void ethread::set_win32(void* new_, void* buffer) {
void* current = get_win32();
PsSetThreadWin32Thread(ethr, NULL, current); // reset win32
PsSetThreadWin32Thread(ethr, new_, NULL); // modify win32
@lennyRBLX
lennyRBLX / ragesu.lua
Last active March 10, 2020 11:37
fatality rewrite of ragesu for aimware v5
-- config
local invert_key = 0x5
-- dependencies
local csgo_globals = csgo.interface_handler:get_global_vars()
function tick() return csgo_globals.tickcount end
local function get_item(index, value)
@lennyRBLX
lennyRBLX / inclusion.lua
Last active January 21, 2020 00:23
A custom Pure Lua compiler to allow for static file inclusion.
-- credits to louka | merge.lua
-- helped a lot
local pattern_regex = "C_INCLUDE%s*%(?%s*['\"]([%w_/\\%.]+)['\"]%s*%)?"
local directory = "" -- adds onto all calls to get contents of files, really easy and helpful
local wrap_includes = false -- wraps files with pcall that has custom error message
local function get_line_count(string)
local result = 1
@lennyRBLX
lennyRBLX / coloring.hpp
Created November 6, 2019 15:57
A single header include for all coloring needs, can be used, easily, to create a simple rainbow effect, and convert HSV, and RGB, into hex for web design.
#pragma once
#include <Windows.h>
namespace coloring {
template< typename T >
std::string int_hex(T val) {
if (static_cast<int>(val) == 0)
return std::string("00");
char hexval[3];
@lennyRBLX
lennyRBLX / file parser.cpp
Last active July 2, 2021 09:00
Converts any file's byte's into a Resource Header file. File -> Resource
#include <vector>
#include <Windows.h>
#include <TlHelp32.h>
#include <iostream>
#include <fstream>
std::string file_path = "";
std::string file_endpath = "";
std::string namespace_name = "example_namespace";
std::string namespace_resource_name = "resources";
@lennyRBLX
lennyRBLX / gui_library.lua
Created May 10, 2019 01:52
Graphical User Interface Library; Creates a Base Interface to add Interface on top of; Created with intent to be used in Roblox
-- notes
--[[
size_pos = table, arranged as so: {<udim2>size, <udim2>pos}
size of objects:
toggle - {height = 21, width = 99}
slider - {height = 27, width = UDim2.new(1, -(posOffset))}
dropdown - {height = 25, width = 160}
textinput - {height = 21, width = 120}
@lennyRBLX
lennyRBLX / md5_hashing.lua
Created May 10, 2019 01:47
Hash Functions for Whitelisting; Old functions used in a Whitelist, Created by me
--[[ lua
function md5hashify(tohash)
local api = "https://helloacm.com/api/md5/?s="
local hash1 = game:HttpGet(api .. tohash, true):sub(2, 33)
hash1 = "additionsarecool|o|" .. hash1:sub(#hash1 - 10, #hash1)
local hash2 = game:HttpGet(api .. hash1, true):sub(20, 33)
local hash3 = game:HttpGet(api .. hash2, true):sub(2, 33)
return hash3
if not getgenv().if_globals_loaded then
getgenv().isBypassed = false
getgenv().global = false
getgenv().mt = false
getgenv().store = game.CoreGui
getgenv().if_globals_loaded = true
end
-- supported: synX, elysian, proto, and visenya