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
validate score of email via: | |
http://www.mail-tester.com/ | |
email [email protected] (will send email report) | |
validate SPF synatx with: | |
http://www.kitterman.com/spf/validate.html? | |
gapps validator: | |
https://toolbox.googleapps.com/apps/checkmx/ |
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 | |
#TO RUN | |
# > ./dns_spf_expander.sh domain.com | |
lookup_count=0 | |
function spf_expand { | |
for spf in $1 ; do | |
if echo $spf | grep "include:" > /dev/null 2>&1 ; then | |
((lookup_count++)) |
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
git clone --no-hardlinks path/to/file.git |
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
cat json.file | python -m json.tool | less |
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
export PS1='\e[1;35m\u\e[m@\h:\e[1;31m\w\e[m\n\$ ' |
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
python: | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
urllib2.urlopen("https://dynamicdns.park-your-domain.com/update?host=%s&domain=%s&password=%s" % ("SUBDOMAIN", "DOMAIN", "namecheap.dynamicDNS.PASSWORD")) |
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
tar ... | ssh ... | |
pipe_exit_status="${PIPESTATUS[@]}" | |
tar_status=`echo $pipe_exit_status | awk '{print $1}'` | |
ssh_status=`echo $pipe_exit_status | awk '{print $2}'` |
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
gawk -vFPAT='[^,]*|"[^"]*"' '{print $1,$2,$3}' | |
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
$EC2_launch_time = Get-Date (Get-EC2Instance -Instance $instanceId | % { $_.RunningInstance } | Select-Object -expand LaunchTime) -format "M/d/yyyy hh:mm:ss tt" | |
$Windows_bootTime = Get-Date (Get-CimInstance -ClassName win32_operatingsystem | select -expand lastbootuptime).tostring().trim() -format "M/d/yyyy hh:mm:ss tt" |
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
# This script will first install the "PSWindowsUpdate" PS Module and then install KBs we specify in this script | |
# KB_ID Description | |
# KB3042553 MS15-034 Critical: Vulnerability in HTTP.sys Could Allow Remote Code Execution - https://technet.microsoft.com/en-us/library/security/ms15-034.aspx | |
# TO DO make it more robust where we can pass kb articles by hash and loop check | |
$kb_to_patch="KB3042553" | |
$ps_windows_update_zip="C:\Windows\temp\PSWindowsUpdate.zip" | |
$ps_modules_dir="C:\Windows\System32\WindowsPowerShell\v1.0\Modules" |