- Lynn Root
- roguelynn.com
- roguelynn-spy.herokuapp.com
Use scapy
python library for sniffing network traffic. Chrome does one DNS request for each autocomplete guess. Interesting.
import os | |
from pyramid.config import Configurator | |
def main(global_config, **settings): | |
settings = {k: os.path.expandvars(v) for k, v in settings.items()} | |
config = Configurator(settings=settings) | |
config.include(__name__) | |
return config.make_wsgi_app() |
##Using Let's Encrypt certificates with AWS API Gateway
Before starting off with API Gateway set up it's worth mentioning that certificate configuration for this particular service is so far isn't well integrated, therefore different from other AWS services. Despite it using CloudFrount to serve on custom domains it won't let you customize distributions it creates, however all the limitations of CloudFront naturally apply to API Gateway. The most important in this case is the size of the key, which is limited by 2048 bit. Many tutorials provide ready to use terminal commands that have the key size preset at 4096 bit for the sake of better security. This won't work with API Gateway and you'll get an error message about certificate's validity or incorrect chain which won't suggest you the real cause of the issue. Another consideration is that to add a custom domain to API Gateway you have to have a certif
# Python logger in AWS Lambda has a preset format. To change the format of the logging statement, | |
# remove the logging handler & add a new handler with the required format | |
import logging | |
import sys | |
def setup_logging(): | |
logger = logging.getLogger() | |
for h in logger.handlers: | |
logger.removeHandler(h) |