2019-01-27 20:28:58 +00:00
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
|
|
|
|
|
|
|
|
class AbstractScanner(ABC):
|
2019-01-31 18:19:44 +00:00
|
|
|
'''The class is used by one thread to scan targets'''
|
2019-01-27 20:28:58 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
@abstractmethod
|
|
|
|
def __init__(self, **kwargs):
|
2019-01-31 18:19:44 +00:00
|
|
|
'''In this method you can init some
|
|
|
|
reusable resources needed for scan'''
|
2019-01-27 20:28:58 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
@abstractmethod
|
|
|
|
def scan_address(self, address):
|
2019-01-31 18:19:44 +00:00
|
|
|
'''This method should contain scanning process of given address. All
|
|
|
|
items returned will be passed to AbstractStorage and ui'''
|
2019-01-27 20:28:58 +00:00
|
|
|
pass
|