warding 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c6e2a5ecc183e76cc17c2a4c16379223a2196b8ac65058318d8807629d0596f
4
- data.tar.gz: d76f2e4d69c808200b9381b77ebe3e4d3f55c50952d3eb717085af8d916b0e5c
3
+ metadata.gz: 8c9a32dc1d152b257a75f9135ba8c90744bd0b0b651f13219c0151b1d1b66487
4
+ data.tar.gz: 49a842f3525b1805b24b3b5017e92aabb6ee2f7001a5886e2c7ddbdddafa8bbb
5
5
  SHA512:
6
- metadata.gz: 7b60126b88ec985713877eea1403449cce055c54ee958daf2a38b1a7a9bf77b4453373267262e2e41fc2b923d362a7e6a846181c8b53d2c7ece343b4566dd369
7
- data.tar.gz: 16f7123ff0d1dec8da58a4e7b6cff307d5a25185fa677493f1721647cf0ff370f8e6fec33cd8c1f8c5ce0707a2bceac018ad3c66696418d2e08eed34fa81838d
6
+ metadata.gz: '038593e77f575fcb096244b249af59c708b2da350e36d1a3fe048f65c23f13f72dfde781d477d5f2e68243a889b8664cffb45acb16bc012f01d058384f403180'
7
+ data.tar.gz: 2baa3f15ca340c6baf4bc67c3157a5faf574438e04665ffeb1cff7ee057a25d084560711bef0525fd8a47bbb9ce10cdc73245dd21bfae0b90130ea9b3543e68e
data/README.md CHANGED
@@ -20,14 +20,12 @@ gem install warding
20
20
 
21
21
  ## Tasklist
22
22
 
23
- * Move base packages to `pacstrap`.
24
23
  * Fix steps that contain pipes.
25
- * Add `EDITOR` setting.
24
+ * Add default smb conf.
26
25
  * Add AUR support.
27
26
  * Add `NetworkManager` support.
28
27
  * Code missing features.
29
28
  * Add extra checks.
30
- * Test installation.
31
29
  * Add GitHub actions.
32
30
  * Publish gem/package on GitHub.
33
31
 
@@ -81,7 +81,7 @@ module Warding
81
81
  end
82
82
  end
83
83
 
84
- key(:extra_settings).multi_select("Select extra options:", %w[tools themes cron])
84
+ key(:extra_settings).multi_select("Select extra options:", %w[desktop-environment hacking-tools crons])
85
85
  end
86
86
 
87
87
  parsed_input
@@ -103,7 +103,7 @@ module Warding
103
103
  if timezone
104
104
  `timedatectl set-timezone #{timezone}`
105
105
  else
106
- `timedatectl set-timezone "$(curl --fail https://ipapi.co/timezone)"`
106
+ `timedatectl set-timezone "$(curl -s https://ipapi.co/timezone)"`
107
107
  end
108
108
  end
109
109
 
@@ -156,27 +156,27 @@ module Warding
156
156
 
157
157
  def setup_packages
158
158
  `pacman -Sy`
159
- `pacstrap /mnt base base-devel linux linux-firmware lvm2 mkinitcpio man-db nano fuse wget openbsd-netcat dhcpcd samba openssh openvpn unzip vim git zsh`
159
+ `pacstrap /mnt base base-devel linux linux-firmware lvm2 mkinitcpio reflector man-db nano vi fuse wget openbsd-netcat dhcpcd samba openssh openvpn unzip vim git zsh`
160
160
  `genfstab -U /mnt >> /mnt/etc/fstab`
161
161
  end
162
162
 
163
163
  setup_packages
164
164
 
165
165
  def setup_chroot(lang, keymap, password)
166
- `arch-chroot /mnt ln -sf /usr/share/zoneinfo/"$(curl --fail https://ipapi.co/timezone)" /etc/localtime`
166
+ `arch-chroot /mnt ln -sf /usr/share/zoneinfo/"$(curl -s https://ipapi.co/timezone)" /etc/localtime`
167
167
  `arch-chroot /mnt hwclock --systohc`
168
168
 
169
169
  `echo "#{lang}.UTF-8" > /mnt/etc/locale.gen`
170
170
  `arch-chroot /mnt locale-gen`
171
171
  `echo "LANG=#{lang}.UTF-8" > /mnt/etc/locale.conf`
172
- `echo KEYMAP=#{keymap} > /mnt/etc/vconsole.conf`
172
+ `echo "KEYMAP=#{keymap}" > /mnt/etc/vconsole.conf`
173
173
  `echo "warding" > /mnt/etc/hostname`
174
174
  `echo "127.0.0.1 localhost\n::1 localhost\n127.0.1.1 warding.localdomain warding" > /mnt/etc/hosts`
175
175
 
176
- `arch-chroot /mnt echo -e "#{password}\n#{password}" | passwd`
176
+ `echo -e "#{password}\n#{password}" | arch-chroot /mnt passwd`
177
177
 
178
178
  `sed -i "/^HOOK/s/filesystems/lvm2 filesystems/" /mnt/etc/mkinitcpio.conf`
179
- `arch-chroot /mnt mkinitcpio -p linux`
179
+ `arch-chroot /mnt mkinitcpio -p linux 2>/dev/null`
180
180
  `arch-chroot /mnt pacman -S intel-ucode --noconfirm`
181
181
  end
182
182
 
@@ -184,7 +184,7 @@ module Warding
184
184
 
185
185
  def setup_bootloader(loader)
186
186
  if loader == "systemd-boot"
