Skip to content

Instantly share code, notes, and snippets.

@libcrack
libcrack / timemachine.sh
Created May 17, 2024 12:00
macOS timemachine bash helper functions
# Fri May 17 13:52:40 CEST 2024
# devnull@libcrack.so
#
# timemachine helper functions:
# timemachine-notify
# timemachine-notify-loop
# timemachine-speedup
# timemachine-log
# timemachine-logstream
# timemachine-log-show
@libcrack
libcrack / minicom-bin-xfr.sh
Created May 12, 2024 15:33
Minicom file transfer helper
#!/bin/sh
INFILE=/dev/null
OUTFILE=/dev/null
if [ ${#} -lt 1 ]; then
echo "Usage: ${0} -i infile -o outfile"
exit 1
fi
@libcrack
libcrack / openvpn_clients_update.php
Created May 12, 2024 14:35
PHP script to update auth details for specific vpn clients pfSense boxes
#!/usr/local/bin/php-cgi -f
# devnull@libcrack.so
# Sun Nov 24 04:22:26 CET 2019
<?php
require_once("globals.inc");
require_once("filter.inc");
require_once("util.inc");
require_once("config.inc");
require_once("service-utils.inc");
@libcrack
libcrack / zerocopy.sh
Created May 12, 2024 14:28
Script to enable/disable zerocopy in FreeBSD/pfSense boxes
#!/bin/sh
# devnull@libcrack.so
# Mon Sep 9 21:30:51 CEST 2019
case $1 in
enable)
echo "[*] Enabling zerocopy"
sysctl net.bpf.zerocopy_enable=1
exit $?
;;
@libcrack
libcrack / cputemp.sh
Created May 12, 2024 14:25
Script to read CPU temperature in FreeBSD/pfSense boxes
#!/bin/sh
# devnull@libcrack.so
# Mon Sep 9 21:30:51 CEST 2019
#
# Title : cputemp
# Description: Prints the average CPU core temperature
# Author : linuxitux
# Date : 12-01-2016
# Usage : ./cputemp
# Notes : kldload coretemp
@libcrack
libcrack / dnsbl.sh
Created May 12, 2024 14:24
Script to extract allow and deny lists from pfblockerng in pfSense boxes
#!/bin/sh
# devnull@libcrack.so
# Mon Sep 9 21:30:51 CEST 2019
denylist=/root/dnsbl.deny
allowlist=/root/dnsbl.allow
allowtmp=/tmp/dnsbl_tmp.sup
logfile=/var/log/pfblockerng/dnsbl.log
@libcrack
libcrack / bypass_filter.php
Created May 12, 2024 14:17
PHP script to enable/disable custom pfSense firewall rules
#!/usr/local/bin/php-cgi -f
# devnull@libcrack.so
# Thu Mar 2 19:48:14 CET 2023
<?php
require_once("globals.inc");
require_once("filter.inc");
require_once("util.inc");
require_once("config.inc");
@libcrack
libcrack / manpages-install.sh
Created May 12, 2024 14:05
Install FreeBSD manpages in pfSense boxes
#!/bin/sh
# devnull@libcrack.so
# Thu Mar 2 19:48:14 CET 2023
#
# From http://ftp.freebsd.org/pub/FreeBSD/README.TXT
#
# releases/${MACHINE}/${MACHINE_ARCH}/*-RELEASE/
# The official FreeBSD releases as individual tarballs to download; useful
# for jail hosting, updating machines in situ, etc. Make sure to look in
# the ${MACHINE_ARCH} sub-directory for the most recent releases (e.g.,
@libcrack
libcrack / cve-get.py
Created May 9, 2024 04:07
Print the summary and CVSSv3 vector for the CVEs passed as arguments
#!/usr/bin/env python3
# coding: utf-8
# Thu May 9 05:51:35 CEST 2024
# sucata & surmano
#
# https://nvd.nist.gov/vuln/detail/CVE-2018-7105
# https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?name=CVE-2018-7105&vector=AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H&version=3.0&source=NIST
"""
Print the summary and CVSS3 vector for the CVEs passed as arguments (March 2014).
@libcrack
libcrack / ipmi.sh
Created May 9, 2024 02:19
Example commands to manage an HPE server iLO via IPMI
#!/usr/bin/env bash
# devnull@libcrack.so
# Thu May 9 04:04:44 CEST 2024
#
# ——————————————————————————————————————————————————————————————————————————————————————————————
#
# $ ipmitool -H 10.10.10.10 -I lanplus -U admin
# Password:
# Unable to Get Channel Cipher Suites
# No command provided!