MCPcopy Create free account
hub / github.com/KingOfBugbounty/enumrust / parse_wp_plugins

Function parse_wp_plugins

src/wpscan.rs:358–388  ·  view source on GitHub ↗
(json: &serde_json::Value)

Source from the content-addressed store, hash-verified

356}
357
358fn parse_wp_plugins(json: &serde_json::Value) -> Vec<WPPlugin> {
359 let mut plugins = Vec::new();
360
361 if let Some(plugins_obj) = json.get("plugins").and_then(|p| p.as_object()) {
362 for (slug, plugin_data) in plugins_obj {
363 let version = plugin_data
364 .get("version")
365 .and_then(|v| v.as_str())
366 .map(|s| s.to_string());
367
368 let outdated = plugin_data
369 .get("outdated")
370 .and_then(|v| v.as_bool())
371 .unwrap_or(false);
372
373 let vulnerabilities = parse_vulns_array(
374 plugin_data.get("vulnerabilities"),
375 slug,
376 );
377
378 plugins.push(WPPlugin {
379 slug: slug.clone(),
380 version,
381 outdated,
382 vulnerabilities,
383 });
384 }
385 }
386
387 plugins
388}
389
390fn parse_wp_themes(json: &serde_json::Value) -> Vec<WPTheme> {
391 let mut themes = Vec::new();

Callers 1

parse_wpscan_jsonFunction · 0.85

Calls 1

parse_vulns_arrayFunction · 0.85

Tested by

no test coverage detected