Skip to content

Instantly share code, notes, and snippets.

View jakejarvis's full-sized avatar

Jake Jarvis jakejarvis

View GitHub Profile
@jakejarvis
jakejarvis / tor-mirror.conf
Last active May 25, 2021 18:39
Tor hidden service & Apache virtual host for proxying a static site (WIP)
<VirtualHost 127.0.0.1:80>
# we'll be proxying from HTTPS origin
SSLProxyEngine On
ProxyRequests Off
# origin is gzip'ped, need to deflate the following filetypes for substitution below
AddOutputFilterByType SUBSTITUTE;DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript application/json application/xml application/atom+xml application/manifest+json
# do the proxying
ProxyPass "/" "https://jarv.is/" max=20 connectiontimeout=5 timeout=10 retry=60
description = [[
Detects whether the specified URL is vulnerable to the Exchange Server SSRF Vulnerability (CVE-2021-26855).
]]
local http = require "http"
local shortport = require "shortport"
local vulns = require "vulns"
local stdnse = require "stdnse"
local string = require "string"
@jakejarvis
jakejarvis / update_gitea.sh
Created December 29, 2020 18:09
Download and install latest Gitea binary
#!/bin/bash
# Download and install latest Gitea binary
set -euo pipefail
GITEA_BINARY=/usr/bin/gitea
# Set working directory to location of this script
cd "${0%/*}" || exit
@jakejarvis
jakejarvis / hugo-update.sh
Created September 27, 2020 14:06 — forked from dkebler/hugo-update.sh
Hugo Release Update Script - supports extended version
#!/bin/bash
# Version 0.21.0 8:26 PST, Nov 9, 2018
# inspried from this forum post https://discourse.gohugo.io/t/script-to-install-latest-hugo-release-on-macos-and-ubuntu/14774/10
# if you have run into github api anonymous access limits which happens during debugging/dev then add user and token here or sourced from a separate file
# . ~/githubapitoken
#GITHUB_USER=""
#GITHUB_TOKEN=""
if [ "$GITHUB_TOKEN" != "" ]; then
echo using access token with script
@jakejarvis
jakejarvis / docker-image-extract.py
Last active August 2, 2020 15:36
extract files from a docker image's filesystem (NOT a running container)
#!/usr/bin/python3
# Pulled from: https://www.madebymikal.com/quick-hack-extracting-the-contents-of-a-docker-image-to-disk/
# Usage:
# docker save -o image_files.tar image_tag:latest
# ./docker-image-extract.py image_files.tar /tmp/files
import tarfile
import json
// Based on [Eric Meyer's reset 2.0](http://meyerweb.com/eric/tools/css/reset/index.html)
// Global reset rules.
// For more specific resets, use the reset mixins provided below
@mixin global-reset {
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
[
"/opt/build/repo/resources/_gen/images/uses/images/desktop_huff3d862f18bedabf6af240f0ff0d98a8_6003507_1880x0_resize_lanczos_2.png",
"/opt/build/repo/resources/_gen/images/previously/images/2002_02_hucba0dfb2a6cd2eac228f6324fd3c2c00_88373_1880x0_resize_lanczos_2.png",
"/opt/build/repo/resources/_gen/images/previously/images/2002_10_huade0f0a44f90e018830dc158a47690c1_41470_1880x0_resize_lanczos_2.png",
"/opt/build/repo/resources/_gen/images/previously/images/2003_08_hu35babe9345f147b5925011380e0b4e13_96958_1880x0_resize_lanczos_2.png",
"/opt/build/repo/resources/_gen/images/previously/images/2004_11_hu88d55da84a60111e774bfa25184b2cec_308001_1880x0_resize_lanczos_2.png",
"/opt/build/repo/resources/_gen/images/previously/images/2006_04_hu56b3d1a05520156732d63e0c369f80b3_264892_1880x0_resize_lanczos_2.png",
"/opt/build/repo/resources/_gen/images/previously/images/2006_05_hu0074da065c686c283cddf6b8c78b7200_169698_1880x0_resize_lanczos_2.png",
"/opt/build/repo/resources/_gen/images/previously/image
@jakejarvis
jakejarvis / glitch-maintenance.html
Created May 28, 2020 04:49
glitch maintenance page source code
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Maintenance</title>
<noscript>
<meta http-equiv="refresh" content="1">
</noscript>
<style>
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@jakejarvis
jakejarvis / fizzbuzz.py
Created January 23, 2020 06:50 — forked from mouse-reeve/fizzbuzz.py
Fizzbuzz via answers.com
''' we're solving fizzbuzz with a little help from the web '''
from html.parser import HTMLParser
from urllib.request import Request, urlopen
import re
import time
base_url = 'https://www.answers.com/Q/'
tag_name = 'div'
class_name = 'answer-body'
delimiter = '_'