Skip to content

Instantly share code, notes, and snippets.

View subfission's full-sized avatar
👨‍💻
InfoSec, privacy, and programming

ѕυвƒιѕѕιση subfission

👨‍💻
InfoSec, privacy, and programming
  • This is not the web page you are looking for
View GitHub Profile
@subfission
subfission / example.sh
Created March 11, 2024 19:21
Best way to source a file or directory after null checking
#
# Example ternary to source a directory into PATH if it exists
#
[ -d $HOME/custom/dir ] && export PATH=$PATH:${HOME}/custom/dir
#
# Better way to source a path into the global environment through function calls
#
add_to_path() { [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]] && export PATH="$1:$PATH"; }
@subfission
subfission / PixelRepair.html
Created September 17, 2023 13:32
Attempt to repair dead screen pixels or burn in
<!DOCTYPE html>
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description" content="Repair stuck pixels & Burnin"><title>Screen Pixel Repair</title><style type="text/css">body,html,#v{margin:0;display:block;}</style></head>
<script type="text/javascript">function s() {setInterval(v, 10);} function v(){c=document.getElementById("v");
c.width=window.innerWidth;c.height=window.innerHeight;var b=768;var t=c.getContext("2d");var d=t.createImageData(b,b);
for (var i=0;i<b*b; i++){var p=i*4;d.data[p+3]=255;d.data[p+0]=Math.random()>=0.5?255:0;d.data[p+1]=Math.random()>=0.5?255:0;d.data[p+2]=Math.random()>=0.5?255:0;}
for (var y=0;y<c.height;y+=b){for (var x=0;x<c.width;x+=b){t.putImageData(d,x,y);}}
}
</script>
<body onload="s()"><canvas id="v"></canvas></body></html>
@subfission
subfission / readme.md
Created August 30, 2023 02:13
MAC OS Demystified Persistence
@subfission
subfission / init.sh
Last active August 10, 2022 00:52
init
#!/bin/bash
# init.sh
# This script is meant to setup the environment for testing.
if [ "$EUID" -ne 0 ]; then
echo "This must be run as root"
exit
fi
INSTALLPATH="/opt/installers"
@subfission
subfission / mouse_clicker.py
Created February 24, 2022 06:51
Click that mouse!
#!/usr/local/bin/python3
# Requires pynput package
from time import sleep
import sys
banner = """
by: subfission
======================================
@subfission
subfission / example.conf
Created September 11, 2020 08:11
Example OSCP Stapling for Apache
# 2020-09-11
# Mozilla Guideline v5.6, Apache 2.4.41, OpenSSL 1.1.1d, intermediate configuration
# https://ssl-config.mozilla.org/#server=apache&version=2.4.41&config=intermediate&openssl=1.1.1d&guideline=5.6
# this configuration requires mod_ssl, mod_socache_shmcb, mod_rewrite, and mod_headers
<VirtualHost *:80>
RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>
@subfission
subfission / README.txt
Last active July 8, 2022 13:03
hack back guide
_ _ _ ____ _ _
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / |
| _ | (_| | (__| < | |_) | (_| | (__| <|_|
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_)
A DIY Guide
@subfission
subfission / icinga_director_installer.sh
Created August 27, 2020 09:38
Icinga turnkey installer
#!/bin/bash
# Coded By: Zach Jetson
#
# This script installs icinga director and dependencies for CentOS 7.
#
# Requirements
# - icinga2, mysql, clean install
#
# usage: bash icinga_director_installer.sh
#
@subfission
subfission / ether.md
Last active July 28, 2020 23:15
Grab ethernet from host with single NIC.

Methods

Method 1

ifconfig | grep -Po 'ether \s*\K\S*'

Method 2

cat /sys/class/net/eth0/address