Jump to content

Mac serial connection script


NightStalker

Recommended Posts

Hello all,

With MAC's (and Linux) you have to know the device of course to serial into it. To make it quicker for me I wrote the below script to search the MAC for the bash bunny (If you have multiple modems this may not work for you) and prompt you to connect to it. Feel free to use and modify as desired.

#!/bin/bash
#
# Title:         Mac Serial Connect
# Author:        NightStalker
# Version:       1.0
#
# Finds the Bash Bunny in the /dev/cu.* location and
# prompt you to connect to it.

clear

bunnyloc=`ls /dev/cu.* | grep usbmodem`
echo "Bash bunny is located at: $bunnyloc"
read -r -p "Would you like to connect to it? (Y/N): " connanswer
echo $connanswer

if [ "$connanswer" == "N" -o "$connanswer" == "n" ]
	then
		exit 0
elif [ "$connanswer" == "Y" -o "$connanswer" == "y" ]
	then
		screen $bunnyloc 115200
fi
Link to comment
Share on other sites

  • 10 months later...
  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...