Skip to content

Instantly share code, notes, and snippets.

@UnJavaScripter
Last active November 16, 2016 02:01
Show Gist options
  • Save UnJavaScripter/db7c9ba2a23bd4e00b49fd925d9b4956 to your computer and use it in GitHub Desktop.
Save UnJavaScripter/db7c9ba2a23bd4e00b49fd925d9b4956 to your computer and use it in GitHub Desktop.
SSH into your Raspberry Pi using brute force... Doesn't hax or anything, just attempts to connect to all the IP addresses in a range
#!/bin/bash
user_name="${1:-pi}"
ip_range="${2:-192.168.1}"
ip_from="${3:-1}"
ip_to="${4:-99}"
echo -e "Attempting to connect to a pi with user name: ${user_name}\n"
for i in $(seq ${ip_from} ${ip_to})
do
echo -e "Trying with: ${ip_range}.$i\n"
ssh ${user_name}@${ip_range}.$i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment