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.2010-02-10)

428.   What is emo surfing (emosurfing)?   [jake/2006-01-21]
416.   How can I fix the debian apt-get error: "E: Dynamic MMap ran out of room"   [jake/2004-10-20]
415.   what is a tabulator   [ross/2004-10-17]
404.   How can I limit the ammount of bandwidth rsync over ssh (or anything else) uses, without a complicated firewall solution?   [leif/2004-02-06]
376.   What are three very useful online dictionaries?   [jake/2003-09-22]
362.   How do I make Internet Explorer download more than 2 files at a time?   [matt/2003-06-17] ( strick/2003-06-21 )
360.   How can I keep my Alcohol-Laced Yak Beverage cold on a hot, sunny day?   [goodwill/2003-06-02]
353.   Can you show me something interesting with apt-cache and graphivz?   [jake/2003-03-01]
321.   what is jesse's first rule of backpacking?   [jesse/2002-08-13]
250.   What's in a Ross Omelette?   [strick/2001-08-07] ( ross/2003-09-16 treesn/2001-12-30 )
195.   why wont my computer boot off of its hard drive?   [jesse/2001-03-11] ( strick/2001-03-12 )
178.   Why isn't my PCS email working on my Cingular/PB Wireless phone?   [rupe/2001-02-12]
162.   What Internet drafts are in the RFC queue currently?   [rupe/2001-01-09]
154.   How can I integrate PGP5 functionality into the pine mail reader?   [rupe/2000-12-27]
152.   Why is it that Slackware roolz all other Linux distributions?   [dice/2000-12-10] ( jake/2003-09-22 )
137.   where can i find docs for radioshack scanners?   [jesse/2000-10-20]
97.   Where can I find WAP/WML resources on the net?   [rupe/2000-06-06]
79.   Where can I find information on the QA process used to validate space shuttle software?   [rupe/2000-05-19]