Skip to content

Instantly share code, notes, and snippets.

View dzervas's full-sized avatar

Dimitris Zervas dzervas

View GitHub Profile
@soarez
soarez / ca.md
Last active October 29, 2024 18:12
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

#!/usr/bin/python2
# coding: utf-8
# Example of how not to code PHP... Not a serious exploit, just one for fun as
# an example of how fucking badly people screw up. Picked an app while githubbin'
# and heres the ruinage.
# Exploits trivial command injection, followed by abusing the lolsudo implemented.
# Seriously, this dudes programming licence needs to be revoked.
# BONUS: Includes SCTP Backconnect for Great Justice reasons :D
# Screenshot: http://i.imgur.com/0CWDs8m.png
# Twitter: @dailydavedavids
@lanrat
lanrat / NetworkManager.conf
Created July 12, 2016 01:19
NetworkManager ignore docker, virtualbox, and vmware adapters
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=false
[keyfile]
unmanaged-devices=interface-name:docker0;interface-name:vmnet1;interface-name:vmnet8;interface-name:vboxnet0
@shirriff
shirriff / ac.py
Created December 7, 2017 18:31
Process air conditioner remote control data: find inputs differing in one bit and print the difference in the output.
import re
data="""\
10100001 10010011 01100011 => 01110111
10100001 10010011 01100100 => 01110001
10100001 10010011 01100101 => 01110000
10100001 10010011 01100110 => 01110010
10100001 10010011 01100111 => 01110011
10100001 10010011 01101000 => 01111001
10100001 10010011 01101001 => 01111000
@shirriff
shirriff / ac3.py
Created December 7, 2017 18:38
Create checksums for an air conditioner remote control
import re
# Each line is 3 bytes of input and the observed 1-byte checksum
data="""\
10100001 10010011 01100011 => 01110111
10100001 10010011 01100100 => 01110001
10100001 10010011 01100101 => 01110000
10100001 10010011 01100110 => 01110010
10100001 10010011 01100111 => 01110011
10100001 10010011 01101000 => 01111001
vSphere 6 Enterprise Plus:
1C20K-4Z214-H84U1-T92EP-92838
1A2JU-DEH12-48460-CT956-AC84D
MC28R-4L006-484D1-VV8NK-C7R58
5C6TK-4C39J-48E00-PH0XH-828Q4
4A4X0-69HE3-M8548-6L1QK-1Y240
vSphere with Operations Management 6 Enterprise:
4Y2NU-4Z301-085C8-M18EP-2K8M8
1Y48R-0EJEK-084R0-GK9XM-23R52