Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotImplementedError on valid CPEs #43

Open
v2vivar opened this issue Mar 14, 2020 · 6 comments
Open

NotImplementedError on valid CPEs #43

v2vivar opened this issue Mar 14, 2020 · 6 comments

Comments

@v2vivar
Copy link

v2vivar commented Mar 14, 2020

Exception -
NotImplementedError: Style of version 2.3 of CPE not implemented
CVE-2014-5606 - cpe:2.3:a:disney:where\'s_my_perry?_free:1.5.1:::::android::
CVE-2014-5607 - cpe:2.3:a:disney:where's_my_water?free:1.9.1:::::android::
CVE-2014-6006 - cpe:2.3:a:gratta
&_vinci?project:gratta&_vinci?:0.21.13167.93474:::::android::
CVE-2014-7025 - cpe:2.3:a:whoisit:who-is-it?_lite_name_caller_time_limited_free:1:::::android::

@v2vivar
Copy link
Author

v2vivar commented Mar 14, 2020

Text was converted to style icons. Pasting it agains in code block.

Exception -
NotImplementedError: Style of version 2.3 of CPE not implemented
CVE-2014-5606 - cpe:2.3:a:disney:where\\'s_my_perry?_free:1.5.1:*:*:*:*:android:*:*
CVE-2014-5607 - cpe:2.3:a:disney:where\'s_my_water\?_free:1.9.1:*:*:*:*:android:*:*
CVE-2014-6006 -  cpe:2.3:a:gratta_\&_vinci\?_project:gratta_\&_vinci\?:0.21.13167.93474:*:*:*:*:android:*:*
CVE-2014-7025 - cpe:2.3:a:whoisit:who-is-it\?_lite_name_caller_time_limited_free:1:*:*:*:*:android:*:*

@donpellegrino
Copy link

I can confirm this issue. As a work-around I had to do a string replace on '2.3:' with '/' before instantiating CPE.

@nilp0inter
Copy link
Owner

I remember we didn't implement this version back in the day because we didn't use it.

@donpellegrino , I am not a heavy user of CPE anymore so I am not aware of the details. Can you confirm that making the replacement of the string '2.3:' by '/' makes ALL CPEs 2.3 work?

@Spider-sun
Copy link

解决了吗

@Spider-sun
Copy link

我尝试了修改CPE里的正则匹配,解决了报错的问题。
你可以尝试一下引入CPE包后加入这几行代码:
from cpe.cpe2_2 import CPE2_2
from cpe.comp.cpecomp2_2 import CPEComponent2_2

CPEComponent2_2.VALUE_PATTERN = "^([\d\w.-~%+/'\()!"#$%&*,:;<=>?@[]^`{}|]+)$"
CPEComponent2_2._value_rxc = re.compile(CPEComponent2_2._VALUE_PATTERN)

str12 = 'cpe:/a:microsoft:visual_c++:2005:sp1_redistribution_pkg'
c11 = CPE2_2(str12)

@sfc-gh-pkommini
Copy link

@Spider-sun Is there any way to replicate this for CPEComponent2_3?

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

No branches or pull requests

5 participants