From 42f6bb8212daeb5e3243ad195bf23320192478e1 Mon Sep 17 00:00:00 2001 From: bwatters Date: Mon, 2 Oct 2023 14:29:20 -0500 Subject: [PATCH] Update on feedback from jmartin --- .../metasploit-framework.wiki/How-to-write-a-check-method.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/metasploit-framework.wiki/How-to-write-a-check-method.md b/docs/metasploit-framework.wiki/How-to-write-a-check-method.md index 0b81f0de2d7a..3af8c661c9ba 100644 --- a/docs/metasploit-framework.wiki/How-to-write-a-check-method.md +++ b/docs/metasploit-framework.wiki/How-to-write-a-check-method.md @@ -37,8 +37,9 @@ The `CheckCode` also supports an optional description which is printed by the fr return CheckCode::Appears('Vulnerable component XYZ is installed') ``` -Metasploit Framework check methods are used occasionally by other groups and projects to assist with vulnerability scanning. Please do your best to ensure that the only return value from a check method is a check code. -Basically, that means avoiding the use of `fail_with` or raising exceptions that are not handled within the check method. +`MetasploitModule#check` methods should capture any known `raise` from methods called and return value of class +`Msf::Exploit::CheckCode`. Basically, that means avoiding the use of `fail_with` or raising exceptions that are not +handled within the check method. ## Remote Check Example