pacificsec / cpe
CPE: PHP的通用平台枚举
1.0.1
2018-08-22 17:55 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-09-28 19:15:13 UTC
README
CPE (此代码) 是一个MIT许可的PHP包,实现了CPE标准。
CPE标准简介
通用平台枚举(CPE)是一种标准化的方法,用于描述和识别企业计算资源中存在的应用程序、操作系统和硬件设备的类别。
更多信息,请访问由MITRE开发并由NIST维护的CPE官方网站。
特性
- CPE丰富比较。
- CPE语言解析和评估。
- MIT许可。
开始使用
- 克隆仓库
$ git clone https://github.com/pacificsec/cpe.git
$ cd cpe
- 创建一个新PHP文件来运行测试
<?php require('autoload.php'); use PacificSec\CPE\Matching\CPENameMatcher; use PacificSec\CPE\Naming\CPENameUnbinder; use PacificSec\CPE\Naming\CPENameBinder; CPENameMatcher::test(); CPENameUnbinder::test(); CPENameBinder::test();
<?php require('autoload.php'); use PacificSec\CPE\Naming\CPENameUnbinder; $cpenu = new CPENameUnbinder(); $wfn = $cpenu->unbindURI("cpe:/a:microsoft:internet_explorer%01%01%01%01:?:beta"); var_dump($wfn); $wfn = $cpenu->unbindURI("cpe:/a:microsoft:internet_explorer:8.%2a:sp%3f"); var_dump($wfn); $wfn = $cpenu->unbindURI("cpe:/a:microsoft:internet_explorer:8.%02:sp%01"); var_dump($wfn); $wfn = $cpenu->unbindURI("cpe:/a:hp:insight_diagnostics:7.4.0.1570::~~online~win2003~x64~"); var_dump($wfn); $wfn = $cpenu->unbindFS("cpe:2.3:a:micr\\?osoft:internet_explorer:8.0.6001:beta:*:*:*:*:*:*"); var_dump($wfn);