scapy.layers.dot11 module

Wireless LAN according to IEEE 802.11.

class scapy.layers.dot11.AKMSuite

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.AKMSuite'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (AKMSuite).oui>, <Field (AKMSuite).suite>]
class scapy.layers.dot11.Dot11

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.Dot11'>, <class 'scapy.packet.Packet'>]
answers(other)

DEV: true if self is an answer from other

fields_desc = [<Field (Dot11,Dot11FCS).subtype>, <Field (Dot11,Dot11FCS).type>, <Field (Dot11,Dot11FCS).proto>, <Field (Dot11,Dot11FCS).FCfield>, <Field (Dot11,Dot11FCS).ID>, <Field (Dot11,Dot11FCS).addr1>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
guess_payload_class(payload)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

payload_guess = [({'type': 2}, <class 'scapy.layers.l2.LLC'>), ({'subtype': 0, 'type': 0}, <class 'scapy.layers.dot11.Dot11AssoReq'>), ({'subtype': 1, 'type': 0}, <class 'scapy.layers.dot11.Dot11AssoResp'>), ({'subtype': 2, 'type': 0}, <class 'scapy.layers.dot11.Dot11ReassoReq'>), ({'subtype': 3, 'type': 0}, <class 'scapy.layers.dot11.Dot11ReassoResp'>), ({'subtype': 4, 'type': 0}, <class 'scapy.layers.dot11.Dot11ProbeReq'>), ({'subtype': 5, 'type': 0}, <class 'scapy.layers.dot11.Dot11ProbeResp'>), ({'subtype': 8, 'type': 0}, <class 'scapy.layers.dot11.Dot11Beacon'>), ({'subtype': 9, 'type': 0}, <class 'scapy.layers.dot11.Dot11ATIM'>), ({'subtype': 10, 'type': 0}, <class 'scapy.layers.dot11.Dot11Disas'>), ({'subtype': 11, 'type': 0}, <class 'scapy.layers.dot11.Dot11Auth'>), ({'subtype': 12, 'type': 0}, <class 'scapy.layers.dot11.Dot11Deauth'>), ({'subtype': 13, 'type': 1}, <class 'scapy.layers.dot11.Dot11Ack'>)]
unwep(key=None, warn=1)
class scapy.layers.dot11.Dot11ATIM

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.Dot11ATIM'>, <class 'scapy.packet.Packet'>]
class scapy.layers.dot11.Dot11Ack

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.Dot11Ack'>, <class 'scapy.packet.Packet'>]
class scapy.layers.dot11.Dot11AssoReq

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.Dot11AssoReq'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Dot11AssoReq).cap>, <Field (Dot11AssoReq).listen_interval>]
payload_guess = [({}, <class 'scapy.layers.dot11.Dot11Elt'>)]
class scapy.layers.dot11.Dot11AssoResp

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.Dot11AssoResp'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Dot11AssoResp,Dot11ReassoResp).cap>, <Field (Dot11AssoResp,Dot11ReassoResp).status>, <Field (Dot11AssoResp,Dot11ReassoResp).AID>]
payload_guess = [({}, <class 'scapy.layers.dot11.Dot11Elt'>)]
class scapy.layers.dot11.Dot11Auth

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.Dot11Auth'>, <class 'scapy.packet.Packet'>]
answers(other)

DEV: true if self is an answer from other

fields_desc = [<Field (Dot11Auth).algo>, <Field (Dot11Auth).seqnum>, <Field (Dot11Auth).status>]
payload_guess = [({}, <class 'scapy.layers.dot11.Dot11Elt'>)]
class scapy.layers.dot11.Dot11Beacon

Bases: scapy.layers.dot11._Dot11NetStats

aliastypes = [<class 'scapy.layers.dot11.Dot11Beacon'>, <class 'scapy.layers.dot11._Dot11NetStats'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (_Dot11NetStats,Dot11Beacon,Dot11ProbeResp).timestamp>, <Field (_Dot11NetStats,Dot11Beacon,Dot11ProbeResp).beacon_interval>, <Field (_Dot11NetStats,Dot11Beacon,Dot11ProbeResp).cap>]
payload_guess = [({}, <class 'scapy.layers.dot11.Dot11Elt'>)]
class scapy.layers.dot11.Dot11CCMP

Bases: scapy.layers.dot11.Dot11Encrypted

aliastypes = [<class 'scapy.layers.dot11.Dot11CCMP'>, <class 'scapy.layers.dot11.Dot11Encrypted'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Dot11CCMP).PN0>, <Field (Dot11CCMP).PN1>, <Field (Dot11CCMP).res0>, <Field (Dot11CCMP).key_id>, <Field (Dot11CCMP).ext_iv>, <Field (Dot11CCMP).res1>, <Field (Dot11CCMP).PN2>, <Field (Dot11CCMP).PN3>, <Field (Dot11CCMP).PN4>, <Field (Dot11CCMP).PN5>, <Field (Dot11CCMP).data>]
payload_guess = [({}, <class 'scapy.packet.Raw'>)]
class scapy.layers.dot11.Dot11Deauth

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.Dot11Deauth'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Dot11Deauth).reason>]
class scapy.layers.dot11.Dot11Disas

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.Dot11Disas'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Dot11Disas).reason>]
class scapy.layers.dot11.Dot11Elt

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.Dot11Elt'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *args, **kargs)
fields_desc = [<Field (Dot11Elt).ID>, <Field (Dot11Elt).len>, <Field (Dot11Elt).info>]
getlayer(cls, nb=1, _track=None, _subclass=True, **flt)

