This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from binaryninja import IntrinsicInfo | |
from binaryninja.types import Type | |
from binaryninja.log import log_info, log_error | |
from binaryninja.architecture import Architecture | |
from binaryninja.function import RegisterInfo, InstructionInfo, InstructionTextToken | |
from binaryninja.enums import InstructionTextTokenType, BranchType, LowLevelILFlagCondition | |
class TESTARCH(Architecture): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf8 -*- | |
from collections import defaultdict | |
from itertools import permutations | |
class PaymentSolver: | |
def __init__(self, people): | |
# if X owe Y N euro, | |
# then Y owe X -N euro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌─┬┐ | |
│ ││ | |
├─┼┤ | |
└─┴┘ | |
╔═╦╗ ╒═╤╕ ╓─╥╖ | |
║ ║║ │ ││ ║ ║║ | |
╠═╬╣ ╞═╪╡ ╟─╫╢ | |
╚═╩╝ ╘═╧╛ ╙─╨╜ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import wraps | |
class print_in_out: | |
def __init__(self, in_str, out_str): | |
self.in_str = in_str | |
self.out_str = out_str | |
def __call__(self, f): | |
@wraps(f) | |
def wrapped(*args, **kargs): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2 | |
import sys | |
from ctypes import cdll, c_char_p, cast | |
from ctypes.util import find_library | |
# to use with gdb: | |
# set exec-wrapper ./wrapper_template.py | |
# custom args and env vars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
gcc -m32 -o getaddrs getaddrs.c | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
void | |
p_data_string(char* string) { |