a
    kÄ#d	  ã                   @   s`   d Z ddlmZ ddlmZmZmZmZ ddlm	Z	m
Z
 dZG dd„ de
eƒZe	eeed� d	S )
a‚  
Apple/Google Exposure Notification System (ENS), formerly known as
Privacy-Preserving Contact Tracing Project.

This module parses the Bluetooth Low Energy beacon payloads used by the system.
This does **not** yet implement any cryptographic functionality.

More info:

* `Apple: Privacy-Preserving Contact Tracing`__
* `Google: Exposure Notifications`__
* `Wikipedia: Exposure Notification`__

__ https://www.apple.com/covid19/contacttracing/
__ https://www.google.com/covid19/exposurenotifications/
__ https://en.wikipedia.org/wiki/Exposure_Notification

Bluetooth protocol specifications:

* `v1.1`_ (April 2020)
* `v1.2`_ (April 2020)

.. _v1.1: https://blog.google/documents/58/Contact_Tracing_-_Bluetooth_Specification_v1.1_RYGZbKW.pdf
.. _v1.2: https://covid19-static.cdn-apple.com/applications/covid19/current/static/contact-tracing/pdf/ExposureNotification-BluetoothSpecificationv1.2.pdf
é    )ÚStrFixedLenField)ÚEIR_HdrÚEIR_ServiceData16BitUUIDÚ!EIR_CompleteList16BitServiceUUIDsÚLowEnergyBeaconHelper)Úbind_layersÚPacketioý  c                   @   s4   e Zd ZdZdZedddƒedddƒgZdd	„ ZdS )
ÚExposure_Notification_Framez7Apple/Google BLE Exposure Notification broadcast frame.zExposure Notification broadcastÚ
identifierNé   Úmetadataé   c                 C   s(   t jtƒ ttgd� tƒ tƒ  |  g S )z1Builds a list of EIR messages to wrap this frame.)Z	svc_uuids)r   Zbase_eirr   r   ÚEXPOSURE_NOTIFICATION_UUIDr   )Úself© r   úZ/var/www/html/gsl.tools/lib/python3.9/site-packages/scapy/contrib/exposure_notification.pyÚ	build_eir7   s    ÿýz%Exposure_Notification_Frame.build_eir)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Únamer   Zfields_descr   r   r   r   r   r	   ,   s   

ür	   )Zsvc_uuidN)r   Zscapy.fieldsr   Zscapy.layers.bluetoothr   r   r   r   Zscapy.packetr   r   r   r	   r   r   r   r   Ú<module>	   s   ÿ