about summary refs log tree commit diff
path: root/examples/clang_asm_normalize
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2020-12-08 22:43:05 +0100
committerAndrea Fioraldi <andreafioraldi@gmail.com>2020-12-08 22:43:05 +0100
commitad29eef2712f8d0b69c1acd79c6a5dfb4e2cc7f8 (patch)
treef74be06e8d1834ada6abe3daf40744e134cb9e3c /examples/clang_asm_normalize
parentc70b7ffd80ee95cdf3bf1276bfbd4a590e74d3f1 (diff)
parent6fb74342b8a3e7aa62e9e0cfe79bd84d9076a275 (diff)
downloadafl++-ad29eef2712f8d0b69c1acd79c6a5dfb4e2cc7f8.tar.gz
Merge branch 'dev' of github.com:AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'examples/clang_asm_normalize')
-rwxr-xr-xexamples/clang_asm_normalize/as75
1 files changed, 0 insertions, 75 deletions
diff --git a/examples/clang_asm_normalize/as b/examples/clang_asm_normalize/as
deleted file mode 100755
index 45537cae..00000000
--- a/examples/clang_asm_normalize/as
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-#
-# american fuzzy lop++ - clang assembly normalizer
-# ----------------------------------------------
-#
-# Originally written by Michal Zalewski
-# The idea for this wrapper comes from Ryan Govostes.
-#
-# Copyright 2013, 2014 Google Inc. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# This 'as' wrapper should allow you to instrument unruly, hand-written
-# assembly with afl-as.
-#
-# Usage:
-#
-# export AFL_REAL_PATH=/path/to/directory/with/afl-as/
-# AFL_PATH=/path/to/this/directory/ make clean all
-
-if [ "$#" -lt "2" ]; then
-  echo "[-] Error: this utility can't be called directly." 1>&2
-  exit 1
-fi
-
-if [ "$AFL_REAL_PATH" = "" ]; then
-  echo "[-] Error: AFL_REAL_PATH not set!" 1>&2
-  exit 1
-fi
-
-if [ ! -x "$AFL_REAL_PATH/afl-as" ]; then
-  echo "[-] Error: AFL_REAL_PATH does not contain the 'afl-as' binary." 1>&2
-  exit 1
-fi
-
-unset __AFL_AS_CMDLINE __AFL_FNAME
-
-while [ ! "$#" = "0" ]; do
-
-  if [ "$#" = "1" ]; then
-    __AFL_FNAME="$1"
-  else
-    __AFL_AS_CMDLINE="${__AFL_AS_CMDLINE} $1"
-  fi
-
-  shift
-
-done
-
-test "$TMPDIR" = "" && TMPDIR=/tmp
-
-TMPFILE=`mktemp $TMPDIR/.afl-XXXXXXXXXX.s`
-
-test "$TMPFILE" = "" && exit 1
-
-clang -cc1as -filetype asm -output-asm-variant 0 "${__AFL_FNAME}" >"$TMPFILE"
-
-ERR="$?"
-
-if [ ! "$ERR" = "0" ]; then
-  rm -f "$TMPFILE"
-  exit $ERR
-fi
-
-"$AFL_REAL_PATH/afl-as" ${__AFL_AS_CMDLINE} "$TMPFILE"
-
-ERR="$?"
-
-rm -f "$TMPFILE"
-
-exit "$ERR"