Skip to content

Instantly share code, notes, and snippets.

I'm not entirely sure.

Josh kernelsmith

I'm not entirely sure.
View GitHub Profile
kernelsmith /
Created Feb 27, 2019
to get radamsa to wait on stdin before generating the next case

Find main.scm and replace



((λ () (get-block stdin 1)))
kernelsmith /
Created May 10, 2018
decreasingly dumb ways of doing windows host discovery

Old ways of scanning for windows hosts

This is from an old presentation, I just wanted to record it somewhere. I'm not saying this stuff:

a) still works b) is a good idea c) hasn't been surpassed greatly in the last 7 years d) is completely accurate

hping & TTLs

kernelsmith / key_peele_east_west_names.rb
Created Apr 13, 2018
All the names, teams, schools, and East-West episode numbers for Key & Peele's East vs West ruby
View key_peele_east_west_names.rb
names = [
["D'Marcus Williums", "1", "east", "University of Georgia"],
["T.J. Juckson", "1", "east", "Wayne State University"],
["T'varisuness King", "1", "east", "Merrimack College"],
["Tyroil Smoochie-Wallace", "1", "east", "University of Miami"],
["D'Squarius Green, Jr.", "east", "University of Notre Dame"],
["Ibrahim Moizoos", "1", "east", "University of Tennessee at Chatanooga"],
["Jackmerius Tacktheritrix", "1", "east", "Michigan State University"],
["D'Isiah T. Billings-Clyde", "1", "east", "Coastal Carolina University"],
["D'Jasper Probincrux III", "1", "east", "South Carolina State University"],
kernelsmith /
Last active Apr 5, 2017
follow a redirect at the command line
curl -s -I $url | grep \^Location: | cut -d ':' -f 2-
# I had a longer version that continued following redirects up to a limit, but
# can't find it atm
# if you'd like to do the above anonymously, you can use and
# change the HTTP method from GET to HEAD and paste in your URL (assuming HEAD
# is supported by the webserver). In the response you'll see the
# Location: HTTP header w/the redirected URL (assuming nominal situation).
kernelsmith /
Last active May 10, 2016
Basic GPGME ruby gem usage

Basic GPGME Ruby Gem Usage

I just found this API ridiculously confusing to use, and maybe I just suck, but I don't want to figure it out again, so I'm writing it down here

Establish a gpg home dir if desired

Optional, but if you have an established gpg home dir that you want to use or you don't want it chosen for you

GPGME::Engine.home_dir = "/some/dir" # e.g. env['GNUPG_HOME']
kernelsmith /
Last active Jan 14, 2016
vmware tools problems such as mounting shares and kernel patches

Restart vmware tools services

  • restart the services so you can see if any fail

sudo /etc/vmware-tools/ restart

  • if failure, you can optionally check which services are actually still running

sudo /etc/vmware-tools/ status

  • but you'll want to rerun the vmware config script which will recompile kernel mods
kernelsmith /
Last active Jan 14, 2016
easily set ubuntu system date/time and timezone
# change this value to suit you, see below for further guidance
# Note, if you were to get this value from an argument etc, keep
# in mind it would be vulnerable to command injection
# get timezone values from `ls /usr/share/zoneinfo` if you need them
# for example, you can see there's a /usr/share/zoneinfo/US/Central and
# /usr/share/zoneinfo/America/Chicago etc
# Functions used to change or display the proxy state
# usually it's all the same host, but you could add more host vars if needed
_SPROXY_PORT="1080" # this is usually different than http/s
# comma separated (no spaces) list of hosts/ip ranges(cidr) to not proxy
kernelsmith / interfaces
Last active May 13, 2020
example etc/network/interfaces config
View interfaces
# always start with interface up
auth eth0
# Static
iface eth0 inet static
kernelsmith /
Last active Aug 29, 2015
Flush a linux interface to force a DHCP change after a network changes
ip addr flush dev eth0
You can’t perform that action at this time.