diff --git a/CHANGELOG b/CHANGELOG index 1d4b73d..4ada5df 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.7.1] - 2021-3-22 +### Added +- Improved the pupilsearch regex +- Fixed a problem with HTTP domain name re recognition errors + ## [v1.7.0] - 2021-3-18 ### Added - Part of the code has been refactored to optimize the program structure diff --git a/doc/README_CN.md b/doc/README_CN.md index e8b0774..891459e 100644 --- a/doc/README_CN.md +++ b/doc/README_CN.md @@ -115,11 +115,11 @@ ZoomEye: stype 设置获取数据类型IPV4或IPV6,默认为 ipv4,ipv6 全选 btype 设置批量查询的API接口(默认为HOST) timeout 设置Kunyu HTTP请求的超时时间 - thread 设置PupilSearch线程数量(默认为10) - deep 设置PupilSearch递归深度(默认为2) - all PupilSearch Add All Url To Check List - fuzz PupilSearch Add Api To Check List - proxy PupilSearch HTTP Proxy + thread 设置PupilSearch线程数量(默认为10) + deep 设置PupilSearch递归深度(默认为2) + all PupilSearch Add All Url To Check List + fuzz PupilSearch Add Api To Check List + proxy PupilSearch HTTP Proxy ``` ## 使用案例 diff --git a/kunyu/config/__version__.py b/kunyu/config/__version__.py index b603234..7d81227 100644 --- a/kunyu/config/__version__.py +++ b/kunyu/config/__version__.py @@ -15,7 +15,7 @@ __python_version__ = sys.version.split()[0] __platform__ = platform.platform() __url__ = "https://github.com/knownsec/Kunyu" -__version__ = '1.7.0' +__version__ = '1.7.1' __author__ = '风起' __Team__ = 'KnownSec 404 Team' __author_email__ = 'onlyzaliks@gmail.com' diff --git a/kunyu/core/console.py b/kunyu/core/console.py index 5281423..c796173 100644 --- a/kunyu/core/console.py +++ b/kunyu/core/console.py @@ -245,7 +245,8 @@ def start(self): pass sys.exit(0) - except Exception: + except Exception as err: + console.print(err) continue diff --git a/kunyu/core/zoomeye.py b/kunyu/core/zoomeye.py index 82c6450..c31343f 100644 --- a/kunyu/core/zoomeye.py +++ b/kunyu/core/zoomeye.py @@ -562,13 +562,15 @@ def command_pupilsearch(cls, url): raise ArithmeticError Pupil().response_main(raw_data) else: - raise Exception + raise ValueError except ArithmeticError: return logger.warning( "No retrieval operation is performed or the length of the dictionary key value is exceeded" ) - except Exception: + except ValueError: return logger.warning("Please enter appropriate parameters!") + except Exception as err: + console.print(err) @classmethod def command_createmap(cls, *args, **kwargs): diff --git a/kunyu/lib/SerachData.py b/kunyu/lib/SerachData.py index 47c0127..dfbfb54 100644 --- a/kunyu/lib/SerachData.py +++ b/kunyu/lib/SerachData.py @@ -144,9 +144,9 @@ def search_url(self): # https://www.cnblogs.com/timelesszhuang/p/5014595.html # accesskey、appid、password、proxy token、 def search_other(self): - # 使用正则捕获组来获取数据归属 + # Use the regex capture group to get data ownership Jwt = "(?P(ey[A-Za-z0-9_-]{10,}\.[A-Za-z0-9._-]{10,}\.[A-Za-z0-9._-]{10,}|ey[A-Za-z0-9_\/+-]{10,}\.[A-Za-z0-9._\/+-]{10,}\.[A-Za-z0-9._-]{10,}))" - Ip = "(?P((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3})" + Ip = "(?P[\"\'\s/(]((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3})[\"\'\s/:\)]" Email = "(?P([a-zA-Z0-9][_|\.])*[a-zA-Z0-9]+@([a-zA-Z0-9][-|_|\.])*[a-zA-Z0-9]+\.((?!js|css|jpg|jpeg|png|ico|webp)[a-zA-Z]{2,}))" ChinaIdCard = "(?P[1-8][1-7]\d{4}(?:19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX])" ChinaMobile = "(?P[^\w]((?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8})[^\w])" @@ -154,9 +154,9 @@ def search_other(self): SecretKey = "(?P([Ss](ecret|ECRET)_?[Kk](ey|EY)|[Ss](ecret|ECRET)_?(id|ID|Id)|[Ss](ecret|ECRET))[^)(|]{0,10}[=:][A-Za-z0-9\"'\s]{2,30}[\"'])" AppId = "(?P([Aa](pp|PP)_?[Ii][dD]|[Aa](pp|PP)_?[Kk](ey|EY)|[Aa](pp|PP)_?[Ss](ecret|ECRET))[^)(|]{0,10}[=:][\s\"\']{1,5}[^):'\"+(|]{5,30}[\"'])" UserName = "(?P([Uu](ser|SER)_?[Nn](ame|AME))[^)(|,\"'\+]{0,10}[=:][\s\"\']{1,5}[^)(|\s=,]{2,30}[\"'])" - PassWord = "(?P([Pp](ass|ASS)_?[Ww](ord|ORD|D|d))[^)(|,\"'\+]{0,10l}[=:][\s\"\']{1,5}[^)(|\s=]{2,30}[\"'])" + PassWord = "(?P([Pp](ass|ASS)_?[Ww](ord|ORD|D|d))[^)(|,\"'\+]{0,10}[=:][\s\"\']{1,5}[^)(|\s=]{2,30}[\"'])" - # Not tested. + # did not test SSHKey = "(?P-----BEGIN PRIVATE KEY-----[a-zA-Z0-9\\S]{100,}-----END PRIVATE KEY——)" RSAKey = "(?P-----BEGIN RSA PRIVATE KEY-----[a-zA-Z0-9\\S]{100,}-----END RSA PRIVATE KEY-----)" GithubAccessKey = "(?P[a-zA-Z0-9_-]*:[a-zA-Z0-9_\\-]+@github\\.com*)"