Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/twisted/mail/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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

5�@g# �@s�ddlZddlmZddlmZddlmZdZdZdZ	da
dad	ad	a
d	ad	ad	ad	ad	ad	ad	a	d
Zgd�ZdZd
ZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#Gdd�dej$�Z%dZ&dd�Z'dd�Z(d d!�Z)e*d"krse)�dSdS)#�N)�reactor)�Factory)�basic�test�twistediLTFs(+OK POP3 localhost v2003.83 server ready)sTOPsLOGIN-DELAY 180�USERs
SASL LOGIN�STLS�UIDLs-ERR Unknown requests+OK Command Completeds-ERR LOGIN faileds+OK Mailbox open, 0 messagess*-ERR server side error start TLS handshakes+OK quit completeds'-ERR Unknown AUHORIZATION state commands+OK 0 0s +OK Unique-ID listing follows
.s#+OK Mailbox scan listing follows
.s+OK Capability list follows:c@sfeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�POP3TestServerNcCsd|_d|_d|_||_dS)NF)�loggedIn�caps�tmpUser�ctx)�self�contextFactory�r�B/usr/lib/python3/dist-packages/twisted/mail/test/pop3testserver.py�__init__6s
zPOP3TestServer.__init__cC�|�t�dS�N)�sendLine�STAT�r�reqrrr�sendSTATResp<�zPOP3TestServer.sendSTATRespcCrr)r�UIDLrrrr�sendUIDLResp?rzPOP3TestServer.sendUIDLRespcCrr)r�LISTrrrr�sendLISTRespBrzPOP3TestServer.sendLISTRespcCsj|jdur	tg|_tr|j�t�tr|j�t�tD]}|j�|�qd�|j�}|d7}|�	|�dS)Ns
s
.)
r�	CAP_START�UIDL_SUPPORT�append�CAPABILITIES_UIDL�SSL_SUPPORT�CAPABILITIES_SSL�CAPABILITIES�joinr)r�cap�resprrr�sendCapabilitiesEs
zPOP3TestServer.sendCapabilitiescCs2tr|��dStrt�d|j�dS|��dS)N�)�DENY_CONNECTION�
disconnect�
SLOW_GREETINGr�	callLater�sendGreeting�rrrr�connectionMadeVszPOP3TestServer.connectionMadecCrr)r�CONNECTION_MADEr1rrrr0arzPOP3TestServer.sendGreetingcs|����fdd�}trdStr|��dS|d�r)tr#|�t�dS|��dS|d�r5tr5|�	�dS|d�rct
rB|�t�dSd}z|�d�d|_t
}Wnty[t}Ynw|�|�dS|d	�r�d}z&|�d�d}|jdusz|dur}t}n|jtkr�|tkr�t}d
|_nt}Wnty�t}Ynw|�|�dS|d�r�d|_|�t�|��dStr�|�t�dS|js�|�t�dS|d
�r�|�t
�dS|d�r�tr�dS|�t�dS|d�r�tr�dS|�t�dS|d��r
tr�dSt�s|�t�dS|�t�dSdS)zError Conditionscs��|�dkS)N���)�find)�s��ulinerr�<lambda>hsz-POP3TestServer.lineReceived.<locals>.<lambda>NsCAPArr� �sPASSTsQUITFsNOOPsSTATsLISTr	)�upper�TIMEOUT_RESPONSE�DROP_CONNECTIONr-�INVALID_CAPABILITY_RESPONSEr�INVALID_RESPONSEr*r$�startTLS�INVALID_LOGIN_RESPONSE�splitr
�VALID_RESPONSE�
BaseException�
AUTH_DECLINED�USER�PASS�
AUTH_ACCEPTEDr�LOGOUT_COMPLETE�INVALID_SERVER_RESPONSE�
NOT_LOGGED_IN�TIMEOUT_DEFERREDrrr!r)r�liner5r)�pwdrr7r�lineReceivedds�
���


�zPOP3TestServer.lineReceivedcCsJ|jdur	|��tr|jdur|�d�|j�|j�dS|�d�dS)Ns+OK Begin TLS negotiation nows-ERR TLS not available)r�
getContextr$r�	transportrAr1rrrrA�s

zPOP3TestServer.startTLScCs|j��dSr)rR�loseConnectionr1rrrr-�rzPOP3TestServer.disconnectcCsFzddlm}Wn
tyd|_YdSw|��|_|jj|j_dS)Nr)�ssl)�twisted.internetrT�ImportErrorr�ClientContextFactory�SSL�TLSv1_METHOD�method)rrTrrrrQ�s�
zPOP3TestServer.getContextr)�__name__�
__module__�__qualname__rrrrr*r2r0rPrAr-rQrrrrr
5s
W
r
a�popServer.py [arg] (default is Standard POP Server with no messages)
no_ssl  - Start with no SSL support
no_uidl - Start with no UIDL support
bad_resp - Send a non-RFC compliant response to the Client
bad_cap_resp - send a non-RFC compliant response when the Client sends a 'CAPABILITY' request
bad_login_resp - send a non-RFC compliant response when the Client sends a 'LOGIN' request
deny - Deny the connection
drop - Drop the connection after sending the greeting
bad_tls - Send a bad response to a STARTTLS
timeout - Do not return a response to a Client request
to_deferred - Do not return a response on a 'Select' request. This
              will test Deferred callback handling
slow - Wait 20 seconds after the connection is made to return a Server Greeting
cCstd|�dS)NzServer Starting in %s mode)�print)�msgrrr�printMessage�sr`cCsh|��dkrdatd�dS|��dkrdatd�dS|��dkr*datd�dS|��d	kr8datd
�dS|��dkrFdatd
�dS|��dkrTdatd
�dS|��dkrbdatd�dS|��dkrpda	td�dS|��dkr~da
td�dS|��dkr�datd�dS|��dkr�datd�dS|��dkr�t
t�t��dSt
t�t��dS)N�no_sslFzNON-SSL�no_uidlzNON-UIDL�bad_respTzInvalid Server Response�bad_cap_respzInvalid Capability Response�bad_login_resp�denyzDeny Connection�dropzDrop Connection�bad_tlszBad TLS Response�timeoutzTimeout Response�to_deferredzTimeout Deferred Response�slowz
Slow Greetingz--help)�lowerr$r`r!rKr?rBr,r>�BAD_TLS_RESPONSEr=rMr.r^�usage�sys�exit)�argrrr�
processArg�sLrrcCs\ttj�dkrtd�ntjdd�}|D]}t|�qt�}t|_t�	t
|�t��dS)N�zPOP3 with no messagesr;)�lenro�argvr`rrrr
�protocolr�	listenTCP�PORT�run)�argsrq�frrr�main(s

r|�__main__)+rorUr�twisted.internet.protocolr�twisted.protocolsrrGrHrxr$r!rKr?rBr,r>rmr=rMr.r3r&r%r#r@rDrFrI�	TLS_ERRORrJrLrrrr �LineReceiverr
rnr`rrr|r[rrrr�<module>sVB
�

Spamworldpro Mini