AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/twisted/pair/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/twisted/pair/test/__pycache__/test_ethernet.cpython-310.pyc
o

�b��@sbddlmZddlmZmZddlmZddlmZeej	�Gdd�d��Z
Gdd�dej�Zd	S)
�)�implementer)�ethernet�raw)�
components)�unittestc@s$eZdZdd�Zdd�Zdd�ZdS)�
MyProtocolcCst|�|_dS)N)�list�	expecting)�selfr	�r�A/usr/lib/python3/dist-packages/twisted/pair/test/test_ethernet.py�__init__szMyProtocol.__init__cCsdS)z!
        Not implemented
        Nr)r
�num�protorrr�addProtoszMyProtocol.addProtoc	CsR|jsJd��|j�d�}t�}||||d�}|||fks'Jd�|||f���dS)Nz(Got a packet when not expecting anymore.r��partial�dest�source�protocolzExpected {!r}, got {!r})r	�pop�locals�format)	r
�datarrrr�expect�localVariables�paramsrrr�datagramReceiveds�
�zMyProtocol.datagramReceivedN)�__name__�
__module__�__qualname__r
rrrrrrr
src@sTeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)�
EthernetTestscCsRt��}tdddddd�fg�}|�d|�|jddd�|jr'Jd	|j��dS)
N�foobarr�123456�987654�r�123456987654foobar�r�5Should not expect any more packets, but still want %r�r�EthernetProtocolrrrr	�r
r�p1rrr�testPacketParsing$s ����
�zEthernetTests.testPacketParsingcCspt��}tdddddd�fddd	d
dd�fg�}|�d|�|jddd�|jd
dd�|jr6Jd|j��dS)Nr"rr#r$r%r�quux��012345�abcdefr&r'�012345abcdefquuxr(r)r+rrr�testMultiplePackets;s0��
�����z!EthernetTests.testMultiplePacketscCs�t��}tdddddd�fg�}tdddddd�fg�}|�d|�|�d|�|jddd�|jr:Jd	�|j���|jrEJd	�|j���dS)
Nr"rr#r$r%rr&r'z7Should not expect any more packets, but still want {!r})rr*rrrr	r�r
rr,�p2rrr�testMultipleSameProtos\sH��������������z$EthernetTests.testMultipleSameProtoscCs<t��}tg�}|�d|�|jddd�|jddd�dS)Nir&rr'r2r/)rr*rrrr+rrr�testWrongProtoNotSeen�s
z#EthernetTests.testWrongProtoNotSeencCs�t��}tdddddd�fddd	d
dd�fg�}|�d|�tddd	d
dd�fdddddd�fg�}|�d|�|jddd
�|jddd
�|jddd
�|jddd
�|jr^Jd|j��|jrhJd|j��dS)Nr"rr#r$r%rr.r/r0r1ir&r's012345abcdefquuxs123456987654foobarr2r(r)r4rrr�testDemuxing�s^��
������
������zEthernetTests.testDemuxingcCs6t��}z|�dd�Wtd��tjyYdSw)z2Adding a wrong level protocol raises an exception.�*�	silliness�2addProto must raise an exception for bad protocolsN)rr*rr�CannotAdapt�AssertionError�r
�errr�testAddingBadProtos_WrongLevel�s��z,EthernetTests.testAddingBadProtos_WrongLevelc
C�Xt��}z
|�dtg��Wtd��ty+}z|jdkrn�WYd}~dSd}~ww)z=Adding a protocol with a negative number raises an exception.���)z'Added protocol must be positive or zeroNr;�rr*rr�	TypeError�argsr=r>rrr�testAddingBadProtos_TooSmall���
���z*EthernetTests.testAddingBadProtos_TooSmallc
CrA)�<Adding a protocol with a number >=2**16 raises an exception.i�z"Added protocol must fit in 16 bitsNr;rCr>rrr�testAddingBadProtos_TooBig�rGz(EthernetTests.testAddingBadProtos_TooBigc
CrA)rHirINr;rCr>rrr�testAddingBadProtos_TooBig2�rGz)EthernetTests.testAddingBadProtos_TooBig2N)rrr r-r3r6r7r8r@rFrJrKrrrrr!#s!.>


r!N)
�zope.interfacer�twisted.pairrr�twisted.pythonr�
twisted.trialr�IRawPacketProtocolr�TestCaser!rrrr�<module>s

Anon7 - 2022
AnonSec Team