Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View fakuivan's full-sized avatar

fakuivan

  • Posadas, Misiones, Argentina
  • 10:33 (UTC -03:00)
View GitHub Profile
@fakuivan
fakuivan / ui_common.inc
Created November 28, 2016 19:06
A function that greatly simplifies the use of a target filter on sourcemod
#if defined _ui_common_included
#endinput
#endif
#define _ui_common_included
typedef ActOnTarget = function void (int i_admin, int i_target, any a_data);
stock int Simplified_ProcessTargets(int i_admin, char[] s_target, ActOnTarget f_action, char[] s_format, char[] s_ml_phrase, char[] s_phrase, a_data, int i_flags = 0)
{
char s_target_name[MAX_TARGET_LENGTH];
@fakuivan
fakuivan / empty_folder_remover.py
Created December 19, 2016 21:49
A simple script that deletes all of those annoing empty folders on your backups
#Empty folder deleter: A simple script that deletes all of those annoing empty folders on your backups
import os
from pathlib import Path
import argparse
def delete_empty_folders(path):
no_empty_dirs = True
for root, dirs, files in os.walk(str(path), topdown=False):
if os.listdir(root) == []:
#pragma semicolon 1
#pragma newdecls required
#include <sourcemod>
#include <sdktools>
#include <events>
#define PLUGIN_VERSION "0.7"
public Plugin myinfo =
@fakuivan
fakuivan / updater_script_gen.py
Last active February 11, 2017 06:04
A python3.4 script for creating a update manifest for @GoD-Tony's plugin updater
import vdf
import os
import argparse
from pathlib import Path, PurePosixPath
class RemoteToPathFormatter:
def __init__(self, local_root, remote_root):
"""
local_root This Path or string should be replaced by your local root directory.
remote_root This PurePosixPath or string should be put instead of the local root.
@fakuivan
fakuivan / sourcemod-buildenv.Dockerfile
Last active May 23, 2017 22:00
A complete (but w/o mysql and only the tf2 sdk) docker build environment for compiling sourcemod (1.8-dev branch) and its extensions, controlled by SSH.
FROM ubuntu
RUN apt update && apt upgrade -y && \
apt install -y git \
lib32stdc++6 \
lib32z1-dev \
libc6-dev-i386 \
linux-libc-dev \
lib32gcc-5-dev \
libgcc-5-dev \
@fakuivan
fakuivan / msysgit2unix-socket.py
Last active May 8, 2018 13:10 — forked from kevinvalk/msysgit2unix-socket.py
Set interpreter to ``/usr/bin/python2`` for compatiblility
#!/usr/bin/python2
"""
msysGit to Unix socket proxy
============================
This small script is intended to help use msysGit sockets with the new Windows Linux Subsystem (aka Bash for Windows).
It was specifically designed to pass SSH keys from the KeeAgent module of KeePass secret management application to the
ssh utility running in the WSL (it only works with Linux sockets). However, my guess is that it will have uses for other
@fakuivan
fakuivan / struct_tree_walker.lua
Last active January 9, 2019 06:38
Use Cheat Engine's LUA engine to walk a struct to find offsets that match a given value and recursively walk potential structure pointers found within
function scanTree(address, maxOffset, comparator, structValidator, maxDepth)
local offsetTree = {}
address = getAddress(address)
for currentOffset = 0, maxOffset, 1 do
local currentAddress = address + currentOffset
if comparator(currentAddress) then
offsetTree[currentOffset] = true
end
if maxDepth > 0 then
local nextNode = readPointer(currentAddress)
@fakuivan
fakuivan / command_extract_rip_relative_address.lua
Created January 11, 2019 03:35
Cheat engine lua script that creates an auto assembler command used to extract and make absolute a RIP-relative address in an instruction
-------------------------
-- Reads a RIP-relative address from an instruction
-- All parameters should be integers
function extractRIPRelativeAddress(address, offset, offset_size)
address = getAddressSafe(address)
if address == nil then return nil end
local instruction_size = getInstructionSize(address)
if instruction_size == nil then return nil end
readOffset = ({
[1] = function(address_) return readBytes(address_, 1, false) end,
diff --git a/Cameras/Dishonored2/InjectableGenericCameraSystem/GameConstants.h b/Cameras/Dishonored2/InjectableGenericCameraSystem/GameConstants.h
index bc8e206..b44950a 100644
--- a/Cameras/Dishonored2/InjectableGenericCameraSystem/GameConstants.h
+++ b/Cameras/Dishonored2/InjectableGenericCameraSystem/GameConstants.h
@@ -30,8 +30,8 @@
namespace IGCS::GameSpecific
{
// Mandatory constants to define for a game
- #define GAME_NAME "Dishonored 2, v1.77+"
- #define CAMERA_VERSION "1.0.0"
@fakuivan
fakuivan / dishonored2_internal-swap-licenses.ct
Last active August 1, 2019 20:09
Swaps licenses for the dev version of dishonored 2
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="27">
<CheatEntries>
<CheatEntry>
<ID>53</ID>
<Description>"Havok license bypasses"</Description>
<LastState Value="" RealAddress="00000000"/>
<GroupHeader>1</GroupHeader>
<CheatEntries>
<CheatEntry>