Patrice Auffret > Net-Lorcon-0.02 > Net::Lorcon

Download:
Net-Lorcon-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Net::Lorcon - Raw wireless packet injection using the Lorcon library

SYNOPSIS ^

  use Net::Lorcon;

  my $tx = Net::Lorcon->new("eth1", "prism54");

  $tx->open;

  $tx->txpacket("packet..");

DESCRIPTION ^

This module enables raw 802.11 packet injection provided you have a Wi-Fi card supported by Lorcon.

Lorcon can be obtained from http://802.11ninja.net/lorcon.

FUNCTIONS ^

Net::Lorcon::getcardlist

Returns a list of supported driver names.

Net::Lorcon::resolvecard

Returns the ID of the given card. Not normally needed as new will automatically call this.

METHODS ^

new(device, driver)

Constructs a new Net::Lorcon object. device is the name of the device to use for packet injection. driver is the driver to use (one of the names returned from getcardlist)

getcapabilities()

Returns the capabilites of this device. This is an integer with the TX80211_CAP_* constants below ORed together.

open()

Opens the device ready for transmitting packets

close()

Closes the device. (Automatically called when object is destroyed).

setmode(mode)

Sets the mode of the device. Expects constants from <linux/wireless.h> (IW_MODE_MONITOR, etc).

getmode()

Returns an integer representing the current mode.

setfunctionalmode(func_mode)

(Not implemented in the version of Lorcon I have)

setchannel(channel)

Sets the channel to trasmit on.

getchannel

Returns the channel the wireless card is currently on.

txpacket(packet)

Transmits the given packet. The expected input is a full 802.11 packet.

EXPORT

None by default.

Exportable constants

constant

Used internally only.

INJ_* are the various injection methods supported by Lorcon. TX80211_CAP_* are returned by getcapabilites.

  INJ_AIRJACK
  INJ_AIRPCAP
  INJ_BCM43XX
  INJ_HOSTAP
  INJ_MAC80211
  INJ_MADWIFING
  INJ_MADWIFIOLD
  INJ_MAX
  INJ_NODRIVER
  INJ_PRISM54
  INJ_RT2500
  INJ_RT2570
  INJ_RT61
  INJ_RT73
  INJ_RTL8180
  INJ_WLANNG
  INJ_ZD1211RW
  MAX_IFNAME_LEN
  TX80211_CAP_BSSTIME
  TX80211_CAP_CTRL
  TX80211_CAP_DSSSTX
  TX80211_CAP_DURID
  TX80211_CAP_FRAG
  TX80211_CAP_MIMOTX
  TX80211_CAP_NONE
  TX80211_CAP_OFDMTX
  TX80211_CAP_SELFACK
  TX80211_CAP_SEQ
  TX80211_CAP_SETMODULATION
  TX80211_CAP_SETRATE
  TX80211_CAP_SNIFF
  TX80211_CAP_SNIFFACK
  TX80211_CAP_TRANSMIT
  TX80211_CAP_TXNOWAIT
  TX80211_FUNCMODE_INJECT
  TX80211_FUNCMODE_INJMON
  TX80211_FUNCMODE_RFMON
  TX80211_MODE_ADHOC
  TX80211_MODE_AUTO
  TX80211_MODE_INFRA
  TX80211_MODE_MASTER
  TX80211_MODE_MONITOR
  TX80211_MODE_REPEAT
  TX80211_MODE_SECOND
  TX80211_RTAP_LEN
  TX80211_RTAP_PRESENT
  TX80211_STATUS_MAX
  TX_IEEE80211_RADIOTAP_ANTENNA
  TX_IEEE80211_RADIOTAP_CHANNEL
  TX_IEEE80211_RADIOTAP_DBM_ANTNOISE
  TX_IEEE80211_RADIOTAP_DBM_ANTSIGNAL
  TX_IEEE80211_RADIOTAP_DBM_TX_POWER
  TX_IEEE80211_RADIOTAP_DB_ANTNOISE
  TX_IEEE80211_RADIOTAP_DB_ANTSIGNAL
  TX_IEEE80211_RADIOTAP_DB_TX_ATTENUATION
  TX_IEEE80211_RADIOTAP_EXT
  TX_IEEE80211_RADIOTAP_FCS
  TX_IEEE80211_RADIOTAP_FHSS
  TX_IEEE80211_RADIOTAP_FLAGS
  TX_IEEE80211_RADIOTAP_LOCK_QUALITY
  TX_IEEE80211_RADIOTAP_RATE
  TX_IEEE80211_RADIOTAP_TSFT
  TX_IEEE80211_RADIOTAP_TX_ATTENUATION

SEE ALSO ^

lorcon(7), 802.11 Wireless Networks by Matthew Gast.

AUTHOR ^

David Leadbeater, <dgl at dgl dot cx> (original author)

Patrice <GomoR> Auffret, <gomor at cpan dot org> (current maintainer)

COPYRIGHT AND LICENSE ^

Copyright (C) 2007-2008 by David Leadbeater and Patrice <GomoR> Auffret

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: