Jump to content

Mac serial connection script


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
  • Upvote 8
Link to post
Share on other sites
  • 10 months later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...