Skip to content
decompile-all-binaries.sh 511 B
Newer Older
#!/bin/bash

# The first argument should correspond to the name of the arch under analysis.
if [ $# -eq 0 ]; then
  echo "No arguments supplied"
  exit 1
fi

arch=$1
basepath=$(pwd)
workdir=$basepath/workdir-$arch
stripped_dir=$workdir/stripped
source_dir=$workdir/ida-sources

if [ ! -d $source_dir ]; then
  mkdir $source_dir;
fi

cd $stripped_dir

for filename in *
do
  echo "IDA decompile: $filename"
  $basepath/scripting/ida-extraction-scripts/decompile-binary.sh $filename $source_dir/$filename.c
done;