fuzzr 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fuzzr might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.rdoc +28 -0
- data/bin/fuzz +11 -0
- data/fuzzers/check_ace_error.excludes +5 -0
- data/fuzzers/check_ace_error.rb +37 -0
- data/fuzzers/check_catch_ex_as_const.rb +41 -0
- data/fuzzers/check_cout_cerr.excludes +5 -0
- data/fuzzers/check_cout_cerr.rb +37 -0
- data/fuzzers/check_executablebit.rb +37 -0
- data/fuzzers/check_exit_keyword.excludes +2 -0
- data/fuzzers/check_exit_keyword.rb +37 -0
- data/fuzzers/check_fileheader.excludes +5 -0
- data/fuzzers/check_fileheader.rb +92 -0
- data/fuzzers/check_filename.excludes +8 -0
- data/fuzzers/check_filename.rb +33 -0
- data/fuzzers/check_id_tag.excludes +3 -0
- data/fuzzers/check_id_tag.rb +34 -0
- data/fuzzers/check_new_delete.excludes +6 -0
- data/fuzzers/check_new_delete.rb +37 -0
- data/fuzzers/check_printf_keyword.excludes +2 -0
- data/fuzzers/check_printf_keyword.rb +37 -0
- data/fuzzers/check_taox11_namespace.excludes +5 -0
- data/fuzzers/check_taox11_namespace.rb +38 -0
- data/lib/fuzz/console.rb +52 -0
- data/lib/fuzz/fuzz.rb +402 -0
- data/lib/fuzz/fuzzers/check_whitespace.rb +62 -0
- data/lib/fuzz/fzzr.rb +258 -0
- data/lib/fuzz/log.rb +97 -0
- data/lib/fuzz/options.rb +208 -0
- data/lib/fuzz/screen.rb +85 -0
- data/lib/fuzz/system.rb +57 -0
- data/lib/fuzz/version.rb +17 -0
- metadata +81 -0
data/lib/fuzz/screen.rb
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
#--------------------------------------------------------------------
|
2
|
+
# @file screen.rb
|
3
|
+
# @author Martin Corino
|
4
|
+
#
|
5
|
+
# @brief Fuzz screen wrapper
|
6
|
+
#
|
7
|
+
# @copyright Copyright (c) Remedy IT Expertise BV
|
8
|
+
#--------------------------------------------------------------------
|
9
|
+
require 'fuzz/system'
|
10
|
+
|
11
|
+
module Fuzz
|
12
|
+
|
13
|
+
class Screen
|
14
|
+
|
15
|
+
class Color
|
16
|
+
def initialize(code)
|
17
|
+
@code = code
|
18
|
+
end
|
19
|
+
attr_reader :code
|
20
|
+
def to_s
|
21
|
+
''
|
22
|
+
end
|
23
|
+
alias :to_str :to_s
|
24
|
+
end
|
25
|
+
|
26
|
+
COLORS = {
|
27
|
+
black: [Color.new("\e[30m"), Color.new("\e[m")],
|
28
|
+
red: [Color.new("\e[31m"), Color.new("\e[m")],
|
29
|
+
green: [Color.new("\e[32m"), Color.new("\e[m")],
|
30
|
+
yellow: [Color.new("\e[33m"), Color.new("\e[m")],
|
31
|
+
blue: [Color.new("\e[34m"), Color.new("\e[m")],
|
32
|
+
magenta: [Color.new("\e[34m"), Color.new("\e[m")],
|
33
|
+
bold: [Color.new("\e[1m"), Color.new("\e[m")],
|
34
|
+
reverse: [Color.new("\e[7m"), Color.new("\e[m")],
|
35
|
+
underline:[Color.new("\e[4m"), Color.new("\e[m")]
|
36
|
+
}
|
37
|
+
|
38
|
+
module ColorizeMethods
|
39
|
+
def self.included(mod)
|
40
|
+
Screen::COLORS.keys.each do |color|
|
41
|
+
mod.module_eval <<-EOT, __FILE__, __LINE__+1
|
42
|
+
def #{color}(s)
|
43
|
+
[Fuzz::Screen::COLORS[:#{color}].first, s, Fuzz::Screen::COLORS[:#{color}].last]
|
44
|
+
end
|
45
|
+
EOT
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def initialize(output = STDOUT, input = STDIN, errout = STDERR)
|
51
|
+
@output = output
|
52
|
+
@input = input
|
53
|
+
@errout = errout
|
54
|
+
@colorize = output.tty? && Fuzz::Sys.has_ansi?
|
55
|
+
end
|
56
|
+
|
57
|
+
attr_reader :input, :output, :errout
|
58
|
+
|
59
|
+
def colorize?
|
60
|
+
@colorize
|
61
|
+
end
|
62
|
+
|
63
|
+
def output_cols
|
64
|
+
80
|
65
|
+
end
|
66
|
+
|
67
|
+
def print(*args)
|
68
|
+
output.print args.flatten.collect {|a| (colorize? && Color === a) ? a.code : a }.join
|
69
|
+
end
|
70
|
+
|
71
|
+
def println(*args)
|
72
|
+
output.puts args.flatten.collect {|a| (colorize? && Color === a) ? a.code : a }.join
|
73
|
+
end
|
74
|
+
|
75
|
+
def error_print(*args)
|
76
|
+
errout.print args.flatten.collect {|a| (colorize? && Color === a) ? a.code : a }.join
|
77
|
+
end
|
78
|
+
|
79
|
+
def error_println(*args)
|
80
|
+
errout.puts args.flatten.collect {|a| (colorize? && Color === a) ? a.code : a }.join
|
81
|
+
end
|
82
|
+
|
83
|
+
end # Screen
|
84
|
+
|
85
|
+
end # Fuzz
|
data/lib/fuzz/system.rb
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
#--------------------------------------------------------------------
|
2
|
+
# @file system.rb
|
3
|
+
# @author Martin Corino
|
4
|
+
#
|
5
|
+
# @brief System support for Fuzz
|
6
|
+
#
|
7
|
+
# @copyright Copyright (c) Remedy IT Expertise BV
|
8
|
+
#--------------------------------------------------------------------
|
9
|
+
require 'fileutils'
|
10
|
+
|
11
|
+
module Fuzz
|
12
|
+
|
13
|
+
module Sys
|
14
|
+
|
15
|
+
module SysMethods
|
16
|
+
|
17
|
+
def mswin?
|
18
|
+
/mingw/ =~ RUBY_PLATFORM ? true : false
|
19
|
+
end
|
20
|
+
|
21
|
+
def has_ansi?
|
22
|
+
# only ANSI escape code support on Windows
|
23
|
+
# if ANSICON (https://github.com/adoxa/ansicon) installed
|
24
|
+
(!mswin?) || ENV['ANSICON']
|
25
|
+
end
|
26
|
+
|
27
|
+
def in_dir(dir, &block)
|
28
|
+
STDERR.puts "cd #{dir}" if Fuzz.verbose?
|
29
|
+
rc = if Fuzz.dryrun?
|
30
|
+
yield if block_given?
|
31
|
+
else
|
32
|
+
Dir.chdir(dir, &block)
|
33
|
+
end
|
34
|
+
STDERR.puts "cd -" if Fuzz.verbose?
|
35
|
+
rc
|
36
|
+
end
|
37
|
+
def mv(src, tgt)
|
38
|
+
FileUtils.move(src, tgt, :verbose => Fuzz.verbose?)
|
39
|
+
end
|
40
|
+
|
41
|
+
def cp(src, tgt)
|
42
|
+
FileUtils.copy(src, tgt, :verbose => Fuzz.verbose?)
|
43
|
+
end
|
44
|
+
|
45
|
+
def chmod(mode, path)
|
46
|
+
FileUtils.chmod(mode, path, :verbose => Fuzz.verbose?)
|
47
|
+
end
|
48
|
+
|
49
|
+
end # SysMethods
|
50
|
+
|
51
|
+
class << self
|
52
|
+
include Sys::SysMethods
|
53
|
+
end
|
54
|
+
|
55
|
+
end # Sys
|
56
|
+
|
57
|
+
end # Fuzz
|
data/lib/fuzz/version.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# -------------------------------------------------------------------
|
3
|
+
# version.rb - TAOX11 fuzz checker
|
4
|
+
#
|
5
|
+
# Author: Martin Corino
|
6
|
+
#
|
7
|
+
# Copyright (c) Remedy IT Expertise BV
|
8
|
+
# -------------------------------------------------------------------
|
9
|
+
|
10
|
+
module Fuzz
|
11
|
+
|
12
|
+
FUZZ_VERSION_MAJOR = 0.freeze
|
13
|
+
FUZZ_VERSION_MINOR = 9.freeze
|
14
|
+
FUZZ_VERSION_RELEASE = 6.freeze
|
15
|
+
FUZZ_VERSION = "#{FUZZ_VERSION_MAJOR}.#{FUZZ_VERSION_MINOR}.#{FUZZ_VERSION_RELEASE}"
|
16
|
+
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fuzzr
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.6
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Martin Corino
|
8
|
+
- Johnny Willemsen
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2020-02-27 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: Fuzzer
|
15
|
+
email: mcorino@remedy.nl
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files:
|
19
|
+
- LICENSE
|
20
|
+
- README.rdoc
|
21
|
+
files:
|
22
|
+
- LICENSE
|
23
|
+
- README.rdoc
|
24
|
+
- bin/fuzz
|
25
|
+
- fuzzers/check_ace_error.excludes
|
26
|
+
- fuzzers/check_ace_error.rb
|
27
|
+
- fuzzers/check_catch_ex_as_const.rb
|
28
|
+
- fuzzers/check_cout_cerr.excludes
|
29
|
+
- fuzzers/check_cout_cerr.rb
|
30
|
+
- fuzzers/check_executablebit.rb
|
31
|
+
- fuzzers/check_exit_keyword.excludes
|
32
|
+
- fuzzers/check_exit_keyword.rb
|
33
|
+
- fuzzers/check_fileheader.excludes
|
34
|
+
- fuzzers/check_fileheader.rb
|
35
|
+
- fuzzers/check_filename.excludes
|
36
|
+
- fuzzers/check_filename.rb
|
37
|
+
- fuzzers/check_id_tag.excludes
|
38
|
+
- fuzzers/check_id_tag.rb
|
39
|
+
- fuzzers/check_new_delete.excludes
|
40
|
+
- fuzzers/check_new_delete.rb
|
41
|
+
- fuzzers/check_printf_keyword.excludes
|
42
|
+
- fuzzers/check_printf_keyword.rb
|
43
|
+
- fuzzers/check_taox11_namespace.excludes
|
44
|
+
- fuzzers/check_taox11_namespace.rb
|
45
|
+
- lib/fuzz/console.rb
|
46
|
+
- lib/fuzz/fuzz.rb
|
47
|
+
- lib/fuzz/fuzzers/check_whitespace.rb
|
48
|
+
- lib/fuzz/fzzr.rb
|
49
|
+
- lib/fuzz/log.rb
|
50
|
+
- lib/fuzz/options.rb
|
51
|
+
- lib/fuzz/screen.rb
|
52
|
+
- lib/fuzz/system.rb
|
53
|
+
- lib/fuzz/version.rb
|
54
|
+
homepage: https://github.com/RemedyIT/fuzzr
|
55
|
+
licenses:
|
56
|
+
- MIT
|
57
|
+
metadata:
|
58
|
+
bug_tracker_uri: https://github.com/RemedyIT/fuzzr/issues
|
59
|
+
source_code_uri: https://github.com/RemedyIT/fuzzr
|
60
|
+
post_install_message:
|
61
|
+
rdoc_options:
|
62
|
+
- "--main"
|
63
|
+
- README.rdoc
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '2.0'
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
requirements: []
|
77
|
+
rubygems_version: 3.0.3
|
78
|
+
signing_key:
|
79
|
+
specification_version: 4
|
80
|
+
summary: fuzzr
|
81
|
+
test_files: []
|