Skip to content

Instantly share code, notes, and snippets.

Ben Nagy bnagy

Block or report user

Report or block bnagy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bnagy
bnagy / gpgmutt.md
Last active May 23, 2019
Mutt, Gmail and GPG
View gpgmutt.md

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@bnagy
bnagy / scansion.ipynb
Created Jun 26, 2018
Teaching a computer to teach me how to scan latin poetry
View scansion.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bnagy
bnagy / afl-llvm-rt.o.c
Last active Jun 13, 2018
AFL SHM with guard pages
View afl-llvm-rt.o.c
/*
american fuzzy lop - LLVM instrumentation bootstrap
---------------------------------------------------
Written by Laszlo Szekeres <lszekeres@google.com> and
Michal Zalewski <lcamtuf@google.com>
LLVM integration design comes from Laszlo Szekeres.
Copyright 2015 Google Inc. All rights reserved.
View afl-pause.sh
#!/bin/sh
#
# american fuzzy lop - pause a set of fuzzers
# --------------------------------------
#
# By @rantyben, based on afl-whatsup, which is:
# Written and maintained by Michal Zalewski <lcamtuf@google.com>
#
# Copyright 2015 Google Inc. All rights reserved.
#
@bnagy
bnagy / searchers.rb
Created Aug 13, 2012
trying to make a threadsafe capybara poltergeist searcher
View searchers.rb
require 'capybara'
require 'capybara/dsl'
require 'capybara/poltergeist'
Capybara.configure do |config|
config.run_server = false
config.default_driver = :poltergeist
end
module Searchers
View pollenate.rb
#! /usr/bin/env ruby
# Pollenate ONE sync dir from each target into all other
# targets fuzzing the same format. Assumes that work
# dirs are named as by github.com/bnagy/afl-launch.
#
# Each target syncs inside its own directory already
# so copying any of the sync dirs works. It is possible
# that you'll miss some stuff, but it saves N * N-1 sync
#
View extension_map.rb
ARGF.each_line {|line|
begin
warn "Starting work on #{line.chomp}"
# expect a line like this:
# s3://commoncrawl-crawl-002/2010/09/24/9/1285380159663_9.arc.gz
proto,unused,bucket_name,*rest=line.chomp.split File::SEPARATOR
raise ArgumentError, "#{__FILE__}: Unknown S3 Protocol #{proto}" unless proto=~/^s3/
object_name=File.join rest
size=Integer( s3.buckets[bucket_name].objects[object_name].content_length )
warn "Reading from #{bucket_name.inspect}, #{object_name.inspect}, size #{size}"
View extension_map.rb
class ArcFile
include Enumerable
def initialize( input_stream )
@handle=input_stream
end
def each
return self.to_enum unless block_given?
View ntstatus.rb
NTSTATUS_ERRORS = {
'STATUS_SUCCESS' => "0x00000000",
'STATUS_SEVERITY_SUCCESS' => "0x00000000",
'STATUS_SEVERITY_INFORMATIONAL' => "0x00000001",
'STATUS_SEVERITY_WARNING' => "0x00000002",
'STATUS_SEVERITY_ERROR' => "0x00000003",
'STATUS_WAIT_0' => "0x00000000",
'STATUS_WAIT_1' => "0x00000001",
'STATUS_WAIT_2' => "0x00000002",
'STATUS_WAIT_3' => "0x00000003",
View gist:5175611
class Player
def initialize(name, health=100)
@name = name.capitalize
@health = health
end
def say_hello
puts "I'm #{@name} with a health of #{@health}."
end
You can’t perform that action at this time.