You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
752 B
Python
33 lines
752 B
Python
#!/usr/bin/python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
__author__ = 'Daniele Perera'
|
|
__license__ = "MIT"
|
|
__version__ = "1.0.0"
|
|
__maintainer__ = "Daniele Perera"
|
|
__status__ = "Development"
|
|
|
|
import requests
|
|
from pathlib import Path
|
|
|
|
from onioningestor.sources import Source
|
|
|
|
|
|
class Plugin(Source):
|
|
|
|
def __init__(self, logger, name, filename):
|
|
self.logger = logger
|
|
self.name = name
|
|
self.filename = filename
|
|
super().__init__(self)
|
|
|
|
|
|
def run(self):
|
|
filepath = Path(__file__).parents[2]/self.filename
|
|
with open(filepath, 'r') as fp:
|
|
lines = fp.read().splitlines()
|
|
for onion in lines:
|
|
yield self.onion(url=onion,source='simple-file',type='domain')
|
|
os.remove(self.filename)
|
|
|