Skip to content

Instantly share code, notes, and snippets.

View BenLubar's full-sized avatar

Ben Lubar BenLubar

View GitHub Profile
package main
import (
"bufio"
"bytes"
"encoding/binary"
"io"
"os"
)
@BenLubar
BenLubar / base.go
Created July 10, 2021 15:07
to be clear, none of these compile, and not just because of the syntax errors
package main
import "git.lubar.me/ben/spy-cards/card"
func main() {
var def card.Def
def.ID = card.Delilah
def.Effects = []*card.EffectDef{
{
Conversation Flow ([ and ] represent 0 or more repetitions):
c->s handshake_request
s->c handshake_reply
[
c->s request
[
s->c text
]
s->c (result OR fail)
local dfplex = Proto("dfplex", "Dwarf Fortress Multiplexer")
local cmds = {
[0x6e] = "update",
[0x6f] = "sendKey",
[0x73] = "connect",
[0x75] = "resize",
[0x76] = "requestTurn"
}
local colors = {

I wish Ghidra could understand these constructs (or alternatively, I knew how to tell Ghidra to override these incorrectly decompiled statements)

Multi-field assignments

Simple example:

struct
{
 int16_t x;
int32_t add_to_vector(building *item,vector<building *> *vec)
{
int32_t size;
int32_t current_index;
int32_t current_index_00;
building **new_start;
building **new_start_00;
size_t old_size;
size_t old_size_00;
@BenLubar
BenLubar / LICENSE
Last active June 23, 2019 14:47
JSLint license with IBM exception
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://gist.githubusercontent.com/BenLubar/55938e0334a6ddac3aa286aafb7277da/raw/actor.json",
"name": "Test Actor",
"type": "Service"
}
@BenLubar
BenLubar / ssh_private_key
Created May 4, 2019 16:20
Most secure SSH private key, as determined by security professionals
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAzSEhYAq2/sGG5ezL8d2e32NU41PkXoTfEgT57obRSFsXlz0A
Iq/4IhKJcpsrBVefYQiB0cn+F8+SErCvNri4PxHBXYR7coq4eW0p1jfICxBP9K5P
d3TOjKl/xTq9XQ+fBZitN0sc6JO65lAsf3UO37Hv1346kMowIc2Ny4B/9AXjBYWG
GkfDhSNPqIkRrBJ1LzA/aJjB9nPTxewBUyJWqqHp8m0eNGi1WY32bHSoz1y/czNR
2omoo0gOISmBpPQwbsoEnJWACW8tx0ZyVtp59N8B7hpYlybEhyFTKksmdhdfj80n
as0uWkikbiVRu5Zw2zyhkvCHS4687hkpAAjZaQIDAQABAoIBABwze9UqY/IuRQ+D
OJ6t61Om4lrGg9UCy3A8wueqHUenTlz6g/RA4Qo+JitdbdK0MzMx6jcfYBGB9gEf
zVbmml4BYOYsepRKwgXfnirXTGdI/NUUydQQeP0ZqHlDFBmhNimczeOWLglDliRn
zVZQj5Ttb53eusqBIZDkI6RgrDauAXchUTLODZLlnYhdO7Tp9EXfurta3FsNfW9H