Skip to content

Instantly share code, notes, and snippets.

@grahampugh
grahampugh / Disable_macOS_Upgrade_Notifications.sh
Last active October 19, 2021 14:38
Script to prevent the macOS Upgrade Notification popup, or delete it if it's already installed
#!/bin/bash
# Disable macOS Upgrade notifications
# Step 1: prevent the update which brings the notification down
softwareupdate --ignore macOSInstallerNotification_GM
echo
# Step 2: delete the file if it's already on the computer
@bgrewell
bgrewell / PenTesters_Framework_Install.txt
Last active February 5, 2024 22:11
Steps required to install and setup PenTesters Framework (PTF) from TrustedSec
## run in terminal ##
sudo su -
apt-get update
apt-get install python
git clone https://github.com/trustedsec/ptf /opt/ptf
cd /opt/ptf
./ptf
## run inside PTF ##
use modules/exploitation/install_update_all
@Gabriellpweb
Gabriellpweb / route53subls.sh
Created May 4, 2018 20:36
List hosted zones and subdomains of route53
#!/bin/bash
# USAGE: route53subls
#
# OUTPUT:
#
# Domain |SubDomain |RecordType|RecordValue
# website.com. |sub.website.com. |A |dualstack.websitealb-12345678998.sa-east-1.elb.amazonaws.com.
#
@ssstonebraker
ssstonebraker / natophon.sh
Created February 22, 2018 21:25 — forked from bradland/natophon.sh
NATO phonetic string converter for bash
#!/bin/bash
#########################################################################
# #
# #
# NATO String converter #
# #
# Description: converts string (first parameter given) #
# to NATO phonetics-alphabet #
# #
@ssstonebraker
ssstonebraker / ediscovery_search_exported_msg_files.ps1
Created February 8, 2018 08:19
Search exported ediscovery msg files from exchange compliance center for a string
# ediscovery_search_exported_msg_files.ps1
# Search through exported .msg files from content search (exchange compliance center) and return a spreadsheet of email addresses and matched URLs
# Kill outlook
cmd.exe /c "taskkill /F /IM outlook.exe /T 2> nul"
$scriptPath = $(split-path $myinvocation.mycommand.definition)
$inputPath = "$($scriptPath)\inputMails"
# Find all .msg files recursively
@hsiboy
hsiboy / Route 53 Updater
Last active February 12, 2024 00:07 — forked from ELLIOTTCABLE/.gitignore
BASH Script to keep Route53 updated with your current external IP address
Roll your own dynamic DNS service using Route53
@niraj-shah
niraj-shah / aws-security.sh
Last active February 13, 2023 23:52
Shell Script to update AWS EC2 Security Groups with Fixed and Current IPs for a given Port, using `aws ec2` command line
#!/bin/bash
# Shell Script to Update AWS EC2 Security Groups
# Note that existing IP rules will be deleted
# CONFIG - Only edit the below lines to setup the script
# ===============================
# AWS Profile Name
profile="name1"
@lukeplausin
lukeplausin / bash_aws_jq_cheatsheet.sh
Last active January 29, 2024 10:00
AWS, JQ and bash command cheat sheet. How to query, cut and munge things in JSON generally.
# Count total EBS based storage in AWS
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add"
# Count total EBS storage with a tag filter
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add"
# Describe instances concisely
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]'
# Wait until $instance_id is running and then immediately stop it again
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id
# Get 10th instance in the account
@zbetcheckin
zbetcheckin / Google_dorks
Created August 25, 2016 22:24
Some google dorks useful in footprinting
Replace 'X' with the domain name of your choice
# Back link
link:X -site:X
# Sub domain
site:X -site:www.X
# Url
inurl:X -site:X