From f925120ddd1e9993d4d71399124e8a7e0784c7b0 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Sat, 11 Nov 2006 21:45:28 +0000 Subject: [PATCH] Wifi updates git-svn-id: file:///home/svn/framework3/trunk@4129 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/exploit/lorcon.rb | 10 ++++++++++ lib/rex/socket/switch_board.rb | 2 ++ modules/auxiliary/dos/wireless/fakeap.rb | 8 ++------ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/msf/core/exploit/lorcon.rb b/lib/msf/core/exploit/lorcon.rb index 83a09a8456..0cee685b8d 100644 --- a/lib/msf/core/exploit/lorcon.rb +++ b/lib/msf/core/exploit/lorcon.rb @@ -59,6 +59,16 @@ module Exploit::Lorcon addr.split(':').map { |c| c.hex.chr }.join end + def channel + self.wifi.channel + end + + def next_channel + cur = self.wifi.channel + nxt = (cur > 10) ? 1 : cur + 1 + self.wifi.channel = nxt + end + attr_accessor :wifi end diff --git a/lib/rex/socket/switch_board.rb b/lib/rex/socket/switch_board.rb index 59ae6645f6..060f7755f1 100644 --- a/lib/rex/socket/switch_board.rb +++ b/lib/rex/socket/switch_board.rb @@ -204,6 +204,7 @@ class SwitchBoard # Finds the best possible comm for the supplied target address. # def best_comm(addr) + addr_nbo = Socket.resolv_nbo_i(addr) comm = nil msb = 0 @@ -225,6 +226,7 @@ class SwitchBoard # Remove all routes that go through the supplied comm. # def remove_by_comm(comm) + _init mutex.synchronize { routes.delete_if { |route| route.comm == comm diff --git a/modules/auxiliary/dos/wireless/fakeap.rb b/modules/auxiliary/dos/wireless/fakeap.rb index 5a3beb2d5d..12ae548e49 100644 --- a/modules/auxiliary/dos/wireless/fakeap.rb +++ b/modules/auxiliary/dos/wireless/fakeap.rb @@ -9,7 +9,7 @@ class Auxiliary::Dos::Wireless::APFlood < Msf::Auxiliary def initialize(info = {}) super(update_info(info, - 'Name' => 'Wireless Fake AP Beacon Flood', + 'Name' => 'Wireless Fake Access Point Beacon Flood', 'Description' => %q{ This module advertises thousands of fake access points, using random SIDs and BSSID addresses. Inspired @@ -29,14 +29,10 @@ class Auxiliary::Dos::Wireless::APFlood < Msf::Auxiliary wifi.write(create_frame()) end end - - def eton(addr) - addr.split(':').map { |c| c.hex.chr }.join - end def create_frame - ssid = Rex::Text.rand_text_alpha(rand(32)+1) + ssid = Rex::Text.rand_text_alpha(rand(31)+1) bssid = Rex::Text.rand_text(6) seq = [rand(255)].pack('n')