diff --git a/pocx/__init__.py b/pocx/__init__.py index f10e7f4..a076c46 100644 --- a/pocx/__init__.py +++ b/pocx/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.1.7' +__version__ = '0.1.8' from .aio_poc import AioPoc from .basic_poc import BasicPoc diff --git a/pocx/aio_poc.py b/pocx/aio_poc.py index 5f0744e..017f4ac 100644 --- a/pocx/aio_poc.py +++ b/pocx/aio_poc.py @@ -4,6 +4,7 @@ import httpx import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) +httpx._config.DEFAULT_CIPHERS += ":ALL:@SECLEVEL=1" class AioPoc(metaclass=ABCMeta): diff --git a/pocx/basic_poc.py b/pocx/basic_poc.py index 9ef68e6..ad4fcce 100644 --- a/pocx/basic_poc.py +++ b/pocx/basic_poc.py @@ -3,6 +3,7 @@ import httpx import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) +httpx._config.DEFAULT_CIPHERS += ":ALL:@SECLEVEL=1" class BasicPoc(metaclass=ABCMeta): diff --git a/pocx/funcs/ceye.py b/pocx/funcs/ceye.py index 64d71af..ae3c9ef 100644 --- a/pocx/funcs/ceye.py +++ b/pocx/funcs/ceye.py @@ -1,5 +1,4 @@ import httpx -import subprocess from loguru import logger from .snow_flake import IdWorker @@ -40,20 +39,24 @@ def generate_payload_id(self): return str(self.id_worker.get_id()) @logger.catch(level='ERROR') - def verify(self, pid: str, verify_type: str='dns'): + def verify(self, pfilter: str, verify_type: str='dns'): """ Verify the payload. - :param pid: The unique id of the payload. + :param pfilter: The unique string of the payload. :param verify_type: The type of the verification, http or dns. :return: The bool result of the verification. """ - verify_url = f'http://api.ceye.io/v1/records?token={self.api_token}&type={verify_type}&filter={pid}' - result = httpx.get(verify_url).json() - if not result['data']: - logger.error(f'{pid} not found in Ceye') + verify_url = f'http://api.ceye.io/v1/records?token={self.api_token}&type={verify_type}&filter={pfilter}' + try: + result = httpx.get(verify_url).json() + if not result['data']: + logger.error(f'{pfilter} not found in Ceye') + return False + logger.success(f'{pfilter} found in Ceye') + logger.success(f'The ceye records are: \n{result["data"]}') + return True + except Exception as e: + logger.error(f'verify has been occur an error \n{e}') return False - logger.success(f'{pid} found in Ceye') - logger.success(f'The ceye records are: \n{result["data"]}') - return True diff --git a/pyproject.toml b/pyproject.toml index 8e3bc7b..acb884e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pocx" -version = "0.1.7" +version = "0.1.8" description = "A Simple, Fast and Powerful poc engine tools was built by antx, which support synchronous mode and asynchronous mode." authors = ["antx "] license = "MIT"