This repository has been archived by the owner on Feb 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
gpucrack-stage1.sh
78 lines (67 loc) · 1.72 KB
/
gpucrack-stage1.sh
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
#! /bin/bash
# Stage 1 v0.2
# 7/22/2021
###start Stage 1###
echo -e "GPU Password Cracking Rig Builder (NVIDIA only) v0.2"
echo -e "Jeffrey Cap (Bort-Millipede)"
echo -e "\nStage 1: remove multiarch (32-bit) support from operating system (if enabled), and install all available updates.\n"
if [[ $EUID -ne 0 ]]
then
echo -e "Error: This script must be executed as root! exiting..."
exit 1
fi
if [ "$(uname -m)" != "x86_64" ]
then
echo -e "Error: this script is only compatible with 64-bit systems! exiting..."
exit 1
fi
if [ ! -f "/etc/debian_version" ]
then
echo -e "Error: this script is only compatible with Debian-based Linux systems! exiting..."
exit 1
fi
apt-get -qq install `dpkg --get-selections | grep "install" | cut -f1 | head -n1` >/dev/null 2>&1
if [ $? -ne 0 ]
then
echo -e "Possible error detected in the package manager! Ensure apt/dpkg are working properly and are not in use by other processes, then try executing Stage 1 as root again!"
exit 1
fi
VERBOSE=0
for var in "$@"
do
if [ "$var" == "--verbose" ]
then
VERBOSE=1
fi
done
MULTIARCH=`dpkg --print-foreign-architectures`
if [[ ${#MULTIARCH} -ne 0 ]]
then
for a in $MULTIARCH
do
dpkg --remove-architecture "$a" > /dev/null 2>&1
done
echo -e "Multiarch support removed!"
else
echo -e "Multiarch support not enabled, so nothing to remove!"
fi
echo -e "\nUpdating system..."
if [ $VERBOSE -eq 1 ]
then
apt-get update -y
apt-get full-upgrade -y
else
apt-get update -y -qq
apt-get full-upgrade -y -qq
fi
sync
echo -en "\n"
if [[ ${#MULTIARCH} -ne 0 ]]
then
echo -en "32-bit support removed and "
fi
echo -e "System updated!"
echo -e "Stage 1 completed successfully! Please reboot and execute Stage 2 as root.\n"
unset MULTIARCH
unset VERBOSE
###end Stage 1###