packetgen 3.1.1 → 3.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/bin/pgconsole +1 -0
  3. data/lib/packetgen.rb +33 -4
  4. data/lib/packetgen/capture.rb +51 -28
  5. data/lib/packetgen/config.rb +17 -11
  6. data/lib/packetgen/deprecation.rb +34 -8
  7. data/lib/packetgen/header.rb +2 -9
  8. data/lib/packetgen/header/arp.rb +2 -2
  9. data/lib/packetgen/header/asn1_base.rb +2 -2
  10. data/lib/packetgen/header/base.rb +70 -74
  11. data/lib/packetgen/header/bootp.rb +3 -3
  12. data/lib/packetgen/header/dhcp.rb +2 -2
  13. data/lib/packetgen/header/dhcp/option.rb +2 -2
  14. data/lib/packetgen/header/dhcp/options.rb +2 -2
  15. data/lib/packetgen/header/dhcpv6.rb +12 -12
  16. data/lib/packetgen/header/dhcpv6/duid.rb +11 -5
  17. data/lib/packetgen/header/dhcpv6/option.rb +8 -16
  18. data/lib/packetgen/header/dhcpv6/options.rb +2 -2
  19. data/lib/packetgen/header/dhcpv6/relay.rb +2 -2
  20. data/lib/packetgen/header/dns.rb +9 -9
  21. data/lib/packetgen/header/dns/name.rb +20 -9
  22. data/lib/packetgen/header/dns/opt.rb +2 -2
  23. data/lib/packetgen/header/dns/option.rb +2 -2
  24. data/lib/packetgen/header/dns/qdsection.rb +3 -3
  25. data/lib/packetgen/header/dns/question.rb +37 -35
  26. data/lib/packetgen/header/dns/rr.rb +3 -3
  27. data/lib/packetgen/header/dns/rrsection.rb +2 -2
  28. data/lib/packetgen/header/dot11.rb +30 -51
  29. data/lib/packetgen/header/dot11/control.rb +5 -5
  30. data/lib/packetgen/header/dot11/data.rb +11 -7
  31. data/lib/packetgen/header/dot11/element.rb +16 -16
  32. data/lib/packetgen/header/dot11/management.rb +2 -2
  33. data/lib/packetgen/header/dot11/sub_mngt.rb +2 -12
  34. data/lib/packetgen/header/dot1q.rb +2 -2
  35. data/lib/packetgen/header/dot1x.rb +7 -20
  36. data/lib/packetgen/header/eap.rb +30 -33
  37. data/lib/packetgen/header/eap/fast.rb +2 -2
  38. data/lib/packetgen/header/eap/md5.rb +2 -2
  39. data/lib/packetgen/header/eap/tls.rb +2 -2
  40. data/lib/packetgen/header/eap/ttls.rb +2 -2
  41. data/lib/packetgen/header/eth.rb +13 -11
  42. data/lib/packetgen/header/gre.rb +2 -2
  43. data/lib/packetgen/header/http.rb +2 -0
  44. data/lib/packetgen/header/http/headers.rb +6 -4
  45. data/lib/packetgen/header/http/request.rb +36 -21
  46. data/lib/packetgen/header/http/response.rb +7 -7
  47. data/lib/packetgen/header/http/verbs.rb +3 -3
  48. data/lib/packetgen/header/icmp.rb +2 -2
  49. data/lib/packetgen/header/icmpv6.rb +2 -2
  50. data/lib/packetgen/header/igmp.rb +4 -4
  51. data/lib/packetgen/header/igmpv3.rb +3 -3
  52. data/lib/packetgen/header/igmpv3/group_record.rb +8 -6
  53. data/lib/packetgen/header/igmpv3/mq.rb +2 -2
  54. data/lib/packetgen/header/igmpv3/mr.rb +2 -2
  55. data/lib/packetgen/header/ip.rb +30 -31
  56. data/lib/packetgen/header/ip/addr.rb +10 -3
  57. data/lib/packetgen/header/ip/option.rb +8 -10
  58. data/lib/packetgen/header/ip/options.rb +3 -5
  59. data/lib/packetgen/header/ipv6.rb +2 -2
  60. data/lib/packetgen/header/ipv6/addr.rb +9 -2
  61. data/lib/packetgen/header/ipv6/extension.rb +2 -2
  62. data/lib/packetgen/header/ipv6/hop_by_hop.rb +3 -3
  63. data/lib/packetgen/header/llc.rb +2 -2
  64. data/lib/packetgen/header/mdns.rb +2 -2
  65. data/lib/packetgen/header/mld.rb +2 -2
  66. data/lib/packetgen/header/mldv2.rb +2 -2
  67. data/lib/packetgen/header/mldv2/mcast_address_record.rb +4 -2
  68. data/lib/packetgen/header/mldv2/mlq.rb +2 -2
  69. data/lib/packetgen/header/mldv2/mlr.rb +2 -2
  70. data/lib/packetgen/header/ospfv2.rb +9 -9
  71. data/lib/packetgen/header/ospfv2/db_description.rb +2 -2
  72. data/lib/packetgen/header/ospfv2/hello.rb +2 -2
  73. data/lib/packetgen/header/ospfv2/ls_ack.rb +2 -2
  74. data/lib/packetgen/header/ospfv2/ls_request.rb +4 -2
  75. data/lib/packetgen/header/ospfv2/ls_update.rb +2 -2
  76. data/lib/packetgen/header/ospfv2/lsa.rb +9 -5
  77. data/lib/packetgen/header/ospfv2/lsa_header.rb +8 -7
  78. data/lib/packetgen/header/ospfv3.rb +2 -2
  79. data/lib/packetgen/header/ospfv3/db_description.rb +2 -2
  80. data/lib/packetgen/header/ospfv3/hello.rb +2 -2
  81. data/lib/packetgen/header/ospfv3/ipv6_prefix.rb +4 -2
  82. data/lib/packetgen/header/ospfv3/ls_ack.rb +2 -2
  83. data/lib/packetgen/header/ospfv3/ls_request.rb +4 -2
  84. data/lib/packetgen/header/ospfv3/ls_update.rb +2 -2
  85. data/lib/packetgen/header/ospfv3/lsa.rb +5 -5
  86. data/lib/packetgen/header/ospfv3/lsa_header.rb +9 -8
  87. data/lib/packetgen/header/snmp.rb +33 -29
  88. data/lib/packetgen/header/tcp.rb +4 -23
  89. data/lib/packetgen/header/tcp/option.rb +11 -11
  90. data/lib/packetgen/header/tcp/options.rb +2 -2
  91. data/lib/packetgen/header/tftp.rb +6 -6
  92. data/lib/packetgen/header/udp.rb +3 -3
  93. data/lib/packetgen/headerable.rb +5 -4
  94. data/lib/packetgen/inject.rb +23 -0
  95. data/lib/packetgen/inspect.rb +23 -20
  96. data/lib/packetgen/packet.rb +96 -53
  97. data/lib/packetgen/pcap.rb +29 -0
  98. data/lib/packetgen/pcapng.rb +13 -13
  99. data/lib/packetgen/pcapng/block.rb +26 -13
  100. data/lib/packetgen/pcapng/epb.rb +25 -22
  101. data/lib/packetgen/pcapng/file.rb +260 -138
  102. data/lib/packetgen/pcapng/idb.rb +36 -38
  103. data/lib/packetgen/pcapng/shb.rb +51 -53
  104. data/lib/packetgen/pcapng/spb.rb +19 -19
  105. data/lib/packetgen/pcapng/unknown_block.rb +5 -13
  106. data/lib/packetgen/pcaprub_wrapper.rb +81 -0
  107. data/lib/packetgen/proto.rb +2 -2
  108. data/lib/packetgen/types.rb +3 -0
  109. data/lib/packetgen/types/abstract_tlv.rb +28 -8
  110. data/lib/packetgen/types/array.rb +22 -15
  111. data/lib/packetgen/types/cstring.rb +40 -16
  112. data/lib/packetgen/types/enum.rb +8 -3
  113. data/lib/packetgen/types/fieldable.rb +65 -0
  114. data/lib/packetgen/types/fields.rb +182 -117
  115. data/lib/packetgen/types/int.rb +18 -6
  116. data/lib/packetgen/types/int_string.rb +10 -2
  117. data/lib/packetgen/types/length_from.rb +20 -12
  118. data/lib/packetgen/types/oui.rb +4 -2
  119. data/lib/packetgen/types/string.rb +46 -8
  120. data/lib/packetgen/types/tlv.rb +4 -2
  121. data/lib/packetgen/utils.rb +4 -4
  122. data/lib/packetgen/utils/arp_spoofer.rb +2 -2
  123. data/lib/packetgen/version.rb +3 -3
  124. metadata +35 -50
  125. data/.gitignore +0 -13
  126. data/.rubocop.yml +0 -28
  127. data/.travis.yml +0 -17
  128. data/Gemfile +0 -4
  129. data/Rakefile +0 -21
  130. data/packetgen.gemspec +0 -36
