fuzzer 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/fuzzer/cli.rb +23 -25
- data/lib/fuzzer/version.rb +1 -1
- data/lib/fuzzer.rb +2 -0
- metadata +1 -17
data/lib/fuzzer/cli.rb
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
require 'open-uri'
|
2
|
-
require 'right_aws'
|
3
|
-
|
4
1
|
module Fuzzer
|
5
2
|
|
6
3
|
class CLI
|
@@ -21,29 +18,30 @@ class CLI
|
|
21
18
|
exit(1)
|
22
19
|
end
|
23
20
|
|
24
|
-
file_name = CLI.download(url)
|
25
|
-
short_name = CLI.gunzip(file_name)
|
26
|
-
|
27
|
-
# manipulate it
|
28
|
-
puts "We can corrupt this database two ways:"
|
29
|
-
puts " easy: only currupt data that would come from the feed"
|
30
|
-
puts " severe: also corrupt db integrity and delete nodes"
|
31
|
-
|
32
21
|
begin
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
22
|
+
file_name = CLI.download(url)
|
23
|
+
short_name = CLI.gunzip(file_name)
|
24
|
+
|
25
|
+
# manipulate it
|
26
|
+
puts "We can corrupt this database two ways:"
|
27
|
+
puts " easy: only currupt data that would come from the feed"
|
28
|
+
puts " severe: also corrupt db integrity and delete nodes"
|
29
|
+
|
30
|
+
begin
|
31
|
+
print "e)asy or s)evere? "
|
32
|
+
input = gets.chomp
|
33
|
+
end while (input != "e" && input != "s")
|
34
|
+
|
35
|
+
db = SQLite3::Database.new(short_name)
|
36
|
+
CLI.fuzz_content(db)
|
37
|
+
CLI.fuzz_integrity(db) if input == "s"
|
38
|
+
|
39
|
+
# Query as to what should be broken?
|
40
|
+
final_name = CLI.gzip(short_name)
|
41
|
+
upload(data, final_name)
|
42
|
+
rescue Exception => e
|
43
|
+
puts "Well, that didn't end well: #{e.message}"
|
44
|
+
end
|
47
45
|
end
|
48
46
|
|
49
47
|
private
|
data/lib/fuzzer/version.rb
CHANGED
data/lib/fuzzer.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fuzzer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -59,22 +59,6 @@ dependencies:
|
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: debugger
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ! '>='
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
70
|
-
type: :runtime
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ! '>='
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
78
62
|
description: Downloads, corrupts, and uploads client sqlite dbs for testing purposes.
|
79
63
|
email: alx.dark@zumobi.com
|
80
64
|
executables:
|