rbkb 0.7.0 → 0.7.1

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NmUwMGU3OGM4ZTEwZTZjMWViOTQxODg1NWNjODVmZWRhOWI1ZTY3Mg==
4
+ MjU3Zjk1NzQ1MTVlYmRiNjJjYzJkYzMyM2VhNmRhMjFjNmYwNjNkNQ==
5
5
  data.tar.gz: !binary |-
6
- YWIwMTg4MjliZWVjOTZjNjg3ZjQ4YWI5NTE2MTQ5ZDk1MzNhNTQwMg==
6
+ YjVlMWViMTgzYTBkNmFhZmRiNzM4ZTQyYTAyMGRlZGIwYTRjNGY2NA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzAwYjE4ZDEyNDdjZDZhZTJiODFkNDc5MWU0NDNhZjQ4YTM4Y2JiMzY4NWQx
10
- MzMwMDk5MTJjNzA1OGM0ZGRhOTU3NDRiNTVhMWIzNGJlYWU5NjBjZTYwZDc4
11
- Y2Q0ODY0YjE3NGNjOGY4ZTE3MmY0MTA3MTY0NmI2YWZiMGMzMDU=
9
+ ZGEyMWFhYzE0MTNjNDkzZmQxYTBmMTcxMGZkNjFhZjVmMTg1NDU1ZDUxNjk3
10
+ ODE3OTQ0MzhlMWY3OGZlYWEwODEwNjU5ZDE1MjFmZjAyZjFhNWVkNjJmMjU0
11
+ ZTU0OTVmYzM4MjY1MWNiYTZkY2E4MDg5ZDg0ZmRjNDcwNmNlMzE=
12
12
  data.tar.gz: !binary |-
13
- ODkwNzFkZWY2ZmQ2NzIzZWM2NWNmM2NkMDIyM2ZkYWQzNjcwYjQwZTc0NzM2
14
- MzE2YjBhN2E4NjQ3YWU1NjkzMTY0NTg0Y2UzMzZlMjk2M2Y3ZWJmODBiZDY2
15
- MDBhNjdiNDc2YTY3YzE2M2RjMzhjY2FkMzg5NjEwMzA1OTZjOTc=
13
+ NmU3MDE1YjRjNTQxZmMyM2Y2YzZlMzRjNjVmZmViNGJjZTJkZDBjZDI3NTBi
14
+ YzNjYmExMGVkYzMwNmUxNTYyNzk5MTQ1N2Y1MzVmZTI2OTBhMmU3OWFlNjYy
15
+ ODFmOTFjZWFjYjFjOWU3MzVkZTRkMjc5OTViMmRiZDdiNzAwZjg=
@@ -0,0 +1 @@
1
+ pkg/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rbkb (0.7.0)
4
+ rbkb (0.7.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,4 +1,5 @@
1
1
  require "rbkb/version"
2
+ require "rbkb/extends"
2
3
 
3
4
  module Rbkb
4
5
 
@@ -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.
@@ -1,3 +1,3 @@
1
1
  module Rbkb
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
@@ -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
@@ -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".force_encoding('ascii')
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".force_encoding('ascii')).b64.should == "Zm9v/wo="
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.0
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-03-03 00:00:00.000000000 Z
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