packet_head 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/packet_head/version.rb +1 -1
- data/lib/packet_head.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c008365b6121b1b6b6b318c8e4d0c3237dbf69f1
|
4
|
+
data.tar.gz: d47d97d8b7e4c64f7b3c3fa5a192d1b82dc5c637
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e03562d4aabbb50ee5505dae8ce8273a8d284ad7b2c8c5417b8cc5d2a44e398a0f2088c59c6214b8ddc446042dc8883b193cdbd28030275a06e08f93cb8f420
|
7
|
+
data.tar.gz: f7ac741b72369e27c38f02907e02e1a9ced4e21d7d6826d6462ec82b9676c9403b366316141ed97b26f38a533d1faa3200307ad60895b91b59fa5f46b68bebbf
|
data/lib/packet_head/version.rb
CHANGED
data/lib/packet_head.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'pry'
|
1
2
|
require "packetgen"
|
2
3
|
require "command_lion"
|
3
4
|
require "colorize"
|
@@ -9,7 +10,7 @@ module PacketHead
|
|
9
10
|
|
10
11
|
CommandLion::App.run do
|
11
12
|
name "Packet Head".colorize(:yellow)
|
12
|
-
version
|
13
|
+
version PacketHead::VERSION
|
13
14
|
description "Streaming captured packet headers straight to the command-line."
|
14
15
|
|
15
16
|
command :capture do
|
@@ -22,7 +23,7 @@ module PacketHead
|
|
22
23
|
loop do
|
23
24
|
while packet = capture.next
|
24
25
|
begin
|
25
|
-
PacketGen.parse(packet).headers.map(&:class).map {|h| h.to_s.split("::").last }.join(" - ")
|
26
|
+
puts PacketGen.parse(packet).headers.map(&:class).map {|h| h.to_s.split("::").last }.join(" - ")
|
26
27
|
rescue
|
27
28
|
# some error, yolo
|
28
29
|
nil
|