Update all Git Cloned Tools
If you are like me and use a lot of tools from Github that don’t always exist in pentesting distro OS’s.
Once you have several tools (like me with 111) it can become difficult to keep them up to date. I use the following commands to make sure I have the latest versions:
#If you occasionally tweak the code of the tools or keep configuration files inside their directories this won't overwrite your changes.
find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \;
#If you just want the latest version and you don't care about any changes
find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git reset --hard && git pull" \;
I zip the folder containing all my tools and keep that backed up. If I build a new VM I copy the folder back. When you copy files to a new VM, especially if you move them between different user accounts or filesystems, the file ownership often changes or becomes “discrepant” in the eyes of Git. You need to run the following in order to update them in future:
git config --global --add safe.directory "*"
Alternatively, you can change the ownership of the files so they match your current user:
sudo chown -R $(whoami):$(whoami) /path/to/your/tools #Change 'user:user' to your actual username