404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.191.171.86: ~ $
3

گa?�@s�dZddlZddlmZddlmZddlZddlmZddlm	Z	ddl
mZddl
mZdd	l
mZeje�Zejedd
�dd�Zejeedd
�d
d�Zed�dd�Zedd�dd�Zejdd�dd�Zdeedd�dd�ZdS)z'Subscribes users to the EFF newsletter.�N)�cast)�Optional)�
configuration)�	constants)�Account)�AccountFileStorage)�util)�config�acc�returncCs�|jdkrdS|jdkrH|jdkr,td�qnttj|jj|jd��|_n&|jrnt�rnttj|jj|jd��|_|jj	r�t
|�}|j|�dS)a�High level function to store potential EFF newsletter subscriptions.

    The user may be asked if they want to sign up for the newsletter if
    they have not given their explicit approval or refusal using --eff-mail
    or --no-eff-mail flag.

    Decision about EFF subscription will be stored in the account metadata.

    :param configuration.NamespaceConfig config: Client configuration.
    :param Account acc: Current client account.

    FNTz$you didn't provide an e-mail address)�register_to_eff)Z	eff_email�email�_report_failurerr�Meta�meta�update�_want_subscriptionrr�update_meta)r	r
�storage�r�/usr/lib/python3.6/eff.py�prepare_subscriptions



rcCsX|js|rdS|jjrTttt|jj��ttj|jjdd��|_t	|�}|j
|�dS)aHigh level function to take care of EFF newsletter subscriptions.

    Once subscription is handled, it will not be handled again.

    :param configuration.NamespaceConfig config: Client configuration.
    :param Account acc: Current client account.

    N)r)Zdry_runrr�	subscriber�strrrrrr)r	r
rrrr�handle_subscription/s	r)rcCsd}tj|dd�S)z�Does the user want to be subscribed to the EFF newsletter?

    :returns: True if we should subscribe the user, otherwise, False
    :rtype: bool

    aoWould you be willing, once your first certificate is successfully issued, to share your email address with the Electronic Frontier Foundation, a founding partner of the Let's Encrypt project and the non-profit organization that develops Certbot? We'd like to send you email about our work encrypting the web, EFF news, campaigns, and ways to support digital freedom. F)�default)�display_utilZyesno)�promptrrrrDsr)r
rcCsBtj}d|dd�}tjd|�tjd||�ttj||d��dS)zhSubscribe the user to the EFF mailing list.

    :param str email: the e-mail address to subscribe

    �jsonZ%eff_supporters_library_subscribe_form)Z	data_typer
Zform_idz.Subscribe to the EFF mailing list (email: %s).zSending POST request to %s:
%s)�dataN)rZEFF_SUBSCRIBE_URI�logger�info�debug�_check_response�requestsZpost)r
ZurlrrrrrTsr)�responsercCsptjd|j�y |j�|j�ds,td�Wn<tjjk
rLt�Yn t	t
fk
rjtd�YnXdS)z�Check for errors in the server's response.

    If an error occurred, it will be reported to the user.

    :param requests.Response response: the server's response to the
        subscription request

    zReceived response:
%sZstatusz)your e-mail address appears to be invalidz,there was a problem with the server responseN)r r"ZcontentZraise_for_statusrrr$�
exceptionsZ	HTTPError�
ValueError�KeyError)r%rrrr#cs	
r#)�reasonrcCs@dg}|dk	r"|jd�|j|�|jd�tjdj|��dS)z�Notify the user of failing to sign them up for the newsletter.

    :param reason: a phrase describing what the problem was
        beginning with a lowercase letter and no closing punctuation
    :type reason: `str` or `None`

    z4We were unable to subscribe you the EFF mailing listNz	 because z:. You can try again later by visiting https://act.eff.org.�)�appendrZnotify�join)r)�msgrrrrws


r)N)�__doc__ZloggingZtypingrrr$ZcertbotrZcertbot._internalrZcertbot._internal.accountrrZcertbot.displayrrZ	getLogger�__name__r ZNamespaceConfigrr�boolrrrZResponser#rrrrr�<module>s 


Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 302 B 0644
__init__.cpython-36.pyc File 302 B 0644
account.cpython-36.opt-1.pyc File 13.29 KB 0644
account.cpython-36.pyc File 13.29 KB 0644
auth_handler.cpython-36.opt-1.pyc File 16.2 KB 0644
auth_handler.cpython-36.pyc File 16.29 KB 0644
cert_manager.cpython-36.opt-1.pyc File 14.98 KB 0644
cert_manager.cpython-36.pyc File 14.98 KB 0644
client.cpython-36.opt-1.pyc File 25.25 KB 0644
client.cpython-36.pyc File 25.25 KB 0644
constants.cpython-36.opt-1.pyc File 3.98 KB 0644
constants.cpython-36.pyc File 3.98 KB 0644
eff.cpython-36.opt-1.pyc File 4.45 KB 0644
eff.cpython-36.pyc File 4.45 KB 0644
error_handler.cpython-36.opt-1.pyc File 5.8 KB 0644
error_handler.cpython-36.pyc File 5.8 KB 0644
hooks.cpython-36.opt-1.pyc File 8.34 KB 0644
hooks.cpython-36.pyc File 8.34 KB 0644
lock.cpython-36.opt-1.pyc File 8.77 KB 0644
lock.cpython-36.pyc File 8.77 KB 0644
log.cpython-36.opt-1.pyc File 12.77 KB 0644
log.cpython-36.pyc File 12.85 KB 0644
main.cpython-36.opt-1.pyc File 43.5 KB 0644
main.cpython-36.pyc File 43.69 KB 0644
renewal.cpython-36.opt-1.pyc File 15.53 KB 0644
renewal.cpython-36.pyc File 15.53 KB 0644
reporter.cpython-36.opt-1.pyc File 2.85 KB 0644
reporter.cpython-36.pyc File 2.91 KB 0644
snap_config.cpython-36.opt-1.pyc File 4.04 KB 0644
snap_config.cpython-36.pyc File 4.04 KB 0644
storage.cpython-36.opt-1.pyc File 38.5 KB 0644
storage.cpython-36.pyc File 38.5 KB 0644
updater.cpython-36.opt-1.pyc File 4.18 KB 0644
updater.cpython-36.pyc File 4.18 KB 0644