Skip to content

Instantly share code, notes, and snippets.

View kaywoz's full-sized avatar

ka kaywoz

  • between a hard place and a nightmarish hellscape....
  • X @Morna666
View GitHub Profile
@drichline
drichline / motd.sh
Created November 30, 2024 21:02
motd.sh
#!/bin/bash
# System info
echo -e " System info on......: $(date '+%H:%M %Y-%m-%d')"
echo -e " Hostname............: $(cat /etc/hostname)"
echo -e " Last login..........: $(last -w | head -n1 | tr -s ' ' | cut -f1 -d' ') from $(last -w | head -n1 | tr -s ' ' | cut -f3 -d' ')"
echo -e " Uptime..............: $(uptime -p | sed 's/^up.//')"
echo -e " Load Averages.......: $(cat /proc/loadavg | cut -f1 -d' '), $(cat /proc/loadavg | cut -f2 -d' '), $(cat /proc/loadavg | cut -f3 -d' ')"
echo -e " Memory..............: Used: $(free -m | grep Mem: | xargs | cut -f3 -d' ')M | Free: $(free -m | grep Mem: | xargs | cut -f7 -d' ')M | Total: $(free -m | grep Mem: | xargs | cut -f2 -d' ')M"
echo -e " CPU Temperature.....: $(sensors | grep Package | cut -f2 -d'+' | cut -f1 -d' ')"
echo -e " Root disk...........: Used: $(df -h / | tail -n1 | tr -s ' ' | cut -f3 -d' ') | Free: $(df -h / | tail -n1 | tr -s ' ' | cut -f4 -d' ') | Total: $(df -h / | tail -n1 | tr -s ' ' | cut -f2 -d' ')"
@brooksvb
brooksvb / Uptime-Kuma-Status-Page-Dark-Mode-High-Density-Tweaks.css
Last active September 3, 2025 17:00
These CSS tweaks are for higher density display for Uptime Kuma status pages in dark mode.
:root {
--min-item-width: 28ch;
--max-item-width: .5fr;
--grid-spacing: .25rem;
--item-padding: .25rem;
}
/* Let items expand on small screens */
@media (max-width: 600px) {
:root {
@scyto
scyto / proxmox.md
Last active September 17, 2025 03:36
my proxmox cluster

ProxMox Cluster - Soup-to-Nutz

aka what i did to get from nothing to done.

note: these are designed to be primarily a re-install guide for myself (writing things down helps me memorize the knowledge), as such don't take any of this on blind faith - some areas are well tested and the docs are very robust, some items, less so). YMMV

Purpose of Proxmox cluster project

Required Outomces of cluster project

@jorisvervuurt
jorisvervuurt / opnsense-i226-nic-tunables.txt
Last active May 30, 2025 09:48
OPNsense - Intel i226 NIC tunables
<item>
<tunable>net.inet.icmp.drop_redirect</tunable>
<value>1</value>
<descr/>
</item>
<item>
<tunable>net.isr.bindthreads</tunable>
<value>1</value>
<descr/>
</item>
@api0cradle
api0cradle / check_vulnerabledrivers.ps1
Last active September 2, 2025 20:10
A quick script to check for vulnerable drivers. Compares drivers on system with list from loldrivers.io
# Simple script to check drivers in C:\windows\system32\drivers against the loldrivers list
# Author: Oddvar Moe - @oddvar.moe
$drivers = get-childitem -Path c:\windows\system32\drivers
$web_client = new-object system.net.webclient
$jsonString = $web_client.DownloadString("https://www.loldrivers.io/api/drivers.json")
$jsonString = $jsonString -replace '"INIT"','"init"'
$loldrivers = $jsonString | ConvertFrom-Json
Write-output("Checking {0} drivers in C:\windows\system32\drivers against loldrivers.io json file" -f $drivers.Count)
(?i)((access_key|access_token|admin_pass|admin_user|algolia_admin_key|algolia_api_key|alias_pass|alicloud_access_key|amazon_secret_access_key|amazonaws|ansible_vault_password|aos_key|api_key|api_key_secret|api_key_sid|api_secret|api.googlemaps AIza|apidocs|apikey|apiSecret|app_debug|app_id|app_key|app_log_level|app_secret|appkey|appkeysecret|application_key|appsecret|appspot|auth_token|authorizationToken|authsecret|aws_access|aws_access_key_id|aws_bucket|aws_key|aws_secret|aws_secret_key|aws_token|AWSSecretKey|b2_app_key|bashrc password|bintray_apikey|bintray_gpg_password|bintray_key|bintraykey|bluemix_api_key|bluemix_pass|browserstack_access_key|bucket_password|bucketeer_aws_access_key_id|bucketeer_aws_secret_access_key|built_branch_deploy_key|bx_password|cache_driver|cache_s3_secret_key|cattle_access_key|cattle_secret_key|certificate_password|ci_deploy_password|client_secret|client_zpk_secret_key|clojars_password|cloud_api_key|cloud_watch_aws_access_key|cloudant_password|cloudflare_api_key|cloudflare_auth_k
@vikas891
vikas891 / ExtractAllScripts.ps1
Last active July 16, 2024 19:32
A PowerShell script to re-construct a suspicious .PS1 from script-blocks recorded in Event ID 4104
#Usage:
#
#NOTE: The script expects an argument which is the full File Path of the EVTX file.
#
#C:\>ExtractAllScripts.ps1
#The default behavior of the script is to assimilate and extract every script/command to disk.
#
#C:\ExtractAllScripts -List
#This will only list Script Block IDs with associated Script Names(if logged.)
#
@DissectMalware
DissectMalware / deobfuscator.py
Last active January 18, 2022 15:18
VBA deobfuscation - Emotet XLSM
from oletools.olevba import VBA_Parser, TYPE_OLE, TYPE_OpenXML, TYPE_Word2003_XML, TYPE_MHTML
import sys
import re
vbaparser = VBA_Parser(sys.argv[1])
replace_regex = r"\s*([^=]+)\s*=\s*Replace\(\s*([^,]+)\s*,\s*\"([^,]*)\"\s*,\s*\"([^,]*)\"\s*\)"
replace = re.compile(replace_regex, re.MULTILINE)
regex_url = "http(s)?://[^,\"]+"
@liamfoneill
liamfoneill / bootstrap.ps1
Created October 25, 2021 11:05
This is a file I use to bootstrap a new Windows installation with all of the applications and tools that I use. Ideally I would get everything from Winget but there are times when I need to get the apps from chocolately or Windows Store.
winget install code52.Carnac -s winget
winget install Github.GithubDesktop -s winget
winget install Postman.Postman -s winget
winget install Github.cli -s winget
winget install Microsoft.Powertoys -s winget
winget install Microsoft.AzureCLI -s winget
winget install Microsoft.VisualStudioCode -s winget
winget install Microsoft.VisualStudio.2022.Enterprise -s winget
winget install Microsoft.Bicep -s winget
winget install Microsoft.Teams -s winget
@jackullrich
jackullrich / mainc.c
Last active May 23, 2025 21:29
Single Step Encryption/Decryption
#include <Windows.h>
LONG SingleStepEncryptDecrypt(EXCEPTION_POINTERS* ExceptionInfo);
typedef VOID(__stdcall* Shellcode)();
LPBYTE ShellcodeBuffer;
ULONG_PTR PreviousOffset;
ULONG_PTR CurrentOffset;
ULONGLONG InstructionCount;
DWORD dwOld;