spcap 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/spcap/version.rb +1 -1
- data/spcap.gemspec +1 -0
- data/test/lib/spcap/file_test.rb +14 -2
- metadata +25 -15
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c04ee15784f9fa7cb15dbda3e24b0ccbac88d4bc
|
4
|
+
data.tar.gz: ea5fc30e027ccec363f894a7557adc69c3d70ce7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5c5d2b59d279f5385f2d6ebadf5384b037de6c58099ca30c01276c9b4c8df912081f65e7ae0b6494df6e6c333f7a0d2789ca5556104407ec079446dcbd9bcc7e
|
7
|
+
data.tar.gz: 1db3109b7a53b97a67f5faeea14775e95af6b987b3e5efb49df2dc1146b51bacbbe0ef32cb187c5032959bfef0bd0e38c471a98cf03f0d426dc208bbd31d7ad2
|
data/lib/spcap/version.rb
CHANGED
data/spcap.gemspec
CHANGED
@@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
spec.add_dependency "log4r", "~> 1.1.10"
|
21
22
|
spec.add_development_dependency "bundler", "~> 1.3"
|
22
23
|
spec.add_development_dependency "rake"
|
23
24
|
end
|
data/test/lib/spcap/file_test.rb
CHANGED
@@ -15,10 +15,16 @@ describe Spcap::Stream do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
describe Spcap::Scopy do
|
18
|
-
|
18
|
+
let(:temp_path) { File.join("test", "tmp")}
|
19
|
+
subject { Spcap::Scopy.new(File.open('test/pcap_files/sample.pcap'), wpath: temp_path) }
|
19
20
|
before do
|
20
21
|
@counter=0
|
21
22
|
end
|
23
|
+
after do
|
24
|
+
Dir.glob("test/tmp/*.pcap").each do |temp_filename|
|
25
|
+
File.unlink(temp_filename)
|
26
|
+
end
|
27
|
+
end
|
22
28
|
it "must be a Spcap::Scopy" do
|
23
29
|
subject.must_be_instance_of(Spcap::Scopy)
|
24
30
|
end
|
@@ -33,8 +39,9 @@ end
|
|
33
39
|
|
34
40
|
describe Spcap::TCPPacket do
|
35
41
|
|
42
|
+
let(:temp_path) { File.join("test", "tmp")}
|
36
43
|
subject { packet = nil
|
37
|
-
src = Spcap::Scopy.new(File.open('test/pcap_files/sample.pcap'))
|
44
|
+
src = Spcap::Scopy.new(File.open('test/pcap_files/sample.pcap'), wpath: temp_path)
|
38
45
|
packet = src.next
|
39
46
|
packet
|
40
47
|
}
|
@@ -46,6 +53,11 @@ describe Spcap::TCPPacket do
|
|
46
53
|
@channel = [[@src,@sport],[@dst,@dport]]
|
47
54
|
@full_session = @channel.sort
|
48
55
|
end
|
56
|
+
after do
|
57
|
+
Dir.glob("test/tmp/*.pcap").each do |temp_filename|
|
58
|
+
File.unlink(temp_filename)
|
59
|
+
end
|
60
|
+
end
|
49
61
|
it "must be a Spcap::TCPPacket" do
|
50
62
|
subject.must_be_instance_of(Spcap::TCPPacket)
|
51
63
|
end
|
metadata
CHANGED
@@ -1,20 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spcap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Bernard Rodier
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-12-21 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: log4r
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.1.10
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.1.10
|
14
27
|
- !ruby/object:Gem::Dependency
|
15
28
|
name: bundler
|
16
29
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
30
|
requirements:
|
19
31
|
- - ~>
|
20
32
|
- !ruby/object:Gem::Version
|
@@ -22,7 +34,6 @@ dependencies:
|
|
22
34
|
type: :development
|
23
35
|
prerelease: false
|
24
36
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
37
|
requirements:
|
27
38
|
- - ~>
|
28
39
|
- !ruby/object:Gem::Version
|
@@ -30,17 +41,15 @@ dependencies:
|
|
30
41
|
- !ruby/object:Gem::Dependency
|
31
42
|
name: rake
|
32
43
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
44
|
requirements:
|
35
|
-
- -
|
45
|
+
- - '>='
|
36
46
|
- !ruby/object:Gem::Version
|
37
47
|
version: '0'
|
38
48
|
type: :development
|
39
49
|
prerelease: false
|
40
50
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
51
|
requirements:
|
43
|
-
- -
|
52
|
+
- - '>='
|
44
53
|
- !ruby/object:Gem::Version
|
45
54
|
version: '0'
|
46
55
|
description: Very simple pcap file handler that is not require native extension
|
@@ -70,33 +79,34 @@ files:
|
|
70
79
|
- test/lib/spcap/file_test.rb
|
71
80
|
- test/pcap_files/sample.pcap
|
72
81
|
- test/test_helper.rb
|
82
|
+
- test/tmp/.gitignore
|
73
83
|
homepage: https://github.com/brodier/spcap
|
74
84
|
licenses:
|
75
85
|
- MIT
|
86
|
+
metadata: {}
|
76
87
|
post_install_message:
|
77
88
|
rdoc_options: []
|
78
89
|
require_paths:
|
79
90
|
- lib
|
80
91
|
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
92
|
requirements:
|
83
|
-
- -
|
93
|
+
- - '>='
|
84
94
|
- !ruby/object:Gem::Version
|
85
95
|
version: '0'
|
86
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
97
|
requirements:
|
89
|
-
- -
|
98
|
+
- - '>='
|
90
99
|
- !ruby/object:Gem::Version
|
91
100
|
version: '0'
|
92
101
|
requirements: []
|
93
102
|
rubyforge_project:
|
94
|
-
rubygems_version:
|
103
|
+
rubygems_version: 2.0.2
|
95
104
|
signing_key:
|
96
|
-
specification_version:
|
105
|
+
specification_version: 4
|
97
106
|
summary: Pure ruby gem without native exstension that handle pcap file produce by
|
98
107
|
pcap library or tcpdump
|
99
108
|
test_files:
|
100
109
|
- test/lib/spcap/file_test.rb
|
101
110
|
- test/pcap_files/sample.pcap
|
102
111
|
- test/test_helper.rb
|
112
|
+
- test/tmp/.gitignore
|