File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed
Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -115,11 +115,26 @@ sudo systemctl enable docker --now
115115# --------------------------------------------------
116116echo " [+] Cloning GitHub repos..."
117117cd /root
118- git clone https://github.com/The-Art-of-Hacking/h4cker.git
119- git clone https://github.com/danielmiessler/SecLists.git
120- git clone https://github.com/internetwache/GitTools.git
121- git clone https://github.com/swisskyrepo/PayloadsAllTheThings.git
122- git clone https://github.com/The-Art-of-Hacking/websploit.git
118+
119+ # Helper function to clone or update a repo
120+ clone_or_update () {
121+ local repo_url=" $1 "
122+ local dir_name=$( basename " $repo_url " .git)
123+
124+ if [ -d " $dir_name " ]; then
125+ echo " [*] Directory '$dir_name ' already exists. Pulling latest changes..."
126+ cd " $dir_name " && git pull && cd ..
127+ else
128+ echo " [+] Cloning $repo_url ..."
129+ git clone " $repo_url "
130+ fi
131+ }
132+
133+ clone_or_update https://github.com/The-Art-of-Hacking/h4cker.git
134+ clone_or_update https://github.com/danielmiessler/SecLists.git
135+ clone_or_update https://github.com/internetwache/GitTools.git
136+ clone_or_update https://github.com/swisskyrepo/PayloadsAllTheThings.git
137+ clone_or_update https://github.com/The-Art-of-Hacking/websploit.git
123138
124139# IoT firmware exercises for reverse engineering courses
125140mkdir -p /root/iot_exercises
You can’t perform that action at this time.
0 commit comments