fix sqs lib to list_queues
This commit is contained in:
@@ -16,10 +16,12 @@ def sqs_list_queues(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
|||||||
if response.get('QueueUrls') is None:
|
if response.get('QueueUrls') is None:
|
||||||
print("[-] ListQueues allowed for {} but no results [-]" .format(region))
|
print("[-] ListQueues allowed for {} but no results [-]" .format(region))
|
||||||
# THis isnt working need to test with one that works to get the QueueUrl attributes
|
# THis isnt working need to test with one that works to get the QueueUrl attributes
|
||||||
# if len(response['QueueUrls']) <= 0:
|
elif len(response['QueueUrls']) <= 0:
|
||||||
# print("[-] ListQueues allowed for {} but no results [-]" .format(region))
|
print("[-] ListQueues allowed for {} but no results [-]" .format(region))
|
||||||
else:
|
else:
|
||||||
print("region: {} \n {}".format(region,response))
|
print("[+] Listing queuesfor region: {} [+]" .format(region))
|
||||||
|
for r in response['QueueUrls']:
|
||||||
|
pp.pprint(r)
|
||||||
|
|
||||||
except botocore.exceptions.ClientError as e:
|
except botocore.exceptions.ClientError as e:
|
||||||
if e.response['Error']['Code'] == 'InvalidClientTokenId':
|
if e.response['Error']['Code'] == 'InvalidClientTokenId':
|
||||||
|
|||||||
Reference in New Issue
Block a user