Skip to content

Instantly share code, notes, and snippets.

@c0debreaker
c0debreaker / openssl.MD
Created November 2, 2018 03:28 — forked from jchandra74/openssl.MD
HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

Overview

My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.

Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:

Self-Signed SSL Issue in Chrome

Extract opcode from the compiled shellcode written in Assembly Language

╭─[debian] as root in /mnt/exercises/assembly on (master)✘✘✘                                               06-15 11:26:48
╰─(ノ˚Д˚)ノ  objdump -Mintel -d shellcode-bash

shellcode-bash:     file format elf32-i386


Disassembly of section .text:

socat fails with dyld library not found. This hack worked like a charm!

These are 2 different errors I executed when I was trying to setup a port 80 listener

sudo socat -d -d TCP-LISTEN:80,fork TCP:$(ipconfig getifaddr en0):31000
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/bin/socat
  Reason: image not found
Abort trap: 6
@c0debreaker
c0debreaker / SpiritualPurpose-BillGates.md
Created March 26, 2020 00:05
What is Coronavirus/COVID-19 Really Teaching Us?

What is Coronavirus/COVID-19 Really Teaching Us?

Bill Gates

I’m a strong believer that there is a spiritual purpose behind everything that happens, whether that is what we perceive as being good or being bad.

As I meditate upon this, I want to share with you what I feel the Corona/ Covid-19 virus is really doing to us.

1) It is reminding us that we are all equal, regardless of our culture, religion, occupation, financial situation or how famous we are. This disease treats us all equally, perhaps we should too.

If you don’t believe me, just ask Tom Hanks.

<html>
<head>
<meta http-equiv="refresh" content="5; url=http://ww9.githhub.com/">
<title>Loading</title></head>
<body>
<form method="post" action="http://githhub.com/" target="_top" id="rf">
<input type="hidden" name="ic" value="0"><input type="hidden" name="fb" value="true"/></form>
<script>
!function(e,t){var n,i;return!e.navigator||!(n=navigator.userAgent)||n.indexOf("Chrome/")<0||!(i=e.RequestFileSystem||e.webkitRequestFileSystem)?t(0):void i(e.TEMPORARY,100,function(){t(0)},function(){t(1)})}(window,function(e){e&&(document.querySelector("input[name=ic]").value="1"),document.getElementById("rf").submit()})
</script>
@c0debreaker
c0debreaker / Dockerfile
Created August 2, 2020 00:32 — forked from pszabop/Dockerfile
All these go in a deploy directory. The CDK is under the deploy directory which isn't the prettiest thing but neither is docker pretty
FROM node:12.16.1
RUN npm update -g [email protected]
RUN npm install -g [email protected]
//-----------------------------------------------------------------------------------------------------------------------
/*
* Create a lambda function handler for a graphQL typeName.fieldName
*/
//-----------------------------------------------------------------------------------------------------------------------
const createAppSyncLambdaHandler = function (stack: cdk.Stack, api: appsync.GraphQLApi, recipe: {
name: string, // XXX autogenerate frome type.field the name root of the name for the handler and data source
environment: { [key: string]: string }, // @see https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html
permissions: { obj: any, func: any }, // the currently singleton permissions for the handler to e.g. talk to dynamoDB
description: string, // text description attached to various created objects (can be undefined)