File tree Expand file tree Collapse file tree 2 files changed +2
-24
lines changed
Expand file tree Collapse file tree 2 files changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,6 @@ if [ "${GHIDRA_VERSION}" == "latest" ]; then
6565 GHIDRA_VERSION=" $( echo ${GHIDRA_DOWNLOAD_URL} | cut -d_ -f 2) "
6666else
6767 GHIDRA_DOWNLOAD_URL=$( curl -s https://api.github.com/repos/NationalSecurityAgency/ghidra/releases | jq -r " .[] | .assets[] | .browser_download_url" | grep " ${GHIDRA_VERSION} " )
68- PYI_DOWNLOAD_URL=$( curl -s https://api.github.com/repos/clearbluejar/ghidra-pyi-generator/releases | jq -r " .[] | .assets[] | .browser_download_url" | grep " ${GHIDRA_VERSION} " | grep whl)
6968fi
7069set -e
7170
@@ -96,15 +95,6 @@ chown -R ${USERNAME}:${USERNAME} ${GHIDRA_INSTALL_DIR}
9695# Clean up
9796rm -rf /tmp/ghidra-tmp
9897
99- # # Download .pyi type stubs for the entire Ghidra API
100- # if [ $PYI_DOWNLOAD_URL ]; then
101- # pushd $GHIDRA_INSTALL_DIR
102- # wget $PYI_DOWNLOAD_URL
103- # popd
104- # else
105- # echo "Couldn't find matching .pyi release for Ghidra Version: ${GHIDRA_VERSION} in https://api.github.com/repos/clearbluejar/ghidra-pyi-generator/releases"
106- # fi
107-
10898# Make GHIDRA ENV vars availble to bash and zsh shells
10999updaterc " $( cat << EOF
110100export GHIDRA_VERSION="${GHIDRA_VERSION} "
Original file line number Diff line number Diff line change 22python3 -m venv .env
33source .env/bin/activate
44
5- # Download latest pyi typings for Ghidra Version
6- PYI_WHL_DOWNLOAD_URL=$( curl -s https://api.github.com/repos/clearbluejar/ghidra-pyi-generator/releases | jq -r " .[] | .assets[] | .browser_download_url" | grep " ${GHIDRA_VERSION} " | grep whl | head -1)
7-
8- # Ensure have valid versions
9- if [ -z " $PYI_WHL_DOWNLOAD_URL " ] || [ -z " $GHIDRA_VERSION " ]; then
10- echo " Error: Failed to get PYI_WHL_DOWNLOAD_URL:${PYI_WHL_DOWNLOAD_URL} filtering on GHIDRA_VERSION:${GHIDRA_VERSION} "
11- RELEASES=$( curl -s https://api.github.com/repos/clearbluejar/ghidra-pyi-generator/releases | jq -r " .[] | .assets[] | .browser_download_url" )
12- echo " Possible releases here: ${RELEASES} "
13- exit 1 # # error out if they are empty
14- fi
15-
16- echo $PYI_WHL_RELEASE_URLS
17- echo $PYI_WHL_DOWNLOAD_URL
18- pip install " ${PYI_WHL_DOWNLOAD_URL} "
5+ # Download latest pyi typings
6+ pip install ghidra-stubs
197
208# Install ghidra-bridge
219pip install ghidra_bridge
You can’t perform that action at this time.
0 commit comments