Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

扫描个别项目时报错 #1376

Open
testtestu opened this issue Jul 1, 2019 · 0 comments
Open

扫描个别项目时报错 #1376

testtestu opened this issue Jul 1, 2019 · 0 comments

Comments

@testtestu
Copy link

System and Python Environment

|System|Linux localhost.localdomain 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux|
|Python|Python 2.7.5||
|Cobra|v2.0.0-alpha.5|
|Code|JAVA|

Description

在扫描个别的源码项目时会抛出以下错误,且报错的都是固定的几个项目报错
`[16:02:11] [WARNING] Traceback (most recent call last):
File "/root/cobra/cobra/detection.py", line 185, in project_information
for root, dirs, filenames in os.walk(absolute_path):
File "/usr/lib64/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib64/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib64/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib64/python2.7/os.py", line 284, in walk
if isdir(join(top, name)):
File "/usr/lib64/python2.7/posixpath.py", line 80, in join
path += '/' + b
UnicodeDecodeError: 'utf8' codec can't decode byte 0xbd in position 1: invalid start byte

[16:02:12] [WARNING] issue seems to be already reported and resolved. Please update to the latest version from official GitHub repository at 'https://github.com/WhaleShark-Team/cobra'
[16:02:12] [WARNING] Traceback (most recent call last):
File "/root/cobra/cobra/init.py", line 110, in main
cli.start(args.target, args.format, args.output, args.special_rules, a_sid, args.dels)
File "/root/cobra/cobra/cli.py", line 82, in start
main_framework = dt.framework
File "/root/cobra/cobra/detection.py", line 82, in framework
frame_name = self.dependency_scan(root) # Based on the dependency analysis framework type
File "/root/cobra/cobra/detection.py", line 102, in dependency_scan
dependencies = Dependencies(self.target_directory)
File "/root/cobra/cobra/dependencies.py", line 183, in init
self.dependencies()
File "/root/cobra/cobra/dependencies.py", line 186, in dependencies
file_path, flag = self.find_file()
File "/root/cobra/cobra/dependencies.py", line 207, in find_file
for root, dirs, filenames in os.walk(self.directory):
File "/usr/lib64/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib64/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib64/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib64/python2.7/os.py", line 284, in walk
if isdir(join(top, name)):
File "/usr/lib64/python2.7/posixpath.py", line 80, in join
path += '/' + b
UnicodeDecodeError: 'utf8' codec can't decode byte 0xbd in position 1: invalid start byte

Traceback (most recent call last):
File "/root/cobra/cobra/config.py", line 70, in init
value = self.config.get(self.level1, self.level2)
File "/usr/lib64/python2.7/ConfigParser.py", line 607, in get
raise NoSectionError(section)
NoSectionError: No section: 'hash'
[16:02:12] [CRITICAL] ./configs file configure failed. http://cobra.feei.cn/config
Error: No section: 'hash'
[16:02:12] [INFO] [HASH] Projects is modified`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant