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 :  /usr/lib/python3/dist-packages/landscape/lib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


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

Current File : /usr/lib/python3/dist-packages/landscape/lib/__pycache__/backoff.cpython-310.pyc
o

���c��@sddlZGdd�d�ZdS)�Nc@s:eZdZdZdd�Zdd�Zdd�Zdd	�Zddd�Zd
S)�ExponentialBackoffz^
    Keeps track of a backoff delay that staggers down and staggers up
    exponentially.
    cCsd|_||_||_dS)Nr)�_error_count�_start_delay�
_max_delay)�self�start_delay�	max_delay�r	�7/usr/lib/python3/dist-packages/landscape/lib/backoff.py�__init__
s
zExponentialBackoff.__init__cCs |jd8_t|jd�|_dS)z0Decreases error count with zero being the lowest�rN)r�max�rr	r	r
�decreaseszExponentialBackoff.decreasecCs$|��|jkr|jd7_dSdS)z=Increases error count but not higher than gives the max delayrN)�	get_delayrrrr	r	r
�increases�zExponentialBackoff.increasecCs0|jrd|jd|j}nd}tt|�|j�S)aR
        Calculates the delay using formula that gives this chart. In this
        specific example start is 5 seconds and max is 60 seconds
                Count  Delay
                0      0
                1      5
                2      10
                3      20
                4      40
                5      60 (max)
        �rr)rr�min�intr)r�delayr	r	r
rszExponentialBackoff.get_delay��?cCs0|��}|d|}||t��}t||�S)z�
        Adds randomness to the specified stagger of the delay. For example
        for a delay of 12 and 25% stagger, it works out to 9 + rand(0,3)
        r)r�randomr)r�stagger_fractionr�non_random_part�random_partr	r	r
�get_random_delay-sz#ExponentialBackoff.get_random_delayN)r)	�__name__�
__module__�__qualname__�__doc__rrrrrr	r	r	r
rsr)rrr	r	r	r
�<module>s

Anon7 - 2022
AnonSec Team