@@ -1,17 +1,19 @@
1
1
  # coding: utf-8
2
+ # frozen_string_literal: true
3
+
2
4
  # This file is part of PacketGen
3
5
  # See https://github.com/sdaubert/packetgen for more informations
4
6
  # Copyright (C) 2016 Sylvain Daubert <sylvain.daubert@laposte.net>
5
7
  # This program is published under MIT license.
6
8
 
7
- # frozen_string_literal: true
8
-
9
9
  module PacketGen
10
10
  module Types
11
11
  # Base integer class to handle binary integers
12
12
  # @abstract
13
13
  # @author Sylvain Daubert
14
14
  class Int
15
+ include Fieldable
16
+
15
17
  # Integer value
16
18
  # @return [Integer]
17
19
  attr_accessor :value
@@ -45,7 +47,7 @@ module PacketGen
45
47
  @value = if value.is_a?(Integer)
46
48
  value.to_i
47
49
  elsif defined? @packstr
48
- value.to_s.unpack(@packstr[@endian]).first
50
+ value.to_s.unpack1(@packstr[@endian])
49
51
  else
50
52
  raise ParseError, 'Int#read is abstract and cannot read'
51
53
  end
@@ -56,9 +58,7 @@ module PacketGen
56
58
  # @return [::String]
57
59
  # @raise [ParseError] This is an abstrat method and must be redefined
58
60
  def to_s
59
- unless defined? @packstr
60
- raise ParseError, 'PacketGen::Types::Int#to_s is an abstract method'
61
- end
61
+ raise ParseError, 'PacketGen::Types::Int#to_s is an abstract method' unless defined? @packstr
62
62
 
63
63
  [to_i].pack(@packstr[@endian])
64
64
  end
@@ -82,6 +82,18 @@ module PacketGen
82
82
  def sz
83
83
  width
84
84
  end
85
+
86
+ # Format Int type when inspecting header or packet
87
+ # @return [String]
88
+ def format_inspect
89
+ format_str % [to_i.to_s, to_i]
90
+ end
91
+
92
+ private
93
+
94
+ def format_str
95
+ "%-16s (0x%0#{width * 2}x)"
96
+ end
85
97
  end
86
98
 
87
99
  # One byte unsigned integer
@@ -1,17 +1,19 @@
1
1
  # coding: utf-8
2
+ # frozen_string_literal: true
3
+
2
4
  # This file is part of PacketGen
3
5
  # See https://github.com/sdaubert/packetgen for more informations
4
6
  # Copyright (C) 2016 Sylvain Daubert <sylvain.daubert@laposte.net>
5
7
  # This program is published under MIT license.
6
8
 
7
- # frozen_string_literal: true
8
-
9
9
  module PacketGen
10
10
  module Types
11
11
  # Provides a class for creating strings preceeded by their length as a {Int}.
12
12
  # By default, a null string will have one byte length (length byte set to 0).
13
13
  # @author Sylvain Daubert
14
14
  class IntString
15
+ include Fieldable
16
+
15
17
  # internal string
16
18
  # @return [String]
17
19
  attr_reader :string
@@ -88,6 +90,12 @@ module PacketGen
88
90
  def sz
89
91
  to_s.size
90
92
  end
93
+
94
+ # Say if IntString is empty
95
+ # @return [Boolean]
96
+ def empty?
97
+ length.zero?
98
+ end
91
99
  end
92
100
  end
93
101
  end
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
+ # frozen_string_literal: true
3
+
2
4
  # This file is part of PacketGen
3
5
  # See https://github.com/sdaubert/packetgen for more informations
4
6
  # Copyright (C) 2016 Sylvain Daubert <sylvain.daubert@laposte.net>
5
7
  # This program is published under MIT license.
6
8
 
7
- # frozen_string_literal: true
8
-
9
9
  module PacketGen
10
10
  module Types
11
11
  # This module is a mixin adding +length_from+ capacity to a type.
@@ -14,6 +14,9 @@ module PacketGen
14
14
  # @author Sylvain Daubert
15
15
  # @since 3.0.0
16
16
  module LengthFrom
17
+ # Max value returned by {#sz_to_read}.
18
+ MAX_SZ_TO_READ = 65_535
19
+
17
20
  # Initialize +length from+ capacity.
18
21
  # Should be call by extensed object's initialize.
19
22
  # @param [Hash] options
@@ -29,16 +32,21 @@ module PacketGen
29
32
  # @return [String]
30
33
  def read_with_length_from(str)
31
34
  s = PacketGen.force_binary(str.to_s)
32
- str_end = case @length_from
33
- when Types::Int
34
- @length_from.to_i
35
- when Proc
36
- @length_from.call
37
- else
38
- s.size
39
- end
40
- str_end = 0 if str_end < 0
41
- s[0, str_end]
35
+ s[0, sz_to_read]
36
+ end
37
+
38
+ # Size to read, from length_from
39
+ # @return [Integer]
40
+ def sz_to_read
41
+ len = case @length_from
42
+ when Types::Int
43
+ @length_from.to_i
44
+ when Proc
45
+ @length_from.call
46
+ else
47
+ MAX_SZ_TO_READ
48
+ end
49
+ [0, len].max
42
50
  end
43
51
  end
44
52
  end
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
+ # frozen_string_literal: true
3
+
2
4
  # This file is part of PacketGen
3
5
  # See https://github.com/sdaubert/packetgen for more informations
4
6
  # Copyright (C) 2016 Sylvain Daubert <sylvain.daubert@laposte.net>
5
7
  # This program is published under MIT license.
6
8
 
7
- # frozen_string_literal: true
8
-
9
9
  module PacketGen
10
10
  module Types
11
11
  # OUI type, defined as a set of 3 bytes
@@ -14,6 +14,8 @@ module PacketGen
14
14
  # oui.to_human # => "00:01:02"
15
15
  # @author Sylvain Daubert
16
16
  class OUI < Types::Fields
17
+ include Fieldable
18
+
17
19
  # @attribute b2
18
20
  # @return [Integer] left-most byte
19
21
  define_field :b2, Types::Int8
@@ -1,20 +1,28 @@
1
1
  # coding: utf-8
2
+ # frozen_string_literal: true
3
+
2
4
  # This file is part of PacketGen
3
5
  # See https://github.com/sdaubert/packetgen for more informations
4
6
  # Copyright (C) 2016 Sylvain Daubert <sylvain.daubert@laposte.net>
5
7
  # This program is published under MIT license.
6
8
 
7
- # frozen_string_literal: true
9
+ require 'forwardable'
8
10
 
9
11
  module PacketGen
10
12
  module Types
11
- # This class is just like regular String. It only adds {#read}, {#sz},
12
- # #{to_human} and {#from_human} methods
13
- # to be compatible with others {Types}.
13
+ # This class mimics regular String, but it is {Fieldable}.
14
14
  # @author Sylvain Daubert
15
- class String < ::String
15
+ # @since 3.1.6 no more a subclass or regular String
16
+ class String
17
+ extend Forwardable
18
+ include Fieldable
16
19
  include LengthFrom
17
20
 
21
+ def_delegators :@string, :[], :to_s, :length, :size, :inspect, :==, :<<,
22
+ :unpack, :force_encoding, :encoding, :index, :empty?
23
+
24
+ # @return [::String]
25
+ attr_reader :string
18
26
  # @return [Integer]
19
27
  attr_reader :static_length
20
28
 
@@ -23,7 +31,7 @@ module PacketGen
23
31
  # takes length when reading
24
32
  # @option options [Integer] :static_length set a static length for this string
25
33
  def initialize(options={})
26
- super()
34
+ register_internal_string ''
27
35
  initialize_length_from(options)
28
36
  @static_length = options[:static_length]
29
37
  end
@@ -32,14 +40,44 @@ module PacketGen
32
40
  # @return [String] self
33
41
  def read(str)
34
42
  s = read_with_length_from(str)
35
- s = s[0, static_length] if static_length
36
- self.replace(s)
43
+ register_internal_string s
37
44
  self
38
45
  end
39
46
 
47
+ alias old_sz_to_read sz_to_read
48
+ private :old_sz_to_read
49
+
50
+ # Size to read.
51
+ # Computed from static_length or length_from, if defined.
52
+ # @return [Integer]
53
+ # @since 3.1.6
54
+ def sz_to_read
55
+ return static_length if static_length?
56
+
57
+ old_sz_to_read
58
+ end
59
+
60
+ # Say if a static length is defined
61
+ # @return [Boolean]
62
+ # @since 3.1.6
63
+ def static_length?
64
+ !static_length.nil?
65
+ end
66
+
67
+ def format_inspect
68
+ inspect
69
+ end
70
+
40
71
  alias sz length
41
72
  alias to_human to_s
42
73
  alias from_human read
74
+
75
+ private
76
+
77
+ def register_internal_string(str)
78
+ @string = str
79
+ PacketGen.force_binary(@string)
80
+ end
43
81
  end
44
82
  end
45
83
  end
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
+ # frozen_string_literal: true
3
+
2
4
  # This file is part of PacketGen
3
5
  # See https://github.com/sdaubert/packetgen for more informations
4
6
  # Copyright (C) 2016 Sylvain Daubert <sylvain.daubert@laposte.net>
5
7
  # This program is published under MIT license.
6
8
 
7
- # frozen_string_literal: true
8
-
9
9
  module PacketGen
10
10
  module Types
11
11
  # Class to handle Type-Length-Value attributes
@@ -31,6 +31,8 @@ module PacketGen
31
31
  # @deprecated Use {AbstractTLV} instead.
32
32
  # @since 3.1.0 deprecated
33
33
  class TLV < Fields
34
+ include Fieldable
35
+
34
36
  # @!attribute type
35
37
  # @return [Integer]
36
38
  define_field :type, Int8
@@ -1,10 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file is part of PacketGen
2
4
  # See https://github.com/sdaubert/packetgen for more informations
3
5
  # Copyright (C) 2016 Sylvain Daubert <sylvain.daubert@laposte.net>
4
6
  # This program is published under MIT license.
5
7
 
6
- # frozen_string_literal: true
7
-
8
8
  require_relative 'config'
9
9
  require_relative 'utils/arp_spoofer'
10
10
 
@@ -53,8 +53,8 @@ module PacketGen
53
53
  timeout = options[:timeout] || 1
54
54
  my_hwaddr = Config.instance.hwaddr(iface)
55
55
  arp_pkt = Packet.gen('Eth', dst: 'ff:ff:ff:ff:ff:ff', src: my_hwaddr)
56
- arp_pkt.add('ARP', sha: Config.instance.hwaddr, spa: Config.instance.ipaddr,
57
- tpa: ipaddr)
56
+ .add('ARP', sha: Config.instance.hwaddr(iface),
57
+ spa: Config.instance.ipaddr(iface), tpa: ipaddr)
58
58
 
59
59
  capture = Capture.new(iface: iface, timeout: timeout, max: 1,
60
60
  filter: "arp src #{ipaddr} and ether dst #{my_hwaddr}")
@@ -1,10 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file is part of PacketGen
2
4
  # See https://github.com/sdaubert/packetgen for more informations
3
5
  # Copyright (C) 2016 Sylvain Daubert <sylvain.daubert@laposte.net>
4
6
  # This program is published under MIT license.
5
7
 
6
- # frozen_string_literal: true
7
-
8
8
  module PacketGen
9
9
  module Utils
10
10
  # @note This class is provided for test purpose.
@@ -1,14 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file is part of PacketGen
2
4
  # See https://github.com/sdaubert/packetgen for more informations
3
5
  # Copyright (C) 2016 Sylvain Daubert <sylvain.daubert@laposte.net>
4
6
  # This program is published under MIT license.
5
7
 
6
- # frozen_string_literal: true
7
-
8
8
  # PacketGen is a network packet generator and analyzor.
9
9
  #
10
10
  # @author Sylvain Daubert
11
11
  module PacketGen
12
12
  # PacketGen version
13
- VERSION = '3.1.1'
13
+ VERSION = '3.1.6'
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: packetgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Daubert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-21 00:00:00.000000000 Z
11
+ date: 2020-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: interfacez
@@ -30,62 +30,48 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.12.4
33
+ version: 0.13.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.12.4
40
+ version: 0.13.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rasn1
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.5'
47
+ version: '0.8'
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 0.6.6
50
+ version: 0.8.0
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - "~>"
56
56
  - !ruby/object:Gem::Version
57
- version: '0.5'
57
+ version: '0.8'
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 0.6.6
61
- - !ruby/object:Gem::Dependency
62
- name: bundler
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '1.16'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '1.16'
60
+ version: 0.8.0
75
61
  - !ruby/object:Gem::Dependency
76
62
  name: rake
77
63
  requirement: !ruby/object:Gem::Requirement
78
64
  requirements:
79
65
  - - "~>"
80
66
  - !ruby/object:Gem::Version
81
- version: '12.3'
67
+ version: '13.0'
82
68
  type: :development
83
69
  prerelease: false
84
70
  version_requirements: !ruby/object:Gem::Requirement
85
71
  requirements:
86
72
  - - "~>"
87
73
  - !ruby/object:Gem::Version