187
- `arch-chroot /mnt bootctl install`
187
+ `arch-chroot /mnt bootctl install 2>/dev/null`
188
188
  `echo "title Warding Linux
189
189
  linux /vmlinuz-linux
190
190
  initrd /intel-ucode.img
@@ -198,44 +198,43 @@ module Warding
198
198
  setup_bootloader(data[:system_settings][:bootloader])
199
199
 
200
200
  def setup_usability
201
- # TODO: include gnome desktop
202
- `arch-chroot /mnt pacman -S xorg-server xf86-video-intel plasma konsole dolphin kmix sddm kvantum-qt5 --noconfirm`
203
- `mkdir /mnt/etc/sddm.conf.d`
204
- `echo "[Theme]\nCurrent=breeze" > /mnt/etc/sddm.conf.d/theme.conf`
205
- `echo "[Autologin]\nUser=root" > /mnt/etc/sddm.conf.d/login.conf`
206
201
  `arch-chroot /mnt systemctl enable dhcpcd`
207
- `arch-chroot /mnt systemctl enable sddm`
208
- `arch-chroot /mnt wget -q https://blackarch.org/strap.sh -O /tmp/strap.sh; bash /tmp/strap.sh`
209
- `arch-chroot /mnt wget -q https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O /tmp/zsh.sh; bash /tmp/zsh.sh`
202
+ `arch-chroot /mnt wget -qO- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | sh`
203
+ `arch-chroot /mnt wget -qO- https://blackarch.org/strap.sh | sh`
210
204
  end
211
205
 
212
206
  setup_usability
213
207
 
214
208
  def setup_visuals
215
- `arch-chroot /mnt wget -q https://raw.githubusercontent.com/PapirusDevelopmentTeam/arc-kde/master/install.sh -O /tmp/theme.sh; bash /tmp/theme.sh`
216
- `arch-chroot /mnt wget -q https://git.io/papirus-icon-theme-install -O /tmp/papirus.sh; bash /tmp/papirus.sh`
209
+ `arch-chroot /mnt pacman -S xorg-server xf86-video-intel plasma konsole dolphin kmix sddm kvantum-qt5`
210
+ `mkdir -p /mnt/etc/sddm.conf.d`
211
+ `echo "[Theme]\nCurrent=breeze" > /mnt/etc/sddm.conf.d/theme.conf`
212
+ `echo "[Autologin]\nUser=root" > /mnt/etc/sddm.conf.d/login.conf`
213
+ `arch-chroot /mnt systemctl enable sddm`
214
+ `arch-chroot /mnt wget -qO- https://raw.githubusercontent.com/PapirusDevelopmentTeam/arc-kde/master/install.sh | sh`
215
+ `arch-chroot /mnt wget -qO- https://git.io/papirus-icon-theme-install | sh`
217
216
  end
218
217
 
219
- setup_visuals if data[:extra_settings].include?("themes")
218
+ setup_visuals if data[:extra_settings].include?("desktop-emvironment")
220
219
 
221
- def setup_extras
220
+ def setup_tools
222
221
  `arch-chroot /mnt pacman -S nmap impacket go ruby php firefox atom hashcat john jre-openjdk proxychains-ng exploitdb httpie metasploit bind-tools radare2 sqlmap wpscan xclip --noconfirm`
223
222
  `arch-chroot /mnt mkdir -p /usr/share/wordlists`
224
223
  `arch-chroot /mnt wget -q https://github.com/danielmiessler/SecLists/raw/master/Passwords/Leaked-Databases/rockyou.txt.tar.gz -O /usr/share/wordlists/rockyou.txt.tar.gz`
225
224
  `arch-chroot /mnt wget -q https://github.com/danielmiessler/SecLists/raw/master/Discovery/Web-Content/common.txt -O /usr/share/wordlists/common.txt`
226
225
  end
227
226
 
228
- setup_extras if data[:extra_settings].include?("tools")
227
+ setup_tools if data[:extra_settings].include?("hacking-tools")
229
228
 
230
229
  def setup_cron
231
230
  `arch-chroot /mnt pacman -S cronie --noconfirm`
232
- `systemctl enable cronie`
233
- `#!/bin/bash\nreflector --latest 25 --sort rate --save /etc/pacman.d/mirrorlist > /etc/cron.hourly/mirrorlist`
234
- `#!/bin/bash\npacman -Sy > /etc/cron.weekly/pacmansync`
235
- `#!/bin/bash\npacman -Syu --noconfirm > /etc/cron.monthly/systemupgrade`
231
+ `arch-chroot /mnt systemctl enable cronie`
232
+ `echo "#!/bin/bash\nreflector --latest 25 --sort rate --save /etc/pacman.d/mirrorlist" > /mnt/etc/cron.hourly/mirrorlist; chmod +x /mnt/etc/cron.hourly/mirrorlist`
233
+ `echo "#!/bin/bash\npacman -Sy" > /mnt/etc/cron.weekly/pacman-sync; chmod +x /mnt/etc/cron.weekly/pacman-sync`
234
+ `echo "#!/bin/bash\npacman -Syu --noconfirm" > /mnt/etc/cron.monthly/system-upgrade; chmod +x /mnt/etc/cron.monthly/system-upgrade`
236
235
  end
237
236
 
238
- setup_cron if data[:extra_settings].include?("cron")
237
+ setup_cron if data[:extra_settings].include?("crons")
239
238
 
240
239
  def finish
241
240
  `umount -R /mnt`
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Warding
4
- VERSION = "0.2.4"
4
+ VERSION = "0.2.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warding
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marlos Pomin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-17 00:00:00.000000000 Z
11
+ date: 2020-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-prompt