Skip to content

Instantly share code, notes, and snippets.

View seanthegeek's full-sized avatar

Sean Whalen seanthegeek

View GitHub Profile
@seanthegeek
seanthegeek / config.fish
Last active February 26, 2025 01:47 — forked from kppullin/config.fish
Fish shell + WSL2 + gnome-keyring / secret-tool
#
# This fish config sets up a working `gnome-keyring` on WSL2.
# I imagine it will work with WSL1 as well, perhaps after adjusting the `DISPLAY` value.
#
# Based off this bash script: https://askubuntu.com/questions/815327/running-gnome-keyring-on-wsl-windows-subsystem-for-linux
# Tested and working with `aws-vault` and `jetbrains-toolbox`.
#
# Be sure your x server is running!!!
set -x DISPLAY (cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
@seanthegeek
seanthegeek / checkdmarc-banking.json
Created October 29, 2024 14:40
Output of checkdmarc --skip-tls ally.com bankofamerica.com chase.com
[
{
"domain": "ally.com",
"base_domain": "ally.com",
"dnssec": false,
"ns": {
"hostnames": [
"gns5.ally.com",
"gns8.ally.com",
"gns7.ally.com",
@seanthegeek
seanthegeek / MVACAs.pem
Last active October 28, 2024 02:40
Root CAs for mark certificates
-----BEGIN CERTIFICATE-----
MIIF3jCCA8agAwIBAgIQBsFnz+v0jTXWJBAYXhHF6zANBgkqhkiG9w0BAQsFADCB
iDELMAkGA1UEBhMCVVMxDTALBgNVBAgTBFV0YWgxDTALBgNVBAcTBExlaGkxFzAV
BgNVBAoTDkRpZ2lDZXJ0LCBJbmMuMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29t
MScwJQYDVQQDEx5EaWdpQ2VydCBWZXJpZmllZCBNYXJrIFJvb3QgQ0EwHhcNMTkw
OTIzMTIxMjA2WhcNNDkwOTIzMTIxMjA2WjCBiDELMAkGA1UEBhMCVVMxDTALBgNV
BAgTBFV0YWgxDTALBgNVBAcTBExlaGkxFzAVBgNVBAoTDkRpZ2lDZXJ0LCBJbmMu
MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMScwJQYDVQQDEx5EaWdpQ2VydCBW
ZXJpZmllZCBNYXJrIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK
AoICAQDawvvIO7cL04ptZxgLw/YwqDuluiFsMvGsr+vZcfq5c3hKuX0uMrslza91
@seanthegeek
seanthegeek / flaskvisitor.py
Last active August 8, 2024 15:29
Gathering IP useful IP address info
# Requires flask and user_agents
import user_agents
from flask import request
def get_source_ip_address():
forwarded_header = request.headers.get("X-Forwarded-For")
if forwarded_header:
return forwarded_header.split(",")[0]
else:
@seanthegeek
seanthegeek / installpwshdeps.sh
Last active October 25, 2019 03:43
Installs missing dependencies from Debian 9 (stretch) for Powershell on Debian 10 (buster) and higher (including Kali Linux)
#!/bin/bash
# Installs missing dependencies from Debian 9 (stretch) for Powershell on Debian 10 (buster) and higher (including Kali Linux)
mkdir /tmp/pwshtmp
cd /tmp/pwshtmp
wget http://http.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u3_amd64.deb
wget http://http.us.debian.org/debian/pool/main/i/icu/icu-devtools_57.1-6+deb9u3_amd64.deb
wget http://http.us.debian.org/debian/pool/main/u/ust/liblttng-ust0_2.9.0-2+deb9u1_amd64.deb
wget http://http.us.debian.org/debian/pool/main/libu/liburcu/liburcu4_0.9.3-1_amd64.deb
@seanthegeek
seanthegeek / fixgeoip.py
Created February 18, 2019 15:15
Fix missing GeoIP data
from elasticsearch_dsl import connections, Search, Q
from parsedmarc.elastic import _AggregateReportDoc, _ForensicReportDoc
from parsedmarc.utils import get_ip_address_country
# Replace with your Elasticsearch URLs
connections.create_connection(hosts=["127.0.0.1:9200"])
search = Search(index="dmarc_aggregate*")
@seanthegeek
seanthegeek / startroute.py
Created November 6, 2018 16:38
Sceipts to manually controll Cuckoo routing
#!/home/cuckoo/venv/bin/python
from cuckoo.misc import set_cwd
from cuckoo.core.rooter import rooter
vm_interface = "virbr0"
vpn_interface = "tun0"
vm_ip = "192.168.100.7"
rt_id = "tun0"
cwd = "/home/cuckoo/.cuckoo"
@seanthegeek
seanthegeek / cuckooboot.sh
Created October 27, 2018 00:27
Old cuckooboot.sh
#!/bin/bash
CUCKOO_USER="cuckoo"
CUCKOO_PATH="/opt/cuckoo"
VIRBR_IP="192.168.100.1"
INETSIM_DNS_PORT="5342"
VIRBR_DEV="virbr0"
su $CUCKOO_USER -c "pkill gunicorn" >/dev/null 2>&1
su $CUCKOO_USER -c "pkill python" > /dev/null 2>&1
@seanthegeek
seanthegeek / install-malhur.md
Last active October 26, 2018 08:58
Random install instructions
sudo apt-get install -y uthash-dev libconfig-dev libarchive-dev libtool autoconf automake checkinstall
git clone https://github.com/rieck/malheur.git
cd malheur
./bootstrap
./configure --prefix=/usr
make

Note: The version number checkinstall parses from Malhur doesn’t conform to Debian standard, so you'll have to specify the correct version number when prompted by checkinstall. Technically, sudo make install will work fine. checkinstall just makes it easier to upgrade and/or remove it just like any other Debian package.

@seanthegeek
seanthegeek / pip-update-all.sh
Created June 30, 2018 13:27
A script update all pip packages
sudo apt-get install -y curl python3 pkg-config libcurl4-nss-dev glib2.0-dev libcairo2-dev gobject-introspection libgirepository1.0-dev libasound2-dev
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python3 get-pip.py
sudo -H pip install pip-review
sudo -H pip install -U --ignore-installed pycurl
sudo -H pip-review --auto