pstream 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/pstream +12 -4
- metadata +4 -5
- data/lib/string.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcfeaaadeb0f4dd7c655faeb065192ab22cb7277
|
4
|
+
data.tar.gz: 226952ccd0e896ca98b039c2e397748c14989914
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb9d281c62201bff19cf97dd0c31a18302a77ef5541575953982f64150e9571fee5cfa7559b84fd31fb460dfa2ec770b3f35bfea0fe67d217444953542402f90
|
7
|
+
data.tar.gz: d9b70e10b47e98c444c77b43e9f1617244178f7b24aa31f290acac8379450ce71214132d61125f8c0d0a05c12f7173eb885571471dd7435d9ea9401000099dca
|
data/bin/pstream
CHANGED
@@ -4,7 +4,6 @@ require "colorize"
|
|
4
4
|
require "io/wait"
|
5
5
|
require "optparse"
|
6
6
|
require "pstream"
|
7
|
-
require "string"
|
8
7
|
|
9
8
|
class PStreamExit
|
10
9
|
GOOD = 0
|
@@ -27,8 +26,18 @@ def parse(args)
|
|
27
26
|
"ciphersuites in use."
|
28
27
|
|
29
28
|
parser = OptionParser.new do |opts|
|
29
|
+
opts.summary_width = 19
|
30
|
+
|
30
31
|
opts.banner = "Usage: #{File.basename($0)} [OPTIONS] <pcap>"
|
31
32
|
|
33
|
+
opts.on("", "DESCRIPTION")
|
34
|
+
|
35
|
+
info.scan(/\S.{0,#{76}}\S(?=\s|$)|\S+/).each do |line|
|
36
|
+
opts.on(" #{line}")
|
37
|
+
end
|
38
|
+
|
39
|
+
opts.on("", "OPTIONS")
|
40
|
+
|
32
41
|
opts.on(
|
33
42
|
"-c",
|
34
43
|
"--ciphersuites",
|
@@ -61,8 +70,6 @@ def parse(args)
|
|
61
70
|
) do
|
62
71
|
options["verbose"] = true
|
63
72
|
end
|
64
|
-
|
65
|
-
opts.on("", info.word_wrap)
|
66
73
|
end
|
67
74
|
|
68
75
|
begin
|
@@ -138,7 +145,8 @@ rescue Exception => e
|
|
138
145
|
$stderr.puts " https://gitlab.com/mjwhitta/pstream/issues"
|
139
146
|
$stderr.puts
|
140
147
|
$stderr.puts "Maybe the message below will help. If not, you " \
|
141
|
-
"can use the --verbose flag to get
|
148
|
+
"can use the --verbose flag to get"
|
149
|
+
$stderr.puts "a backtrace."
|
142
150
|
|
143
151
|
$stderr.puts e.message.red
|
144
152
|
if (options["verbose"])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pstream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Whittaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
version: '0.1'
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.1.
|
62
|
+
version: 0.1.4
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -69,7 +69,7 @@ dependencies:
|
|
69
69
|
version: '0.1'
|
70
70
|
- - ">="
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: 0.1.
|
72
|
+
version: 0.1.4
|
73
73
|
description: This ruby gem will summarize or extract info from pcap files.
|
74
74
|
email: mjwhitta@gmail.com
|
75
75
|
executables:
|
@@ -87,7 +87,6 @@ files:
|
|
87
87
|
- lib/pstream/error/stream_not_found.rb
|
88
88
|
- lib/pstream/error/tshark_not_found.rb
|
89
89
|
- lib/pstream/stream.rb
|
90
|
-
- lib/string.rb
|
91
90
|
homepage: https://mjwhitta.github.io/pstream
|
92
91
|
licenses:
|
93
92
|
- GPL-3.0
|
data/lib/string.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# Modify String class to allow for rsplit and word wrap
|
2
|
-
class String
|
3
|
-
def rsplit(pattern)
|
4
|
-
ret = rpartition(pattern)
|
5
|
-
ret.delete_at(1)
|
6
|
-
return ret
|
7
|
-
end
|
8
|
-
|
9
|
-
def word_wrap(width = 80)
|
10
|
-
return scan(/\S.{0,#{width}}\S(?=\s|$)|\S+/).join("\n")
|
11
|
-
end
|
12
|
-
end
|