ruckus 0.5.6 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/ruckus/extensions/object.rb +21 -16
- data/lib/ruckus/parsel.rb +5 -1
- data/lib/ruckus/structure.rb +2 -2
- data/ruckus.gemspec +2 -2
- data/test/test_mutator.rb +0 -1
- data/test/test_respondto.rb +1 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.6.0
|
@@ -1,22 +1,27 @@
|
|
1
1
|
class Object
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
module ObjectExtensions
|
3
|
+
# Every object has a "singleton" class, which you can think
|
4
|
+
# of as the class (ie, 1.metaclass =~ Fixnum) --- but that you
|
5
|
+
# can modify and extend without fucking up the actual class.
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
def metaclass; class << self; self; end; end
|
8
|
+
def meta_eval(&blk) metaclass.instance_eval &blk; end
|
9
|
+
def meta_def(name, &blk) meta_eval { define_method name, &blk }; end
|
10
|
+
def try(meth, *args); send(meth, *args) if respond_to? meth; end
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
end
|
12
|
+
def through(meth, *args)
|
13
|
+
if respond_to? meth
|
14
|
+
send(meth, *args)
|
15
|
+
else
|
16
|
+
self
|
17
|
+
end
|
19
18
|
end
|
20
|
-
|
19
|
+
|
20
|
+
def tap
|
21
|
+
yield(self)
|
22
|
+
self
|
23
|
+
end if !(Object.instance_methods.include? :tap)
|
24
|
+
end
|
25
|
+
include ObjectExtensions
|
21
26
|
end
|
22
27
|
|
data/lib/ruckus/parsel.rb
CHANGED
@@ -46,7 +46,7 @@ module Ruckus
|
|
46
46
|
# What's our native endianness? :big or :little
|
47
47
|
#
|
48
48
|
def self.endian?
|
49
|
-
@endianness ||= ([1].pack("I")
|
49
|
+
@endianness ||= ([1].pack("I") == "\x01\x00\x00\x00" ? :little : :big)
|
50
50
|
end
|
51
51
|
|
52
52
|
# Is this endianness native?
|
@@ -226,6 +226,10 @@ module Ruckus
|
|
226
226
|
@value.send meth, *args, &block
|
227
227
|
end
|
228
228
|
|
229
|
+
def respond_to?(symbol, include_priv = false)
|
230
|
+
!!(super(symbol, include_priv) || @value.respond_to?(symbol, include_priv))
|
231
|
+
end
|
232
|
+
|
229
233
|
# Traverse all the way to the root of the tree
|
230
234
|
#
|
231
235
|
def root(p = self, &block)
|
data/lib/ruckus/structure.rb
CHANGED
@@ -256,8 +256,8 @@ module Ruckus
|
|
256
256
|
@value.each {|f| yield f.name, f}
|
257
257
|
end
|
258
258
|
|
259
|
-
def respond_to?(
|
260
|
-
!!(self.class.structure_field_names.include?(
|
259
|
+
def respond_to?(symbol, include_priv = false)
|
260
|
+
!!(super(symbol, include_priv) || @value.respond_to?(symbol, include_priv) || self.class.structure_field_names.include?(symbol) || self.find_tag(symbol))
|
261
261
|
end
|
262
262
|
end
|
263
263
|
end
|
data/ruckus.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ruckus}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.6.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["tduehr", "tqbf"]
|
12
|
-
s.date = %q{2010-04-
|
12
|
+
s.date = %q{2010-04-28}
|
13
13
|
s.description = %q{Ruckus: A DOM-Inspired Ruby Smart Fuzzer}
|
14
14
|
s.email = %q{td@matasano.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/test/test_mutator.rb
CHANGED
data/test/test_respondto.rb
CHANGED
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
- 5
|
8
7
|
- 6
|
9
|
-
|
8
|
+
- 0
|
9
|
+
version: 0.6.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- tduehr
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-04-
|
18
|
+
date: 2010-04-28 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|