-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlinux_post_install.sh
More file actions
220 lines (173 loc) · 5.9 KB
/
Copy pathlinux_post_install.sh
File metadata and controls
220 lines (173 loc) · 5.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
#!/bin/bash
# Linux install script tested successfully on Ubuntu 18.04.1 LTS
# Usage: sudo bash ./linux_post_install.sh
# Terminate on any error
set -e
update_and_upgrade() {
apt-get update
apt-get upgrade
}
# exFAT USB support
install_exfat() {
apt-get install exfat-fuse exfat-utils -y
}
# i3 window manager
install_i3() {
apt install i3 feh -y
# echo "exec --no-startup-id /usr/bin/feh --bg-scale ~/Pictures/desktop2.jpg" >> ~/.config/i3/config
}
install_term_tools() {
apt install tmux screen git openvpn tlp vim curl guake -y
}
install_graphics_tools() {
apt install inkscape kazam -y
}
install_wireshark() {
# ask for username
apt install wireshark -y
usermod -aG wireshark $username
}
install_brave_browser() {
curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key add -
source /etc/os-release
echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ $UBUNTU_CODENAME main" | sudo tee /etc/apt/sources.list.d/brave-browser-release-${UBUNTU_CODENAME}.list
sudo apt update
sudo apt install brave-browser brave-keyring
}
install_vbox() {
echo "deb https://download.virtualbox.org/virtualbox/debian bionic contrib" >> /etc/apt/sources.list
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-6.0 # virtualbox-5.2
}
install_docker() {
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
sudo apt install docker-ce
}
install_spotify() {
apt install snap
snap install spotify
}
install_sublime() {
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update && sudo apt-get install sublime-text
}
download_desktop_debs() {
# vscode deb
wget https://go.microsoft.com/fwlink/?LinkID=760868
# discord deb
wget https://discordapp.com/api/download?platform=linux&format=deb
# cherrytree deb
wget http://www.giuspen.com/software/cherrytree_0.38.7-0_all.deb
}
download_r2_cutter() {
wget https://github.com/radareorg/cutter/releases/download/v1.7.4/Cutter-v1.7.4-x64.Linux.AppImage
chmod +x Cutter-v1.7.4-x64.Linux.AppImage
}
download_ghidra() {
wget https://ghidra-sre.org/ghidra_9.0_PUBLIC_20190228.zip
unzip ghidra*.zip -d /opt/
sudo apt install openjdk-11-jre-headless
# Get JDK 11.0.2 deb
# https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html
# http://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.deb
# Get JDK 12 zips
# https://www.oracle.com/technetwork/java/javase/downloads/jdk12-downloads-5295953.html
export PATH=$PATH:jdk-11.0.3/bin/
}
install_32_bit_support() {
sudo dpkg --add-architecture i386
sudo apt-get update
# install gcc 32-bit
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
sudo apt-get install multiarch-support
}
install_peda() {
sudo apt-get install git
git clone https://github.com/longld/peda.git ~/peda
echo "source ~/peda/peda.py" >> ~/.gdbinit
}
install_gef() {
wget -O ~/.gdbinit-gef.py -q https://github.com/hugsy/gef/raw/master/gef.py
echo source ~/.gdbinit-gef.py >> ~/.gdbinit
}
install_ctf_tools() {
echo "Installing ctf tools"
install_32_bit_support
# install peda | gef | pwndbg
# install_peda
install_gef
}
install_typora() {
wget -qO - https://typora.io/linux/public-key.asc | sudo apt-key add -
# add Typora's repository
sudo add-apt-repository 'deb https://typora.io/linux ./'
sudo apt-get update -y
# install typora
sudo apt-get install typora -y
}
install_source_code_tools() {
sudo apt-get install ctags zeal -y
# Get sourcetrail appimage
wget https://github.com/CoatiSoftware/Sourcetrail/releases/download/2020.1.117/Sourcetrail_2020_1_117_Linux_64bit.AppImage
}
install_python3_pip() {
sudo apt-get install python3 python3-dev python3-pip -y
pip install pyvenv --user
}
install_pwntools() {
apt-get update
apt-get install python3 python3-pip python3-dev git libssl-dev libffi-dev build-essential
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade git+https://github.com/Gallopsled/pwntools.git@dev
}
install_golang() {
wget https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.14.2.linux-amd64.tar.gz
# Add path to bashrc
# export PATH=$PATH:/usr/local/go/bin
}
set_tmux_conf() {
echo "setw -g mode-keys vi" > ~/.tmux.conf
}
set_vimrc() {
echo "syntax enable" > ~/.vimrc
echo "set tabstop=4" >> ~/.vimrc
echo "set softtabstop=4" >> ~/.vimrc
echo "set expandtab" >> ~/.vimrc
echo "set number" >> ~/.vimrc
echo "set showcmd" >> ~/.vimrc
echo "set cursorline" >> ~/.vimrc
echo "set incsearch" >> ~/.vimrc
echo "set hlsearch" >> ~/.vimrc
echo "set shiftwidth=4" >> ~/.vimrc
}
get_cmdfu() {
echo "Adding cmdfu to bashrc"
echo 'cmdfu(){ curl "https://www.commandlinefu.com/commands/matching/$@/$(echo -n $@ | openssl base64)/plaintext"; }' >> .bashrc
}
# reminder to get darkreader and lastpass browser extensions
main() {
#update_and_upgrade
#install_exfat
#install_i3
#install_term_tools
#install_graphics_tools
##install_wireshark
#install_brave_browser
#install_vbox
#install_docker
#install_spotify
#install_sublime
#download_desktop_debs
#download_r2_cutter
install_ctf_tools
#set_vimrc
##get_cmdfu
}
main