Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# prints all the records in all the zones in colums separated by ','.
# It uses raw mode to handle pagination to iterate over zones and records
import CloudFlare
separator=","
cf = CloudFlare.CloudFlare(token='REPLACE_WITH_YOUR_OWN_CF_TOKEN', raw=True)
per_page = 10
#!/bin/sh
# for testing EDR
VERSION="ng"
ADVISORY="This script should be used for authorized penetration testing and/or educational purposes only. Any misuse of this software will not be the responsibility of the author or of any other collaborator. Use it at your own computers and/or with the computer owner's permission."
###########################################
#-------) Checks pre-everything (---------#
###########################################
if ([ -f /usr/bin/id ] && [ "$(/usr/bin/id -u)" -eq "0" ]) || [ "`whoami 2>/dev/null`" = "root" ]; then
IAMROOT="1"
@ssstonebraker
ssstonebraker / write_temp_file_and_execute.sh
Last active March 15, 2022 22:18
write_temp_file_and_execute.sh
#!/bin/bash
echo "[*] - Now writing file /tmp/check_ip.sh"
cat <<'EOF' > /tmp/check_ip.sh
#!/bin/bash
# Purpose: Return current external IP
CURRENTIP=$(curl --silent icanhazip.com)
echo "[*] - Current IP - ${CURRENTIP}"
@ssstonebraker
ssstonebraker / tcpdump_tcpreplay.org
Created November 2, 2021 18:33 — forked from niranjan-nagaraju/tcpdump_tcpreplay.org
TCPReplay/TCPRewrite/TCPPrep/TCPDump Cheatsheet

TCPReplay/TCPRewrite/TCPPrep/TCPDump Cheatsheet

tcprewrite

Rewrite IP/Mac addresses, -C optionally to fix checksums

  1. tcpprep, first:C2S, Second S2C, Generate cache file
        
@ssstonebraker
ssstonebraker / pentestws.json
Created January 28, 2021 23:15
pentest.ws export
{
"username": "brakertech",
"export_time": "2021-01-28T23:14:25.004Z",
"export_type": "Account Items",
"service_command_library": [
{
"service": "http",
"sort_order": null,
"name": "davtest",
"command": "davtest -url http://$ip:$port",
@ssstonebraker
ssstonebraker / hue.sh_crontab.txt
Created November 16, 2020 19:43
hue.sh crontab
* * * * * . $HOME/.bash_profile; cd $HOME/Library/cron/philips-hue-experiments && $HOME/Library/cron/philips-hue-experiments/hue.sh 2>&1 >> $HOME/Library/cron/philips-hue-experiments/log/hue.log
@daily /bin/echo "" > $HOME/Library/cron/philips-hue-experiments/log/hue.log
@ssstonebraker
ssstonebraker / hue.sh
Last active February 15, 2021 05:12
hue.sh
#!/bin/bash
# Author: Steve Stonebraker
# Date: 11/16/2020
# brakertech.com
WHOAMI=$(whoami)
path_phe=/Users/"$WHOAMI"/Library/cron/philips-hue-experiments
path_log="$PWD"/log/hue.log
path_npm=$(which npm)
@ssstonebraker
ssstonebraker / OSCP_Windows_Enumeration.md
Created June 23, 2020 13:51
OSCP_Windows_Enumeration.md

[TOC]

Windows Initial Checks

Basic Info

hostname
systeminfo
whoami

Global path

If any part of the SYSTEM %PATH% variable is writeable by Authenticated Users, privesc exists

@ssstonebraker
ssstonebraker / remove_office_365_mac.sh
Last active May 3, 2022 20:59
Office 365 Mac 2020 - Delete everything
#!/bin/bash
echo " Removing Office 365 apps..."
rm -rf "/Applications/Microsoft Excel.app"
rm -rf "/Applications/Microsoft OneNote.app"
rm -rf "/Applications/Microsoft Outlook.app"
rm -rf "/Applications/Microsoft PowerPoint.app"
rm -rf "/Applications/Microsoft Word.app"
rm -rf "/Applications/Microsoft OneDrive.app"
rm -rf "/Applications/Microsoft Teams.app"