Last active
November 16, 2016 02:01
-
-
Save funnierinspanish/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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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