From 7e26ed0098782c2dd8a64e45734a47f25c840544 Mon Sep 17 00:00:00 2001 From: gurkenhabicht Date: Sun, 6 Nov 2022 02:00:53 +0100 Subject: [PATCH] added applications and fonts --- README.md | 7 ++ includes/01-myfonts.conf | 34 ++++++++ playbook.yml | 165 ++++++++++++++++++++++++++++++++++++--- 3 files changed, 194 insertions(+), 12 deletions(-) create mode 100644 includes/01-myfonts.conf diff --git a/README.md b/README.md index 99e6907..7261eab 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,13 @@ This is a vagrant setup for using BlackArch as a portable pentest environment. ## Create VM +* If you haven't done it before, install the arch image and vagrant-reload via +```sh +vagrant plugin install vagrant-reload +vagrant box add archlinux/archlinux +``` + +* Run the script to bring up the VM ```sh ./run.sh ``` diff --git a/includes/01-myfonts.conf b/includes/01-myfonts.conf new file mode 100644 index 0000000..89ddac0 --- /dev/null +++ b/includes/01-myfonts.conf @@ -0,0 +1,34 @@ + + + + + sans-serif + + DejaVu Sans + Noto Sans + Noto Color Emoji + Noto Emoji + + + + + serif + + DejaVu Serif + Noto Serif + Noto Color Emoji + Noto Emoji + + + + + monospace + + MesloGS + DejaVu Sans Mono + Noto Mono + Noto Color Emoji + Noto Emoji + + + diff --git a/playbook.yml b/playbook.yml index a780306..e793706 100644 --- a/playbook.yml +++ b/playbook.yml @@ -54,28 +54,28 @@ cmd: if [ ! -d "yay" ] ; then git clone http://aur.archlinux.org/yay.git && cd yay && makepkg -si --noconfirm ; fi -- name: Prepare window manger (dwm) +- name: Preparing window manger (dwm) and Downloading dotfiles hosts: default remote_user: vagrant tasks: - name: Installing dependencies ansible.builtin.shell: - cmd: sudo pacman -S pass coreutils fontconfig freetype2 glibc libx11 libxft libxinerama clipmenu libdrm libepoxy libevdev libfontenc libglvnd libgudev libice libinput libomxil-bellagio libpciaccess libsm libunwind libwacom libxcursor libxcvt libxdamage libxfixes libxfont2 libxkbfile libxmu libxrandr libxshmfence libxt libxxf86vm llvm-libs lm_sensors mesa mtdev pixman vulkan-icd-loader wayland xf86-input-libinput xkeyboard-config xorg-fonts-encodings xorg-server xorg-server-common xorg-setxkbmap xorg-xkbcomp xorg-xrandr xorg-xsetroot paraxor-dwm --noconfirm + cmd: sudo pacman -S pass coreutils fontconfig freetype2 glibc libx11 libxft libxinerama clipmenu libdrm libepoxy libevdev libfontenc libglvnd libgudev libice libinput libomxil-bellagio libpciaccess libsm libunwind libwacom libxcursor libxcvt libxdamage libxfixes libxfont2 libxkbfile libxmu libxrandr libxshmfence libxt libxxf86vm llvm-libs lm_sensors mesa mtdev pixman vulkan-icd-loader wayland xf86-input-libinput xkeyboard-config xorg-fonts-encodings xorg-server xorg-server-common xorg-setxkbmap xorg-xkbcomp xorg-xrandr xorg-xsetroot paraxor-dwm --noconfirm scrot - name: Prepare vim ansible.builtin.shell: | [[ ! -d ".vim/pack/default/start/gruvbox/.git" ]] && cd .vim/pack/default/start/gruvbox/ && git submodule update --init || exit 0 - name: Getting dotfiles ansible.builtin.shell: | - [[ ! -d "dotfiles" ]] && git clone https://git.stefan.works/stefan/dotfiles || exit 0 + [[ ! -d "dotfiles" ]] && git clone --recursive https://git.stefan.works/stefan/dotfiles || exit 0 - name: Getting dwm ansible.builtin.shell: | - [[ ! -d "dwm" ]] && git clone git://git.suckless.org/dwm && [[ -e "~/dwm/config.h" ]] && mv dwm/config.h dwm/config.bkp || exit 0 + [[ ! -d "dwm" ]] && git clone https://git.stefan.works/stefan/dwm.git && [[ -e "~/dwm/config.h" ]] && mv dwm/config.h dwm/config.bkp || exit 0 - name: Getting dmenu ansible.builtin.shell: | - [[ ! -d "dmenu" ]] && git clone git://git.suckless.org/dmenu || exit 0 + [[ ! -d "dmenu" ]] && git clone git://git.suckless.org/dmenu && cd ~/dotfiles && stow dmenu || exit 0 - name: Getting slstatus ansible.builtin.shell: | - [[ ! -d "slstatus" ]] && git clone git://git.suckless.org/slstatus || exit 0 + [[ ! -d "slstatus" ]] && git clone git://git.suckless.org/slstatus && cd ~/dotfiles && stow slstatus || exit 0 - name: Distributing dotfiles ansible.builtin.shell: #cmd: cd dotfiles && stow vim && stow dwm && stow dmenu && stow slstatus && cd .. @@ -97,8 +97,43 @@ path: ~/.xinitrc line: 'exec dwm' insertbefore: EOF + - name: Create .xsession file + ansible.builtin.file: + path: ~/.xsession + owner: vagrant + group: vagrant + mode: '0775' + state: touch + - name: Insert slstatus into .xsession + lineinfile: + path: ~/.xsession + line: 'slstatus 2>&1 >/dev/null &' + insertbefore: EOF + - name: Create .profile + ansible.builtin.file: + path: ~/.profile + owner: vagrant + group: vagrant + state: touch + - name: Fix Java Applications + ansible.builtin.blockinfile: + path: ~/.profile + block: | + export _JAVA_AWT_WM_NONREPARENTING=1 + export AWT_TOOLKIT=MToolkit + wmname LG3D -- name: make ssh x11 possible +# - name: Configure Xresources +# hosts: default +# remote_user: vagrant +# tasks: +# - name: install xrdb +# ansible.builtin.shell: +# cmd: sudo pacman -S --noconfirm --needed xorg-xrdb +# # TODO: further config + + +- name: make SSH x11 possible hosts: default remote_user: vagrant become: yes @@ -118,7 +153,7 @@ cmd: systemctl restart sshd -- name: Install lightm as a session manager for dwm +- name: Install lightdm as a session manager for dwm hosts: default remote_user: vagrant become: yes @@ -158,6 +193,38 @@ ansible.builtin.shell: cmd: systemctl enable lightdm +- name: Preparing Fonts + hosts: default + remote_user: vagrant + become: yes + become_user: root + tasks: + - name: Fonts + ansible.builtin.shell: + cmd: pacman -S --noconfirm --needed noto-fonts-emoji ttf-dejavu + +- name: Preparing More Fonts + hosts: default + remote_user: vagrant + tasks: + - name: Fonts + ansible.builtin.shell: + cmd: yay -S --aur --noconfirm --needed ttf-meslo-nerd-font-powerlevel10k nerd-fonts-dejavu-complete ttf-meslo + +- name: Configuring Fonts + hosts: default + remote_user: vagrant + become: yes + become_user: root + tasks: + - name: Configure fonts + ansible.builtin.copy: + src: includes/01-myfonts.conf + dest: /etc/fonts/conf.d/01-customfonts.conf + owner: root + group: root + mode: '0644' + - name: Install Applications hosts: default remote_user: vagrant @@ -165,10 +232,84 @@ become_user: root tasks: + # System + - name: pass + ansible.builtin.shell: + cmd: pacman -S --noconfirm pass + - name: Python dependencies + ansible.builtin.shell: + cmd: pacman -S --noconfirm --needed python-setuptools python-j2cli python-jinja-time python-beautifulsoup4 + + + # Shell - name: Alacritty ansible.builtin.shell: - cmd: pacman -S alacritty --noconfirm -# - name: Fonts -# ansible.builtin.shell: -# cmd: yay -S ttf-meslo-nerd-font-powerlevel10k nerd-font-sans-mono --noconfirm + cmd: pacman -S --noconfirm alacritty + - name: bash-completion + ansible.builtin.shell: + cmd: sudo pacman -S --noconfirm bash-completion + - name: clipmenu + ansible.builtin.shell: + cmd: pacman -S --noconfirm clipmenu + # Web + - name: qutebrowser + ansible.builtin.shell: + cmd: pacman -S --noconfirm qutebrowser + - name: Firefox + ansible.builtin.shell: + cmd: pacman -S --noconfirm firefox + - name: nmap + ansible.builtin.shell: + cmd: pacman -S --noconfirm nmap + - name: dirsearch + ansible.builtin.shell: + cmd: pacman -S --noconfirm dirsearch + - name: gobuster + ansible.builtin.shell: + cmd: pacman -S --noconfirm gobuster + - name: Burpsuite + ansible.builtin.shell: + cmd: pacman -S --noconfirm burpsuite + - name: zaproxy + ansible.builtin.shell: + cmd: su -c "yay -S --noconfirm --aur zaproxy-weekly" vagrant + - name: nikto + ansible.builtin.shell: + cmd: pacman -S --noconfirm nikto + - name: wpscan + ansible.builtin.shell: + cmd: pacman -S --noconfirm wpscan + + # Seclists + - name: seclists + ansible.builtin.shell: + cmd: pacman -S --noconfirm --needed seclists + + # Passwords + - name: John the Ripper + ansible.builtin.shell: + cmd: pacman -S --noconfirm --needed john + - name: Hashcat + ansible.builtin.shell: + cmd: pacman -S --noconfirm --needed hashcat hashcat-utils + - name: Haiti + ansible.builtin.shell: + cmd: pacman -S --noconfirm haiti + - name: CeWL + ansible.bultin.shell: + cmd: pacman -S --noconfirm cewl + + # Pwn + - name: Ghidra + ansible.builtin.shell: + cmd: pacman -S --noconfirm ghidra + - name: r2 + ansible.builtin.shell: + cmd: pacman -S --noconfirm radare2 + + +# - name: radare2 +# ansible:builtin.shell: +# cmd: pacman -S --noconfirm radare2 +#