# Path: theHarvester/parsers/myparser.py
# class Parser:
#     def __init__(self, results, word):
#     async def genericClean(self):
#     async def urlClean(self):
#     async def emails(self):
#     async def fileurls(self, file):
#     async def hostnames(self):
#     async def people_googleplus(self):
#     async def hostnames_all(self):
#     async def links_linkedin(self):
#     async def people_linkedin(self):
#     async def people_twitter(self):
#     async def profiles(self):
#     async def set(self):
#     async def urls(self):
#     async def unique(self) -> list:


from theHarvester.lib.core import *
from theHarvester.parsers import myparser
import aiohttp
import asyncio
            csrftoken = ''
            if self.proxy is False:
                async with session.get(url, headers=headers) as resp:
                    cookies = str(resp.cookies)
                    cookies = cookies.split('csrftoken=')
                    csrftoken += cookies[1][:cookies[1].find(';')]
            else:
                async with session.get(url, headers=headers, proxy=self.proxy) as resp:
                    cookies = str(resp.cookies)
                    cookies = cookies.split('csrftoken=')
                    csrftoken += cookies[1][:cookies[1].find(';')]
            await asyncio.sleep(2)

            # extract csrftoken from cookies
            data = {
                'Cookie': f'csfrtoken={csrftoken}', 'csrfmiddlewaretoken': csrftoken,
                'targetip': self.word, 'user': 'free'}
            headers['Referer'] = url
            if self.proxy is False:
                async with session.post(url, headers=headers, data=data) as resp:
                    self.results = await resp.text()
            else:
                async with session.post(url, headers=headers, data=data, proxy=self.proxy) as resp:
                    self.results = await resp.text()
            await session.close()
        except Exception as e:
            print(f'An exception occurred: {e}')
        self.totalresults += self.results

    async def get_hostnames(self):

# Path: theHarvester/parsers/myparser.py
# class Parser:
#     def __init__(self, results, word):
#     async def genericClean(self):
#     async def urlClean(self):
#     async def emails(self):
#     async def fileurls(self, file):
#     async def hostnames(self):
#     async def people_googleplus(self):
#     async def hostnames_all(self):
#     async def links_linkedin(self):
#     async def people_linkedin(self):
#     async def people_twitter(self):
#     async def profiles(self):
#     async def set(self):
#     async def urls(self):
#     async def unique(self) -> list:


# Path: theHarvester/discovery/dnsdumpster.py
from theHarvester.lib.core import *
from theHarvester.parsers import myparser
import aiohttp
import asyncio

            csrftoken = ''
            if self.proxy is False:
                async with session.get(url, headers=headers) as resp:
                    cookies = str(resp.cookies)
                    cookies = cookies.split('csrftoken=')
                    csrftoken += cookies[1][:cookies[1].find(';')]
            else:
                async with session.get(url, headers=headers, proxy=self.proxy) as resp:
                    cookies = str(resp.cookies)
                    cookies = cookies.split('csrftoken=')
                    csrftoken += cookies[1][:cookies[1].find(';')]
            await asyncio.sleep(2)

            # extract csrftoken from cookies
            data = {
                'Cookie': f'csfrtoken={csrftoken}', 'csrfmiddlewaretoken': csrftoken,
                'targetip': self.word, 'user': 'free'}
            headers['Referer'] = url
            if self.proxy is False:
                async with session.post(url, headers=headers, data=data) as resp:
                    self.results = await resp.text()
            else:
                async with session.post(url, headers=headers, data=data, proxy=self.proxy) as resp:
                    self.results = await resp.text()
            await session.close()
        except Exception as e:
            print(f'An exception occurred: {e}')
        self.totalresults += self.results

    async def get_hostnames(self):

        rawres = myparser.Parser(self.totalresults, self.word)