Skip to content

Instantly share code, notes, and snippets.

View th0rex's full-sized avatar

Timo von Hartz th0rex

View GitHub Profile
@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
// 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@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
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
#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) {
@th0rex
th0rex / impl.cc
Last active February 18, 2018 19:14
algorithm thing
#include <algorithm>
#include <iostream>
#include <iterator>
#include <random>
#include <vector>
std::vector<unsigned> random_vec(const unsigned count) {
std::random_device rnd_device;
std::mt19937 mt(rnd_device());
std::uniform_int_distribution<unsigned> dist;
@th0rex
th0rex / config.tex
Created March 11, 2018 17:23
Some latex styles
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{minted}
\usepackage{xcolor}
\definecolor{background}{HTML}{1d1f21}
\definecolor{foreground}{HTML}{c5c8c6}
\definecolor{comment}{HTML}{969896}
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
const uint32_t data[256] =
{
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
namespace TriCore {
enum {
PHI = 0,
INLINEASM = 1,
CFI_INSTRUCTION = 2,
EH_LABEL = 3,
GC_LABEL = 4,
KILL = 5,
EXTRACT_SUBREG = 6,
INSERT_SUBREG = 7,
#pragma once
#include <exception>
#include <variant>
#include <experimental/coroutine>
#include <experimental/net>
namespace ams::async {
using std::experimental::coroutine_handle;