ButteWifi

Here are some scripts that I wrote to mount and search bulk windows machines.
mountmachines.sh
#!/bin/bash
cd /searchmachines
echo “Username please”
read username
echo “Password please”
read -s password
for machine in `cat machinelist.txt`
do
mkdir remote$machine
echo “Attempting to mount $machine…”
mount.cifs //$machine/c$ ./remote$machine -o username=$username,password=$password
done
exit
This next script searches the machines for NTUSER.DAT files to find users that were logged in during a specific time frame.
search.sh
#!/bin/bash
cd [...]

Read more...

§46 · August 5, 2009 · Uncategorized · 1 comment · Tags: , , , ,


Normally my Internet connection is pretty good; but, once every couple of months, the provider changes something and my current IP address no longer works. The lease doesn’t actually expire, which is set to last 48 hours. So, I lose internet connectivity until a new renewal. It’s easy to do this by hand, but that [...]

Read more...

§42 · August 2, 2009 · Uncategorized · 2 comments · Tags: , , , , , ,


So you just kicked your roommate out and you need to change the username and password on 250 switches.
You can do it with a quick bash loop and pipe it into telnet. (ssh is way better, but isn’t enabled by default on most network devices)
Make a new file named credentials.txt and put the username on [...]

Read more...

§28 · July 13, 2009 · Uncategorized · (No comments) · Tags: , , ,


The power button is pretty boring just turning the computer off.
Time to make it special for those headless Linux machines that play music but don’t have a keyboard.
Make sure ACPI is installed.
~$ sudo apt-get install acpi
Backup the old script.
~$ sudo cp /etc/acpi/powerbtn.sh  /etc/acpi/powerbtn.sh.bak
Clear all of that nonsense out of the old script and start with [...]

Read more...

§21 · July 9, 2009 · Uncategorized · (No comments) · Tags: , , ,


Here is a game that is worth your time. You even get to code it yourself.
Lolz. Needs a bash interpreter.
~$ nano guessinggame.sh
Paste this in there.
#!/bin/bash
echo “Please pick an integer between 1 and 10.”
read guess
number=0
while [ "$number" -le 1 ]
do
number=$RANDOM
let “number %= 11 ”
done
if [ $guess -eq $number ]
then
echo “You win!”
else
echo “You suck. The number was [...]

Read more...

§19 · July 8, 2009 · Uncategorized · (No comments) · Tags: , , , , , , , ,