Skip to content

Instantly share code, notes, and snippets.

Avatar

Kevin Kirsche kkirsche

View GitHub Profile
@kkirsche
kkirsche / ConventionalCommitsEmoji.md
Last active Jun 17, 2021 — forked from parmentf/ConventionalCommitsEmoji.md
Emoji for Conventional Commits
View ConventionalCommitsEmoji.md
Type Emoji code
build 📦 :package:
chore 🔧 :wrench:
ci 👷 :construction_worker:
docs 📚 :books:
feat :sparkles:
fix 🐛 :bug:
perf 🚀 :rocket:
refactor 🔨 :hammer:
@kkirsche
kkirsche / Install Composer to use MAMP's PHP.md
Last active Jun 10, 2021
How to install Composer globally using MAMP's PHP
View Install Composer to use MAMP's PHP.md

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line:

View mount-shared-folders
#!/bin/bash
# to install:
# git clone https://gist.github.com/381e17fab1457ccf3b8b750edbc40b79.git msd
# mv ./msd/mount-shared-folders /usr/local/bin
# rm -rf ./msd
# chmod +x /usr/local/bin/mount-shared-folders
# vmware-hgfsclient is provided by the open-vm-tools package
# in some cases, this package is named open-vm-tools-desktop instead.
@kkirsche
kkirsche / python-convert-dictionary-to-object
Created Jun 20, 2017 — forked from typerandom/python-convert-dictionary-to-object
Convert a dictionary to an object (recursive).
View python-convert-dictionary-to-object
class DictionaryUtility:
"""
Utility methods for dealing with dictionaries.
"""
@staticmethod
def to_object(item):
"""
Convert a dictionary to an object (recursive).
"""
def convert(item):
@kkirsche
kkirsche / aes256-gcm.go
Last active Mar 5, 2021
AES-256 GCM Encryption Example in Golang
View aes256-gcm.go
package example_test
import (
"crypto/aes"
"crypto/cipher"
"hex"
"io"
)
// AES-GCM should be used because the operation is an authenticated encryption
@kkirsche
kkirsche / inetAton-inet6Aton.go
Last active Feb 2, 2021
inet_aton and inet6_aton in Golang
View inetAton-inet6Aton.go
package nessusProcessor
import (
"encoding/hex"
"math/big"
"net"
)
// Inet_Aton converts an IPv4 net.IP object to a 64 bit integer.
func Inet_Aton(ip net.IP) int64 {
View how-to-oscp-final.md

How to pass the OSCP

  1. Recon
  2. Find vuln
  3. Exploit
  4. Escalate
  5. Document it

Time yourself

View mass-gobuster-runner.py
#!/usr/bin/env python3
from os import system, fsencode, fsdecode, listdir
from multiprocessing import Pool
def gobust(fp):
f_name = fp.split('/')[-1].split('.txt')[0]
system('gobuster -u http://URLHERE -w {fp} -x txt,php -o gobuster-80-{f_name}.txt'.format(fp=fp, f_name=f_name))
@kkirsche
kkirsche / exit_codes.py
Created Dec 29, 2020
Exit Codes Python
View exit_codes.py
from enum import IntEnum
class ExitCode(IntEnum):
"""The following exit codes are defined and can be used with SystemExit, although they
are not required. These are typically used for system programs written in Python,
such as a mail servers external command delivery program.
* EX_OK: Exit code that means no error occurred.
* EX_USAGE: Exit code that means the command was used incorrectly, such as when the wrong number of arguments are given.
* EX_DATAERR: Exit code that means the input data was incorrect.
@kkirsche
kkirsche / nmapxml_to_elasticsearch.py
Created Aug 22, 2016
Nmap XML to Elasticsearch
View nmapxml_to_elasticsearch.py
import os
import glob
from datetime import datetime
from elasticsearch import Elasticsearch
from libnmap.parser import NmapParser
dir_path = os.path.dirname(os.path.realpath(__file__))
es = Elasticsearch()