Skip to content

Instantly share code, notes, and snippets.

View synackme's full-sized avatar

Landon Mayo synackme

  • Houston, Tx
View GitHub Profile
@synackme
synackme / get_directory_owner_group.py
Last active August 29, 2015 14:00
How to get the owner and grup of a folder with Python on Linux/Mac machines
#!/usr/bin/env python
# get the owner and group IDs of a directory using Python under Linux
"""
Use os.stat() to get the uid and gid of the file.
Then, use pwd.getpwuid() and grp.getgrgid() to
get the user and group names respectively.
"""
#! /usr/env/ruby
require "benchmark"
require 'digest/md5'
# The password hash to crack
password_hash = "e1f3ecc31656795a128db19da490c9ec"
# Helper for hashing passwords
def md5(password)
Digest::MD5.hexdigest(password)
#! /usr/env/ruby
require "benchmark"
require 'digest/md5'
# The password hash to crack
password_hash = "e1f3ecc31656795a128db19da490c9ec"
# Helper for hashing passwords
def md5(password)
Digest::MD5.hexdigest(password)
@synackme
synackme / SSH_tunnel_SOCKS5.md
Created April 18, 2014 23:25
SSH Tunnel: SOCKS5 with Firefox Simple and secure web browsing

SOCKS5 with Firefox

Simple and secure web browsing. You can setup a tunnel as described above or you can use the following technique. This starts SSH on your localhost acting as a SOCKS proxy. Once you start SSH this way you can point any application that supports a SOCKS5 interface to this port. But these instructions will show what you need to do to get Firefox to proxy through SOCKS. Firefox supports SOCKS with no extra add-ons. Start ssh an connection to a host that you want to proxy through. Use the -D option to specify a SOCKS5 port on your localhost. The port doesn't really matter. You just need to use the same port in your SOCKS client application.

ssh -D 9999 [email protected]

In Firefox select "Edit | Preferences | Advanced Tab | Connection Settings button". Then select "Manual proxy configuration". All you need to fill out is "SOCKS Host: Localhost", "Port: 9999", then select "SOCKS v5". It's easy.

@synackme
synackme / mac-multiple-firefox-profiles.md
Created April 17, 2014 06:53
Run multiple Firefox profiles as separate Applications

Run multiple Firefox profiles as separate Applications on Mac

Creating a new Firefox profile

Open terminal and execute the following command:

/Applications/Firefox.app/Contents/MacOS/firefox-bin --ProfileManager

This should bring up the Firefox Profile Manager -

@synackme
synackme / hack.sh
Created April 17, 2014 00:44 — forked from erikh/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@synackme
synackme / userscript_favs.html
Created April 9, 2014 01:25
My favorite scripts from userscripts.org
<script src="http://widgets.userscripts.org/widgets/477122/favorites.js" type="text/javascript"></script><div id="uso_link"><a href="http://userscripts.org">userscripts.org</a></div>
@synackme
synackme / PyCharm-Dash_Inegration.md
Created April 2, 2014 09:06
PyCharm Dash Integration Details

Launches Dash with the word under the caret or the selected text. The default shortcut assigned in the plugin is Mac-Shift-D.

Dash is a Mac OSX utility that can be obtained here.

The plugin will use the documents file type to determine which docset keyword to use in Dash. These associations are customizable in "~/Library/Preferences/%IDE_NAME%/options/options.xml" under the property "DASH_PLUGIN_KEYWORDS" %IDE_NAME% might be "WebIde60", "IdeaIC12" or "AndroidStudioPreview".

Values pairs can be provided in a semi-colon delimited list. The value pair consists of FILE_TYPE=KEYWORD

@synackme
synackme / disable_apache_OSX.md
Last active August 29, 2015 13:57
How to stop Apache permanently on Mac OS X Mavericks

##Disable Integrated Apache Server in OSX

This will stop a running instance of Apache, and record that it should not be restarted. In otherwords, Apache stays disabled even after rebooting.

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
command/flags description
sudo run as root (administrator) account
launchctl OS X program interfaced with launchd which is a daemon manager
@synackme
synackme / append2bashrc.sh
Last active August 29, 2015 13:57
X11 forwarding after SUDO SU
# in your login directory on the target machine, add this to your .bashrc:
LIVE=`echo $DISPLAY | awk -F: '{print $2}' | awk -F. '{print $1}'` xauth list | grep unix:$LIVE | awk '{print "xauth add " $0}' >xuser