diff --git a/lib/common/models/wp_theme/childtheme.rb b/lib/common/models/wp_theme/childtheme.rb index 3e0944e8..0303db99 100644 --- a/lib/common/models/wp_theme/childtheme.rb +++ b/lib/common/models/wp_theme/childtheme.rb @@ -3,6 +3,10 @@ class WpTheme < WpItem module Childtheme + def parent_theme_limit + 3 + end + def is_child_theme? return true unless @theme_template.nil? false diff --git a/wpscan.rb b/wpscan.rb index 7596a077..c114d636 100755 --- a/wpscan.rb +++ b/wpscan.rb @@ -222,7 +222,10 @@ def main wp_theme.output(wpscan_options.verbose) # Check for parent Themes - while wp_theme.is_child_theme? + parent_theme_count = 0 + while wp_theme.is_child_theme? && parent_theme_count <= wp_theme.parent_theme_limit + parent_theme_count += 1 + parent = wp_theme.get_parent_theme puts puts "#{info('[+]')} Detected parent theme: #{parent}"