88
- version: '12.3'
74
+ version: '13.0'
89
75
  - !ruby/object:Gem::Dependency
90
76
  name: rspec
91
77
  requirement: !ruby/object:Gem::Requirement
@@ -100,20 +86,6 @@ dependencies:
100
86
  - - "~>"
101
87
  - !ruby/object:Gem::Version
102
88
  version: '3.7'
103
- - !ruby/object:Gem::Dependency
104
- name: simplecov
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '0.16'
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: '0.16'
117
89
  - !ruby/object:Gem::Dependency
118
90
  name: yard
119
91
  requirement: !ruby/object:Gem::Requirement
@@ -128,21 +100,20 @@ dependencies:
128
100
  - - "~>"
129
101
  - !ruby/object:Gem::Version
130
102
  version: '0.9'
131
- description:
103
+ description: |
104
+ PacketGen is a network packet manipulation library. It allows reading, parsing
105
+ and sending network packets with fun.
132
106
  email:
133
107
  - sylvain.daubert@laposte.net
134
108
  executables:
135
109
  - pgconsole
136
110
  extensions: []
137
- extra_rdoc_files: []
111
+ extra_rdoc_files:
112
+ - README.md
113
+ - LICENSE
138
114
  files:
139
- - ".gitignore"
140
- - ".rubocop.yml"
141
- - ".travis.yml"
142
- - Gemfile
143
115
  - LICENSE
144
116
  - README.md
145
- - Rakefile
146
117
  - bin/pgconsole
147
118
  - lib/packetgen.rb
148
119
  - lib/packetgen/capture.rb
@@ -235,8 +206,10 @@ files:
235
206
  - lib/packetgen/header/tftp.rb
236
207
  - lib/packetgen/header/udp.rb
237
208
  - lib/packetgen/headerable.rb
209
+ - lib/packetgen/inject.rb
238
210
  - lib/packetgen/inspect.rb
239
211
  - lib/packetgen/packet.rb
212
+ - lib/packetgen/pcap.rb
240
213
  - lib/packetgen/pcapng.rb
241
214
  - lib/packetgen/pcapng/block.rb
242
215
  - lib/packetgen/pcapng/epb.rb
@@ -245,12 +218,14 @@ files:
245
218
  - lib/packetgen/pcapng/shb.rb
246
219
  - lib/packetgen/pcapng/spb.rb
247
220
  - lib/packetgen/pcapng/unknown_block.rb
221
+ - lib/packetgen/pcaprub_wrapper.rb
248
222
  - lib/packetgen/proto.rb
249
223
  - lib/packetgen/types.rb
250
224
  - lib/packetgen/types/abstract_tlv.rb
251
225
  - lib/packetgen/types/array.rb
252
226
  - lib/packetgen/types/cstring.rb
253
227
  - lib/packetgen/types/enum.rb
228
+ - lib/packetgen/types/fieldable.rb
254
229
  - lib/packetgen/types/fields.rb
255
230
  - lib/packetgen/types/int.rb
256
231
  - lib/packetgen/types/int_string.rb
@@ -261,13 +236,23 @@ files:
261
236
  - lib/packetgen/utils.rb
262
237
  - lib/packetgen/utils/arp_spoofer.rb
263
238
  - lib/packetgen/version.rb
264
- - packetgen.gemspec
265
- homepage: https://github.com/sdaubert/packetgen
239
+ homepage:
266
240
  licenses:
267
241
  - MIT
268
- metadata: {}
242
+ metadata:
243
+ homepage_uri: https://github.com/sdaubert/packetgen
244
+ source_code_uri: https://github.com/sdaubert/packetgen
245
+ bug_tracker_uri: https://github.com/sdaubert/packetgen/issues
246
+ documentation_uri: https://www.rubydoc.info/gems/packetgen
247
+ wiki_uri: https://github.com/sdaubert/packetgen/wiki
269
248
  post_install_message:
270
- rdoc_options: []
249
+ rdoc_options:
250
+ - "--title"
251
+ - PacketGen - network packet dissector
252
+ - "--main"
253
+ - README.md
254
+ - "--inline-source"
255
+ - "--quiet"
271
256
  require_paths:
272
257
  - lib
273
258
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -282,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
282
267
  version: '0'
283
268
  requirements: []
284
269
  rubyforge_project:
285
- rubygems_version: 2.7.6
270
+ rubygems_version: 2.7.6.2
286
271
  signing_key:
287
272
  specification_version: 4
288
273
  summary: Network packet generator and dissector