Skip to content

Commit

Permalink
Merge pull request #51 from wikiZ/main
Browse files Browse the repository at this point in the history
Update Kunyu Version 1.7.1
  • Loading branch information
0x7Fancy committed Mar 23, 2022
2 parents 25c1588 + a57aad9 commit e2e6bcc
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions doc/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ ZoomEye:
stype <v4/v6> 设置获取数据类型IPV4或IPV6,默认为 ipv4,ipv6 全选
btype <host/web> 设置批量查询的API接口(默认为HOST)
timeout <num> 设置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
```

## 使用案例
Expand Down
2 changes: 1 addition & 1 deletion kunyu/config/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion kunyu/core/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ def start(self):
pass
sys.exit(0)

except Exception:
except Exception as err:
console.print(err)
continue


Expand Down
6 changes: 4 additions & 2 deletions kunyu/core/zoomeye.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
8 changes: 4 additions & 4 deletions kunyu/lib/SerachData.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,19 @@ 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<Jwt>(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<Ip>((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<Ip>[\"\'\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<Email>([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<ChinaIdCard>[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<ChinaMobile>[^\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])"
AccessKey = "(?P<AccessKey>([Aa](ccess|CCESS)_?[Kk](ey|EY)|[Aa](ccess|CCESS)_?[sS](ecret|ECRET)|[Aa](ccess|CCESS)_?(id|ID|Id)|[Aa](ccess|CCESS)[A-Za-z0-9_-]{5,10})[A-Za-z0-9\"'\s]{0,10}[=:][\s\"\']{1,5}[A-Za-z0-9]{2,30}[\"'])"
SecretKey = "(?P<SecretKey>([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<AppId>([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<UserName>([Uu](ser|SER)_?[Nn](ame|AME))[^)(|,\"'\+]{0,10}[=:][\s\"\']{1,5}[^)(|\s=,]{2,30}[\"'])"
PassWord = "(?P<PassWord>([Pp](ass|ASS)_?[Ww](ord|ORD|D|d))[^)(|,\"'\+]{0,10l}[=:][\s\"\']{1,5}[^)(|\s=]{2,30}[\"'])"
PassWord = "(?P<PassWord>([Pp](ass|ASS)_?[Ww](ord|ORD|D|d))[^)(|,\"'\+]{0,10}[=:][\s\"\']{1,5}[^)(|\s=]{2,30}[\"'])"

# Not tested.
# did not test
SSHKey = "(?P<SSHKey>-----BEGIN PRIVATE KEY-----[a-zA-Z0-9\\S]{100,}-----END PRIVATE KEY——)"
RSAKey = "(?P<RSAKey>-----BEGIN RSA PRIVATE KEY-----[a-zA-Z0-9\\S]{100,}-----END RSA PRIVATE KEY-----)"
GithubAccessKey = "(?P<GithubAccessKey>[a-zA-Z0-9_-]*:[a-zA-Z0-9_\\-]+@github\\.com*)"
Expand Down

0 comments on commit e2e6bcc

Please sign in to comment.