pep8 mostly
This commit is contained in:
@@ -1,8 +0,0 @@
|
|||||||
|
|
||||||
'''
|
|
||||||
This file is used to list EBS volumes and whether or not they are encrypted. This is only for "in-use" (running) volumes.
|
|
||||||
'''
|
|
||||||
from libs.ec2 import *
|
|
||||||
from config import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
|
|
||||||
|
|
||||||
review_encrypted_volumes(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
|
|
||||||
464
libs/brute.py
464
libs/brute.py
File diff suppressed because it is too large
Load Diff
@@ -5,12 +5,14 @@ dynamoDB functions
|
|||||||
import boto3
|
import boto3
|
||||||
import botocore
|
import botocore
|
||||||
import pprint
|
import pprint
|
||||||
import sys,os
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
pp = pprint.PrettyPrinter(indent=5, width=80)
|
pp = pprint.PrettyPrinter(indent=5, width=80)
|
||||||
|
|
||||||
# from http://docs.aws.amazon.com/general/latest/gr/rande.html
|
# from http://docs.aws.amazon.com/general/latest/gr/rande.html
|
||||||
regions = ['us-east-1', 'us-east-2', 'us-west-1', 'us-west-2', 'ca-central-1', 'eu-central-1', 'eu-west-1', 'eu-west-2', 'ap-northeast-1', 'ap-northeast-2', 'ap-southeast-1', 'ap-southeast-2', ]
|
regions = ['us-east-1', 'us-east-2', 'us-west-1', 'us-west-2', 'ca-central-1', 'eu-central-1', 'eu-west-1', 'eu-west-2', 'ap-northeast-1', 'ap-northeast-2', 'ap-southeast-1', 'ap-southeast-2']
|
||||||
|
|
||||||
|
|
||||||
def list_dynamodb_tables(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
def list_dynamodb_tables(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
||||||
print("### Printing DynamoDB Tables ###")
|
print("### Printing DynamoDB Tables ###")
|
||||||
@@ -38,6 +40,7 @@ def list_dynamodb_tables(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
|||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("CTRL-C received, exiting...")
|
print("CTRL-C received, exiting...")
|
||||||
|
|
||||||
|
|
||||||
def list_dynamodb_tables_detailed(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
def list_dynamodb_tables_detailed(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
||||||
print("### Printing DynamoDB Tables ###")
|
print("### Printing DynamoDB Tables ###")
|
||||||
try:
|
try:
|
||||||
@@ -64,6 +67,7 @@ def list_dynamodb_tables_detailed(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
|||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("CTRL-C received, exiting...")
|
print("CTRL-C received, exiting...")
|
||||||
|
|
||||||
|
|
||||||
def describe_table(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, table, region):
|
def describe_table(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, table, region):
|
||||||
print("### Describing DynamoDB Table: {} ###" .format(table))
|
print("### Describing DynamoDB Table: {} ###" .format(table))
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -5,12 +5,13 @@ dynamoDBstreams functions
|
|||||||
import boto3
|
import boto3
|
||||||
import botocore
|
import botocore
|
||||||
import pprint
|
import pprint
|
||||||
import sys,os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
pp = pprint.PrettyPrinter(indent=5, width=80)
|
pp = pprint.PrettyPrinter(indent=5, width=80)
|
||||||
|
|
||||||
# from http://docs.aws.amazon.com/general/latest/gr/rande.html
|
# from http://docs.aws.amazon.com/general/latest/gr/rande.html
|
||||||
regions = ['us-east-1', 'us-east-2', 'us-west-1', 'us-west-2', 'ca-central-1', 'eu-central-1', 'eu-west-1', 'eu-west-2', 'ap-northeast-1', 'ap-northeast-2', 'ap-southeast-1', 'ap-southeast-2', ]
|
regions = ['us-east-1', 'us-east-2', 'us-west-1', 'us-west-2', 'ca-central-1', 'eu-central-1', 'eu-west-1', 'eu-west-2', 'ap-northeast-1', 'ap-northeast-2', 'ap-southeast-1', 'ap-southeast-2']
|
||||||
|
|
||||||
|
|
||||||
def list_dynamodbstreams(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
def list_dynamodbstreams(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
'''
|
'''
|
||||||
data pipeline example
|
data pipeline example
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from libs.datapipeline import *
|
from libs.datapipeline import *
|
||||||
from config import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
|
from config import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
|
||||||
|
|
||||||
|
|
||||||
def step_datapipeline_list_pipelines():
|
def step_datapipeline_list_pipelines():
|
||||||
list_pipelines(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
|
list_pipelines(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
'''
|
'''
|
||||||
This file is used to perform various EC2 operations
|
This file is used to perform various EC2 operations
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from libs.ec2 import *
|
from libs.ec2 import *
|
||||||
from config import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
|
from config import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
|
||||||
|
|
||||||
'''
|
'''
|
||||||
Basic info about each instance
|
Basic info about each EC2 instance
|
||||||
|
ex:
|
||||||
|
[+] Listing instances for region: us-west-2 [+]
|
||||||
|
InstanceID: i-XXXXXXXXXXXXXXX, InstanceType: t2.micro, State: {'Code': 80, 'Name': 'stopped'}, Launchtime: 2016-08-25 22:31:31+00:00
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
@@ -14,7 +18,7 @@ def step_ec2_get_instances_basic():
|
|||||||
|
|
||||||
|
|
||||||
'''
|
'''
|
||||||
All info about each instance
|
All info about each EC2 instance
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
@@ -38,3 +42,12 @@ show volumes by instanceId but instanceID->volume1 of ID, instanceID->volume2 of
|
|||||||
|
|
||||||
def step_ec2_get_instance_volume_details2():
|
def step_ec2_get_instance_volume_details2():
|
||||||
get_instance_volume_details2(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
|
get_instance_volume_details2(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
|
||||||
|
|
||||||
|
|
||||||
|
'''
|
||||||
|
This function is used to list EBS volumes and whether or not they are encrypted. This is only for "in-use" (running) volumes.
|
||||||
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
def step_ec2_review_encrypted_volumes():
|
||||||
|
review_encrypted_volumes(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
|
||||||
|
|||||||
Reference in New Issue
Block a user