|
4 | 4 |
|
5 | 5 | [](https://github.com/fofapro/vulfocus-java/releases) [](https://github.com/fofapro/vulfocus-java/stargazers) [](https://github.com/fofapro/vulfocus-java/blob/master/LICENSE) |
6 | 6 |
|
| 7 | +[Chinese document](https://github.com/fofapro/vulfocus-java/blob/master/README.md) |
| 8 | + |
7 | 9 | ## Vulfocus API |
8 | 10 |
|
9 | 11 |
|
10 | 12 | [`Vulfocus API`](https://fofapro.github.io/vulfocus/#/VULFOCUSAPI) is the `RESUFul API` interface provided by [`Vulfocus`](http://vulfocus.io/) for development, allowing Developers integrate [`Vulfocus`](http://vulfocus.io) in their own projects. |
11 | 13 |
|
12 | 14 | ## Vulfocus SDK |
13 | 15 |
|
14 | | -The `Java` version of `SDK` written based on the [`Vulfocus API`](https://fofapro.github.io/vulfocus/#/VULFOCUSAPI) makes it easy for `Java` developers to quickly integrate [`Vulfocus`](http://vulfocus.io/) into their projects. |
| 16 | +The `Java` version of `SDK` written based on the [`Vulfocus API`](https://fofapro.github.io/vulfocus/#/VULFOCUSAPI) makes it easy for `Java` developers to quickly integrate [`Vulfocus`](http://vulfocus.io/) into their projects. |
| 17 | + |
| 18 | +## Add dependency |
| 19 | + |
| 20 | +### Apache Maven |
| 21 | + |
| 22 | +``` |
| 23 | +<dependency> |
| 24 | + <groupId>com.r4v3zn.vulfocus</groupId> |
| 25 | + <artifactId>vulfocus-core</artifactId> |
| 26 | + <version>0.0.2</version> |
| 27 | +</dependency> |
| 28 | +``` |
| 29 | + |
| 30 | +## USE |
| 31 | + |
| 32 | +|field|description| |
| 33 | +| ---- | ---- | |
| 34 | +|`addr`|[`Vulfocus`](http://vulfocus.io/) URL| |
| 35 | +|`username`|User login [`Vulfocus`](http://vulfocus.io/) userbox `username`| |
| 36 | +|`licence`|Please go to the [`personal center`](http://vulfocus.fofa.so/#/profile/index) to view `API licence`| |
| 37 | + |
| 38 | +### Pull Images |
| 39 | + |
| 40 | +#### Code |
| 41 | + |
| 42 | +```java |
| 43 | +public static void main(String[] args) throws Exception { |
| 44 | + String username = ""; |
| 45 | + String license = ""; |
| 46 | + VulfocusClinet vulfocusClinet = new VulfocusClinet(username, license); |
| 47 | + List<ImageEntity> imageEntityList = vulfocusClinet.imageList(); |
| 48 | + System.out.println(imageEntityList); |
| 49 | +} |
| 50 | +``` |
| 51 | + |
| 52 | +#### Response |
| 53 | + |
| 54 | +``` |
| 55 | +[ImageEntity{imageName='vulfocus/webmin-cve_2020_35606:latest', imageVulName='Webmin 命令执行漏洞 (CVE-2020-35606)', imageDesc='Webmin是Webmin社区的一套基于Web的用于类Unix操作系统中的系统管理工具。 |
| 56 | +Webmin 1.962版本及之前版本存在安全漏洞,该漏洞允许执行任意命令。任何被授权使用Package Updates模块的用户都可以使用根权限通过包含和的向量执行任意命令。 |
| 57 | +账户密码:root:password'}] |
| 58 | +``` |
| 59 | + |
| 60 | +## Start |
| 61 | + |
| 62 | +### Code |
| 63 | + |
| 64 | +```java |
| 65 | +public static void main(String[] args) throws Exception { |
| 66 | + String username = ""; |
| 67 | + String license = ""; |
| 68 | + VulfocusClinet vulfocusClinet = new VulfocusClinet(username, license); |
| 69 | + List<ImageEntity> imageEntityList = vulfocusClinet.imageList(); |
| 70 | + ImageEntity imageEntity = imageEntityList.get(0); |
| 71 | + System.out.println(imageEntity); |
| 72 | + System.out.println(vulfocusClinet.start(imageEntity.getImageName())); |
| 73 | +} |
| 74 | +``` |
| 75 | + |
| 76 | + |
| 77 | +### Response |
| 78 | + |
| 79 | +``` |
| 80 | +ImageEntity{imageName='vulfocus/webmin-cve_2020_35606:latest', imageVulName='Webmin 命令执行漏洞 (CVE-2020-35606)', imageDesc='Webmin是Webmin社区的一套基于Web的用于类Unix操作系统中的系统管理工具。 |
| 81 | +Webmin 1.962版本及之前版本存在安全漏洞,该漏洞允许执行任意命令。任何被授权使用Package Updates模块的用户都可以使用根权限通过包含和的向量执行任意命令。 |
| 82 | +账户密码:root:password'} |
| 83 | +
|
| 84 | +HostEntity{host='118.193.36.37:54240', port='{"10000": "54240"}'} |
| 85 | +``` |
| 86 | + |
| 87 | +## Stop |
| 88 | + |
| 89 | +### Code |
| 90 | + |
| 91 | +```java |
| 92 | +public static void main(String[] args) throws Exception { |
| 93 | + String username = ""; |
| 94 | + String license = ""; |
| 95 | + VulfocusClinet vulfocusClinet = new VulfocusClinet(username, license); |
| 96 | + List<ImageEntity> imageEntityList = vulfocusClinet.imageList(); |
| 97 | + ImageEntity imageEntity = imageEntityList.get(0); |
| 98 | + System.out.println(imageEntity); |
| 99 | + System.out.println(vulfocusClinet.stop(imageEntity.getImageName())); |
| 100 | +} |
| 101 | +``` |
| 102 | + |
| 103 | +### Response |
| 104 | + |
| 105 | +``` |
| 106 | +ImageEntity{imageName='vulfocus/webmin-cve_2020_35606:latest', imageVulName='Webmin 命令执行漏洞 (CVE-2020-35606)', imageDesc='Webmin是Webmin社区的一套基于Web的用于类Unix操作系统中的系统管理工具。 |
| 107 | +Webmin 1.962版本及之前版本存在安全漏洞,该漏洞允许执行任意命令。任何被授权使用Package Updates模块的用户都可以使用根权限通过包含和的向量执行任意命令。 |
| 108 | +账户密码:root:password'} |
| 109 | +
|
| 110 | +停止成功 |
| 111 | +``` |
| 112 | + |
| 113 | +## Delete |
| 114 | + |
| 115 | +### Code |
| 116 | + |
| 117 | +```java |
| 118 | +public static void main(String[] args) throws Exception { |
| 119 | + String username = ""; |
| 120 | + String license = ""; |
| 121 | + VulfocusClinet vulfocusClinet = new VulfocusClinet(username, license); |
| 122 | + List<ImageEntity> imageEntityList = vulfocusClinet.imageList(); |
| 123 | + ImageEntity imageEntity = imageEntityList.get(0); |
| 124 | + System.out.println(imageEntity); |
| 125 | + System.out.println(vulfocusClinet.delete(imageEntity.getImageName())); |
| 126 | +} |
| 127 | +``` |
| 128 | + |
| 129 | +### Response |
| 130 | + |
| 131 | +``` |
| 132 | +ImageEntity{imageName='vulfocus/webmin-cve_2020_35606:latest', imageVulName='Webmin 命令执行漏洞 (CVE-2020-35606)', imageDesc='Webmin是Webmin社区的一套基于Web的用于类Unix操作系统中的系统管理工具。 |
| 133 | +Webmin 1.962版本及之前版本存在安全漏洞,该漏洞允许执行任意命令。任何被授权使用Package Updates模块的用户都可以使用根权限通过包含和的向量执行任意命令。 |
| 134 | +账户密码:root:password'} |
| 135 | +
|
| 136 | +删除成功 |
| 137 | +``` |
| 138 | + |
| 139 | +## Update Log |
| 140 | + |
| 141 | +2021-11-26 |
| 142 | + |
| 143 | +``` |
| 144 | +Release |
| 145 | +``` |
0 commit comments