aspisec 0.0.1 → 0.0.2

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: 0774d430a48a87fa3e42c12c3128539d47ad0fd801e0f72d60f6e0bed0d748c7
4
- data.tar.gz: 00323257ec5e60891045f4be245854334cb66848ef2232ceb894aefe35cb717c
3
+ metadata.gz: 766e59f32c8d0661ea37cc677183ee3e0bc3e844fb8acfd12d3a2420a57b9d13
4
+ data.tar.gz: 05c24dfb5599dc2c240bc361566deb21adf150827e5f85a75107899a9945a2ca
5
5
  SHA512:
6
- metadata.gz: 74d2860157892606ce4113612e489cccece2eeaa138e825cf4be93f8c16f3182e18db4276f2bc6ce420e215c9d36b46bb3cbf9dc86f0ca557c2145795658707e
7
- data.tar.gz: 64eb61bb34d63920da20059bb040da0890959726bdc407038191036d6d901a224538e7097ccd30e82aae8a33ec262dc26f4536a25699c9a452587e084fc6eaba
6
+ metadata.gz: 4b62e8cba7fcf061dec4211525802797bd1c9ae534b7c6a4410363b50c8c8aa8cea589ca450e2b7b7fda16590d73454c1fd82b1c26d44978503ccfe01b4ca0e6
7
+ data.tar.gz: 005a8aa1c8e48186923f1bb842ee5a521f73c2c902df08663c22b9f55a8e548132ef390d415fd9eaa3de87371a418d8923e207a3ab59a8ce8f6f0f124be7023c
@@ -3,7 +3,7 @@
3
3
  # stdlib
4
4
  require 'yaml'
5
5
  # third-party
6
- require 'xdg'
6
+ require 'sxdg'
7
7
  require 'tty-logger'
8
8
 
9
9
  module Aspisec
@@ -254,15 +254,7 @@ module Aspisec
254
254
  # Get the Aspisec configuration file path
255
255
  # @return [String] absolute file path
256
256
  def config_filepath
257
- xdg = XDG.new
258
- # Logging this floods debug info and is not meaningful
259
- # path = xdg.config_home + 'aspisec' + CONFIG_FILENAME
260
- # @logger.debug("The default configuration file path should be: #{path}")
261
- # path
262
- # https://github.com/rubocop/rubocop/issues/11757
263
- # rubocop:disable Style/StringConcatenation
264
- xdg.config_home + 'aspisec' + CONFIG_FILENAME # /home/noraj/.config/aspisec/aspisec.config.yaml
265
- # rubocop:enable Style/StringConcatenation
257
+ File.join(SXDG::XDG_CONFIG_HOME, 'aspisec', CONFIG_FILENAME) # /home/noraj/.config/aspisec/aspisec.config.yaml
266
258
  end
267
259
 
268
260
  # Check if the Aspisec configuration file exists or not
@@ -283,7 +275,7 @@ module Aspisec
283
275
 
284
276
  # Evaluate XDG variables and $HOME in file path
285
277
  # @param path [String] path with variables
286
- # @return the absolute version of the evaluated path
278
+ # @return [String] the absolute version of the evaluated path
287
279
  # @note Arguments other than Strings are returned untouched, useful to iterate over configuration values
288
280
  # @example
289
281
  # conf.expand_path_variables('$XDG_DATA_HOME/sqlmap')
@@ -291,12 +283,11 @@ module Aspisec
291
283
  def self.expand_path_variables(path)
292
284
  return path unless path.is_a?(String) # not a path, let untouched
293
285
 
294
- xdg = XDG.new
295
286
  case path
296
287
  when /\$XDG_CONFIG_HOME/
297
- path.sub!('$XDG_CONFIG_HOME', xdg.config_home.to_s)
288
+ path.sub!('$XDG_CONFIG_HOME', SXDG::XDG_CONFIG_HOME)
298
289
  when /\$XDG_DATA_HOME/
299
- path.sub!('$XDG_DATA_HOME', xdg.data_home.to_s)
290
+ path.sub!('$XDG_DATA_HOME', SXDG::XDG_DATA_HOME)
300
291
  when /\$HOME/
301
292
  path.sub!('$HOME', Dir.home)
302
293
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Aspisec
4
4
  # Version of aspisec library and app
5
- VERSION = '0.0.1'
5
+ VERSION = '0.0.2'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspisec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre ZANNI
8
8
  autorequire:
9
9
  bindir: bin-ruby
10
10
  cert_chain: []
11
- date: 2024-04-08 00:00:00.000000000 Z
11
+ date: 2024-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -59,47 +59,47 @@ dependencies:
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0.8'
61
61
  - !ruby/object:Gem::Dependency
62
- name: tty-logger
62
+ name: sxdg
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '0.6'
67
+ version: '1.0'
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '0.6'
74
+ version: '1.0'
75
75
  - !ruby/object:Gem::Dependency
76
- name: tty-prompt
76
+ name: tty-logger
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.23'
81
+ version: '0.6'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '0.23'
88
+ version: '0.6'
89
89
  - !ruby/object:Gem::Dependency
90
- name: xdg
90
+ name: tty-prompt
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '8.0'
95
+ version: '0.23'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '8.0'
102
+ version: '0.23'
103
103
  description: Vacuuming out the remnants of offensive tools. AspiSec is responsible
104
104
  for removing the traces and confidential information left by offensive security
105
105
  tools on an auditor's computer in various cache and log files.