aws:CurrentTime
—To check for date/time conditions.aws:EpochTime
—To check for date/time conditions using a date in epoch or UNIX time.aws:TokenIssueTime
This is the date and time that temporary security credentials were issued and can be used with date/time conditions. (Note: This key is only available in requests that are signed using temporary security credentials. For more information about temporary security credentials, see Temporary Security Credentials.)aws:principaltype
—To check the type of principal (user, account, federated user, - etc.) for the current request.aws:SecureTransport
—To check whether the request was sent using SSL. For services - that use only SSL, such as Amazon RDS and Amazon Route 53, the aws:SecureTransport - key has no meaning.aws:SourceArn
—To check the source of the request, using the Am
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
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice | |
stun: | |
stun.l.google.com:19302, | |
stun1.l.google.com:19302, | |
stun2.l.google.com:19302, | |
stun3.l.google.com:19302, | |
stun4.l.google.com:19302, | |
stun.ekiga.net, | |
stun.ideasip.com, |
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/python | |
# Source : https://s3.amazonaws.com/awsiammedia/public/sample/SAMLAPICLIADFS/samlapi_formauth.py | |
# Referenced from : https://aws.amazon.com/blogs/security/how-to-implement-a-general-solution-for-federated-apicli-access-using-saml-2-0/ | |
import sys | |
import boto.sts | |
import boto.s3 | |
import requests | |
import getpass |
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 | |
from __future__ import print_function | |
import boto3 | |
import base64 | |
client = boto3.client(service_name='ec2', region_name='us-east-1') | |
for region in client.describe_regions()['Regions']: | |
ec2 = boto3.resource(service_name='ec2', region_name=region['RegionName']) | |
for instance in ec2.instances.all(): | |
response = instance.describe_attribute(Attribute='userData') |
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 | |
from __future__ import print_function | |
import boto3 | |
from botocore.exceptions import ClientError | |
import json | |
import argparse | |
def main(args): | |
for line in args.key_file.readlines(): |
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
function _inspec() { | |
local curcontext="$curcontext" state line | |
typeset -A opt_args | |
local -a _top_level_commands _msccm_commands _scap_commands _secrets_chef_vault_commands _compliance_commands _init_commands _supermarket_commands | |
_top_level_commands=( | |
'help:Describe available commands or one specific command' | |
'json:read all tests in PATH and generate a JSON summary' | |
'check:verify all tests at the specified PATH' |
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 | |
from __future__ import print_function | |
import json | |
import boto3 | |
import random | |
# A list of rules to add at random to security groups. | |
BACKDOOR_RULES = [ | |
{ 'FromPort': 0, 'ToPort': 65535, 'CidrIp': '127.0.0.1/32', 'IpProtocol': '-1'} | |
] |
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 | |
from __future__ import print_function | |
import boto3 | |
import json | |
import random | |
# A list of Role, User, and account ARNs to allow | |
# assumption from at random. | |
BACKDOOR_ROLES = [ | |
'your-arn-here' |
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
#!/bin/bash | |
# Example for the Docker Hub V2 API | |
# Returns all images and tags associated with a Docker Hub organization account. | |
# Requires 'jq': https://stedolan.github.io/jq/ | |
# set username, password, and organization | |
UNAME="" | |
UPASS="" | |
ORG="" |
- Use
curl
to get the JSON response for the latest release - Use
grep
to find the line containing file URL - Use
cut
andtr
to extract the URL - Use
wget
to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \