mirror of
https://github.com/Matir/skel.git
synced 2026-05-26 13:35:42 -07:00
Merge branch 'master' of https://github.com/Matir/skel
This commit is contained in:
101
bin/install_tool
Executable file
101
bin/install_tool
Executable file
@@ -0,0 +1,101 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ue
|
||||||
|
|
||||||
|
REINSTALL=0
|
||||||
|
PACKAGES=1
|
||||||
|
|
||||||
|
while getopts -- "-:" a ; do
|
||||||
|
case "${a}" in
|
||||||
|
-)
|
||||||
|
case "${OPTARG}" in
|
||||||
|
reinstall)
|
||||||
|
REINSTALL=1
|
||||||
|
;;
|
||||||
|
no-packages)
|
||||||
|
PACKAGES=0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown long option ${OPTARG}" >/dev/stderr
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
shift $(($OPTIND-1))
|
||||||
|
|
||||||
|
if [ $# -ne 1 ] ; then
|
||||||
|
echo "Usage: ${0} <tool>" >/dev/stderr
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
TOOL=${1}
|
||||||
|
|
||||||
|
function install_pkgs {
|
||||||
|
if [ ${PACKAGES} -eq 0 ] ; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [ `id -u` -ne "0" ] ; then
|
||||||
|
sudo apt-get -y install $* || (
|
||||||
|
echo -n "Unable to install packages, please ensure these " >/dev/stderr
|
||||||
|
echo "are installed, then run with --no-packages." >/dev/stderr
|
||||||
|
echo $*
|
||||||
|
false )
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
apt-get -y install $*
|
||||||
|
}
|
||||||
|
|
||||||
|
DESTDIR="${HOME}/tools/${TOOL}"
|
||||||
|
|
||||||
|
if [ -d ${DESTDIR} ] ; then
|
||||||
|
if [ ${REINSTALL} -eq 1 ] ; then
|
||||||
|
rm -ri ${DESTDIR}
|
||||||
|
else
|
||||||
|
echo "${DESTDIR} exists but not reinstalling." >/dev/stderr
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
case ${TOOL} in
|
||||||
|
john)
|
||||||
|
install_pkgs libssl-dev git build-essential yasm libgmp-dev libpcap-dev \
|
||||||
|
pkg-config libbz2-dev libopenmpi-dev openmpi-bin libnss3-dev \
|
||||||
|
libkrb5-dev libgmp-dev
|
||||||
|
jtemp=`mktemp -d`
|
||||||
|
git clone https://github.com/magnumripper/JohnTheRipper.git ${jtemp}/john
|
||||||
|
cd ${jtemp}/john/src
|
||||||
|
./configure && make -sj2
|
||||||
|
mkdir -p ${DESTDIR}
|
||||||
|
cp -r ${jtemp}/john/run/* ${DESTDIR}
|
||||||
|
rm -rf ${jtemp}
|
||||||
|
# Persistent files
|
||||||
|
mkdir -p ${HOME}/.john
|
||||||
|
touch ${HOME}/.john/john.pot
|
||||||
|
ln -sf ${HOME}/.john/* ${DESTDIR}
|
||||||
|
;;
|
||||||
|
wordlists)
|
||||||
|
mkdir -p ${DESTDIR}
|
||||||
|
wget -q -O ${DESTDIR}/rockyou.txt.bz2 \
|
||||||
|
http://downloads.skullsecurity.org/passwords/rockyou.txt.bz2
|
||||||
|
bunzip2 ${DESTDIR}/rockyou.txt.bz2
|
||||||
|
wget -q -O ${DESTDIR}/phpbb.txt.bz2 \
|
||||||
|
http://downloads.skullsecurity.org/passwords/phpbb.txt.bz2
|
||||||
|
bunzip2 ${DESTDIR}/phpbb.txt.bz2
|
||||||
|
wget -q -O ${DESTDIR}/hak5.txt.bz2 \
|
||||||
|
http://downloads.skullsecurity.org/passwords/hak5.txt.bz2
|
||||||
|
bunzip2 ${DESTDIR}/hak5.txt.bz2
|
||||||
|
;;
|
||||||
|
gcloud)
|
||||||
|
gtemp=`mktemp -d`
|
||||||
|
gbase="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/"
|
||||||
|
gsdk="google-cloud-sdk-142.0.0-linux-x86_64.tar.gz"
|
||||||
|
wget -q -O /tmp/gcloud.tar.gz \
|
||||||
|
"${gbase}${gsdk}"
|
||||||
|
tar zxf /tmp/gcloud.tar.gz --strip-components=1 -C ${DESTDIR}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown tool: ${TOOL}" >/dev/stderr
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -4,18 +4,15 @@ umask 027
|
|||||||
ulimit -c unlimited
|
ulimit -c unlimited
|
||||||
|
|
||||||
# Paths and preferences
|
# Paths and preferences
|
||||||
export PATH="$HOME/bin:/sbin:/usr/sbin:$PATH"
|
|
||||||
export PYTHONPATH="$HOME/.python:$PYTHONPATH"
|
export PYTHONPATH="$HOME/.python:$PYTHONPATH"
|
||||||
export GOPATH="$HOME/Projects/Go"
|
export GOPATH="$HOME/Projects/Go"
|
||||||
|
export PATH="$HOME/bin:/sbin:/usr/sbin:$PATH:$GOPATH/bin"
|
||||||
export VISUAL=vim
|
export VISUAL=vim
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
export DEBEMAIL="david@systemoverlord.com"
|
export DEBEMAIL="david@systemoverlord.com"
|
||||||
export DEBFULLNAME="David Tomaschik"
|
export DEBFULLNAME="David Tomaschik"
|
||||||
export LESS="-MR"
|
export LESS="-MR"
|
||||||
|
|
||||||
# Unconditional because /bin/sh sucks
|
|
||||||
export PATH="$PATH:$HOME/.gce/google-cloud-sdk/bin:$HOME/bin/genymotion:$HOME/bin/genymotion/tools:$HOME/bin/google_appengine:$HOME/bin/go_appengine:$HOME/bin/google-cloud-sdk/bin:$GOPATH/bin"
|
|
||||||
|
|
||||||
# Fix gnome-terminal
|
# Fix gnome-terminal
|
||||||
if [[ $TERM == "xterm" && $COLORTERM == "gnome-terminal" ]] ; then
|
if [[ $TERM == "xterm" && $COLORTERM == "gnome-terminal" ]] ; then
|
||||||
export TERM="xterm-256color"
|
export TERM="xterm-256color"
|
||||||
|
|||||||
@@ -12,3 +12,8 @@ Host *
|
|||||||
ForwardX11Trusted no
|
ForwardX11Trusted no
|
||||||
ServerAliveInterval 120
|
ServerAliveInterval 120
|
||||||
CheckHostIP no
|
CheckHostIP no
|
||||||
|
|
||||||
|
Host warzone
|
||||||
|
Hostname warzone.shadowcats.club
|
||||||
|
Port 22
|
||||||
|
User matir
|
||||||
|
|||||||
@@ -148,4 +148,4 @@ autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/ containedin=ALL
|
|||||||
|
|
||||||
" Color column at end of lines
|
" Color column at end of lines
|
||||||
set colorcolumn=+1
|
set colorcolumn=+1
|
||||||
highlight ColorColumn ctermbg=lightgrey guibg=lightgrey
|
highlight ColorColumn ctermbg=black guibg=lightgrey
|
||||||
|
|||||||
17
dotfiles/zsh_custom/plugins/gcloud/gcloud.plugin.zsh
Executable file
17
dotfiles/zsh_custom/plugins/gcloud/gcloud.plugin.zsh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
GCL=${HOME}/tools/gcloud
|
||||||
|
|
||||||
|
if [ ! -d ${GCL} ] ; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add bin to path
|
||||||
|
export PATH="${PATH}:${GCL}/bin"
|
||||||
|
|
||||||
|
# Load completion
|
||||||
|
source ${GCL}/completion.zsh.inc
|
||||||
|
|
||||||
|
which kubectl 2>/dev/null >&2 && \
|
||||||
|
source <(kubectl completion zsh) || \
|
||||||
|
true
|
||||||
@@ -29,7 +29,7 @@ if [ -d $HOME/.oh-my-zsh ] ; then
|
|||||||
ZSH=$HOME/.oh-my-zsh
|
ZSH=$HOME/.oh-my-zsh
|
||||||
ZSH_THEME="matir"
|
ZSH_THEME="matir"
|
||||||
ZSH_CUSTOM="$HOME/.zsh_custom"
|
ZSH_CUSTOM="$HOME/.zsh_custom"
|
||||||
plugins=(encode64 gpg-agent pep8 pip python tmux urltools extract sudo virsh virtualenv jekyll)
|
plugins=(encode64 gpg-agent pep8 pip python tmux urltools extract sudo virsh virtualenv jekyll metasploit gcloud)
|
||||||
test -f /usr/share/virtualenvwrapper/virtualenvwrapper.sh && plugins+=(virtualenvwrapper)
|
test -f /usr/share/virtualenvwrapper/virtualenvwrapper.sh && plugins+=(virtualenvwrapper)
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
unset ZSH_THEME
|
unset ZSH_THEME
|
||||||
|
|||||||
Reference in New Issue
Block a user