Skip to content

Instantly share code, notes, and snippets.

@jfeilbach
jfeilbach / check_tls.sh
Last active March 14, 2023 23:51
Check for TLS cert expiration
#!/bin/bash
SECONDS=0
RED='\033[0;31m'
WHITE='\033[1;37m'
CYAN='\033[0;36m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
list=''
@jfeilbach
jfeilbach / dark.md
Last active February 18, 2020 07:18
How To Get Dark GNOME Shell Menus And Dialogs On Ubuntu 19.10 With Yaru Theme

Gnome Shell dark

The default dark theme in Ubuntu 19.04/19.10 Gnome is missing some components in gnome shell. This will apple the YAru dark theme to the missing portions of gnome shell.

Install software

sudo apt install git meson sassc libglib2.0-dev libxml2-utils
git clone https://github.com/ubuntu/yaru
cd yaru
meson build
cd build
@jfeilbach
jfeilbach / .vimrc
Last active September 13, 2019 15:54
some .vimrc settings
hi comment ctermfg=grey
if has("syntax")
syntax on
endif
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
@jfeilbach
jfeilbach / get_brent.sh
Last active September 4, 2019 15:47
Checks the last time a user logged into AWS console
#!/bin/bash
# Checks the last time a user logged into AWS console via CloudTrail
# Outputs to stdout or notify OSD
# Requires ~/.aws/credentials with AWS_REGION and AWS_DEFAULT_PROFILE set
SECONDS=0
export AWS_SSH_KEY=<key name>
export AWS_REGION=us-gov-west-1
export AWS_DEFAULT_PROFILE=gov
@jfeilbach
jfeilbach / fix.sh
Last active August 15, 2019 16:58
fix display resolution in vm
#!/bin/bash
# Fix resolution lost during reboot
cmd=$(xrandr --listmonitors | grep Virtual | awk '{ print $3 }')
if [[ "${cmd}" == "2560/677x1440/381+0+0" ]]; then
res=$(gtf 2560 1440 60 | grep Modeline | sed s/Modeline\ //)
base=$(gtf 2560 1440 60 | grep Modeline | awk '{ print $2 }')
xrandr --newmode ${res}
xrandr --addmode Virtual1 ${base}
@jfeilbach
jfeilbach / get_dod_certs.sh
Created August 15, 2019 16:07
get the DoD certs including root certs. download, verify, install, and revoke
#!/bin/bash
# DoD Root Certificate install 19 July 2019
# to do: add Firefix import
# set cert numbers as variables
# combine fingerprint functions
# check all root CA fingerprints
# compare against CRL
SECONDS='0'
NC='\e[0m'
@jfeilbach
jfeilbach / ssl-dh-params.nse
Last active January 8, 2022 17:23
test Diffie-Hellman handshake using nmap
local nmap = require "nmap"
local shortport = require "shortport"
local sslcert = require "sslcert"
local stdnse = require "stdnse"
local string = require "string"
local math = require "math"
local table = require "table"
local tls = require "tls"
local vulns = require "vulns"
local have_ssl, openssl = pcall(require, "openssl")
@jfeilbach
jfeilbach / ssl-cert.nse
Created August 7, 2019 15:18
get tls cert details
local datetime = require "datetime"
local nmap = require "nmap"
local shortport = require "shortport"
local sslcert = require "sslcert"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local tls = require "tls"
local unicode = require "unicode"
@jfeilbach
jfeilbach / sslv2.nse
Created August 7, 2019 15:18
test for ssl v2 ciphers
local shortport = require "shortport"
local sslcert = require "sslcert"
local sslv2 = require "sslv2"
description = [[
Determines whether the server supports obsolete and less secure SSLv2, and discovers which ciphers it
supports.
]]
---
@jfeilbach
jfeilbach / ssl-enum-ciphers.nse
Created August 7, 2019 15:16
test tls connection
local coroutine = require "coroutine"
local math = require "math"
local nmap = require "nmap"
local shortport = require "shortport"
local sslcert = require "sslcert"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local tls = require "tls"