by jake

What is a great little script to use when airboxing (wardriving, warchalking, etc)

I have a small bash script that resets the card before use and then brings it back up with a random mac address (via an external perl script).


run_stumble:

#!/bin/sh
cardctl eject 0
sleep 1
cardctl insert 0
sleep 1
ifconfig eth0 hw ether `~/bin/cng_mac`
ifconfig eth0 up

cng_mac:

#!/usr/bin/perl
#
# A quick script that generates a random varible
# It looks suprisingly like a MAC address
# Something like: 23:00:C0:FF:EE:00
# However it will take the first set of octets and set a vendor code
# Vendor codes are in /usr/share/ethereal/manuf
#


for (`cat /usr/share/ethereal/manuf`){
push (@vendorcode, $1) if ($_ =~ /(^[^#]\S+)\s/);
}


srand(time() % 345);
printf("%s:%X%X:%X%X:%X%X",$vendorcode[rand(1) * $#vendorcode],rand(16),rand(16),rand(16),rand(16),rand(16),rand(16))




Then you can simply run kismet (or airsnort or something else) and it will work perfectly.

Then you no longer have to leave your real MAC address behind when checking slashdot from a nokia parking lot.

 


 
Read more of   The Yak's Frequently Questioned Answers   (mod.2008-11-08)

424.   Where do you get StrickPants?   [strick/2007-06-30]
414.   What is art?   [jake/2004-09-22]
374.   How can I make Gnu/Linux behave like a Real Unix (TM)?   [jake/2003-09-22]
368.   Do Laws of Physics apply to Software such as PostgreSQL and MS Windows 95/NT?   [strick/2003-08-25]
327.   What is a great little script to use when airboxing (wardriving, warchalking, etc)   [jake/2002-10-05]
302.   How can I raise my website's placement on google?   [macki/2002-01-20]
287.   How do I make a VCD (Video CD)?   [combee/2001-11-19]
279.   How do I get my USB digital camera to work under Linux?   [rupe/2001-10-29]
256.   How does the new Windows Product Activation (WPA) scheme work?   [rupe/2001-07-10]
246.   why am i getting errors with when reflashing my TINI from a linux box?   [jesse/2001-06-09]
239.   What's the Grubstake?   [rupe/2001-06-05]
225.   What do I use to write cool Palm software?   [combee/2001-11-01] ( combee/2001-09-21 )
211.   Who are strick's net.gods?   [strick/2001-04-08] ( rupe/2001-05-22 rupe/2001-05-22 )
185.   what are some cool domain names?   [jesse/2001-02-26] ( josh/2001-04-03 )
175.   What's the best wine with chocolate chip cookies?   [strick/2001-02-11]
117.   Where can I find information on character codes, and encoding issues?   [rupe/2000-09-12]
81.   How do I do port-forwarding with ssh?   [robey/2001-03-25]
76.   How can I run my 486 25 at 247 mhz?   [jj/2000-04-16]
68.   What are Nana's rats names?   [nana/2000-02-28]
62.   What is the diameter of the World Wide Web?   [jamison/2000-04-01]
46.   What is Ross' natural hair color?   [macki/2000-02-03]
18.   Where have all the flowers gone?   [datavortex/2000-01-18]
17.   How can I make a didgeridoo for traveling?   [ult/2002-04-20]