Return the nb^th layer that is an instance of cls, matching flt values.

haslayer(cls)

true if self has a layer that is an instance of cls. Superseded by “cls in self” syntax.

info
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

payload_guess = [({}, <class 'scapy.layers.dot11.Dot11Elt'>)]
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

pre_dissect(s)

DEV: is called right before the current layer is dissected

classmethod register_variant()
registered_ies = {0: <class 'scapy.layers.dot11.Dot11Elt'>, 1: <class 'scapy.layers.dot11.Dot11EltRates'>, 7: <class 'scapy.layers.dot11.Dot11EltCountry'>, 48: <class 'scapy.layers.dot11.Dot11EltRSN'>, 221: <class 'scapy.layers.dot11.Dot11EltVendorSpecific'>}
show_indent = 0
class scapy.layers.dot11.Dot11EltCountry

Bases: scapy.layers.dot11.Dot11Elt

aliastypes = [<class 'scapy.layers.dot11.Dot11EltCountry'>, <class 'scapy.layers.dot11.Dot11Elt'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Dot11EltCountry).ID>, <Field (Dot11EltCountry).len>, <Field (Dot11EltCountry).country_string>, <Field (Dot11EltCountry).descriptors>, <scapy.fields.ConditionalField object>]
class scapy.layers.dot11.Dot11EltCountryConstraintTriplet

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.Dot11EltCountryConstraintTriplet'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (Dot11EltCountryConstraintTriplet).first_channel_number>, <Field (Dot11EltCountryConstraintTriplet).num_channels>, <Field (Dot11EltCountryConstraintTriplet).mtp>]
class scapy.layers.dot11.Dot11EltMicrosoftWPA

Bases: scapy.layers.dot11.Dot11Elt

aliastypes = [<class 'scapy.layers.dot11.Dot11EltMicrosoftWPA'>, <class 'scapy.layers.dot11.Dot11Elt'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Dot11EltMicrosoftWPA).ID>, <Field (Dot11EltMicrosoftWPA).len>, <Field (Dot11EltMicrosoftWPA).oui>, <Field (Dot11EltMicrosoftWPA).type>, <Field (Dot11EltMicrosoftWPA).version>, <Field (Dot11EltMicrosoftWPA).group_cipher_suite>, <Field (Dot11EltMicrosoftWPA).nb_pairwise_cipher_suites>, <Field (Dot11EltMicrosoftWPA).pairwise_cipher_suites>, <Field (Dot11EltMicrosoftWPA).nb_akm_suites>, <Field (Dot11EltMicrosoftWPA).akm_suites>]
class scapy.layers.dot11.Dot11EltRSN

