Skip to content

Instantly share code, notes, and snippets.

@zanshin
Forked from april/find-all-electron-versions.sh
Created September 29, 2023 04:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zanshin/fc3d331c4e8fd123e2765782f4ea5a3c to your computer and use it in GitHub Desktop.
Save zanshin/fc3d331c4e8fd123e2765782f4ea5a3c to your computer and use it in GitHub Desktop.
find all apps using Electron and their versions, on macOS systems
#!/usr/bin/env zsh
# patched versions for CVE-2023-4863: 22.3.24, 24.8.3, 25.8.1, 26.2.1
mdfind "kind:app" 2>/dev/null | sort -u | while read app;
do
filename="$app/Contents/Frameworks/Electron Framework.framework/Electron Framework"
if [[ -f $filename ]]; then
echo "App Name: $(basename ${app})"
electronVersion=$(strings "$filename" | grep "Chrome/" | grep -i Electron | grep -v '%s' | sort -u | cut -f 3 -d '/')
echo "Electron Version: $electronVersion"
echo -n "File Name: $filename "
echo -e "\n"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment