# Path: lib/utils/config.py
# class ConfigFileParser:
#     @staticmethod
#     def _get_option(section, option):
#         try:
#             cf = ConfigParser.ConfigParser()
#             cf.read(paths.CONFIG_PATH)
#             return cf.get(section=section, option=option)
#         except ConfigParser.NoOptionError, e:
#             logger.warning('Missing essential options, please check your config-file')
#             logger.error(getSafeExString(e))
#             return ''
# 
#     def ZoomEyeEmail(self):
#         return self._get_option('zoomeye', 'email')
# 
#     def ZoomEyePassword(self):
#         return self._get_option('zoomeye', 'password')
# 
#     def UrlFilter(self):
#         return self._get_option('urlfilter', 'regex')


import random
import requests
import time
from string import ascii_lowercase
from lib.utils.config import ConfigFileParser
#!/usr/bin/env python
#-*- coding: utf-8 -*-


"""
CloudEye API

Usage:
    c = CloudEye()
    a = c.getRandomDomain('cdxy')
    try:
        requests.get('http://' + a, timeout=1)
    except Exception:
        pass
    print c.verifyDNS(delay=0)
    print c.verifyHTTP(delay=0)
    print c.getDnsRecord(delay=0)
    print c.getHttpRecord(delay=0)
"""


# load once for all thread
key = ConfigFileParser().CloudEyeApikey()

# Path: lib/utils/config.py
# class ConfigFileParser:
#     @staticmethod
#     def _get_option(section, option):
#         try:
#             cf = ConfigParser.ConfigParser()
#             cf.read(paths.CONFIG_PATH)
#             return cf.get(section=section, option=option)
#         except ConfigParser.NoOptionError, e:
#             logger.warning('Missing essential options, please check your config-file')
#             logger.error(getSafeExString(e))
#             return ''
# 
#     def ZoomEyeEmail(self):
#         return self._get_option('zoomeye', 'email')
# 
#     def ZoomEyePassword(self):
#         return self._get_option('zoomeye', 'password')
# 
#     def UrlFilter(self):
#         return self._get_option('urlfilter', 'regex')


# Path: plugin/cloudeye.py
import random
import requests
import time
from string import ascii_lowercase
from lib.utils.config import ConfigFileParser

#!/usr/bin/env python
#-*- coding: utf-8 -*-


"""
CloudEye API

Usage:
    c = CloudEye()
    a = c.getRandomDomain('cdxy')
    try:
        requests.get('http://' + a, timeout=1)
    except Exception:
        pass
    print c.verifyDNS(delay=0)
    print c.verifyHTTP(delay=0)
    print c.getDnsRecord(delay=0)
    print c.getHttpRecord(delay=0)
"""


# load once for all thread
key = ConfigFileParser().CloudEyeApikey()

uniq_domain = ConfigFileParser().ColudEyePersonaldomain().split('.')[0]