This file contains 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
## Download the get pip script | |
$ curl -o get_pip.py https://bootstrap.pypa.io/get-pip.py | |
## Switch to root user | |
$ sudo su | |
## Run the script as root | |
# ./get_pip.py | |
## Switch back to regular user and install modules with pip |
This file contains 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/bash | |
################################################################################# | |
# # | |
# Author: Calum Hunter # | |
# Date: 22-08-2016 # | |
# Version: 1.0 # | |
# Purpose: Install check script for the AD Bind Package. # | |
# This script checks to see if we are bound to AD and if our binding # | |
# is working. If we are not bound, or our binding is broken. # |
This file contains 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/expect | |
expect "connecting" | |
send "yes\r" | |
exit 0 |
This file contains 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/python | |
''' | |
Author: Calum Hunter | |
Date: April 16 2018 | |
Version: 1.0 | |
This script will get the current UserShell | |
value set in the users record in /Local/Default |
This file contains 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
# Option 1 | |
# Get the data from the ManagedClient section of the System Profiler | |
system_profiler SPManagedClientDataType | |
# Additional - you can also provide the -xml flag to get the output in xml | |
system_profiler -xml SPManagedClientDataType | |
# Option 2 | |
# use mcxquery | |
mcxquery |
This file contains 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>Label</key> | |
<string>com.org.logstash</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/logstash-5.2.1/bin/logstash</string> | |
<string>-f</string> |
This file contains 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
input { | |
jdbc { | |
jdbc_driver_library => "/usr/local/logstash-5.2.1/plugins/sqlite-jdbc-3.16.1.jar" | |
jdbc_driver_class => "org.sqlite.jdbc" | |
jdbc_connection_string => "jdbc:sqlite:/Library/Server/Caching/Logs/Metrics.sqlite" | |
jdbc_user => "" | |
schedule => "* * * * *" | |
statement => 'SELECT * FROM statsData WHERE metricname LIKE "bytes.%.toclients" OR metricname LIKE "bytes.%.topeers"' | |
tracking_column => "entryindex" | |
use_column_value => true |
This file contains 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/bash | |
# | |
# Author: Calum Hunter | |
# Date: 28/11/2016 | |
# Version: 1.0 | |
# Purpose: To generate a Mac UID from the objectGUID attribute | |
# (GeneratedUID) in AD. | |
# This uses the same method that the Apple | |
# AD Plugin uses |
This file contains 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/bash | |
# | |
# Author: Calum Hunter | |
# Date: 28/11/2016 | |
# Version: 1.0 | |
# Purpose: To generate a Mac UID from the objectGUID attribute | |
# (GeneratedUID) in AD. | |
# This uses the same method that the Apple | |
# AD Plugin uses |