From 4a4eb307bc84a1129bb5ea5df73dcf0dd02fa040 Mon Sep 17 00:00:00 2001 From: bcoles Date: Mon, 3 Apr 2023 23:22:38 +1000 Subject: [PATCH] API: Verify inheritance from BeEF::API class (#2803) --- core/api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/api.rb b/core/api.rb index 3599430dc..cb6e5bf8f 100644 --- a/core/api.rb +++ b/core/api.rb @@ -184,7 +184,7 @@ module BeEF mods = get_owners(clss, mthd, args) return nil unless mods.length.positive? - unless verify_api_path(clss, mthd) && clss.ancestors[0].to_s > 'BeEF::API' + unless verify_api_path(clss, mthd) && clss.ancestors.first.to_s.start_with?('BeEF::API') print_error "API Path not defined for Class: #{clss} method: #{mthd}" return [] end