File size: 728 Bytes
ae8c826
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
set -euo pipefail

for tool in file strings readelf objdump nm; do
  if command -v "$tool" >/dev/null 2>&1; then
    echo "ok: $tool -> $(command -v "$tool")"
  else
    echo "missing: $tool"
  fi
done

if command -v hexdump >/dev/null 2>&1; then
  echo "ok: hexdump -> $(command -v hexdump)"
elif command -v xxd >/dev/null 2>&1; then
  echo "ok: xxd -> $(command -v xxd)"
else
  echo "missing: hexdump or xxd"
fi

if [[ -n "${GHIDRA_HEADLESS:-}" && -x "${GHIDRA_HEADLESS:-}" ]]; then
  echo "ok: GHIDRA_HEADLESS -> $GHIDRA_HEADLESS"
elif command -v analyzeHeadless >/dev/null 2>&1; then
  echo "ok: analyzeHeadless -> $(command -v analyzeHeadless)"
else
  echo "optional missing: Ghidra analyzeHeadless"
fi