This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'open-uri' | |
| def get_warranty_end(serial) | |
| open('https://selfsolve.apple.com/warrantyChecker.do?sn=' + serial.upcase + '&country=USA', :proxy => "http://proxy.company.com:8080") {|item| | |
| item.each_line {|item|} | |
| warranty_array = item.strip.split('"') | |
| purchase = warranty_array.index('PURCHASE_DATE')+2 | |
| File.open("/etc/purchase_date", "w") {|f| f.puts warranty_array[purchase]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Apr 14 11:12:58 buckethead xpchelper[2449]: could not open dyld map file: (null) | |
| Apr 14 11:12:58 buckethead com.apple.launchd[1]: System: Could not find requested session: Aqua | |
| Apr 14 11:13:00 buckethead MRT[2468]: MRT finished scan. Malware files were not found. | |
| Apr 14 11:13:00 buckethead MRT[2468]: FAILURE: Job com.apple.mrt.uiagent is not loaded in launchd. | |
| Apr 14 11:13:00 buckethead MRT[2468]: Error: SMJobRemove: The operation couldn’t be completed. (kSMErrorDomainLaunchd error 6 - The specified job could not be found.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /tmp/ | |
| Error: Couldn't move %@ to %@: %s | |
| com.apple.ServiceManagement.daemons.modify | |
| Error: AuthorizationCreate for kSMRightModifySystemDaemons failed with %d | |
| Error: SMJobRemove: %@ | |
| Error: SMJobSetEnabled: %@ | |
| Exiting because caught signal %d | |
| Error: Couldn't connect to agent | |
| com.apple.mrt | |
| com.apple.mrt.uiagent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # only works on SL | |
| /bin/launchctl unload -S Aqua /System/Library/LaunchAgents/com.apple.mrt.uiagent.plist | |
| /bin/launchctl load -w -S Aqua /System/Library/LaunchAgents/com.apple.mrt.uiagent.plist | |
| # only works on Lion | |
| /bin/launchctl asuser `id -u "$USER"` /bin/launchctl unload -S Aqua /System/Library/LaunchAgents/com.apple.mrt.uiagent.plist | |
| /bin/launchctl asuser `id -u "$USER"` /bin/launchctl load -w -S Aqua /System/Library/LaunchAgents/com.apple.mrt.uiagent.plist | |
| /bin/launchctl unload /System/Library/LaunchDaemons/com.apple.mrt.plist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>MachServices</key> | |
| <dict> | |
| <key>com.apple.mrt</key> | |
| <true/> | |
| </dict> | |
| <key>KeepAlive</key> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>RunAtLoad</key> | |
| <true/> | |
| <key>LimitLoadToSessionType</key> | |
| <string>Aqua</string> | |
| <key>Label</key> | |
| <string>com.apple.mrt.uiagent</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| System | |
| System/Library | |
| System/Library/CoreServices | |
| System/Library/CoreServices/MRTAgent.app | |
| System/Library/CoreServices/MRTAgent.app/Contents | |
| System/Library/CoreServices/MRTAgent.app/Contents/CodeResources | |
| System/Library/CoreServices/MRTAgent.app/Contents/Info.plist | |
| System/Library/CoreServices/MRTAgent.app/Contents/MacOS | |
| System/Library/CoreServices/MRTAgent.app/Contents/MacOS/MRTAgent | |
| System/Library/CoreServices/MRTAgent.app/Contents/PkgInfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| def version_compare(version_a, version_b) | |
| vre = /[-.]|\d+|[^-.\d]+/ | |
| ax = version_a.scan(vre) | |
| bx = version_b.scan(vre) | |
| while (ax.length>0 && bx.length>0) | |
| a = ax.shift | |
| b = bx.shift |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # from puppet's package util | |
| def versioncmp(version_a, version_b) | |
| vre = /[-.]|\d+|[^-.\d]+/ | |
| ax = version_a.scan(vre) | |
| bx = version_b.scan(vre) | |
| while (ax.length>0 && bx.length>0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby -wKU | |
| # 110224, revised with loop to accept an array | |
| # 110425, swapped order of variable definition in get_version | |
| # 120405, format output for use as casper extension attribute | |
| def get_version(apps) | |
| apps.each do |app| | |
| if app.include?("/Applications/") | |
| short = app.sub(/\/Applications\//, '') |