circe/helpers.py
def yield_chunk_randrange(obj: Sequence, min_len: int, max_len: int) -> Iterator:
    """ Yields slices of randomly-selected lengths on [_min, _max] from a sized iterable.

    "Jitter is the introduction of randomness into beacon timing. Imagine we have a beacon signal that is set to call
    home once per minute... [If we introduce a jitter of +/- 50%], the beacon would call home at time intervals
    varying from 30 seconds to 90 seconds." [https://www.activecountermeasures.com/detecting-beacons-with-jitter/]

    This variance makes beaconing more difficult to detect. We re-apply the jitter to the length of our encoded data
    chunks / URLs to confuse cursory analysis.

    Args:
        obj (sequence): An subscriptable object supporting __len__ and __getitem__ (lists, tuple, string, set, etc)
        min_len (int): The minimum desired length for a slice of obj
        max_len (int): The maximum desired length for a slice of obj

    Yields:
        Slices of varying length from the obj iterable
    """
    i = 0
    obj_len = len(obj)

    while 1:
        length = random.randint(min_len, max_len)
        if i + length > obj_len:  # If the next slice runs past the end of the iterable, take what's available
            yield obj[i: obj_len + 1]
            break

        yield obj[i:i+length]
        i += length
 Yields slices of randomly-selected lengths on [_min, _max] from a sized iterable.

    "Jitter is the introduction of randomness into beacon timing. Imagine we have a beacon signal that is set to call
    home once per minute... [If we introduce a jitter of +/- 50%], the beacon would call home at time intervals
    varying from 30 seconds to 90 seconds." [https://www.activecountermeasures.com/detecting-beacons-with-jitter/]

    This variance makes beaconing more difficult to detect. We re-apply the jitter to the length of our encoded data
    chunks / URLs to confuse cursory analysis.

    Args:
        obj (sequence): An subscriptable object supporting __len__ and __getitem__ (lists, tuple, string, set, etc)
        min_len (int): The minimum desired length for a slice of obj
        max_len (int): The maximum desired length for a slice of obj

    Yields:
        Slices of varying length from the obj iterable
    
Yields slices of randomly-selected lengths on [_min, _max] from a sized iterable.
"Jitter is the introduction of randomness into beacon timing. Imagine we have a beacon signal that is set to call
home once per minute...

This variance makes beaconing more difficult to detect. We re-apply the jitter to the length of our encoded data
chunks / URLs to confuse cursory analysis.
Yields slices of randomly - selected lengths on [ _min _max ] from a sized iterable . " Jitter is the introduction of randomness into beacon timing . Imagine we have a beacon signal that is set to call home once per minute ... This variance makes beaconing more difficult to detect . We re - apply the jitter to the length of our encoded data chunks / URLs to confuse cursory analysis .
def yield_chunk_randrange(obj: Sequence, min_len: int, max_len: int) -> Iterator:
    i = 0
    obj_len = len(obj)
    while 1:
        length = random.randint(min_len, max_len)
        if i + length > obj_len:  
            yield obj[i: obj_len + 1]
            break
        yield obj[i:i+length]
        i += length
def yield_chunk_randrange ( obj : Sequence , min_len : int , max_len : int ) -> Iterator : i = 0 obj_len = len ( obj ) while 1 : length = random . randint ( min_len , max_len ) if i + length > obj_len : yield obj [ i : obj_len + 1 ] break yield obj [ i : i + length ] i += length
Yields slices of randomly-selected lengths on [_min, _max] from a sized iterable.
Yields slices of randomly - selected lengths on [ _min _max ] from a sized iterable .
""" Yields slices of randomly-selected lengths on [_min, _max] from a sized iterable.

    "Jitter is the introduction of randomness into beacon timing. Imagine we have a beacon signal that is set to call
    home once per minute... [If we introduce a jitter of +/- 50%], the beacon would call home at time intervals
    varying from 30 seconds to 90 seconds." [https://www.activecountermeasures.com/detecting-beacons-with-jitter/]

    This variance makes beaconing more difficult to detect. We re-apply the jitter to the length of our encoded data
    chunks / URLs to confuse cursory analysis.

    Args:
        obj (sequence): An subscriptable object supporting __len__ and __getitem__ (lists, tuple, string, set, etc)
        min_len (int): The minimum desired length for a slice of obj
        max_len (int): The maximum desired length for a slice of obj

    Yields:
        Slices of varying length from the obj iterable
    """ # If the next slice runs past the end of the iterable, take what's available

Slices of varying length from the obj iterable
Slices of varying length from the obj iterable
obj
Sequence
An subscriptable object supporting __len__ and __getitem__ (lists, tuple, string, set, etc)
An subscriptable object supporting __len__ and __getitem__ ( lists tuple string set etc )
min_len
int
The minimum desired length for a slice of obj
The minimum desired length for a slice of obj
max_len
int
The maximum desired length for a slice of obj
The maximum desired length for a slice of obj