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 bash | |
# call as sudo or modify variables to suit your needs | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
CWD=$(pwd) | |
CUR_USER=$(whoami) | |
HOME_DIR=/home/${CUR_USER} | |
TESTSSL_INSTALL_DIR=${HOME_DIR}/testssl |
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 bash | |
# call as sudo or modify variables to suit your needs | |
GREEN='\033[0;32m' | |
ORANGE='\033[0;33m' | |
NC='\033[0m' # No Color | |
CWD=$(pwd) | |
CUR_USER=$(whoami) | |
HOME_DIR=/home/${CUR_USER} |
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
' or '1'='1 | |
-' | |
' ' | |
'&' | |
'^' | |
'*' | |
' or ''-' | |
' or '' ' | |
' or ''&' | |
' or ''^' |
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
""" | |
Based on https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html | |
""" | |
from requests.packages.urllib3.util.ssl_ import create_urllib3_context | |
from requests.adapters import HTTPAdapter | |
import hmac | |
import hashlib | |
import datetime | |
import base64 | |
import os |
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 python | |
# -*- coding:utf-8 | |
from Crypto.PublicKey import RSA | |
from Crypto.Cipher import PKCS1_v1_5 | |
import requests | |
import base64 | |
import sys | |
# Generate a keys from the key server, distribute the public key to encryptors |
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 sh | |
template_url=https://.../template.yml | |
aws_regions=( us-east-1 us-east-2 us-west-1 us-west-2 ca-central-1 eu-west-1 eu-central-1 eu-west-2 ap-northeast-1 ap-northeast-2 ap-southeast-1 ap-southeast-2 ap-south-1 sa-east-1 ) | |
stack_name=MyStack | |
stack_version=1 | |
parameters="ParameterKey=MyTemplateParam,ParameterValue=MyTemplateParamVal" | |
if ! command -v aws >/dev/null 2>&1 | |
then |
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 bash | |
SCHEMA=public | |
DB=certwatch | |
HOST=crt.sh | |
PORT=5432 | |
USER='guest --no-password' | |
DIR=$(pwd) | |
mkdir -p $DIR |
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 python | |
# -*- coding:utf-8 | |
""" | |
requires Python 2.x | |
requirements.txt | |
pycrypto==2.6.1 | |
requests==2.21.0 | |
urllib3==1.24.1 |
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 bash | |
if [ -z $(which retire) ]; then | |
echo "retire not found. try npm install -g retire" | |
exit 1 | |
fi | |
if [ -z $(which parallel) ]; then | |
echo "parallel not found. try 'apt install -y parallel'" | |
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
#!/usr/bin/env python3 | |
import boto3 | |
import argparse | |
import configparser | |
from os.path import expanduser | |
from botocore.exceptions import ClientError | |
def chose_profile()->str: | |
session = boto3.Session() |