packetman 0.1.5 → 0.1.6
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 +4 -4
- data/config/applications.yml +10 -3
- data/lib/packetman/filter.rb +6 -3
- data/lib/packetman/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3b1cf3885dcdce498b69eb568a10f6bb728a9af2ca0d0bd9f50510137416f9e
|
4
|
+
data.tar.gz: e4af77b424e0074748bb7c034a191a475e68c5f5daaf545b0c23910b01447dc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 188bb0f019470028ccabc251bbe195038728c81be5dcbdec98f121d153ca273b19e51390613600a99b0eadca571f20fb33530e4f9a3d871a2d49a5dc1e8deee4
|
7
|
+
data.tar.gz: 794018ddb9156cfcfcb174163877fb4518cebc57df9d1cf22fe021a54899b71c94e9fb73c70f62ee236a2c3518df35c300aa7b00d70b46da8fcf0e090cf2e879
|
data/config/applications.yml
CHANGED
@@ -1,7 +1,14 @@
|
|
1
1
|
---
|
2
|
-
dns: # packetman -
|
3
|
-
:offset:
|
4
|
-
:start_with_transport:
|
2
|
+
dns: # packetman -bo 13 -p udp -w '.' 'google.com'
|
3
|
+
:offset: 13
|
4
|
+
:start_with_transport: false
|
5
5
|
:offset_type: :bytes
|
6
6
|
:wildcard: .
|
7
7
|
:transport: udp
|
8
|
+
|
9
|
+
dns_tcp: # packetman -bo 15 -p tcp -w '.' 'google.com'
|
10
|
+
:offset: 15 # DNS over TCP adds a 2 byte length field to the beginning of the standard DNS protocol
|
11
|
+
:start_with_transport: false
|
12
|
+
:offset_type: :bytes
|
13
|
+
:wildcard: .
|
14
|
+
:transport: tcp
|
data/lib/packetman/filter.rb
CHANGED
@@ -56,13 +56,16 @@ module Packetman
|
|
56
56
|
# @param chr [String] character to convert to binary
|
57
57
|
# @return [String] binary string
|
58
58
|
def bin_chr(chr)
|
59
|
-
chr = '0' if chr == config.wildcard
|
60
|
-
|
61
59
|
if config.radix
|
60
|
+
chr = '0' if chr == config.wildcard
|
62
61
|
raise "invalid character '#{chr}' for radix=#{config.radix}" if chr.downcase != chr.to_i(config.radix).to_s(config.radix).downcase
|
63
62
|
chr.to_i(config.radix)
|
64
63
|
else
|
65
|
-
chr.
|
64
|
+
if chr == config.wildcard
|
65
|
+
0
|
66
|
+
else
|
67
|
+
chr.ord
|
68
|
+
end
|
66
69
|
end.to_s(2).rjust(self.class.bit_density, '0')
|
67
70
|
end
|
68
71
|
|
data/lib/packetman/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packetman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Scholl
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: terminal-table
|
@@ -130,7 +130,7 @@ homepage: https://github.com/jescholl/packetman
|
|
130
130
|
licenses:
|
131
131
|
- MIT
|
132
132
|
metadata: {}
|
133
|
-
post_install_message:
|
133
|
+
post_install_message:
|
134
134
|
rdoc_options: []
|
135
135
|
require_paths:
|
136
136
|
- lib
|
@@ -145,9 +145,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
|
-
rubyforge_project:
|
148
|
+
rubyforge_project:
|
149
149
|
rubygems_version: 2.7.6.2
|
150
|
-
signing_key:
|
150
|
+
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: Advanced tcpdump and Wiresharp filter generator.
|
153
153
|
test_files: []
|