Skip to main content

Posts

Showing posts with the label mac

USB to Serial Mac OS X for console connections

Download the 32bit driver here or the 64bit driver here  to be used with the PL2303 adapter that can be purchased cheap online. To initiate an console connection find your device: bash-3.2$ ls -la /dev/tty.* crw-rw-rw- 1 root wheel 18, 2 26 Oct 08:32 /dev/tty.Bluetooth-Modem crw-rw-rw- 1 root wheel 18, 0 26 Oct 08:32 /dev/tty.Bluetooth-PDA-Sync crw-rw-rw- 1 root wheel 18, 6 26 Oct 14:40 /dev/tty.PL2303-000013FA Execute: screen /dev/tty.PL2303-000013FA 9600 If it doesn't work for you uninstall it this way; kextunload /System/Library/Extensions/osx-pl2303.kext/ sudo rm -r /System/Library/Extensions/osx-pl2303.kext/ sudo rm -r /Library/Receipts/osx-pl2303.pkg

arp

Auditing my asset list, I like to ensure assets have mac addresses documented, helps with locating them on a switch. Found a couple entries missing and didn't want to bother the end users with a phone call. Don't forget arp :) Just ping the host address of the machine, then check your arp table. https://gist.github.com/4084091

CLI Mac OS X Version

A simple "1-liner" that I use quite a bit to get the OS version, makes it easy to create a single script that can be deployed universally. /usr/bin/sw_vers | /usr/bin/grep 'ProductVersion:' | /usr/bin/grep -o '[0-9]*\.[0-9]*\.[0-9]*' | /usr/bin/cut -c 1-4

TFTP on Mac OS X 10.7 shell script

I've just started getting into Cisco support a little more. It's my goal to eventually specialise (its probably the first time I've found something in I.T. support that I don't eventually get bored with ). Since I've got about 1 of each OS I need make sure I can perform my job on anything. Was working on my macbook pro and needed to download some router configs. Give tftp a kick on Mac OS X 10.7 #!/bin/bash #* TFTP.sh #+ A quick script to enable/disable tftp (for use with cisco devices). #+ Usage: TFTP.sh on NO_ARGS=0 if [ $# -eq "$NO_ARGS" ] # no arguments? then /bin/echo "Disabling tftp." #+ Always unload, just to be on the safe side. sudo launchctl unload -w /System/Library/LaunchDaemons/tftp.plist #+ Cleanup any files so they aren't floating around ;) /bin/echo "Removing default tftp files." sudo /bin/rm -f /private/tftpboot/running-config sudo /bin/rm -f /private/tftpboot/startup-config sudo /bin/rm -f /private/tftp...

Code Snippet (Mac OSX Encryption)

Need to encrypt a file? Don't have any budget to buy software? You don't need to really, there is plenty of opensource stuff out there and some built-in stuff to. Give openssl a try on Mac OS X. Encrypt #!/bin/sh in="$1" out="$2" openssl des3 -in "$1" -out "$2" exit 0 Decrypt #!/bin/sh in="$1" out="$2" openssl des3 -d -in "$1" -out "$2" exit 0