Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f7b5d198
Kaydet (Commit)
f7b5d198
authored
Eyl 05, 2011
tarafından
Marc-Andre Laverdiere
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Initial commit of file fuzzer tool
üst
2e5e3730
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
fuzzfiles
bin/fuzzfiles
+59
-0
No files found.
bin/fuzzfiles
0 → 100755
Dosyayı görüntüle @
f7b5d198
#! /bin/bash
# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License or as specified alternatively below. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# Major Contributor(s):
# Copyright (C) 2011 Tata Consultancy Services, Ltd. Marc-Andre Laverdiere <marc-andre@atc.tcs.com> (initial developer)
#
# All Rights Reserved.
#
# For minor contributions see the git repository.
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
#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
"
\t
XYZ: the original file name"
echo
-e
"
\t
ratio: the fuzz ratio (what % of bytes were fuzzed)"
echo
-e
"
\t
NNNN: 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 $@
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment