Skip to content

Instantly share code, notes, and snippets.

@N4NU
Last active July 7, 2023 18:22
Show Gist options
  • Save N4NU/824f63f0970ac7b3b57052c909157c1c to your computer and use it in GitHub Desktop.
Save N4NU/824f63f0970ac7b3b57052c909157c1c to your computer and use it in GitHub Desktop.
linux init commands
cat id_rsa.pub >> ./.ssh/authorized_keys
hostname vu
echo "vu" > /etc/hostname
sudo dpkg --add-architecture i386
sudo sed -i'~' -E "s@http://(..\.)?(archive|security)\.ubuntu\.com/ubuntu@http://ftp.tsukuba.wide.ad.jp/Linux/ubuntu@g" /etc/apt/sources.list
sudo apt update
sudo apt upgrade
sudo apt install git build-essential socat vim zsh gdb python3-dev libc6-dbg curl libssl-dev libbz2-dev libreadline-dev libsqlite3-dev libffi-dev libncurses5-dev zlib1g-dev liblzma-dev
sudo apt install libc6:i386 libc6-dbg:i386 libncurses5:i386 libstdc++6:i386 gcc-multilib g++-multilib
git clone --depth 1 https://github.com/N4NU/.myenv ~/.myenv
cd ~/.myenv/
./setup vim
./setup zsh
chsh -s /bin/zsh
git clone --depth 1 https://github.com/longld/peda.git ~/.peda
git clone --depth 1 https://github.com/scwuaptx/Pwngdb.git ~/.Pwngdb
cp ~/.Pwngdb/.gdbinit ~/
sed -i -e 's/~\/peda/~\/.peda/g' -e 's/~\/Pwngdb/~\/.Pwngdb/g' ~/.gdbinit
# wget https://github.com/downloads/0vercl0k/rp/rp-lin-x64
# chmod +x rp-lin-x64
# sudo mv ./rp-lin-x64 /usr/local/bin/rp++
# wget http://www.trapkit.de/tools/checksec.sh
# chmod +x checksec.sh
# sudo mv ./checksec.sh /usr/local/bin/checksec
# pyenv ver.
git clone --depth 1 https://github.com/pyenv/pyenv.git ~/.pyenv
git clone --depth 1 https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
echo '# pyenv' >> ~/.zshrc.profile
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc.profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc.profile
echo 'eval "$(pyenv init -)"' >> ~/.zshrc.profile
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshrc.profile
exec -l zsh
pyenv install 2.7.12
pyenv virtualenv 2.7.12 tmp
pyenv shell tmp
pip install pwntools requests angr ipython
curl -kL https://bootstrap.pypa.io/get-pip.py | sudo -H python
sudo -H pip install pwntools requests angr ipython
cd /opt && wget -qO- https://github.com/BinaryAnalysisPlatform/qira/archive/v1.2.tar.gz | tar zx && cd qira-1.2 && ./install.sh
# z3
git clone --depth 1 https://github.com/Z3Prover/z3.git
cd z3
python scripts/mk_make.py --python
cd build
make -j `nproc`
sudo make install
# boolector
pip install cython
git clone https://github.com/Boolector/boolector.git
cd boolector
./contrib/setup-lingeling.sh
./contrib/setup-btor2tools.sh
./configure.sh --python
cd build
make -j `nproc`
sudo make install
echo '# pyboolector' >> ~/.zshrc.profile
echo 'export PYTHONPATH="/usr/local/lib/:$PYTHONPATH"' >> ~/.zshrc.profile
# rbenv
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'PATH=$HOME/.rbenv/bin:$PATH' >> ~/.zshrc.profile
echo 'eval "$(rbenv init -)"' >> ~/.zshrc.profile
mkdir -p "$(rbenv root)"/plugins
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
rbenv install 2.5.1
rbenv global 2.5.1
# gem
gem update --system
gem install bundle
gem install seccomp-tools
gem install easy_pow
gem install zsteg
# fish
sudo apt install software-properties-common
sudo apt-add-repository ppa:fish-shell/release-2
sudo apt update
sudo apt install fish
curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs https://git.io/fisher
fisher add oh-my-fish/theme-bobthefish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment