wgpsec / tig

Threat Intelligence Gathering 威胁情报收集,旨在提高蓝队拿到攻击 IP 后对其进行威胁情报信息收集的效率。
Apache License 2.0
850 stars 138 forks source link

是有BUG吗? #5

Closed Ew0x68 closed 3 years ago

Ew0x68 commented 3 years ago

python3 tig.py -i X.X.X.X +-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ |T|h|r|e|a|t| |I|n|t|e|l|l|i|g|e|n|c|e| |G|a|t|h|e|r|i|n|g| +-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ 团队:狼组安全团队 作者:TeamsSix 版本:0.5

[18:18:48] 检测到您可能是第一次运行本程序,请根据程序提示输入您的API地 tig.py:71 址,如果没有直接回车即可,但在查询时将不会调用相关模块 请输入您的微步 Api:[填写的是正常的] 请输入您的Fofa邮箱:[填写的是正常的] 请输入您的Fofa Api:[填写的是正常的] Traceback (most recent call last): File "/Users/win/Downloads/tig-0.5/tig.py", line 508, in console.rule("[yellow]正在查询 %s 的情报信息" % ip, align='left', style="yellow") TypeError: rule() got an unexpected keyword argument 'align'

teamssix commented 3 years ago

可能是 rich 库没安装,您可以运行下面的命令安装 rich 库之后再试试

pip3 install rich
Ew0x68 commented 3 years ago

依然不行,报错还是跟之前

Ew0x68 commented 3 years ago

依然不行,报错还是跟之前一样

keac commented 3 years ago

输入的关键词是否有问题呢?或者看看API什么的是否有问题

keac commented 3 years ago

输入的关键词是否有问题呢?或者看看API什么的是否有问题

teamssix commented 3 years ago

@0x68W 请问您使用的python版本是多少?

Ew0x68 commented 3 years ago

@0x68W 请问您使用的python版本是多少?

python3.9

Ew0x68 commented 3 years ago

输入的关键词是否有问题呢?或者看看API什么的是否有问题

API是直接覆盖的旧版本文件自动获取的,是正确的

teamssix commented 3 years ago

@0x68W 请问您使用的python版本是多少?

python3.9

好的,请问您的操作系统是什么?我在我本地搭个环境测试一下

Ew0x68 commented 3 years ago

@0x68W 请问您使用的python版本是多少?

python3.9

好的,请问您的操作系统是什么?我在我本地搭个环境测试一下

MAC

teamssix commented 3 years ago

@0x68W 请问您使用的python版本是多少?

python3.9

好的,请问您的操作系统是什么?我在我本地搭个环境测试一下

MAC

OK,好的,我用python3.9测试一下

teamssix commented 3 years ago

@0x68W 我这边使用Python 3.9.4、pip 21.0.1、big sur 11.2.3 进行测试是正常的,建议您可以再 git clone 一下本程序试试。

git clone https://github.com/wgpsec/tig.git
cd  tig
pip3 install -r requirements.txt
python3 tig.py
Ew0x68 commented 3 years ago

OK

Ew0x68 commented 3 years ago

@0x68W 我这边使用Python 3.9.4、pip 21.0.1、big sur 11.2.3 进行测试是正常的,建议您可以再 git clone 一下本程序试试。

git clone https://github.com/wgpsec/tig.git
cd  tig
pip3 install -r requirements.txt
python3 tig.py

python3 tig.py -i [正常IP]

+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ |T|h|r|e|a|t| |I|n|t|e|l|l|i|g|e|n|c|e| |G|a|t|h|e|r|i|n|g| +-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ 团队:狼组安全团队 作者:TeamsSix 版本:0.5

Traceback (most recent call last): File "/Users/win/Downloads/tig/tig.py", line 508, in console.rule("[yellow]正在查询 %s 的情报信息" % ip, align='left', style="yellow") TypeError: rule() got an unexpected keyword argument 'align'

Ew0x68 commented 3 years ago

@0x68W 我这边使用Python 3.9.4、pip 21.0.1、big sur 11.2.3 进行测试是正常的,建议您可以再 git clone 一下本程序试试。

git clone https://github.com/wgpsec/tig.git
cd  tig
pip3 install -r requirements.txt
python3 tig.py

python3 tig.py -i [正常IP]

+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ |T|h|r|e|a|t| |I|n|t|e|l|l|i|g|e|n|c|e| |G|a|t|h|e|r|i|n|g| +-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ 团队:狼组安全团队 作者:TeamsSix 版本:0.5

Traceback (most recent call last): File "/Users/win/Downloads/tig/tig.py", line 508, in console.rule("[yellow]正在查询 %s 的情报信息" % ip, align='left', style="yellow") TypeError: rule() got an unexpected keyword argument 'align'

依然如此,纳闷了,不知道是谁走漏了风声,为什么我的就不行

teamssix commented 3 years ago

@0x68W 我看这个错误是因为 alian 参数的问题,但理论上存在这个参数应该是没问题的,至少在我和其他人的测试中,不过你可以尝试删掉这个参数看看能否正常运行,具体做法是:

找到 tig.py的第508行,删掉 align='left', 应该就行了

Ew0x68 commented 3 years ago

@0x68W 我看这个错误是因为 alian 参数的问题,但理论上存在这个参数应该是没问题的,至少在我和其他人的测试中,不过你可以尝试删掉这个参数看看能否正常运行,具体做法是:

找到 tig.py的第508行,删掉 align='left', 应该就行了

+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ |T|h|r|e|a|t| |I|n|t|e|l|l|i|g|e|n|c|e| |G|a|t|h|e|r|i|n|g| +-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ 团队:狼组安全团队 作者:TeamsSix 版本:0.5

─────────────────────────── 正在查询 [ip] 的情报信息 ──────────────────────────── Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen self._prepare_proxy(conn) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy conn.connect() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connection.py", line 411, in connect self.sock = ssl_wrapsocket( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/ssl.py", line 428, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/ssl.py", line 472, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1040, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1123)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/retry.py", line 573, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.threatbook.cn', port=443): Max retries exceeded with url: /v3/scene/ip_reputation?apikey=0d7f4005ead9460a9e9ecd69a66ac6ffdd22f0a8139046fd9709ba43becd35fa&resource=[ip] &lang=zh (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/win/Downloads/tig/tig.py", line 509, in main(ip, config_path, proxies) File "/Users/win/Downloads/tig/tig.py", line 288, in main ThreatBook_result = ThreatBook(ip, config_path) File "/Users/win/Downloads/tig/tig.py", line 146, in ThreatBook r = requests.request("GET", url, params=query) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/adapters.py", line 514, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='api.threatbook.cn', port=443): Max retries exceeded with url: /v3/scene/ip_reputation?apikey=0d7f4005ead9460a9e9ecd69a66ac6ffdd22f0a8139046fd9709ba43becd35fa&resource=[ip] &lang=zh (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)')))

teamssix commented 3 years ago

@0x68W 我看这个错误是因为 alian 参数的问题,但理论上存在这个参数应该是没问题的,至少在我和其他人的测试中,不过你可以尝试删掉这个参数看看能否正常运行,具体做法是: 找到 tig.py的第508行,删掉 align='left', 应该就行了

+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ |T|h|r|e|a|t| |I|n|t|e|l|l|i|g|e|n|c|e| |G|a|t|h|e|r|i|n|g| +-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ 团队:狼组安全团队 作者:TeamsSix 版本:0.5

─────────────────────────── 正在查询 [ip] 的情报信息 ──────────────────────────── Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 696, in urlopen self._prepare_proxy(conn) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy conn.connect() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connection.py", line 411, in connect self.sock = ssl_wrapsocket( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/ssl.py", line 428, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/ssl.py", line 472, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1040, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1123)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/retry.py", line 573, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.threatbook.cn', port=443): Max retries exceeded with url: /v3/scene/ip_reputation?apikey=0d7f4005ead9460a9e9ecd69a66ac6ffdd22f0a8139046fd9709ba43becd35fa&resource=[ip] &lang=zh (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/win/Downloads/tig/tig.py", line 509, in main(ip, config_path, proxies) File "/Users/win/Downloads/tig/tig.py", line 288, in main ThreatBook_result = ThreatBook(ip, config_path) File "/Users/win/Downloads/tig/tig.py", line 146, in ThreatBook r = requests.request("GET", url, params=query) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/adapters.py", line 514, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='api.threatbook.cn', port=443): Max retries exceeded with url: /v3/scene/ip_reputation?apikey=0d7f4005ead9460a9e9ecd69a66ac6ffdd22f0a8139046fd9709ba43becd35fa&resource=[ip] &lang=zh (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)')))

这个问题可能是由于代码中没有设置证书信任为false的原因,稍等,我修复一下

teamssix commented 3 years ago

@0x68W 这个问题我想已经被修复,您可以直接在 tig 目录下运行 git pull 获取最新版,然后再试试

Ew0x68 commented 3 years ago

@0x68W 这个问题我想已经被修复,您可以直接在 tig 目录下运行 git pull 获取最新版,然后再试试

已经正常,师傅🐂p

teamssix commented 3 years ago

@0x68W 这个问题我想已经被修复,您可以直接在 tig 目录下运行 git pull 获取最新版,然后再试试

已经正常,师傅🐂p

正常了就好 [捂脸哭]