macos-artifacts 0.6.0 → 0.6.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bef9e063059ed8e1aa054b732e4fa670b438794331fd84c136088ddb3744ed79
4
- data.tar.gz: 064d53b36446e2101a2d59479240d10c462ab22840627f6818ef9832d02d0948
3
+ metadata.gz: 7feb1e41e9f2850f24e4d73a0c4ba4f2d82de33ea6df5bbeb2fd808b5d674239
4
+ data.tar.gz: 805ed33d8952f4c1194631ff05a204aef5b2c86db5e99199e72dd2e26d91ed3d
5
5
  SHA512:
6
- metadata.gz: 3187009f4306d5ad8c41e496e0ce76c76a0e74741a66fb8e1cd9910a98b9c34fd7160a82f6d24e019d9d3d0a28844cc6e76af0a3c206ba65b57447a7d89130c9
7
- data.tar.gz: 89d75dfe2fae0b58649ccc28fd27088ee3b37d6dd5f531c38fa568f95872730347dc41dad650c61c0909879effc118930f5b762d4bddf9ef2d1462e24a66df93
6
+ metadata.gz: dea8017fa8709d8da75402bd76ee5cf1161192d23703c06f4c52f0eca8d7e73906cca66e3322dea7f423f7347c4e4d682da212ccf7777902f5637fd907bb2a1f
7
+ data.tar.gz: 8e44c1aaad14972586b11d4ea386b28fd09ca60771bd525ea817eaebb5302770e601b6593f7448937daa3389aa4bf6233c3092e9dd969c88d2e7b36d73cc9f14
data/CHANGELOG.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # Change Log
2
2
 
3
3
 
4
+ ---
5
+ ## version 0.6.2
6
+ - Fixed: workaround for listing files in user directory where listing items in the .Trash resulted in an error
7
+
8
+ ---
9
+ ## version 0.6.1
10
+ - Fixed: checking plist to make sure they are valid before reading them with CFPropertyList
11
+
4
12
  ---
5
13
  ## version 0.6.0
6
14
  - Add: `help` to output options. User `Macos::Artifacts::Help::options`
data/README.md CHANGED
@@ -15,12 +15,6 @@ Output is simple text making it able to be scraped up by an MDM or EDR solution
15
15
 
16
16
  `require 'macos/artifacts'`
17
17
 
18
-
19
-
20
- For options:
21
-
22
- Macos::Artifacts::Help::options
23
-
24
18
  ```ruby
25
19
  Macos::Artifacts::computerName
26
20
  Macos::Artifacts::serial
@@ -63,7 +57,7 @@ Macos::Artifacts::State::processMemory
63
57
  ```yaml
64
58
  #Example output of all Macos::Artifacts commands
65
59
  Host Name: nics-mac
66
- Serial: X57CLJT7CV
60
+ Serial: X57CLJ67CV
67
61
  Version: 13.5.1
68
62
  Build: 22F82
69
63
  Kernel: 22.5.0
@@ -71,8 +65,8 @@ Model Name: MacBook Pro
71
65
  Model ID: MacBookPro18,3
72
66
  Chip: Apple M1 Pro
73
67
  Architecture: arm64
74
- Memory: 32 GB
75
- Hardware UID: 6AE03961-13A4-5418-BA2A-87FF9075FA91
68
+ Memory: 16 GB
69
+ Hardware UID: 6AE03561-13A4-5218-BA2A-87FF9075FA91
76
70
  Public IP: 172.76.37.139
77
71
  Private IP: 192.68.68.68
78
72
  SIP Status: enabled
@@ -88,3 +82,11 @@ Software Updates:
88
82
  Install Critical Updates: 1
89
83
  ```
90
84
 
85
+
86
+
87
+ For all options run the below and check the output.
88
+
89
+ ```ruby
90
+ Macos::Artifacts::Help::options
91
+ ```
92
+
@@ -28,11 +28,14 @@ module Macos
28
28
  puts "System LaunchDaemons:"
29
29
  $launchAgentDir.each do | filename |
30
30
  if filename != "." && filename != ".."
31
- puts " #{$systemLaunchAgentsPath}/#{filename}"
32
- plist = CFPropertyList::List.new(:file => "#{$systemLaunchAgentsPath}/#{filename}")
33
- data = CFPropertyList.native_types(plist.value)
34
- data.each do |k,v|
35
- puts " #{k}: #{v}"
31
+ plistLint = `plutil -lint #{$systemLaunchAgentsPath}/#{filename} | cut -d ":" -f2 | xargs`.strip
32
+ if plistLint == "OK"
33
+ puts " #{$systemLaunchAgentsPath}/#{filename}"
34
+ plist = CFPropertyList::List.new(:file => "#{$systemLaunchAgentsPath}/#{filename}")
35
+ data = CFPropertyList.native_types(plist.value)
36
+ data.each do |k,v|
37
+ puts " #{k}: #{v}"
38
+ end
36
39
  end
37
40
  end
38
41
  end
@@ -72,7 +75,7 @@ module Macos
72
75
  $userHomeFolder = Dir.entries("/Users/#{$currentUser}")
73
76
  fileArray = []
74
77
  $userHomeFolder.each do | filename |
75
- if filename != "." && filename != ".."
78
+ if filename != "." && filename != ".." && filename != ".Trash" && filename != ".cups"
76
79
  filePath = "/Users/#{$currentUser}/#{filename}"
77
80
  fileArray.push("#{filePath}")
78
81
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Macos
4
4
  module Artifacts
5
- VERSION = "0.6.0"
5
+ VERSION = "0.6.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macos-artifacts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - nic scott
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-06 00:00:00.000000000 Z
11
+ date: 2023-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -55,7 +55,6 @@ files:
55
55
  - lib/macos/artifacts/help.rb
56
56
  - lib/macos/artifacts/state.rb
57
57
  - lib/macos/artifacts/version.rb
58
- - macos-artifacts.gemspec
59
58
  - sig/macos/artifacts.rbs
60
59
  homepage: https://github.com/nlscott/macos-artifacts
61
60
  licenses:
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/macos/artifacts/version"
4
- require_relative "lib/macos/artifacts/state"
5
- require_relative "lib/macos/artifacts/files"
6
- require_relative "lib/macos/artifacts/apps"
7
- require_relative "lib/macos/artifacts/help"
8
-
9
- Gem::Specification.new do |spec|
10
- spec.name = "macos-artifacts"
11
- spec.version = Macos::Artifacts::VERSION
12
- spec.authors = ["nic scott"]
13
- spec.email = ["nls.inbox@gmail.com"]
14
- spec.summary = %q{A collection of macOS artifacts}
15
- spec.homepage = "https://github.com/nlscott/macos-artifacts"
16
- spec.license = "MIT"
17
- spec.required_ruby_version = ">= 2.6.0"
18
-
19
-
20
- # Specify which files should be added to the gem when it is released.
21
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
- spec.files = Dir.chdir(__dir__) do
23
- `git ls-files -z`.split("\x0").reject do |f|
24
- (File.expand_path(f) == __FILE__) ||
25
- f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
26
- end
27
- end
28
- spec.bindir = "exe"
29
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
- spec.require_paths = ["lib"]
31
-
32
- # Uncomment to register a new dependency of your gem
33
- spec.add_development_dependency "bundler", ">= 2.2.33"
34
- spec.add_development_dependency "CFPropertyList", ">= 3.0.6"
35
- end