Skip to content

Instantly share code, notes, and snippets.

boxofrox / .bashrc
Created February 10, 2020 18:52 — forked from kevinoid/.bashrc
GnuPG pinentry script for terminal or graphical interface based on $PINENTRY_USER_DATA.
# ~/.bashrc: executed by bash(1) for non-login shells.
# If file exists (likely) copy fragment below into existing script:
# If stdin is a terminal
if [ -t 0 ]; then
# Set GPG_TTY so gpg-agent knows where to prompt. See gpg-agent(1)
export GPG_TTY="$(tty)"
# Set PINENTRY_USER_DATA so pinentry-auto knows to present a text UI.
boxofrox /
Created March 13, 2018 18:36 — forked from anonymous/
Rust code shared from the playground
#[macro_use] extern crate nom;
fn to_s(i: Vec<u8>) -> String {
named!( single_quoted_shell_arg(&[u8]) -> String
, map!( delimited!( char!('\'')
, escaped_transform!( take_until!("\\'")
, "\\"
boxofrox /
Created June 30, 2017 00:23 — forked from jdeathe/
How to generate a self-signed SAN SSL/TLS certificate using openssl

How to generate a self-signed SAN SSL/TLS certificate using openssl

Generating a self-signed certificate is a common taks and the command to generate one with openssl is well known and well documented. Generating a certificate that includes subjectAltName is not so straght forward however. The following example demonstrates how to generate a SAN certificate without making a permanent change to the openssl configuration.

Generate a list of all required DNS names, (Note: CN will be discarded).

$ export SAN="DNS:www.domain.localdomain,DNS:domain.localdomain"
boxofrox /
Created May 30, 2017 03:20 — forked from anonymous/
Rust code shared from the playground
extern crate serde;
extern crate serde_derive;
extern crate serde_json;
use std::collections::HashMap;
use serde::{Serialize, Serializer};
fn main() {
let mut map: HashMap<String, String> = HashMap::new();
boxofrox /
Last active May 23, 2017 23:52 — forked from ob/gist:11961f2f82fc7001c71444d261352f94
tokio-rs : two url example -> many url example
extern crate curl;
extern crate futures;
extern crate time;
extern crate tokio_core;
extern crate tokio_curl;
extern crate tokio_timer;
use curl::easy::Easy;
use futures::{Future, Stream};
use futures::stream::futures_unordered;
boxofrox /
Created November 17, 2015 20:03 — forked from bonsaiviking/
Guide to using Nmap to scan for the Heartbleed bug.


  1. Nmap. The script requires version 6.25 or newer. The latest version, 6.47, already includes the next 3 dependencies, so you can skip directly to the Scanning section below.
    • An easy way to get the latest Nmap release is to use Kali Linux.
    • Binary installers are available for Windows.
    • RPM installer available for Linux, or install from source.
    • .dmg installer available for Mac OS X.
  2. tls.lua. The script requires this Lua library for TLS handshaking.
  3. ssl-heartbleed.nse. This is the script itself.