Skip to content

Instantly share code, notes, and snippets.

View jfalken's full-sized avatar

Chris Sandulow jfalken

View GitHub Profile
@MatthewWilkes
MatthewWilkes / automated.py
Created January 24, 2019 16:30
Extract deleted commits from a GitHub repo
import argparse
import os
import re
import subprocess
import tempfile
import requests
def get_repo(owner, repo):
@HarmJ0y
HarmJ0y / keepass2john.py
Created June 30, 2016 06:02
Python port of John the Ripper's keepass2john - extracts a HashCat/john crackable hash from KeePass 1.x/2.X databases
#!/usr/bin/python
# Python port of keepass2john from the John the Ripper suite (http://www.openwall.com/john/)
# ./keepass2john.c was written by Dhiru Kholia <dhiru.kholia at gmail.com> in March of 2012
# ./keepass2john.c was released under the GNU General Public License
# source keepass2john.c source code from: http://fossies.org/linux/john/src/keepass2john.c
#
# Python port by @harmj0y, GNU General Public License
#
Blog post: Ryan Huber - Distributed Security Alerting
https://medium.com/several-people-are-coding
Video: Zane Lackey - Building a Modern Security Organization
https://duo.com/blog/duo-tech-talk-building-a-modern-security-engineering-organization
Krebs on Security Blog
https://www.krebsonsecurity.com
Sony Breach
@worawit
worawit / cve-2015-0240_samba_exploit.py
Created April 10, 2015 14:48
Exploit for Samba vulnerabilty (CVE-2015-0240)
#!/usr/bin/python
"""
Exploit for Samba vulnerabilty (CVE-2015-0240) by sleepya
The exploit only targets vulnerable x86 smbd <3.6.24 which 'creds' is controlled by
ReferentID field of PrimaryName (ServerName). That means '_talloc_zero()'
in libtalloc does not write a value on 'creds' address.
Reference:
- https://securityblog.redhat.com/2015/02/23/samba-vulnerability-cve-2015-0240/
@thom-nic
thom-nic / Dockerfile
Last active August 13, 2020 14:35
Dockerfile that attempts to run the app as non-root user. This creates a `node` user & sets permissions on app files. Note you cannot `chown` files in a docker 'volume' during the build process, but you can at runtime (as part of your `CMD`) but in that case you can't use the `USER` command to change the UID before `CMD` runs.
###
# Node.js app Docker file
#
# Some basic build instructions:
# ```
# # you should delete node_modules b/c you don't want that copied during 'ADD'
# docker build -t thom-nic/node-bootstrap .
# # run a shell in the container to inspect the environment (as root):
# docker run --rm -itu root thom-nic/node-bootstrap /bin/bash
# ```
@g-r-a-v-e-l-y
g-r-a-v-e-l-y / gist:5657778
Created May 27, 2013 15:57
A very silly "turn chrome into a full screen kiosk and tab-rotate it with applescript" waste of time.
## settings
set lag to 120
set sites to {"http://nyan.cat", "http://grantstavely.com/files/borat.html"}
## functions
on tab_toggle(lag, sites)
set siteCount to count sites
tell application "System Events"
## lame hacks abound
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@wadey
wadey / iterm2.zsh
Last active March 10, 2024 00:32
Change iTerm2 tab color when using SSH
# Usage:
# source iterm2.zsh
# iTerm2 tab color commands
# https://iterm2.com/documentation-escape-codes.html
if [[ -n "$ITERM_SESSION_ID" ]]; then
tab-color() {
echo -ne "\033]6;1;bg;red;brightness;$1\a"
echo -ne "\033]6;1;bg;green;brightness;$2\a"