Skip to content

Instantly share code, notes, and snippets.

View th0rex's full-sized avatar

Timo von Hartz th0rex

View GitHub Profile
#include <string.h>
char* some_arr =
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
// @0x4012a2
int find_char(char* arr, char to_find) {
int i = 0;
for (; arr[i] != 0; ++i) {
if (arr[i] == to_find) {
Damage = 35
Dmgrate_Head = 1.3
Dmgrate_Chest = 1
Dmgrate_Arm = 0.8
Dmgrate_Leg = 0.8
Firerate = 950
Firetime = 100
FireAnimationtime = 333
Max_Range = 300000
ReloadTime = 2272
th0rex@void /v/R/Ironsight> ./isx All/Ironsight_2018_Feb_03/data/*.wpg | grep -A 2 "Statistics"
Statistics for file: All/Ironsight_2018_Feb_03/data/ani.wpg
Compressed: 7734/7734
Encrypted: 0/7734
--
Statistics for file: All/Ironsight_2018_Feb_03/data/building.wpg
Compressed: 1408/1408
Encrypted: 0/1408
--
Statistics for file: All/Ironsight_2018_Feb_03/data/character_custom.wpg
// clang++ eea.cpp -std=c++17 -o eea -O3
// ./eea <num1> <num2> <num3> <num4> ...
#include <cstdint>
#include <cstdlib>
#include <utility> // std::swap
struct result {
std::int64_t s;
std::int64_t t;
@th0rex
th0rex / pwn.rb
Last active January 10, 2018 12:26
34C3 readme revenge pwn script
# encoding: ASCII-8BIT
# socat TCP-LISTEN:2323,reuseaddr,fork EXEC:./readme_revenge
# ruby pwn.rb
require 'pwn'
context.arch = 'amd64'
context.log_level = :debug
z = Sock.new 'localhost', 2323
@th0rex
th0rex / config.tex
Last active February 24, 2025 10:29
% Sprache und Schriftart einstellen
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
% Taken from http://pr0gramm.com/top/latex/2286360 and adapted
\usepackage{minted}
// rustc aes_decrypt.rs -o aes_decrypt
// ./aes_decrypt
#[cfg_attr(rustfmt, rustfmt_skip)]
static S: [u8; 16 * 16] = [
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75,
0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84,
// rustc generate_round_key.rs -o generate_round_key
// ./generate_round_key
#[cfg_attr(rustfmt, rustfmt_skip)]
static S: [u8; 16 * 16] = [
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75,
0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84,
use std::fmt;
#[derive(Eq, PartialEq)]
enum Element {
Index(usize),
GCall(Vec<Element>),
}
impl fmt::Display for Element {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// Compile with: clang++ -std=c++17 -O3 matrix_mul.cpp -o matrix_mul
// Run with: ./matrix_mul
// Produces:
// result: [
// 1, 0, 0, 0,
// 0, 1, 0, 0,
// 0, 0, 1, 0,
// 0, 0, 0, 1,
// ]