macos-artifacts 0.6.0 → 0.6.1

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: 67cf55113fa48b9f79fb0e91c47a8c1a595575868fc3e1e071a27e06708b7859
4
+ data.tar.gz: 2da13eebb0d0287828a7da35e7222375a5de747f38a2c40f7235137d80a68760
5
5
  SHA512:
6
- metadata.gz: 3187009f4306d5ad8c41e496e0ce76c76a0e74741a66fb8e1cd9910a98b9c34fd7160a82f6d24e019d9d3d0a28844cc6e76af0a3c206ba65b57447a7d89130c9
7
- data.tar.gz: 89d75dfe2fae0b58649ccc28fd27088ee3b37d6dd5f531c38fa568f95872730347dc41dad650c61c0909879effc118930f5b762d4bddf9ef2d1462e24a66df93
6
+ metadata.gz: fbec3bb3b6e463166e2572d353ed9f971af19e1814b1962551b067cf346cf6808fc49a1d806e811782a28bfa24e6c2e2501e1277e7be7dac9a69bea3ce696444
7
+ data.tar.gz: 35089efa9fd7e06beeb05f077729ab46cfdeab82df2bd64f32e76f1c394202d530e7892ee19cf6a0a3ec4a40b04d308a6679a5a4ee3327e91f4d892e7e666c50
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Change Log
2
2
 
3
3
 
4
+ ---
5
+ ## version 0.6.1
6
+ - Fixed: checking plist to make sure they are valid before reading them with CFPropertyList
7
+
4
8
  ---
5
9
  ## version 0.6.0
6
10
  - 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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Macos
4
4
  module Artifacts
5
- VERSION = "0.6.0"
5
+ VERSION = "0.6.1"
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.1
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-12 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