Skip to content

Instantly share code, notes, and snippets.

@fuzzamos
Forked from richinseattle/afl_build.sh
Created May 25, 2019 11:56
Show Gist options
  • Select an option

  • Save fuzzamos/aa6523058af6dec8a0125a5d8d660287 to your computer and use it in GitHub Desktop.

Select an option

Save fuzzamos/aa6523058af6dec8a0125a5d8d660287 to your computer and use it in GitHub Desktop.

Revisions

  1. @richinseattle richinseattle revised this gist Oct 17, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion afl_build.sh
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,6 @@ while (($#)); do
    sudo apt-get build-dep -y $FUZZ_TARGET && \
    apt-get source -y $FUZZ_TARGET && \
    cd * && \
    sudo -E dpkg-buildpackage -uc -us -j$(( $CPU_COUNT -1 ))
    dpkg-buildpackage -uc -us -j$(( $CPU_COUNT -1 ))
    shift
    done
  2. @richinseattle richinseattle revised this gist Jul 15, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion afl_build.sh
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,6 @@ while (($#)); do
    sudo apt-get build-dep -y $FUZZ_TARGET && \
    apt-get source -y $FUZZ_TARGET && \
    cd * && \
    sudo dpkg-buildpackage -uc -us -j$(( $CPU_COUNT -1 ))
    sudo -E dpkg-buildpackage -uc -us -j$(( $CPU_COUNT -1 ))
    shift
    done
  3. @richinseattle richinseattle revised this gist Jun 27, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion afl_build.sh
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,6 @@ while (($#)); do
    sudo apt-get build-dep -y $FUZZ_TARGET && \
    apt-get source -y $FUZZ_TARGET && \
    cd * && \
    sudo dpkg-buildpackage -uc -us -j $(( $CPU_COUNT -1 ))
    sudo dpkg-buildpackage -uc -us -j$(( $CPU_COUNT -1 ))
    shift
    done
  4. @richinseattle richinseattle revised this gist Jun 8, 2017. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions afl_build.sh
    Original file line number Diff line number Diff line change
    @@ -10,13 +10,15 @@ if [ $# -lt 1 ]; then
    exit 1
    fi

    CPU_COUNT=$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1)

    while (($#)); do
    FUZZ_TARGET=$1
    mkdir -p /tmp/$FUZZ_TARGET && \
    cd /tmp/$FUZZ_TARGET && \
    apt-get build-dep -y $FUZZ_TARGET && \
    sudo apt-get build-dep -y $FUZZ_TARGET && \
    apt-get source -y $FUZZ_TARGET && \
    cd * && \
    dpkg-buildpackage -uc -us -j $(( $(nproc) -1 ))
    sudo dpkg-buildpackage -uc -us -j $(( $CPU_COUNT -1 ))
    shift
    done
  5. @richinseattle richinseattle revised this gist Jun 8, 2017. 1 changed file with 10 additions and 8 deletions.
    18 changes: 10 additions & 8 deletions afl_build.sh
    Original file line number Diff line number Diff line change
    @@ -1,20 +1,22 @@
    #!/bin/bash

    # builds ubuntu package with afl-gcc
    # set CC / CXX environment variavles as needed
    # installs dependenies and builds ubuntu package from source
    # set CC / CXX environment variables as needed

    USAGE="$0 <apt package> ..."

    if [ $# -lt 1 ]; then
    echo "$USAGE"
    exit 1
    fi

    while (($#)); do
    FUZZ_TARGET=$1
    mkdir -p /tmp/$FUZZ_TARGET \
    && cd /tmp/$FUZZ_TARGET \
    && apt-get build-dep -y $FUZZ_TARGET \
    && apt-get source -y $FUZZ_TARGET \
    && cd * \
    && dpkg-buildpackage -uc -us -j
    mkdir -p /tmp/$FUZZ_TARGET && \
    cd /tmp/$FUZZ_TARGET && \
    apt-get build-dep -y $FUZZ_TARGET && \
    apt-get source -y $FUZZ_TARGET && \
    cd * && \
    dpkg-buildpackage -uc -us -j $(( $(nproc) -1 ))
    shift
    done
  6. @richinseattle richinseattle revised this gist May 31, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions afl_build.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/bash

    # builds ubuntu package with afl-gcc

    # set CC / CXX environment variavles as needed
    USAGE="$0 <apt package> ..."
    if [ $# -lt 1 ]; then
    echo "$USAGE"
    @@ -15,6 +15,6 @@ while (($#)); do
    && apt-get build-dep -y $FUZZ_TARGET \
    && apt-get source -y $FUZZ_TARGET \
    && cd * \
    && CC=afl-gcc CXX=afl-g++ dpkg-buildpackage -uc -us -j
    && dpkg-buildpackage -uc -us -j
    shift
    done
  7. @richinseattle richinseattle revised this gist May 13, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions afl_build.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    #!/bin/sh
    #!/bin/bash

    # builds ubuntu package with afl-gcc

    @@ -10,7 +10,7 @@ fi

    while (($#)); do
    FUZZ_TARGET=$1
    mkdir /tmp/$FUZZ_TARGET \
    mkdir -p /tmp/$FUZZ_TARGET \
    && cd /tmp/$FUZZ_TARGET \
    && apt-get build-dep -y $FUZZ_TARGET \
    && apt-get source -y $FUZZ_TARGET \
  8. @richinseattle richinseattle revised this gist May 13, 2017. 1 changed file with 16 additions and 12 deletions.
    28 changes: 16 additions & 12 deletions afl_build.sh
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,20 @@
    #!/bin/sh

    USAGE="$0 <apt package>
    if [ "$#" == "0" ]; then
    echo "$USAGE"
    exit 1
    fi
    # builds ubuntu package with afl-gcc

    FUZZ_TARGET=$1
    USAGE="$0 <apt package> ..."
    if [ $# -lt 1 ]; then
    echo "$USAGE"
    exit 1
    fi

    mkdir /tmp/$FUZZ_TARGET \
    && cd /tmp/$FUZZ_TARGET \
    && apt-get build-dep -y $FUZZ_TARGET \
    && apt-get source -y $FUZZ_TARGET \
    && cd * \
    && CC=afl-gcc CXX=afl-g++ dpkg-buildpackage -uc -us -j
    while (($#)); do
    FUZZ_TARGET=$1
    mkdir /tmp/$FUZZ_TARGET \
    && cd /tmp/$FUZZ_TARGET \
    && apt-get build-dep -y $FUZZ_TARGET \
    && apt-get source -y $FUZZ_TARGET \
    && cd * \
    && CC=afl-gcc CXX=afl-g++ dpkg-buildpackage -uc -us -j
    shift
    done
  9. @richinseattle richinseattle created this gist May 13, 2017.
    16 changes: 16 additions & 0 deletions afl_build.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    #!/bin/sh

    USAGE="$0 <apt package>
    if [ "$#" == "0" ]; then
    echo "$USAGE"
    exit 1
    fi
    FUZZ_TARGET=$1
    mkdir /tmp/$FUZZ_TARGET \
    && cd /tmp/$FUZZ_TARGET \
    && apt-get build-dep -y $FUZZ_TARGET \
    && apt-get source -y $FUZZ_TARGET \
    && cd * \
    && CC=afl-gcc CXX=afl-g++ dpkg-buildpackage -uc -us -j