This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# USAGE: route53subls | |
# | |
# OUTPUT: | |
# | |
# Domain |SubDomain |RecordType|RecordValue | |
# website.com. |sub.website.com. |A |dualstack.websitealb-12345678998.sa-east-1.elb.amazonaws.com. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
######################################################################### | |
# # | |
# # | |
# NATO String converter # | |
# # | |
# Description: converts string (first parameter given) # | |
# to NATO phonetics-alphabet # | |
# # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Roll your own dynamic DNS service using Route53 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |