ronin-web-user_agents 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55a3e3bfe46dc0c698ffee051249993e16f7cb1e3f411e140b4379a168b4f5ee
4
- data.tar.gz: aed3f4680b30846c2d8c61caa8addca28e86de85deeb94fb6fdb7ac6f18bd05a
3
+ metadata.gz: 362b831e0de6d339b41a3c12fd0c80cc542f250ddb8cb00304a10b9efe4f4d05
4
+ data.tar.gz: 2f56546e867a79c8a9a1393261f2b4546c70f192d93736c7499ecf2289961f84
5
5
  SHA512:
6
- metadata.gz: 76ebaf12208752b5ec1b2466a1dc0992aa202a026a2b700062014ee7c4d7ed15e6161340176dda532b3f6d0330f97c9a10be5146f2996b7b622f341d764c7759
7
- data.tar.gz: b9dbce6211bfe348305adf37ff68de6b77ebb5a5b96c6fea4173accfae17a893834ea831297f741c1211089525b9b61bcf68d27b77189965b88a894fe1b8334d
6
+ metadata.gz: 69d452562cbf97cb037ece1d94e364ab39aff4458295cc5339140307248962838a24e87dcec8cc11abc9c1f1c6574c512177f16a142bfc445b7be1a6b9076e5a
7
+ data.tar.gz: 708c8b9ca36740ca6d8a90eb5bd7059e521e9f98b46af10aa7fc07b2c65c1a99ade85e1befcd5b30fade7e204ad0d076a0e6b66116bb9d277a08d7c4ff5fe0d4
@@ -12,11 +12,13 @@ jobs:
12
12
  - '3.0'
13
13
  - '3.1'
14
14
  - '3.2'
15
+ - '3.3'
16
+ - '3.4'
15
17
  - jruby
16
18
  - truffleruby
17
19
  name: Ruby ${{ matrix.ruby }}
18
20
  steps:
19
- - uses: actions/checkout@v2
21
+ - uses: actions/checkout@v4
20
22
  - name: Set up Ruby
21
23
  uses: ruby/setup-ruby@v1
22
24
  with:
@@ -30,3 +32,17 @@ jobs:
30
32
  run: bundle install --jobs 4 --retry 3
31
33
  - name: Run tests
32
34
  run: bundle exec rake test
35
+
36
+ # rubocop linting
37
+ rubocop:
38
+ runs-on: ubuntu-latest
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+ - name: Set up Ruby
42
+ uses: ruby/setup-ruby@v1
43
+ with:
44
+ ruby-version: 3.0
45
+ - name: Install dependencies
46
+ run: bundle install --jobs 4 --retry 3
47
+ - name: Run rubocop
48
+ run: bundle exec rubocop --parallel
data/.rubocop.yml ADDED
@@ -0,0 +1,11 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ SuggestExtensions: false
4
+ TargetRubyVersion: 3.1
5
+
6
+ inherit_gem:
7
+ rubocop-ronin: rubocop.yml
8
+
9
+ #
10
+ # ronin-FIXME specific exceptions
11
+ #
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-3.1
1
+ ruby-3.3
data/ChangeLog.md CHANGED
@@ -1,4 +1,8 @@
1
- ### 0.1.0 / 2023-XX-XX
1
+ ### 0.1.1 / 2025-02-14
2
+
3
+ * Use `require_relative` to improve load times.
4
+
5
+ ### 0.1.0 / 2023-02-01
2
6
 
3
7
  * Extracted and refactored from [ronin-web](https://github.com/ronin-rb/ronin-web/tree/v0.3.0.rc1).
4
8
  * Relicensed as LGPL-3.0.
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gemspec
@@ -23,4 +25,6 @@ group :development do
23
25
  gem 'dead_end', require: false
24
26
  gem 'sord', require: false, platform: :mri
25
27
  gem 'stackprof', require: false, platform: :mri
28
+ gem 'rubocop', require: false, platform: :mri
29
+ gem 'rubocop-ronin', require: false, platform: :mri
26
30
  end
data/README.md CHANGED
@@ -9,7 +9,6 @@
9
9
  * [Issues](https://github.com/ronin-rb/ronin-web-user_agents/issues)
10
10
  * [Documentation](https://ronin-rb.dev/docs/ronin-web-user_agents/frames)
11
11
  * [Discord](https://discord.gg/6WAb3PsVX9) |
12
- [Twitter](https://twitter.com/ronin_rb) |
13
12
  [Mastodon](https://infosec.exchange/@ronin_rb)
14
13
 
15
14
  ## Description
@@ -45,8 +44,7 @@ user_agent = Ronin::Web::UserAgents.chrome.random
45
44
  Build a specific Chrome `User-Agent` for Android 10.0 string:
46
45
 
47
46
  ```ruby
48
- Ronin::Web::UserAgents.chrome.build(chrome_version: '100.0.4758.81', os: :
49
- android, os_version: '10.0')
47
+ Ronin::Web::UserAgents.chrome.build(chrome_version: '100.0.4758.81', os: :android, os_version: '10.0')
50
48
  # => "Mozilla/5.0 (Linux; Android 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4758.81 Mobile Safari/537.36"
51
49
  ```
52
50
 
@@ -160,7 +158,7 @@ gem.add_dependency 'ronin-web-user_agents', '~> 0.1'
160
158
 
161
159
  ## License
162
160
 
163
- Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3@gmail.com)
161
+ Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3@gmail.com)
164
162
 
165
163
  ronin-web-user_agents is free software: you can redistribute it and/or modify
166
164
  it under the terms of the GNU Lesser General Public License as published
data/Rakefile CHANGED
@@ -1,11 +1,11 @@
1
- require 'rubygems'
1
+ # frozen_string_literal: true
2
2
 
3
3
  begin
4
4
  require 'bundler'
5
5
  rescue LoadError => e
6
6
  warn e.message
7
7
  warn "Run `gem install bundler` to install Bundler"
8
- exit -1
8
+ exit(-1)
9
9
  end
10
10
 
11
11
  begin
data/gemspec.yml CHANGED
@@ -2,7 +2,7 @@ name: ronin-web-user_agents
2
2
  summary: Generate random but realistic User-Agent strings
3
3
  description: Yet another User-Agent string generator library.
4
4
 
5
- license: LGPL-3.0
5
+ license: LGPL-3.0-or-later
6
6
  authors: Postmodern
7
7
  email: postmodern.mod3@gmail.com
8
8
  homepage: https://ronin-rb.dev/
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web-user_agents - Yet another User-Agent string generator library.
4
4
  #
5
- # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web-user_agents is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU Lesser General Public License as published
@@ -18,10 +18,10 @@
18
18
  # along with ronin-web-user_agents. If not, see <https://www.gnu.org/licenses/>
19
19
  #
20
20
 
21
- require 'ronin/web/user_agents/os/windows'
22
- require 'ronin/web/user_agents/os/mac_os'
23
- require 'ronin/web/user_agents/os/linux'
24
- require 'ronin/web/user_agents/os/android'
21
+ require_relative 'os/windows'
22
+ require_relative 'os/mac_os'
23
+ require_relative 'os/linux'
24
+ require_relative 'os/android'
25
25
 
26
26
  module Ronin
27
27
  module Web
@@ -30,7 +30,6 @@ module Ronin
30
30
  # Represents every possible Chrome `User-Agent` string.
31
31
  #
32
32
  module Chrome
33
-
34
33
  #
35
34
  # Builds a new Chrome `User-Agent` string.
36
35
  #
@@ -186,8 +185,6 @@ module Ronin
186
185
  )
187
186
  end
188
187
 
189
- private
190
-
191
188
  #
192
189
  # Builds a Chrome `User-Agent` string for Windows.
193
190
  #
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web-user_agents - Yet another User-Agent string generator library.
4
4
  #
5
- # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web-user_agents is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU Lesser General Public License as published
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web-user_agents - Yet another User-Agent string generator library.
4
4
  #
5
- # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web-user_agents is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU Lesser General Public License as published
@@ -18,11 +18,11 @@
18
18
  # along with ronin-web-user_agents. If not, see <https://www.gnu.org/licenses/>
19
19
  #
20
20
 
21
- require 'ronin/web/user_agents/os/windows'
22
- require 'ronin/web/user_agents/os/mac_os'
23
- require 'ronin/web/user_agents/os/linux'
24
- require 'ronin/web/user_agents/os/android'
25
- require 'ronin/web/user_agents/data_dir'
21
+ require_relative 'os/windows'
22
+ require_relative 'os/mac_os'
23
+ require_relative 'os/linux'
24
+ require_relative 'os/android'
25
+ require_relative 'data_dir'
26
26
 
27
27
  module Ronin
28
28
  module Web
@@ -33,7 +33,6 @@ module Ronin
33
33
  # @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
34
34
  #
35
35
  module Firefox
36
-
37
36
  # The default `Gecko/...` version.
38
37
  #
39
38
  # @note: On desktop, the `Gecko/...` version is hardcoded to `20100101`
@@ -244,8 +243,6 @@ module Ronin
244
243
  )
245
244
  end
246
245
 
247
- private
248
-
249
246
  #
250
247
  # Builds a Firefox `User-Agent` string for Windows.
251
248
  #
@@ -319,12 +316,12 @@ module Ronin
319
316
  #
320
317
  def self.build_linux(encryption: nil, linux_distro: nil, arch: nil, lang: nil, firefox_version: )
321
318
  encryption_flag = ENCRYPTION.fetch(encryption)
322
- linux_arch = OS::Linux::ARCHES[arch]
323
- linux_distro = OS::Linux::DISTROS.fetch(linux_distro,linux_distro)
319
+ linux_arch = OS::Linux::ARCHES[arch]
320
+ linux_distro = OS::Linux::DISTROS.fetch(linux_distro,linux_distro)
324
321
 
325
322
  extensions = String.new("X11")
326
323
  extensions << "; #{encryption_flag}" if encryption_flag
327
- extensions << "; #{linux_distro}" if linux_distro
324
+ extensions << "; #{linux_distro}" if linux_distro
328
325
  extensions << "; Linux"
329
326
  extensions << " #{linux_arch}" if linux_arch
330
327
  extensions << "; #{lang}" if lang
@@ -353,7 +350,6 @@ module Ronin
353
350
 
354
351
  return "Mozilla/5.0 (#{extensions}) Gecko/#{firefox_version} Firefox/#{firefox_version}"
355
352
  end
356
-
357
353
  end
358
354
  end
359
355
  end
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web-user_agents - Yet another User-Agent string generator library.
4
4
  #
5
- # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web-user_agents is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU Lesser General Public License as published
@@ -18,7 +18,7 @@
18
18
  # along with ronin-web-user_agents. If not, see <https://www.gnu.org/licenses/>
19
19
  #
20
20
 
21
- require 'ronin/web/user_agents/chrome'
21
+ require_relative 'chrome'
22
22
 
23
23
  module Ronin
24
24
  module Web
@@ -64,7 +64,6 @@ module Ronin
64
64
  # @api public
65
65
  #
66
66
  def self.build(crawler: :search, compatible: nil, chrome_version: nil)
67
-
68
67
  case crawler
69
68
  when :image
70
69
  "Googlebot-Image/1.0"
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web-user_agents - Yet another User-Agent string generator library.
4
4
  #
5
- # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web-user_agents is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU Lesser General Public License as published
@@ -18,7 +18,7 @@
18
18
  # along with ronin-web-user_agents. If not, see <https://www.gnu.org/licenses/>
19
19
  #
20
20
 
21
- require 'ronin/web/user_agents/data_dir'
21
+ require_relative '../data_dir'
22
22
 
23
23
  module Ronin
24
24
  module Web
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web-user_agents - Yet another User-Agent string generator library.
4
4
  #
5
- # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web-user_agents is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU Lesser General Public License as published
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web-user_agents - Yet another User-Agent string generator library.
4
4
  #
5
- # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web-user_agents is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU Lesser General Public License as published
@@ -97,8 +97,10 @@ module Ronin
97
97
  '11.55' => '11_55',
98
98
  '11.6.3' => '11_6_3',
99
99
  '12.2.0' => '12_2_0',
100
- '16.55' => '16_55',
100
+ '16.55' => '16_55'
101
101
  }
102
+
103
+ # Set a default `VERSIONS_UNDERSCORED` rule of `X.Y` -> `X_Y`.
102
104
  VERSIONS_UNDERSCORED.default_proc = ->(hash,version) {
103
105
  version.tr('.','_')
104
106
  }
@@ -108,7 +110,6 @@ module Ronin
108
110
  intel: 'Intel',
109
111
  x86_64: 'Intel'
110
112
  }
111
-
112
113
  end
113
114
  end
114
115
  end
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web-user_agents - Yet another User-Agent string generator library.
4
4
  #
5
- # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web-user_agents is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU Lesser General Public License as published
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web-user_agents - Yet another User-Agent string generator library.
4
4
  #
5
- # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web-user_agents is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU Lesser General Public License as published
@@ -22,7 +22,7 @@ module Ronin
22
22
  module Web
23
23
  module UserAgents
24
24
  # ronin-web-user_agents version
25
- VERSION = '0.1.0'
25
+ VERSION = '0.1.1'
26
26
  end
27
27
  end
28
28
  end
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web-user_agents - Yet another User-Agent string generator library.
4
4
  #
5
- # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web-user_agents is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU Lesser General Public License as published
@@ -19,13 +19,13 @@
19
19
  #
20
20
 
21
21
  # browsers
22
- require 'ronin/web/user_agents/chrome'
23
- require 'ronin/web/user_agents/firefox'
22
+ require_relative 'user_agents/chrome'
23
+ require_relative 'user_agents/firefox'
24
24
 
25
25
  # crawlers
26
- require 'ronin/web/user_agents/google_bot'
26
+ require_relative 'user_agents/google_bot'
27
27
 
28
- require 'ronin/web/user_agents/version'
28
+ require_relative 'user_agents/version'
29
29
 
30
30
  module Ronin
31
31
  module Web
@@ -55,7 +55,6 @@ module Ronin
55
55
  # # => "GoogleBot/2.1 (+http://www.google.com/bot.html)"
56
56
  #
57
57
  module UserAgents
58
-
59
58
  #
60
59
  # Google Chrome `User-Agent` strings.
61
60
  #
@@ -91,7 +90,7 @@ module Ronin
91
90
  #
92
91
  # @example
93
92
  # user_agent = Ronin::Web::UserAgents.firefox.random
94
- # # => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16.0; rv:52.55.07) Gecko/20100101 Firefox/52.55.07"
93
+ # # => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16.0; rv:52.55.07) Gecko/20100101 Firefox/52.55.07"
95
94
  #
96
95
  # @api public
97
96
  #
@@ -129,13 +128,13 @@ module Ronin
129
128
  # Ronin::Web::UserAgents.random
130
129
  # # => "Mozilla/5.0 (X11; Fedora; Linux i686; en-IE; rv:123.4) Gecko/20100101 Firefox/123.4"
131
130
  #
132
- def self.random(&block)
131
+ def self.random
133
132
  method = [
134
133
  :chrome,
135
- :firefox,
134
+ :firefox
136
135
  ].sample
137
136
 
138
- return send(method).random(&block)
137
+ return send(method).random
139
138
  end
140
139
  end
141
140
  end
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'yaml'
4
4
 
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
22
22
  gem.homepage = gemspec['homepage']
23
23
  gem.metadata = gemspec['metadata'] if gemspec['metadata']
24
24
 
25
- glob = lambda { |patterns| gem.files & Dir[*patterns] }
25
+ glob = ->(patterns) { gem.files & Dir[*patterns] }
26
26
 
27
27
  gem.files = `git ls-files`.split($/)
28
28
  gem.files = glob[gemspec['files']] if gemspec['files']
@@ -46,7 +46,7 @@ Gem::Specification.new do |gem|
46
46
  gem.required_rubygems_version = gemspec['required_rubygems_version']
47
47
  gem.post_install_message = gemspec['post_install_message']
48
48
 
49
- split = lambda { |string| string.split(/,\s*/) }
49
+ split = ->(string) { string.split(/,\s*/) }
50
50
 
51
51
  if gemspec['dependencies']
52
52
  gemspec['dependencies'].each do |name,versions|
@@ -1,7 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'set'
4
5
 
6
+ #
7
+ # A `User-Agent` strings txt file parser.
8
+ #
5
9
  class UserAgentsFile
6
10
 
7
11
  attr_reader :path
@@ -27,7 +31,7 @@ class UserAgentsFile
27
31
 
28
32
  EXTENSION_SEPARATOR = /\s*;\s+/
29
33
 
