-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
290 additions
and
144 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
" turn on syntax highlight | ||
syntax on | ||
|
||
" turn on line numbers | ||
set number | ||
|
||
" make backspace work as intended in edit mode | ||
set backspace=indent,eol,start | ||
|
||
" Indentation | ||
set shiftwidth=4 | ||
set tabstop=4 | ||
set softtabstop=4 | ||
set shiftwidth=4 | ||
set expandtab | ||
|
||
" Auto indent what you can | ||
set autoindent | ||
|
||
" Display | ||
set ls=2 | ||
set noshowmode | ||
set showcmd | ||
set modeline | ||
set ruler | ||
set title | ||
set nu | ||
|
||
" History | ||
set history=50 | ||
|
||
|
||
" Command shortcuts | ||
" sort the buffer removing duplicates | ||
nmap <Leader>s :%!sort -u --version-sort<CR> | ||
|
||
" Base64 decode word under cursor | ||
nmap <Leader>b :!echo <C-R><C-W> \| base64 -d<CR> | ||
|
||
" Pretty print XML | ||
nmap <Leader>x :!xmllint --format - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
### my aliases | ||
# required to sudo an aliased command | ||
alias sudo='sudo ' | ||
|
||
# tmux | ||
alias tml='tmux ls' | ||
alias tma='tmux a -t' | ||
alias tmn='tmux new -s' | ||
|
||
# binaries | ||
alias vi='vim' | ||
alias ngrok='/opt/tools/ngrok' | ||
|
||
# web | ||
alias secretfinder='python3 /opt/tools/SecretFinder/SecretFinder.py' | ||
alias linkfinder='python3 /opt/tools/LinkFinder/linkfinder.py' | ||
alias bypassfuzzer='python3 /opt/tools/bypassfuzzer/bypassfuzzer.py' | ||
|
||
# Proxy stuff | ||
alias burl='curl -x 127.0.0.1:8080 -k' | ||
alias murl="curl -x 127.0.0.1:8080 -k -H $'intrudir: magenta'" | ||
alias proxypy='export REQUESTS_CA_BUNDLE="path/to/burpcert.pem"; export HTTP_PROXY="http://127.0.0.1:8080"; export HTTPS_PROXY="http://127.0.0.1:8080"' | ||
alias proxypy_unset='unset REQUESTS_CA_BUNDLE; unset HTTP_PROXY; unset HTTPS_PROXY' | ||
|
||
# shortcuts | ||
alias POST='curl -d @-' | ||
alias apachelogs="tail -f -n 10 /var/log/apache2/access.log" | ||
alias udc='python3 -c "import sys, urllib.parse as ul; print(ul.unquote_plus(sys.argv[1]))"' | ||
alias uec='python3 -c "import sys, urllib.parse as ul; print(ul.quote_plus(sys.argv[1]))"' | ||
alias ascii_lower='python3 -c "import string; [print(x) for x in string.ascii_lowercase]"' | ||
alias ascii_upper='python3 -c "import string; [print(x) for x in string.ascii_uppercase]"' | ||
alias ascii_digits='python3 -c "import string; [print(x) for x in string.digits]"' | ||
|
||
# other | ||
export EDITOR=vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
### enable mouse: | ||
set -g mouse on | ||
|
||
### Scrollback buffer | ||
set -g history-limit 65000 | ||
|
||
### get 256 colors to work, including in vim/nvim | ||
set-option -g default-terminal "screen-256color" | ||
set -ga terminal-overrides ",xterm-256color:RGB" | ||
|
||
### fix tmux escape time (for vim/nvim) | ||
set-option -sg escape-time 10 | ||
|
||
### New windows open in current path | ||
bind c new-window -c "#{pane_current_path}" | ||
|
||
### New panes open in current path | ||
bind '"' split-window -c "#{pane_current_path}" | ||
bind % split-window -h -c "#{pane_current_path}" | ||
|
||
# Use ALT + <- and ALT + -> to jump words | ||
# not needed if you use iterm | ||
bind -n M-Left send-key M-b | ||
bind -n M-Right send-key M-f | ||
|
||
### Tmux themes | ||
run-shell "/opt/tmux/tmux-power/tmux-power.tmux" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/bin/bash | ||
function check_if_success () { | ||
if [ $? -eq 0 ]; then | ||
echo "OK" | ||
else | ||
echo "Something went wrong. Stopping here so you can check the error." | ||
exit | ||
fi | ||
} | ||
|
||
while getopts 'h:t:' flag; do | ||
case "$flag" in | ||
h) echo "usage";; | ||
|
||
t) type=${OPTARG};; | ||
esac | ||
done | ||
|
||
if [ -v "$type" ]; then | ||
echo "The -t flag is required. Needs to be one of the following: ['full', 'ctf']" | ||
exit 1 | ||
fi | ||
|
||
|
||
if [[ ! $type == 'full' ]] && [[ ! $type == 'ctf' ]]; then | ||
echo "the -t flag needs to be either 'full' or 'ctf'." | ||
exit 1 | ||
fi | ||
|
||
echo "VM type: $type"; | ||
|
||
if [[ $type == 'full' ]]; then | ||
echo "Full vim config" | ||
# vim_rc=$(curl https://raw.githubusercontent.com/intrudir/vm-setup.sh/main/dotfiles/full-vimrc) | ||
# echo "$vim_rc" > ~/.vimrc | ||
|
||
echo "Full shell aliases" | ||
# zsh_rc=$(curl https://raw.githubusercontent.com/intrudir/vm-setup.sh/main/dotfiles/full-aliases) | ||
# echo "$zsh_rc" >> ~/.zshrc | ||
# echo "$zsh_rc" >> ~/.bash_aliases | ||
|
||
echo "Full tmux.conf" | ||
# tmux_conf=$(curl https://raw.githubusercontent.com/intrudir/vm-setup.sh/main/dotfiles/full-tmux.conf) | ||
# echo "$tmux_conf" > ~/.tmux.conf | ||
|
||
echo "Install VIM plug" | ||
# curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | ||
# check_if_success | ||
|
||
echo "Install tmux themes" | ||
# sudo mkdir /opt/tmux && cd /opt/tmux | ||
# check_if_success | ||
# sudo git clone https://github.com/wfxr/tmux-power.git | ||
# cd ~ | ||
fi | ||
|
||
|
||
if [[ $type == 'ctf' ]]; then | ||
echo "CTF vim config" | ||
# vim_rc=$(curl https://raw.githubusercontent.com/intrudir/vm-setup.sh/main/dotfiles/ctf-vimrc) | ||
# echo "$vim_rc" > ~/.vimrc | ||
|
||
echo "CTF shell aliases" | ||
# zsh_rc=$(curl https://raw.githubusercontent.com/intrudir/vm-setup.sh/main/dotfiles/ctf-aliases) | ||
# echo "$zsh_rc" >> ~/.zshrc | ||
# echo "$zsh_rc" >> ~/.bash_aliases | ||
|
||
echo "CTF tmux.conf" | ||
# tmux_conf=$(curl https://raw.githubusercontent.com/intrudir/vm-setup.sh/main/dotfiles/ctf-tmux.conf) | ||
# echo "$tmux_conf" > ~/.tmux.conf | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.