# Path: lib/core/data.py

# 
# 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 requests
import getpass
import sys
from lib.core.data import logger, paths
from lib.utils.config import ConfigFileParser
#!/usr/bin/env python
#-*- coding:utf-8 -*-



class ZoomEye(object):
    def __init__(self, username=None, password=None):
        self.username = username
        self.password = password

        self.token = ''
        self.zoomeye_login_api = "https://api.zoomeye.org/user/login"
        self.zoomeye_dork_api = "https://api.zoomeye.org/{}/search"

    def auto_login(self):
        msg = 'Trying to login with credentials in config file: %s' % paths.CONFIG_PATH
        logger.info(msg)
        try:
            self.username = ConfigFileParser().ZoomEyeEmail()

# Path: lib/core/data.py

# 
# 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: lib/api/zoomeye/base.py
import requests
import getpass
import sys
from lib.core.data import logger, paths
from lib.utils.config import ConfigFileParser

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



class ZoomEye(object):
    def __init__(self, username=None, password=None):
        self.username = username
        self.password = password

        self.token = ''
        self.zoomeye_login_api = "https://api.zoomeye.org/user/login"
        self.zoomeye_dork_api = "https://api.zoomeye.org/{}/search"

    def auto_login(self):
        msg = 'Trying to login with credentials in config file: %s' % paths.CONFIG_PATH
        logger.info(msg)
        try:
            self.username = ConfigFileParser().ZoomEyeEmail()

            self.password = ConfigFileParser().ZoomEyePassword()