30
- REGEXP = /(#{PRODUCT_REGEXP})\/(#{PRODUCT_VERSION_REGEXP})(?:\s+\((#{EXTENSIONS_REGEXP})\))?/
34
+ REGEXP = %r{(#{PRODUCT_REGEXP})/(#{PRODUCT_VERSION_REGEXP})(?:\s+\((#{EXTENSIONS_REGEXP})\))?}
31
35
 
32
36
  VERSION_REGEXP = /\d+(?:\.\d+)*/
33
37
 
@@ -55,7 +59,7 @@ class UserAgentsFile
55
59
  product_versions = Hash.new { |hash,key| hash[key] = 0 }
56
60
 
57
61
  parse do |matches|
58
- _,product_version,_ = *matches.find do |(product,_,_)|
62
+ _, product_version, = *matches.find do |(product,_,_)|
59
63
  product == search_product
60
64
  end
61
65
 
@@ -74,8 +78,6 @@ class UserAgentsFile
74
78
  _,_,extensions = matches.find { |(product,_,_)| product == target_product }
75
79
 
76
80
  if extensions
77
- tree_node = product_extensions
78
-
79
81
  product_extensions[extensions.split(EXTENSION_SEPARATOR)] += 1
80
82
  end
81
83
  end
@@ -115,7 +117,7 @@ class UserAgentsFile
115
117
  each_product('Mozilla') do |product,product_version,extensions|
116
118
  if extensions
117
119
  if (match = extensions.match(/Windows NT (#{VERSION_REGEXP});/))
118
- windows_versions << match[1]
120
+ windows_versions << match[1]
119
121
  end
120
122
  end
121
123
  end
@@ -129,7 +131,7 @@ class UserAgentsFile
129
131
  each_product('Mozilla') do |product,product_version,extensions|
130
132
  if extensions
131
133
  if (match = extensions.match(/; Android (#{VERSION_REGEXP});/))
132
- android_versions << match[1]
134
+ android_versions << match[1]
133
135
  end
134
136
  end
135
137
  end
@@ -199,7 +201,7 @@ if $0 == __FILE__
199
201
  opts.banner = './scripts/index_user_agents [options] FILE'
200
202
 
201
203
  opts.on('--products', 'List all product names') do
202
- @method = :index_product_combinations
204
+ @method = :index_product_combinations
203
205
  @print_mode = :count
204
206
  end
205
207
 
@@ -249,21 +251,21 @@ if $0 == __FILE__
249
251
  args = begin
250
252
  optparser.parse(ARGV)
251
253
  rescue OptionParser::ParseError => error
252
- $stderr.puts "./scripts/index_user_agents: #{error.message}"
253
- exit -1
254
+ warn "./scripts/index_user_agents: #{error.message}"
255
+ exit(-1)
254
256
  end
255
257
 
256
258
  unless (file_path = args[0])
257
- $stderr.puts "./scripts/index_user_agents: must specify a User-Agents FILE"
258
- exit -1
259
+ warn "./scripts/index_user_agents: must specify a User-Agents FILE"
260
+ exit(-1)
259
261
  end
260
262
 
261
263
  user_agents = UserAgentsFile.new(file_path)
262
264
 
263
265
  unless @method
264
- $stderr.puts "./scripts/index_user_agents: must specify atleast one option"
265
- $stderr.puts optparser
266
- exit -1
266
+ warn "./scripts/index_user_agents: must specify atleast one option"
267
+ warn optparser
268
+ exit(-1)
267
269
  end
268
270
 
269
271
  results = user_agents.send(@method,*@method_args)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronin-web-user_agents
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Postmodern
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-01 00:00:00.000000000 Z
11
+ date: 2025-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -37,6 +37,7 @@ files:
37
37
  - ".github/workflows/ruby.yml"
38
38
  - ".gitignore"
39
39
  - ".rspec"
40
+ - ".rubocop.yml"
40
41
  - ".ruby-version"
41
42
  - ".yardopts"
42
43
  - COPYING.txt
@@ -64,7 +65,7 @@ files:
64
65
  - scripts/index_user_agents
65
66
  homepage: https://ronin-rb.dev/
66
67
  licenses:
67
- - LGPL-3.0
68
+ - LGPL-3.0-or-later
68
69
  metadata:
69
70
  documentation_uri: https://ronin-rb.dev/docs/ronin-web-user_agents
70
71
  source_code_uri: https://github.com/ronin-rb/ronin-web-user_agents
@@ -86,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
87
  - !ruby/object:Gem::Version
87
88
  version: '0'
88
89
  requirements: []
89
- rubygems_version: 3.3.26
90
+ rubygems_version: 3.5.22
90
91
  signing_key:
91
92
  specification_version: 4
92
93
  summary: Generate random but realistic User-Agent strings