OXIESEC PANEL
- Current Dir:
/
/
opt
/
gsutil
/
third_party
/
pyu2f
/
pyu2f
/
__pycache__
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/11/2025 08:19:48 AM
rwxr-xr-x
📄
__init__.cpython-39.pyc
198 bytes
02/11/2025 08:19:48 AM
rw-r--r--
📄
apdu.cpython-39.pyc
3.77 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
errors.cpython-39.pyc
3.16 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
hardware.cpython-39.pyc
5.12 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
hidtransport.cpython-39.pyc
9.66 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
model.cpython-39.pyc
2.44 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
u2f.cpython-39.pyc
5.49 KB
02/11/2025 08:19:48 AM
rw-r--r--
Editing: hidtransport.cpython-39.pyc
Close
a ��a�, � @ sd d Z ddlZddlZddlZddlZddlmZ ddlmZ dd� Zefdd�Z G d d � d e �ZdS )z�HID Transport for U2F. This module imports the U2F HID Transport protocol as well as methods for discovering devices implementing this protocol. � N)�errors)�hidc C s | d dkr| d dkrdS dS )NZ usage_pagei�� �usage� TF� )�devicer r �3/opt/gsutil/third_party/pyu2f/pyu2f/hidtransport.py�HidUsageSelector s r c c sJ t �� D ]<}| |�rzt �|d �}t|�V W q tyB Y q0 qd S )N�path)r Z EnumerateZOpen�UsbHidTransport�OSError)�selector�d�devr r r �DiscoverLocalHIDU2FDevices# s r c @ s� e Zd ZdZdZdZdZdZdZdZ dZ d Zeg d ��Z edg�ZG dd � d e�ZG dd� de�Zd(dd�Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'S ))r am Implements the U2FHID transport protocol. This class implements the U2FHID transport protocol from the FIDO U2F specs. This protocol manages fragmenting longer messages over a short hid frame (usually 64 bytes). It exposes an APDU channel through the MSG command as well as a series of other commands for configuring and interacting with the device. � � � � � � � � )� r r r � c @ s, e Zd ZdZdd� Zdd� Zedd� �ZdS ) zUsbHidTransport.InitPacketa� Represent an initial U2FHID packet. Represent an initial U2FHID packet. This packet contains metadata necessary to interpret the entire packet stream associated with a particular exchange (read or write). Attributes: packet_size: The size of the hid report (packet) used. Usually 64. cid: The channel id for the connection to the device. size: The size of the entire message to be sent (including all continuation packets) payload: The portion of the message to put into the init packet. This must be smaller than packet_size - 7 (the overhead for an init packet). c C s` || _ t|�dks"|dks"|dkr*t�� �t|�| j d krDt�� �|| _|| _|| _|| _d S )N� r i � )�packet_size�lenr �InvalidPacketError�cid�cmd�size�payload)�selfr r r! r"