diff --git a/pocx/__init__.py b/pocx/__init__.py index 182be45..143e491 100644 --- a/pocx/__init__.py +++ b/pocx/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.2.1' +__version__ = '0.2.2' from .aio_poc import AioPoc from .basic_poc import BasicPoc diff --git a/pocx/funcs/fofa.py b/pocx/funcs/fofa.py index 63d512d..29ebc50 100644 --- a/pocx/funcs/fofa.py +++ b/pocx/funcs/fofa.py @@ -95,7 +95,7 @@ def assets(self, grammar: str, page: int = 1, size: int = 100): if not results: return targets for asset in results['results']: - target = f'https://{asset[1]}:{asset[2]}' if int(asset[2]) == 443 else f'http://{asset[1]}:{asset[2]}' + target = asset[0] if 'http' in asset[0] else (f'https://{asset[1]}:{asset[2]}' if int(asset[2]) == 443 else f'http://{asset[1]}:{asset[2]}') targets.append(target) return list(set(targets)) @@ -128,7 +128,7 @@ def asset_pages(self, grammar: str, size: int = 100): return 1 all_counts = results['size'] if all_counts >= 10000: - logger.warning("Fofa's asset counts is {all_counts}, which is too much, so we only search the first 10000.") + logger.warning(f"Fofa's asset counts is {all_counts}, which is too much, so we only search the first 10000.") count = 10000 % size pages = 10000 // size if count == 0 else 10000 // size + 1 else: diff --git a/pyproject.toml b/pyproject.toml index 10332d9..69820db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pocx" -version = "0.2.1" +version = "0.2.2" description = "A Simple, Fast and Powerful poc engine tools was built by antx, which support synchronous mode and asynchronous mode." authors = ["antx "] license = "MIT"