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/bash | |
# Iterate through local user accounts | |
for LOCAL_USER in $(dscl . list /Users UniqueID | awk '$2 >= 500 {print $1}'); do | |
LOCAL_HOME=$(dscacheutil -q user -a name "$LOCAL_USER" | awk -F": " '/dir/ { print $2 }') | |
echo "Local User: $LOCAL_USER" | |
# Dump iCloud Account | |
AA_PLIST="$LOCAL_HOME/Library/Preferences/MobileMeAccounts.plist" | |
if [[ -r $AA_PLIST ]]; then |
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
<?php | |
$serverIP = '192.168.0.1'; | |
$serverPort = 5000; | |
if ($_REQUEST['cmd']) { | |
$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); | |
if (!$socket) { | |
error_log("Could not open socket"); | |
} else { | |
socket_sendto($socket, $_REQUEST['cmd'], strlen($_REQUEST['cmd']), 0, $serverIP, $serverPort); | |
socket_close($socket); |