(self, plugins_json, base_url, source_event)
| 231 | ) |
| 232 | |
| 233 | def parse_wp_plugins(self, plugins_json, base_url, source_event): |
| 234 | for name, plugin in plugins_json.items(): |
| 235 | url = plugin.get("location", base_url) |
| 236 | if url != base_url: |
| 237 | url_event = self.make_event(url, "URL_UNVERIFIED", parent=source_event, tags=["httpx-safe"]) |
| 238 | if url_event: |
| 239 | yield url_event |
| 240 | version = plugin.get("version", {}).get("number", "") |
| 241 | if version: |
| 242 | technology = f"{name} {version}" |
| 243 | else: |
| 244 | technology = name |
| 245 | yield self.make_event( |
| 246 | {"technology": str(technology).lower(), "url": url, "host": str(source_event.host)}, |
| 247 | "TECHNOLOGY", |
| 248 | source_event, |
| 249 | ) |
| 250 | for vuln in plugin.get("vulnerabilities", []): |
| 251 | yield self.make_event( |
| 252 | { |
| 253 | "severity": "HIGH", |
| 254 | "host": str(source_event.host), |
| 255 | "url": url, |
| 256 | "description": self.vulnerability_to_s(vuln), |
| 257 | }, |
| 258 | "VULNERABILITY", |
| 259 | source_event, |
| 260 | ) |
| 261 | |
| 262 | def vulnerability_to_s(self, vuln_json): |
| 263 | string = [] |
no test coverage detected