Bases: scapy.layers.dot11.Dot11Elt

aliastypes = [<class 'scapy.layers.dot11.Dot11EltRSN'>, <class 'scapy.layers.dot11.Dot11Elt'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Dot11EltRSN).ID>, <Field (Dot11EltRSN).len>, <Field (Dot11EltRSN).version>, <Field (Dot11EltRSN).group_cipher_suite>, <Field (Dot11EltRSN).nb_pairwise_cipher_suites>, <Field (Dot11EltRSN).pairwise_cipher_suites>, <Field (Dot11EltRSN).nb_akm_suites>, <Field (Dot11EltRSN).akm_suites>, <Field (Dot11EltRSN).mfp_capable>, <Field (Dot11EltRSN).mfp_required>, <Field (Dot11EltRSN).gtksa_replay_counter>, <Field (Dot11EltRSN).ptksa_replay_counter>, <Field (Dot11EltRSN).no_pairwise>, <Field (Dot11EltRSN).pre_auth>, <Field (Dot11EltRSN).reserved>, <scapy.fields.ConditionalField object>]
class scapy.layers.dot11.Dot11EltRates

Bases: scapy.layers.dot11.Dot11Elt

aliastypes = [<class 'scapy.layers.dot11.Dot11EltRates'>, <class 'scapy.layers.dot11.Dot11Elt'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Dot11EltRates).ID>, <Field (Dot11EltRates).len>, <Field (Dot11EltRates).rates>]
class scapy.layers.dot11.Dot11EltVendorSpecific

Bases: scapy.layers.dot11.Dot11Elt

aliastypes = [<class 'scapy.layers.dot11.Dot11EltVendorSpecific'>, <class 'scapy.layers.dot11.Dot11Elt'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Dot11EltVendorSpecific).ID>, <Field (Dot11EltVendorSpecific).len>, <Field (Dot11EltVendorSpecific).oui>, <Field (Dot11EltVendorSpecific).info>]
class scapy.layers.dot11.Dot11Encrypted

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.Dot11Encrypted'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *args, **kargs)
fields_desc = [<Field (Dot11Encrypted).data>]
class scapy.layers.dot11.Dot11FCS

Bases: scapy.layers.dot11.Dot11

aliastypes = [<class 'scapy.layers.dot11.Dot11FCS'>, <class 'scapy.layers.dot11.Dot11'>, <class 'scapy.packet.Packet'>]
compute_fcs(s)
fields_desc = [<Field (Dot11,Dot11FCS).subtype>, <Field (Dot11,Dot11FCS).type>, <Field (Dot11,Dot11FCS).proto>, <Field (Dot11,Dot11FCS).FCfield>, <Field (Dot11,Dot11FCS).ID>, <Field (Dot11,Dot11FCS).addr1>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <Field (Dot11FCS).fcs>]
match_subclass = True
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.layers.dot11.Dot11PacketList(res=None, name='Dot11List', stats=None)

Bases: scapy.plist.PacketList

toEthernet()
class scapy.layers.dot11.Dot11ProbeReq

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.Dot11ProbeReq'>, <class 'scapy.packet.Packet'>]
payload_guess = [({}, <class 'scapy.layers.dot11.Dot11Elt'>)]
class scapy.layers.dot11.Dot11ProbeResp

Bases: scapy.layers.dot11._Dot11NetStats

