rbkb 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/lib/rbkb.rb +1 -0
- data/lib/rbkb/extends/string.rb +2 -2
- data/lib/rbkb/version.rb +1 -1
- data/rbkb.gemspec +2 -2
- data/spec/string_extends_spec.rb +2 -3
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjU3Zjk1NzQ1MTVlYmRiNjJjYzJkYzMyM2VhNmRhMjFjNmYwNjNkNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjVlMWViMTgzYTBkNmFhZmRiNzM4ZTQyYTAyMGRlZGIwYTRjNGY2NA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGEyMWFhYzE0MTNjNDkzZmQxYTBmMTcxMGZkNjFhZjVmMTg1NDU1ZDUxNjk3
|
10
|
+
ODE3OTQ0MzhlMWY3OGZlYWEwODEwNjU5ZDE1MjFmZjAyZjFhNWVkNjJmMjU0
|
11
|
+
ZTU0OTVmYzM4MjY1MWNiYTZkY2E4MDg5ZDg0ZmRjNDcwNmNlMzE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NmU3MDE1YjRjNTQxZmMyM2Y2YzZlMzRjNjVmZmViNGJjZTJkZDBjZDI3NTBi
|
14
|
+
YzNjYmExMGVkYzMwNmUxNTYyNzk5MTQ1N2Y1MzVmZTI2OTBhMmU3OWFlNjYy
|
15
|
+
ODFmOTFjZWFjYjFjOWU3MzVkZTRkMjc5OTViMmRiZDdiNzAwZjg=
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
pkg/
|
data/Gemfile.lock
CHANGED
data/lib/rbkb.rb
CHANGED
data/lib/rbkb/extends/string.rb
CHANGED
@@ -29,7 +29,7 @@ module Rbkb
|
|
29
29
|
end
|
30
30
|
hx = Rbkb::HEXCHARS
|
31
31
|
|
32
|
-
s.gsub(opts[:rx]) do |c|
|
32
|
+
s.force_to_binary.gsub(opts[:rx]) do |c|
|
33
33
|
c=c.ord
|
34
34
|
(plus and c==32)? '+' : "%" + (hx[(c >> 4)] + hx[(c & 0xf )])
|
35
35
|
end
|
@@ -124,7 +124,7 @@ module Rbkb
|
|
124
124
|
# @param [String] d optional 'delimiter' between hex bytes
|
125
125
|
# (zero+ spaces by default)
|
126
126
|
def unhexify(d=/\s*/)
|
127
|
-
self.strip.gsub(/([A-Fa-f0-9]{1,2})#{d}?/) { $1.hex.chr }
|
127
|
+
self.force_to_binary.strip.gsub(/([A-Fa-f0-9]{1,2})#{d}?/) { $1.hex.chr }
|
128
128
|
end
|
129
129
|
|
130
130
|
# Converts a hex value to numeric.
|
data/lib/rbkb/version.rb
CHANGED
data/rbkb.gemspec
CHANGED
@@ -19,6 +19,6 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
-
spec.add_development_dependency "rake"
|
23
|
-
spec.add_development_dependency "rspec"
|
22
|
+
spec.add_development_dependency "rake", "~> 0"
|
23
|
+
spec.add_development_dependency "rspec", "~> 0"
|
24
24
|
end
|
data/spec/string_extends_spec.rb
CHANGED
@@ -30,19 +30,18 @@ describe Rbkb::Extends::String do
|
|
30
30
|
RbkbString("foo%0a").urldec.should == "foo\n"
|
31
31
|
RbkbString("foo%20").urldec.should == "foo "
|
32
32
|
RbkbString("foo+").urldec.should == "foo "
|
33
|
-
RbkbString("foo%ff\n").urldec.should == "foo\xFF\n".
|
33
|
+
RbkbString("foo%ff\n").urldec.bytes.to_a.should == "foo\xFF\n".bytes.to_a
|
34
34
|
end
|
35
35
|
|
36
36
|
|
37
37
|
it "should base-64 encode a string" do
|
38
38
|
RbkbString("fooby").b64.should == "Zm9vYnk="
|
39
39
|
RbkbString("\xca\xfe\xba\xbe").b64.should == "yv66vg=="
|
40
|
-
RbkbString("foo\xFF\n"
|
40
|
+
RbkbString("foo\xFF\n").b64.should == "Zm9v/wo="
|
41
41
|
end
|
42
42
|
|
43
43
|
it "should base-64 decode a string" do
|
44
44
|
RbkbString("Zm9vYnk=").d64.should == "fooby"
|
45
|
-
RbkbString("yv66vg==").d64.should == "\xca\xfe\xba\xbe"
|
46
45
|
RbkbString("yv66vg==").d64.bytes.to_a.should == [0xca,0xfe,0xba,0xbe]
|
47
46
|
RbkbString("Zm9v/wo=").d64.bytes.to_a.should == [0x66, 0x6f, 0x6f, 0xff, 0x0a]
|
48
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbkb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Monti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,28 +28,28 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description: Rbkb is a collection of ruby-based pen-testing and reversing tools. Inspired
|
@@ -80,6 +80,7 @@ extensions: []
|
|
80
80
|
extra_rdoc_files: []
|
81
81
|
files:
|
82
82
|
- .bnsignore
|
83
|
+
- .gitignore
|
83
84
|
- .rspec
|
84
85
|
- Gemfile
|
85
86
|
- Gemfile.lock
|