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
BEGIN MESSAGE. | |
K9m3gUTNgkxnZIC iVo9NtpWywzNZlV TXqqNafJTX9l1o9 i45egdvWYeqn36F | |
1F5G5Un1czApQdv rWioRcZNTjmTCKq 6Xr2MZHgg4ZFWB0 qUfubS9YbvB6W1n | |
6CCBuup1FSYrxJl KmtRlytSFGgkA2w QptFNxMrqCTA2Q0 e0oimf2RbQYNYp6 | |
KkdradiwhAtkRzu 2yjdhHQJBj5WIF7 a4YBt0aLMzWSiL. | |
END MESSAGE. |
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
#!/usr/bin/env python3 | |
import argparse | |
import smtplib | |
import ssl | |
import dns.resolver # Required for DNS lookup | |
from email.mime.text import MIMEText | |
def get_mx_record(domain): | |
""" |
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
import sys | |
def wait_for_enter(): | |
input("Press Enter to continue: ") | |
class CreateSSHKeypairStep(object): | |
def run(self, context): | |
print("Run:") | |
print(" ssh-keygen -t rsa -f ~/{0}".format(context["username"])) | |
wait_for_enter() |
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
Host * | |
# Cool one-liner. Use bash to connect to ssh host on port 22 and use shell to read/write data! | |
# https://www.commandlinefu.com/commands/view/14406/read-and-write-to-tcp-or-udp-sockets-with-common-bash-tools | |
ProxyCommand ssh -q joesmith@remotehost 'host=%h;exec 7<>/dev/tcp/${host}/22; cat <&7 & cat >&7; exec 7>&-' |
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/sh | |
PREFILLED=false | |
SLOTS=8 | |
END_YEAR=2099 | |
year=2018 | |
declare -a procs[8] |
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/sh | |
TEMP="$1.$$.img" | |
trap "rm -f $TEMP 2>/dev/null" 1 2 3 11 15 | |
offset=`hexdump -s 0x158 -n 4 "$1" | head -1 | awk '{print $5 $4 $3 $2}'` | |
offset512=`echo "obase=16; ibase=16; $offset / 200" | bc` | |
ln "$1" "$TEMP" | |
hdiutil attach "$TEMP" -nomount -section "0x$offset512" | |
rm -f "$TEMP" |
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 | |
# From: https://jd-powered.net/notes/fixing-your-time-machine-backup/ | |
ext=${1##*.} | |
if [[ "${ext}" != "sparsebundle" ]] || [[ -z ${1} ]]; then | |
echo "A sparsebundle disk image is required." | |
exit 1 | |
fi |
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
# Colors | |
declare -A colors | |
colors[NC]="\033[0m" | |
colors[NORMAL]="\033[00m" | |
#colors[BLINK]="\033[05m" | |
#colors[DEFAULT]="\033[39m" | |
#colors[BLACK_BG]="\033[40m" | |
colors[BLACK]="\033[0;30m" | |
colors[BOLD_BLACK]="\033[1;30m" | |
colors[RED]="\033[0;31m" |
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
#!/usr/bin/env python3 | |
import datetime | |
from io import BytesIO | |
from sys import argv | |
import requests | |
from PyPDF2 import PdfFileReader | |
from icalendar import Calendar, Event, Alarm | |
from icalendar.prop import vRecur | |
from pytz import UTC |
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
#! /usr/local/bin/python | |
SMTPserver = 'smtp.att.yahoo.com' | |
sender = 'me@my_email_domain.net' | |
destination = ['recipient@her_email_domain.com'] | |
USERNAME = "USER_NAME_FOR_INTERNET_SERVICE_PROVIDER" | |
PASSWORD = "PASSWORD_INTERNET_SERVICE_PROVIDER" |
NewerOlder