Skip to content

Instantly share code, notes, and snippets.

F. d4gh0s7

View GitHub Profile
@d4gh0s7
d4gh0s7 / centos-vmware.Dockerfile
Created May 6, 2019 21:43
Run vmware workstation in a Docker container.
FROM centos/systemd
LABEL maintainer="[email protected]"
LABEL version="0.5"
LABEL description="Run vmware workstation in a Docker container."
ARG VAGRANT_VERSION=2.2.4
ARG PACKER_VERSION=1.4.0
@d4gh0s7
d4gh0s7 / trace_proc_mem.py
Created April 10, 2019 18:36
A tool to access the memory of a given pid.
#!/usr/bin/env python
# """
# Here is a tool to access the memory of a given pid.
# far from being perfect, you cam adjust it to your environment.
# Validate the args before using this chunk in real life.
# d4gh0s7
# """
import ctypes, re, sys
import argparse
@d4gh0s7
d4gh0s7 / tlswalk.sh
Created March 25, 2019 20:55
Scans over https, the available SSL/ TLS ciphers available for a given host.
#!/usr/bin/env bash
set -o noclobber # Avoid overlay files (echo "hi" > foo)
set -o errexit # Used to exit upon error, avoiding cascading errors
# set -o nounset # Exposes unset variables
#Setting up some colors for helping read the demo output
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
@d4gh0s7
d4gh0s7 / awsLambdaSetSecurityHeaders.js
Last active September 3, 2020 05:37
Security Headers with AWS Lambda@Edge
'use strict';
exports.handler = async (event, context, callback) => {
const response = event.Records[0].cf.response;
const headers = response.headers;
headers['Strict-Transport-Security'] = [{
key: 'Strict-Transport-Security',
value: 'max-age=63072000; includeSubDomains; preload',
}];
@d4gh0s7
d4gh0s7 / FizzBuzz
Created December 7, 2018 15:05
A simple Fizz-Buzz Test in JavaScript
let config = { };
config.fizzTest = 3;
config.buzzTest = 5;
config.checks = 100;
config.fizzText = 'Fizz';
config.buzzText = 'Buzz';
for (let i = 1; i <= config.checks; i++) {
let expletive = '';
if (i % config.fizzTest === 0) expletive += config.fizzText;