summaryrefslogtreecommitdiff
path: root/bin/fuzzfiles
blob: 99b503e3bd692c7d45ebf89efd03200de27efd22 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/bash
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

#check that zzuf is installed
hash zzuf &> /dev/null
if [ $? -eq 1 ];then
    echo >&2 "zzuf not found. Please install and/or fix the PATH environement variable. Aborting"
    exit -1
fi

#check that file(s) to fuzz are mentioned
if [[ $# -eq 0 ]]; then
    echo "Usage: fuzzfiles.sh <list of seed files to fuzz>"
    echo "The generated fuzzed files will be output to the current working directory"
    echo "The fuzzed files will be named XYZ-ratio-NNNN where:"
    echo -e "\tXYZ: the original file name"
    echo -e "\tratio: the fuzz ratio (what % of bytes were fuzzed)"
    echo -e "\tNNNN: the mutation # for that file and ratio combo"
    exit -1
fi

for file in $@; do
    if [ -d $file ]; then
        echo "$file is a directory. Only files are allowed"
    elif [ -e $file ]; then
        basename=${file##*/}
        #Sequence from 0.001 to 0.5
        for ratio in `seq -w 1 2 500 | sed -e 's/^/0./'`; do
            echo "Fuzzing $file with ratio $ratio"
            for i in {1..1000}; do
                zzuf -r $ratio < $file > "$basename-$ratio-$i"
                done #end of for i in {1..
            done #end of for ratio in ...
    fi #end if of file vailidity check
done #end for file in $@
McNamara 2017-07-04tdf#108928 - Branding for 6.0Heiko Tietze 2017-04-04typo fixAndras Timar 2017-02-22Drop some ooo2gd extension packaging bitsGabor Kelemen 2017-02-13AutoInstall oox filter data packages to ooo moduleMatúš Kukan 2017-01-01Bump copyright year to 2017Adolfo Jayme Barrientos 2016-12-02fix display of DMG background on Mac OS X SierraChristian Lohmaier 2016-11-23tdf#103922: Add Tibetan (bo) dictionaryAron Budea 2016-11-07typo: modul -> moduleAndras Timar 2016-11-07fix description of 'ooofonts' packageAndras Timar 2016-09-08Remove obsolete OxygenOffice bitsGabor Kelemen 2016-02-29scp2: move scp2 classification package to AutoInstallMiklos Vajna 2016-02-22sfx2 classification: include example XML in the instsetMiklos Vajna 2016-01-19lokdocview: Add scp files for selection handle PNGsPranav Kant 2016-01-08Bump copyright year to 2016Adolfo Jayme Barrientos 2015-10-17deb system integration postinst and postrm scripts are not needed hereAndras Timar 2015-10-16drop gconf integration as per ESC decisionBjoern Michaelsen 2015-07-24update branding for 5.0Christian Lohmaier 2015-06-29Remove some hard coded references to "LibreOffice" as Productname.Martin Hollmichel 2015-04-234 dict package names did not follow the ruleAndras Timar 2015-01-01Bump copyright year to 2015Andras Timar 2014-10-08fdo#82288 merge core01-core07 packages into just oneChristian Lohmaier 2014-07-11follow up fdo#81218 - update Copyright year in DEB filesJoren De Cuyper 2014-07-11fdo#81218 - update Copyright year in DEB filesJoren De Cuyper 2014-04-17remove executable bitAndras Timar 2014-04-15oox: generate data, not code for drawingML export adjustment valuesMiklos Vajna 2014-04-07scp2: move firebird into base.Andrzej Hunt 2014-01-09fdo#70596 - fix version dependency for linux package - 2nd tryChristian Lohmaier 2013-12-13Targetted text updates, with seasonable changes before l10n freeze.Michael Meeks 2013-11-24Add lo_LA (Lao) dictionary fdo#71939Andras Timar 2013-11-20fdo#70596 - fix version dependency for deb-packagesChristian Lohmaier 2013-11-19renamed ku* to kmr-Latn*, fdo#63460Eike Rathke 2013-11-18renamed ku* to kmr-Latn*, fdo#63460Eike Rathke 2013-10-31setup_native: find all static files in source/packinfoMichael Stahl 2013-10-31setup_native: remove unused shellscripts*.txtMichael Stahl 2013-10-18Remove *_Test product, so cppunittester can be NONE againStephan Bergmann 2013-10-14fdo#61950 De-extensionize presentation minimizerDavid Ostrovsky 2013-09-10changed all 'sh' language to 'sr-Latn'Eike Rathke 2013-09-04renamed ca-XV to ca-valencia and activated ca-ES-valencia, fdo#59867 relatedEike Rathke 2013-09-02prepare to accept partial BCP47 (lll-Ssss-CC-vvvvvvvv)Eike Rathke 2013-08-14Unbreak Windows buildFridrich Štrba