- Open the Terminal Application
- Type in sudo -iand type in your Mac Administrator account password.sudogives you root level or administrator level privileges.
dsconfigad -show
| #!/bin/bash | |
| if (( $(id -u) )) ; then | |
| echo "This script needs to run as root" | |
| exit 1 | |
| fi | |
| if [[ -z "$1" ]] ; then | |
| echo "Usage: $(basename $0) [username] [realname (optional)]" | |
| exit 1 | 
| #!/bin/sh | |
| TempDir="/tmp/pkg" | |
| AppPath=$1 | |
| TargetPath=$2 | |
| PackageIdentifier=$3 | |
| Certificate=$4 | |
| if [ $# -ne 3 ] | |
| then | 
| #pragma mark - NSURLConnection methods | |
| /* | |
| - (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection *)connection { | |
| return NO; | |
| } | |
| */ | |
| - (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace { | |
| //NSLog(@"can auth"); | 
sudo -i and type in your Mac Administrator account password. sudo gives you root level or administrator level privileges.dsconfigad -show
| #include <mach/port.h> /* mach_port_t */ | |
| #include <mach/mach.h> /* mach_port_allocate(), mach_task_self(), mach_port_insert_member(), MACH_PORT_RIGHT_PORT_SET */ | |
| #include <sys/event.h> /* kqueue(), kevent64(), struct kevent64_s, EVFILT_MACHPORT, EV_SET64, EV_ADD */ | |
| #include <sys/time.h> /* struct timespec */ | |
| //#include <dispatch/private.h> | |
| extern mach_port_t _dispatch_get_main_queue_port_4CF(void); | |
| extern void _dispatch_main_queue_callback_4CF(void); | |
| #include <stdio.h> | 
| import SwiftUI | |
| fileprivate extension DateFormatter { | |
| static var month: DateFormatter { | |
| let formatter = DateFormatter() | |
| formatter.dateFormat = "MMMM" | |
| return formatter | |
| } | |
| static var monthAndYear: DateFormatter { | 
| #!/bin/python | |
| import subprocess | |
| destination_ips = ['192.168.1.2', '192.168.1.3', '192.168.1.4', '192.168.1.5'] | |
| lb_ip = '192.168.1.1' | |
| tcp_ports = {'443': '443', '6080': '8080', '53':'8053'} | |
| udp_ports = {'53':'8054'} |