This file contains hidden or 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 boto3 | |
from boto3.session import Session | |
def assume_role(arn, session_name): | |
"""aws sts assume-role --role-arn arn:aws:iam::00000000000000:role/example-role --role-session-name example-role""" | |
client = boto3.client('sts') | |
account_id = client.get_caller_identity()["Account"] | |
print(account_id) |
This file contains hidden or 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
from __future__ import print_function | |
import json | |
import boto3 | |
import logging | |
#setup simple logging for INFO | |
logger = logging.getLogger() | |
logger.setLevel(logging.ERROR) |
This file contains hidden or 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
# install terraform and docker | |
# https://docs.docker.com/engine/install/debian/ | |
# Parrot $PATH contains .local from user home location | |
curl -O https://releases.hashicorp.com/terraform/0.13.2/terraform_0.13.2_linux_amd64.zip && unzip terraform_0.13.2_linux_amd64.zip -d ~/.local/bin | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ |
This file contains hidden or 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
# API server: nodes should be able to reach k3s server tcp port 6443 | |
# flannel vxlan: udp port 8472 for nodes to communicate (server and agents) | |
# metrics server: it collects resource metrics from kubelets and exposes them in k8s api server through metrics api. tcp port 10250 | |
# https://rancher.com/docs/k3s/latest/en/installation/install-options/ | |
# run the installation script | |
curl -sfL https://get.k3s.io | sh - | |
# create k3s group and add user to avoid using always sudo | |
sudo groupadd k3s |
This file contains hidden or 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 | |
# findPwnedDB.py | |
# | |
# Last update: 1/13/2020 | |
# | |
# Added: | |
# CassandraDB support | |
# Additional DBs | |
# Docker XMR mining flags (Thanks Unit42!) | |
# https://unit42.paloaltonetworks.com/graboid-first-ever-cryptojacking-worm-found-in-images-on-docker-hub/ |
OlderNewer