aliastypes = [<class 'scapy.layers.dot11.Dot11ProbeResp'>, <class 'scapy.layers.dot11._Dot11NetStats'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (_Dot11NetStats,Dot11Beacon,Dot11ProbeResp).timestamp>, <Field (_Dot11NetStats,Dot11Beacon,Dot11ProbeResp).beacon_interval>, <Field (_Dot11NetStats,Dot11Beacon,Dot11ProbeResp).cap>]
payload_guess = [({}, <class 'scapy.layers.dot11.Dot11Elt'>)]
class scapy.layers.dot11.Dot11QoS

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.Dot11QoS'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Dot11QoS).Reserved>, <Field (Dot11QoS).Ack_Policy>, <Field (Dot11QoS).EOSP>, <Field (Dot11QoS).TID>, <Field (Dot11QoS).TXOP>]
guess_payload_class(payload)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
payload_guess = [({}, <class 'scapy.layers.l2.LLC'>)]
class scapy.layers.dot11.Dot11ReassoReq

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.Dot11ReassoReq'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Dot11ReassoReq).cap>, <Field (Dot11ReassoReq).listen_interval>, <Field (Dot11ReassoReq).current_AP>]
payload_guess = [({}, <class 'scapy.layers.dot11.Dot11Elt'>)]
class scapy.layers.dot11.Dot11ReassoResp

Bases: scapy.layers.dot11.Dot11AssoResp

aliastypes = [<class 'scapy.layers.dot11.Dot11ReassoResp'>, <class 'scapy.layers.dot11.Dot11AssoResp'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Dot11AssoResp,Dot11ReassoResp).cap>, <Field (Dot11AssoResp,Dot11ReassoResp).status>, <Field (Dot11AssoResp,Dot11ReassoResp).AID>]
payload_guess = [({}, <class 'scapy.layers.dot11.Dot11Elt'>), ({}, <class 'scapy.layers.dot11.Dot11Elt'>)]
class scapy.layers.dot11.Dot11TKIP

Bases: scapy.layers.dot11.Dot11Encrypted

aliastypes = [<class 'scapy.layers.dot11.Dot11TKIP'>, <class 'scapy.layers.dot11.Dot11Encrypted'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Dot11TKIP).TSC1>, <Field (Dot11TKIP).WEPSeed>, <Field (Dot11TKIP).TSC0>, <Field (Dot11TKIP).key_id>, <Field (Dot11TKIP).ext_iv>, <Field (Dot11TKIP).res>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <Field (Dot11TKIP).data>]
payload_guess = [({}, <class 'scapy.packet.Raw'>)]
class scapy.layers.dot11.Dot11WEP

Bases: scapy.layers.dot11.Dot11Encrypted

aliastypes = [<class 'scapy.layers.dot11.Dot11WEP'>, <class 'scapy.layers.dot11.Dot11Encrypted'>, <class 'scapy.packet.Packet'>]
build_payload()
decrypt(key=None)
encrypt(**kwargs)
fields_desc = [<Field (Dot11WEP).iv>, <Field (Dot11WEP).keyid>, <Field (Dot11WEP).wepdata>, <Field (Dot11WEP).icv>]
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

post_dissect(s)

DEV: is called right after the current layer has been dissected

class scapy.layers.dot11.PMKIDListPacket

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.PMKIDListPacket'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (PMKIDListPacket).nb_pmkids>, <Field (PMKIDListPacket).pmkid_list>]
class scapy.layers.dot11.PrismHeader

Bases: scapy.packet.Packet

iwpriv wlan0 monitor 3

aliastypes = [<class 'scapy.layers.dot11.PrismHeader'>, <class 'scapy.packet.Packet'>]
answers(other)

DEV: true if self is an answer from other

