summaryrefslogtreecommitdiffstats
path: root/development
diff options
context:
space:
mode:
author Ebben Aries2022-04-06 04:37:47 +0200
committer Willy Sudiarto Raharjo2022-04-09 10:45:48 +0200
commit5967e0bb212d2ea49aca79ad4db1e24c45e732c3 (patch)
treeb39f9a9a06bc5fcfbc1f0f67a1483cc6271c36ba /development
parent1a7269b0e19d2713648f37c46a55b18ae743fb0d (diff)
downloadslackbuilds-5967e0bb212d2ea49aca79ad4db1e24c45e732c3.tar.gz
development/ghidra: Added (Reverse Engineering Tool).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r--development/ghidra/README12
-rw-r--r--development/ghidra/doinst.sh17
-rw-r--r--development/ghidra/ghidra.SlackBuild88
-rw-r--r--development/ghidra/ghidra.info10
-rw-r--r--development/ghidra/slack-desc19
5 files changed, 146 insertions, 0 deletions
diff --git a/development/ghidra/README b/development/ghidra/README
new file mode 100644
index 0000000000..ae9f69f631
--- /dev/null
+++ b/development/ghidra/README
@@ -0,0 +1,12 @@
+ghidra (Software Reverse Engineering Tools developed by NSA)
+
+Ghidra is a software reverse engineering (SRE) framework created and
+maintained by the National Security Agency Research Directorate.
+Capabilities include disassembly, assembly, decompilation, graphing,
+and scripting, along with hundreds of other features. Ghidra supports
+a wide variety of processor instruction sets and executable formats
+and can be run in both user-interactive and automated modes.
+
+NOTE: On first run, ghidra will prompt you for your path to the JDK 11+
+home directory. This is usually /usr/lib64/jdk11-<version> if
+installed from slackbuilds.
diff --git a/development/ghidra/doinst.sh b/development/ghidra/doinst.sh
new file mode 100644
index 0000000000..8bb9b43c77
--- /dev/null
+++ b/development/ghidra/doinst.sh
@@ -0,0 +1,17 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
diff --git a/development/ghidra/ghidra.SlackBuild b/development/ghidra/ghidra.SlackBuild
new file mode 100644
index 0000000000..337cc6d452
--- /dev/null
+++ b/development/ghidra/ghidra.SlackBuild
@@ -0,0 +1,88 @@
+#!/bin/bash
+
+# Slackware build script for Ghidra
+
+# Copyright (c) 2021, Ebben Aries <slackbuilds@dscp.org>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1.- Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=ghidra
+VERSION=${VERSION:-10.1.2}
+VERDATE=${VERDATE:-20220125}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf ${PRGNAM}_${VERSION}_PUBLIC
+unzip $CWD/${PRGNAM}_${VERSION}_PUBLIC_${VERDATE}.zip
+cd ${PRGNAM}_${VERSION}_PUBLIC
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+mkdir -p $PKG/opt/$PRGNAM
+cp -ar Extensions GPL Ghidra docs ghidraRun server support $PKG/opt/$PRGNAM/
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Add a wrapper to run ghidra in /usr/bin
+mkdir -p $PKG/usr/bin
+cat << EOF > $PKG/usr/bin/$PRGNAM
+#!/bin/sh
+cd \$HOME
+/opt/$PRGNAM/ghidraRun \$@
+EOF
+chmod 0755 $PKG/usr/bin/$PRGNAM
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -ar LICENSE licenses $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/ghidra/ghidra.info b/development/ghidra/ghidra.info
new file mode 100644
index 0000000000..5666b7f10e
--- /dev/null
+++ b/development/ghidra/ghidra.info
@@ -0,0 +1,10 @@
+PRGNAM="ghidra"
+VERSION="10.1.2"
+HOMEPAGE="https://ghidra-sre.org"
+DOWNLOAD="https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_10.1.2_build/ghidra_10.1.2_PUBLIC_20220125.zip"
+MD5SUM="ee0a1b72d9fa88a1861f84f9c26b8c2d"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="jdk11"
+MAINTAINER="Ebben Aries"
+EMAIL="slackbuilds@dscp.org"
diff --git a/development/ghidra/slack-desc b/development/ghidra/slack-desc
new file mode 100644
index 0000000000..1992ea2aa7
--- /dev/null
+++ b/development/ghidra/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+ghidra: ghidra (Software Reverse Engineering Tools developed by NSA)
+ghidra:
+ghidra: Ghidra is a software reverse engineering (SRE) framework created and
+ghidra: maintained by the National Security Agency Research Directorate.
+ghidra: Capabilities include disassembly, assembly, decompilation, graphing,
+ghidra: and scripting, along with hundreds of other features. Ghidra supports
+ghidra: a wide variety of processor instruction sets and executable formats
+ghidra: and can be run in both user-interactive and automated modes.
+ghidra:
+ghidra: Homepage: https://ghidra-sre.org/
+ghidra: