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
import sys | |
from pwn import * | |
def exploit(): | |
r.recvuntil("start: ") | |
addr = r.recv(10) | |
addr = int(addr, 16) | |
print hex(addr) |
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 BsidesSF CTF 2017 | |
import itertools | |
import requests | |
import sys | |
from binascii import hexlify, unhexlify | |
uh = unhexlify | |
h = hexlify |
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 pwn import * | |
from collections import defaultdict | |
def add_row(graph, y, row): | |
for x, col in enumerate(row): | |
true_x = x/2 | |
if col == " ": # Can do down or left | |
if not x & 1: # This is the left wall part |
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
# Taken from the binary | |
gh = "A)\xd9e\xa1\xf1\xe1\xc9\x19\t\x93\x13\xa1\t\xb9I\xb9\x89\xdda1i\xa1\xf1q!\x9d\xd5=\x15\xd5" | |
mh = "" | |
def mirror_bits(c): | |
return ( | |
(c & 1) << 7 | | |
(c & 2) << 5 | | |
(c & 4) << 3 | | |
(c & 8) << 1 | |
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
# Run from within gdb (e.g. `pi <enter>` and paste) | |
need = [0x27, 0xb3, 0x73, 0x9d, 0xf5, 0x11, 0xe7, 0xb1, 0xb3, 0xbe, 0x99, 0xb3, 0xf9, 0xf9, 0xf4, 0x30, 0x1b, 0x71, 0x99, 0x73, 0x23, 0x65, 0x99, 0xb1, 0x65, 0x11, 0x11, 0xbe, 0x23, 0x99, 0x27, 0xf9, 0x23, 0x99, 0x05, 0x65, 0xce] | |
map = {} | |
for i in range(0xfe): | |
r = gdb.execute("call get_tbl_entry({})".format(i), False, True) | |
v = int(r.rstrip().split()[-1], 16) | |
map[v] = i | |
s = "" |
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
#!/bin/bash | |
# | |
# Install/update Capstone/Keystone/Unicorn from GitHub with Python/Python3 bindings | |
# First time, run: | |
# $ sudo apt-get install git cmake gcc g++ pkg-config libglib2.0-dev | |
# | |
LOGFILE=/tmp/update-trinity.log | |
NB_CPU="$(grep -c processor /proc/cpuinfo)" |
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 bb | |
(ns context-times | |
(:require [clojure.data.csv :as csv] | |
[clojure.java.io :as io] | |
[clojure.java.shell :refer [sh]] | |
[clojure.string :as s] | |
[clojure.tools.cli :refer [parse-opts]])) | |
;; CLI |
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 ubuntu:22.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt update | |
# install dependencies for python3.8 | |
RUN apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev \ | |
libnss3-dev libssl-dev libreadline-dev libffi-dev wget curl git \ | |
file locales | |
#attempt to fix libncursesw.so.5 | |
RUN apt install libncurses5 -y |
OlderNewer