fields_desc = [<Field (PrismHeader).msgcode>, <Field (PrismHeader).len>, <Field (PrismHeader).dev>, <Field (PrismHeader).hosttime_did>, <Field (PrismHeader).hosttime_status>, <Field (PrismHeader).hosttime_len>, <Field (PrismHeader).hosttime>, <Field (PrismHeader).mactime_did>, <Field (PrismHeader).mactime_status>, <Field (PrismHeader).mactime_len>, <Field (PrismHeader).mactime>, <Field (PrismHeader).channel_did>, <Field (PrismHeader).channel_status>, <Field (PrismHeader).channel_len>, <Field (PrismHeader).channel>, <Field (PrismHeader).rssi_did>, <Field (PrismHeader).rssi_status>, <Field (PrismHeader).rssi_len>, <Field (PrismHeader).rssi>, <Field (PrismHeader).sq_did>, <Field (PrismHeader).sq_status>, <Field (PrismHeader).sq_len>, <Field (PrismHeader).sq>, <Field (PrismHeader).signal_did>, <Field (PrismHeader).signal_status>, <Field (PrismHeader).signal_len>, <Field (PrismHeader).signal>, <Field (PrismHeader).noise_did>, <Field (PrismHeader).noise_status>, <Field (PrismHeader).noise_len>, <Field (PrismHeader).noise>, <Field (PrismHeader).rate_did>, <Field (PrismHeader).rate_status>, <Field (PrismHeader).rate_len>, <Field (PrismHeader).rate>, <Field (PrismHeader).istx_did>, <Field (PrismHeader).istx_status>, <Field (PrismHeader).istx_len>, <Field (PrismHeader).istx>, <Field (PrismHeader).frmlen_did>, <Field (PrismHeader).frmlen_status>, <Field (PrismHeader).frmlen_len>, <Field (PrismHeader).frmlen>]
payload_guess = [({}, <class 'scapy.layers.dot11.Dot11'>)]
class scapy.layers.dot11.RSNCipherSuite

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.RSNCipherSuite'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (RSNCipherSuite).oui>, <Field (RSNCipherSuite).cipher>]
class scapy.layers.dot11.RadioTap

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.dot11.RadioTap'>, <class 'scapy.packet.Packet'>]
deprecated_fields = {'Channel': ('ChannelFrequency', '2.4.3'), 'ChannelFlags2': ('ChannelPlusFlags', '2.4.3'), 'ChannelNumber': ('ChannelPlusNumber', '2.4.3')}
fields_desc = [<Field (RadioTap).version>, <Field (RadioTap).pad>, <Field (RadioTap).len>, <Field (RadioTap).present>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <Field (RadioTap).notdecoded>]
guess_payload_class(payload)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.layers.dot11.RadioTapExtendedPresenceMask(_pkt=None, index=0, **kwargs)

Bases: scapy.packet.Packet

RadioTapExtendedPresenceMask should be instantiated by passing an index= kwarg, stating which place the item has in the list.

Passing index will update the b[x] fields accordingly to the index.
e.g.
>>> a = RadioTapExtendedPresenceMask(present="b0+b12+b29+Ext")
>>> b = RadioTapExtendedPresenceMask(index=1, present="b33+b45+b59+b62")
>>> pkt = RadioTap(present="Ext", Ext=[a, b])
aliastypes = [<class 'scapy.layers.dot11.RadioTapExtendedPresenceMask'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (RadioTapExtendedPresenceMask).present>]
guess_payload_class(pay)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
class scapy.layers.dot11.WiFi_am(**kargs)

Bases: scapy.ansmachine.AnsweringMachine

Before using this, initialize “iffrom” and “ifto” interfaces: iwconfig iffrom mode monitor iwpriv orig_ifto hostapd 1 ifconfig ifto up note: if ifto=wlan0ap then orig_ifto=wlan0 note: ifto and iffrom must be set on the same channel ex: ifconfig eth1 up iwconfig eth1 mode monitor iwconfig eth1 channel 11 iwpriv wlan0 hostapd 1 ifconfig wlan0ap up iwconfig wlan0 channel 11 iwconfig wlan0 essid dontexist iwconfig wlan0 mode managed

filter = None
function_name = 'airpwn'
is_request(pkt)
make_reply(p)
parse_options(iffrom='eth0', ifto='eth0', replace='', pattern='', ignorepattern='')
print_reply(query, *reply)
send_reply(reply)
sniff()