Skip to content

Instantly share code, notes, and snippets.

View gabemarshall's full-sized avatar

Gabe Marshall gabemarshall

View GitHub Profile
@gabemarshall
gabemarshall / rc4.js
Last active August 25, 2017 21:34 — forked from salipro4ever/rc4.js
/*
* RC4 symmetric cipher encryption/decryption
*
* @license Public Domain
* @param string key - secret key for encryption/decryption
* @param string str - string to be encrypted/decrypted
* @return string
*/
function rc4(key, str) {
var s = [], j = 0, x, res = '';
@gabemarshall
gabemarshall / ActiveRecord Cheat Sheet v1
Created January 12, 2018 21:24 — forked from jessieay/ActiveRecord Cheat Sheet v1
Active Record cheat sheet with examples of queries I've needed most so far
ActiveRecord cheat sheet / EXAMPLES
INSTALL
=======
$ gem install activerecord
in GEMFILE: gem ‘activerecord’
REQUIRE
=======
require ‘active_record’
file
StaticMetafile
StaticDib
clsid
objref
ADODB.Command.6.0
ADODB.Parameter.6.0
ADODB.Connection.6.0
ADODB.Recordset.6.0
ADODB.Error.6.0
@gabemarshall
gabemarshall / msigen.wix
Created March 12, 2019 16:23 — forked from xpn/msigen.wix
WIX file with embedded Powershell, which will be executed as SYSTEM
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" UpgradeCode="12345678-1234-1234-1234-111111111111" Name="Example Product Name" Version="0.0.1" Manufacturer="@_xpn_" Language="1033">
<Package InstallerVersion="200" Compressed="yes" Comments="Windows Installer Package"/>
<Media Id="1" Cabinet="product.cab" EmbedCab="yes"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="Example">
<Component Id="ApplicationFiles" Guid="12345678-1234-1234-1234-222222222222">
@gabemarshall
gabemarshall / reclaimWindows10.ps1
Last active March 15, 2019 18:10 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@gabemarshall
gabemarshall / install-miniconda.sh
Created March 26, 2019 03:16
miniconda installation for Ubuntu
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda-latest-Linux-x86_64.sh
@gabemarshall
gabemarshall / gitr_dump.rb
Last active November 4, 2019 15:59
Ruby script to search Github and dump a list of individual files as well as repos
#!/usr/bin/env ruby
# gem install faraday && gem install tty-prompt
# export GITHUB_AUTH=[replace with Github API token]
# Ex: ruby gitr_dump.rb '"corp.contoso.com"'
require "faraday"
require "json"
require "csv"
require "rb-readline"
#!/bin/bash
# A fork of g0tmi1k's kali script
#-Metadata----------------------------------------------------#
# Filename: kali-rolling.sh (Update: 2016-04-08) #
#-Info--------------------------------------------------------#
# Personal post-install script for Kali Linux Rolling #
#-Author(s)---------------------------------------------------#
# g0tmilk ~ https://blog.g0tmi1k.com/ #
#-Operating System--------------------------------------------#
# Designed for: Kali Linux Rolling [x64] (VM - VMware) #
@gabemarshall
gabemarshall / wayback.sh
Created August 23, 2017 17:53
Script to download results from the wayback machine, and do some ghetto parsing
#!/bin/bash
# Requires httpie and jq
#### Settings ####
read -p "What domain would you like to search the wayback machine for? " domain
http --download --output=$domain.json "https://web.archive.org/cdx/search?url=$domain%2F&matchType=prefix&collapse=urlkey&output=json&fl=original%2Cmimetype%2Ctimestamp%2Cendtimestamp%2Cgroupcount%2Cuniqcount&filter=!statuscode%3A%5B45%5D..&_=1498608272486"
cat $domain.json| jq '.[][]'| grep 'http'| grep -v -i -e '.js' -e '.gif' -e '.png' -e '.jpg' -e '.jpeg' -e '.css' | cut -d '"' -f2 > $domain".txt"
@gabemarshall
gabemarshall / win_vms.md
Last active July 14, 2020 18:29
Temporary Windows VMs

Retrieve List of Microsoft IE/Edge Trial VMs

(credit to https://twitter.com/jack_halon/status/1229467736759263233)

curl https://web.archive.org/cdx/search\?url\=az792536.vo.msecnd.net\&matchType\=prefix\&collapse\=urlkey\&output\=json\&fl\=original%2Cmimetype%2Ctimestamp%2Cendtimestamp%2Cgroupcount%2Cuniqcount\&filter\=\!statuscode%3A%5B45%5D |jq -r '.[][]'| grep -v -F '.txt'|grep -F '.zip'|sort -u
IE/Edge VMs