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
$ ./try_local_metadata.sh | |
Trying 169.254.169.254... found metadata | |
Trying 169.254.43518... found metadata | |
Trying 169.16689662... found metadata | |
Trying 2852039166... found metadata | |
Trying 0251.0376.0251.0376... found metadata | |
Trying 0251.0376.0124776... found metadata | |
Trying 251.0775248... - | |
Trying 25177524776... - | |
Trying 0xa9.0xfe.0xa9.0xfe... found metadata |
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
image: docker:latest | |
before_script: | |
- apt-get update -y # Updating the Ubuntu Docker instance. | |
- python -V # Print out python version for debugging. | |
- apt install -y zip jq | |
- pip install awscli --upgrade --user | |
- export PATH=~/.local/bin:$PATH # Required for awscli. | |
- aws --version # Print out aws cli version for debugging. |
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 paho.mqtt.client as paho | |
import os | |
import socket | |
import ssl | |
from time import sleep | |
from random import uniform | |
import json | |
import logging | |
logging.basicConfig(level=logging.INFO) |
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
""" | |
This code is a Python 2.7 port of [aws-lambda-ses-forwarder](https://github.com/arithmetric/aws-lambda-ses-forwarder). Follow instructions there for setting up SES and AWS Lambda. | |
""" | |
from email import message_from_file | |
import json | |
import logging | |
import os | |
import re |
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 python3 | |
# | |
# This is a simple script to encrypt a message using AES | |
# with CBC mode in Python 3. | |
# Before running it, you must install pycryptodome: | |
# | |
# $ python -m pip install PyCryptodome | |
# | |
# Author.: José Lopes | |
# Date...: 2019-06-14 |
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
import argparse | |
import json | |
import re | |
import sys | |
import uuid | |
class OpenVPNNetworkConfiguration(object): | |
KNOWN_CONFIG_KEYS = { | |
'name': {'key': 'Name'}, |
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
On why stateful code is bad | |
=========================== | |
STUDENT: Sir, can I ask a question? | |
TEACHER: Yes! | |
STUDENT: How do you put an elephant inside a fridge? | |
TEACHER: I don't know. | |
STUDENT: It's easy, you just open the fridge and put it in. I have another question! | |
TEACHER: Ok, ask. | |
STUDENT: How to put a donkey inside the fridge? |
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 thread, mosquitto, random, time | |
# mosquitto reference and download can be found here: http://mosquitto.org/documentation/python/ | |
class mqtt(): | |
def __init__(self, broker = "127.0.0.1", port = 1883, clientID = None): | |
self.__broker = broker | |
self.__port = port | |
self._client = None | |
self.__subscriptionsList = [] | |
self.__pendingSubscriptionsList = [] |
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
{ | |
"rootDir": "{{ salt['pillar.get']('aptly:rootdir') }}", | |
"downloadConcurrency": 4, | |
"architectures": [], | |
"dependencyFollowSuggests": false, | |
"dependencyFollowRecommends": false, | |
"dependencyFollowAllVariants": false, | |
"dependencyFollowSource": false, | |
"gpgDisableSign": false, | |
"gpgDisableVerify": false, |
NewerOlder