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 | |
#very dangerous as it unrecoverably removes all profilemanager data | |
sudo /Applications/Server.app/Contents/ServerRoot/usr/share/devicemgr/backend/wipeDB.sh | |
sudo serveradmin stop devicemgr | |
sudo serverctl disable service=com.apple.DeviceManagement.postgres | |
sudo rm -R /Library/Server/ProfileManager/Config/ServiceData/Data/backup | |
sudo rm -R /Library/Server/ProfileManager/Config/ServiceData/Data/PostgreSQL | |
sudo /Applications/Server.app/Contents/ServerRoot/System/Library/ServerSetup/CommonExtras/80-devicemgrcommon.sh |
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
if [[ $USER != "root" ]]; then | |
echo "This script must be run as root" | |
else | |
echo "You are root" | |
exit 1 | |
fi |
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
Import-Module -Name ActiveDirectory | |
Set-ADForestMode –Identity “krypted.com” –ForestMode Windows2008Forest | |
Set-ADDomainMode –Identity “krypted.com” –DomainMode Windows2008Domain | |
Get-ADForest | Format-Table Name , ForestMode |
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
class Logging(object): | |
__name__ = 'logger.info(1)' | |
plist = '/System/Library/Preferences/Logging/Subsystems/' | |
def __init__(__name__, plist, *args, **kwargs): | |
super(getLogger/, self).__init__() | |
logger.info('Input parameters:\n' | |
'accessibility: "{com.apple.Accessibility.plist}"\n' |
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 | |
#Get our list of DNS servers | |
servers=`networksetup -getdnsservers Wi-Fi` | |
#Start with this set to False - we'll change it to true if needed | |
foundInfected=false | |
#For each item in $servers | |
for ser in $servers; do | |
#If the current IP matches this IP | |
if [ $ser == '82.163.143.135' ]; then |
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
import requests | |
import json | |
import sys | |
print("Script Starting...") | |
print("") | |
access_token_url = 'https://login.salesforce.com/services/oauth2/token' | |
data = { |
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
import requests | |
import json | |
import sys | |
print("Connecting to Salesforce") | |
print("") | |
access_token_url = 'https://login.salesforce.com/services/oauth2/token' | |
data = { |
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
let request = require('request'); | |
console.log("Connecting to Salesforce"); | |
console.log(""); | |
let access_token_url = 'https://login.salesforce.com/services/oauth2/token'; | |
let username = 'enter user name here'; | |
let password = 'enter password here'; | |
let client_id = 'enter client id here'; | |
let client_secret = 'enter client secret here'; |
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
import requests | |
from xml.etree import ElementTree as ET | |
import sys | |
print("Script Starting...") | |
print("") | |
# Set the following constants specific to Salesforce Environment | |
username = sys.argv[1] | |
password = sys.argv[2] |
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
tell application "Calendar" | |
set allEvents to events of calendar "SOURCE" | |
repeat with theEvent in allEvents | |
copy theEvent to end of events of calendar "TARGET" | |
delete theEvent | |
end repeat | |
end tell |
OlderNewer