packet_via_dmem 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/packet_via_dmem.rb +2 -1
- data/lib/packet_via_dmem/packet.rb +2 -0
- data/packet_via_dmem.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36975cfb09e9cebda91fdd67d5982f4120806984
|
4
|
+
data.tar.gz: 89aaa1943eecdff4f7cf46079f2f2867de66203e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7548cfaf781d592a18ed2dfc8a640055942e38b6fa3c911a6c5cd3c2132543bf4670829ef1e1a0dfc1d3d79ec7d921f1bba74a6f78f67ad7b1cb85e40e3de2c
|
7
|
+
data.tar.gz: db6ead8d6c9436ab062f903337f0d0d27525f7f9bc58fea995be53098271e1115be9d2698c38e58d4a8c8a0f544bb4f5da1db05a5c653a5e42e3f077da98f00d
|
data/lib/packet_via_dmem.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'strscan'
|
2
2
|
require 'logger'
|
3
|
+
require 'pry'
|
3
4
|
|
4
5
|
class PacketViaDMEM
|
5
6
|
PACKET = /^(Received|Sent) \d+ byte parcel:.*\n/
|
@@ -51,7 +52,7 @@ class PacketViaDMEM
|
|
51
52
|
@sc.scan_until(/\n/) if type == :received
|
52
53
|
pkt = ''
|
53
54
|
while @sc.match?(/^0x/)
|
54
|
-
pkt << @sc.scan_until(/\n/).strip
|
55
|
+
pkt << (@sc.scan_until(/\n/) || @sc.scan_until(/$/)).strip
|
55
56
|
end
|
56
57
|
pkt = parse_packet pkt
|
57
58
|
packets.add pkt, type
|
@@ -93,6 +93,8 @@ class PacketViaDMEM
|
|
93
93
|
when 0x20
|
94
94
|
push = FAKE[:dmac] + FAKE[:smac] + FAKE[:etype_ipv4]
|
95
95
|
[ 3, push ]
|
96
|
+
when 0x83
|
97
|
+
[ 2, [] ]
|
96
98
|
else
|
97
99
|
@log.warn "unknown port: magic: (%x/%x), type: %x, port: %x'" % [header.magic1, header.magic2, header.type, header.port]
|
98
100
|
[ 0, [] ]
|
data/packet_via_dmem.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packet_via_dmem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Saku Ytti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slop
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
72
|
rubyforge_project: packet_via_dmem
|
73
|
-
rubygems_version: 2.
|
73
|
+
rubygems_version: 2.6.11
|
74
74
|
signing_key:
|
75
75
|
specification_version: 4
|
76
76
|
summary: packet_via_dmem to pcap
|