2019-01-27 20:28:58 +00:00
|
|
|
from abc import abstractmethod, ABC
|
|
|
|
|
|
|
|
|
|
|
|
class AbstractAddressGenerator(ABC):
|
2019-01-31 18:19:44 +00:00
|
|
|
'''The class describes addess generation mechanism.
|
|
|
|
In __init__ method it should get results of parsing fields
|
|
|
|
and then it returns addresses.'''
|
2019-01-27 20:28:58 +00:00
|
|
|
@classmethod
|
|
|
|
@abstractmethod
|
|
|
|
def get_next_address(self, previous_address, **kwargs):
|
2019-01-31 18:19:44 +00:00
|
|
|
'''Address - an only, indivisible object, that describes single scan
|
|
|
|
target address. This method should return next address to scan based on
|
|
|
|
previous scanned address and result of scanning previous address, that
|
|
|
|
can be placed in kwargs.'''
|
2019-01-27 20:28:58 +00:00
|
|
|
pass
|