scapy.contrib.wireguard

WireGuard Module Implements the WireGuard network tunnel protocol. Based on the whitepaper: https://www.wireguard.com/papers/wireguard.pdf

class scapy.contrib.wireguard.Wireguard

Bases: scapy.packet.Packet

Wrapper that only contains the message type.

aliastypes
fields_desc
Wireguard fields

message_type

ByteEnumField

1

reserved_zero

ThreeBytesField

0

payload_guess

Possible sublayers: WireguardCookieReply, WireguardInitiation, WireguardResponse, WireguardTransport

class scapy.contrib.wireguard.WireguardCookieReply

Bases: scapy.packet.Packet

aliastypes
fields_desc
WireguardCookieReply fields

receiver_index

XLEIntField

0

nonce

XStrFixedLenField

0

encrypted_cookie

XStrFixedLenField

0

class scapy.contrib.wireguard.WireguardInitiation

Bases: scapy.packet.Packet

aliastypes
fields_desc
WireguardInitiation fields

sender_index

XLEIntField

0

unencrypted_ephemeral

XStrFixedLenField

0

encrypted_static

XStrFixedLenField

0

encrypted_timestamp

XStrFixedLenField

0

mac1

XStrFixedLenField

0

mac2

XStrFixedLenField

0

class scapy.contrib.wireguard.WireguardResponse

Bases: scapy.packet.Packet

aliastypes
fields_desc
WireguardResponse fields

sender_index

XLEIntField

0

receiver_index

XLEIntField

0

unencrypted_ephemeral

XStrFixedLenField

0

encrypted_nothing

XStrFixedLenField

0

mac1

XStrFixedLenField

0

mac2

XStrFixedLenField

0

class scapy.contrib.wireguard.WireguardTransport

Bases: scapy.packet.Packet

aliastypes
fields_desc
WireguardTransport fields

receiver_index

XLEIntField

0

counter

XLELongField

0

encrypted_encapsulated_packet

XStrField

None