Skip to content

Instantly share code, notes, and snippets.

@amatus
amatus / rom24b6-lope-colour.diff
Created March 29, 2017 20:12
Lope's color patch to ROM 2.4b6 (approximately)
diff --git a/src/act_comm.c b/src/act_comm.c
index 19eba7f..fb1f792 100644
--- a/src/act_comm.c
+++ b/src/act_comm.c
@@ -301,7 +301,7 @@ void do_auction( CHAR_DATA *ch, char *argument )
REMOVE_BIT(ch->comm,COMM_NOAUCTION);
}
- sprintf( buf, "You auction '%s'\n\r", argument );
+ sprintf( buf, "{yYou auction '%s'{x\n\r", argument );
@amatus
amatus / gist:da76f8c8f20180ff6b0e7f2046705360
Created February 19, 2017 23:01
pt-duplicate-key-checker run on gnunet mysql datastore
# ########################################################################
# gnunet.gn090
# ########################################################################
# idx_hash is a left-prefix of idx_hash_vhash
# Key definitions:
# KEY `idx_hash` (`hash`),
# KEY `idx_hash_vhash` (`hash`,`vhash`),
# Column types:
# `hash` binary(64) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
#define GNUNET_MQ_hd_fixed_size(name,code,str,ctx) \
({ \
void (*_cb)(void *cls, const str *msg) = &handle_##name; \
((struct GNUNET_MQ_MessageHandler) { \
NULL, (GNUNET_MQ_MessageCallback) _cb, \
(ctx), (code), sizeof (str) }); \
})
#define GNUNET_MQ_hd_var_size(name,code,str,ctx) \
({ \
[14617.407881] usb 3-2: new full-speed USB device number 95 using xhci_hcd
[14617.537783] usb 3-2: New USB device found, idVendor=1337, idProduct=4141
[14617.537787] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[14617.537789] usb 3-2: Product: AHA! Badge
[14617.537791] usb 3-2: Manufacturer: Amatus
[14617.537792] usb 3-2: SerialNumber: 0123456789ABCDEF
[14617.538931] usb-storage 3-2:1.0: USB Mass Storage device detected
[14617.539018] scsi host42: usb-storage 3-2:1.0
[14618.548288] scsi 42:0:0:0: Direct-Access FSL SEMI FSL MASS STORAGE 0001 PQ: 0 ANSI: 4
[14618.548588] sd 42:0:0:0: Attached scsi generic sg1 type 0
import angr
proj = angr.Project('root_fs/bin/flag', load_options={"auto_load_libs": False})
argv1 = angr.claripy.BVS("argv1", 0xE * 8)
initial_state = proj.factory.entry_state(args=["./flag", argv1])
initial_path = proj.factory.path(initial_state)
path_group = proj.factory.path_group(initial_state)
path_group.explore(find=0x10764, avoid=0x10768)
found = path_group.found[0]
print found.state.posix.dumps(1)
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
#include <fcntl.h>
/*
* 0x00 - strange char
* 0x01 ^a - seems to do nothing, except after ^r
* 0x02 - 0x0E ^b - ^n - strange chars
@amatus
amatus / gnunet.sh
Last active June 13, 2017 19:33
This script installs or updates an existing install of the latest gnunet sources on debian jessie
#!/bin/sh -ex
apt-get update
apt-get install -y make libltdl-dev libsqlite3-dev libunistring-dev libidn11-dev zlib1g-dev autoconf libtool libgnutls28-dev libgcrypt20-dev libcurl4-gnutls-dev git libextractor-dev texinfo automake
apt-get install -y -t jessie-backports autopoint
[ -e /opt/gnunet/bin/gnunet-arm ] && [ -e /tmp/gnunet-system-runtime ] && su -s /bin/bash -c "/opt/gnunet/bin/gnunet-arm -e" gnunet
rm -rf /opt/mhd /opt/gnunet
[ -d libmicrohttpd/.svn ] && rm -rf libmicrohttpd
@amatus
amatus / cloud-at-cost.sh
Last active March 19, 2021 14:43
This script configures a cloud@cost debian install
#!/bin/sh -e
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
mkdir -p /root/.ssh
echo ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHHuFvsgkjQBRsWgDCgI9b0rPVNbDHmTXg8+0gy3kUVb > /root/.ssh/authorized_keys
passwd -l root
deluser --remove-home user
cat > /etc/rc.local << EOF
#!/bin/sh
@amatus
amatus / crypto300.py
Created October 3, 2015 21:48
Solution to DCTF 2015 Crypto 300
import z3
ciphertext = "320b1c5900180a034c74441819004557415b0e0d1a316918011845524147384f5700264f48091e4500110e41030d1203460b1d0752150411541b455741520544111d0000131e0159110f0c16451b0f1c4a74120a170d460e13001e120a1106431e0c1c0a0a1017135a4e381b16530f330006411953664334593654114e114c09532f271c490630110e0b0b"
c = map(ord, ciphertext.decode("hex"))
space = [z3.Int("space%d" % x) for x in range(len(c) + 1)]
p = z3.Array("plain", z3.IntSort(), z3.BitVecSort(8))
s = z3.Solver()
s.add(space[0] == 0xA)
for i in range(len(c)):
s.add(z3.Or(
@amatus
amatus / gist:cf939551f8e7024743b6
Last active August 29, 2015 14:27
Why the Master Pancake Audience Should Choose Hackers
Angelina Jolie NIP SLIP
Actors in their 20s as high-school students
Unnecessary roler-blading and skate-boarding (while hanging on to a limo)
Unnecessary eye-ware (sunglasses at night)
Horrible "cyber" scenes (flying through the computer)
20th anniversary, San Antonio Alamo is screening it
Actors:
* Jonny Lee Miller as Dade Murphy (a.k.a. Zero Cool, a.k.a. Crash Override)
* Angelina Jolie as Kate Libby (a.k.a. Acid Burn). The director auditioned Hilary Swank, Heather Graham, and Liv Tyler for the role which ultimately went to Jolie. The part was originally offered to Katherine Heigl, but due to prior commitments to Under Siege 2: Dark Territory (1995), she had to turn it down.
* Renoly Santiago as Ramόn Sánchez (a.k.a. The Phantom Phreak)