From c210260845cf1bfbc9cddaeccc247afd2f77a248 Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Sat, 30 Mar 2013 15:32:38 -0500 Subject: [PATCH] Fix Undocumentable method, missing name YARD warning [#46491831] Comments at the start of the file with ## caused YARD to think the comment was documenting the require call. By removing the ##, the warning disappeared. I did not determine what is special about ## in file comments. --- lib/msf/base.rb | 3 --- lib/msf/base/sessions/meterpreter.rb | 2 -- lib/msf/base/sessions/meterpreter_java.rb | 2 -- lib/msf/base/sessions/meterpreter_options.rb | 2 -- lib/msf/base/sessions/meterpreter_php.rb | 2 -- lib/msf/base/sessions/meterpreter_x64_win.rb | 3 --- lib/msf/base/sessions/meterpreter_x86_bsd.rb | 2 -- lib/msf/base/sessions/meterpreter_x86_linux.rb | 2 -- lib/msf/base/sessions/meterpreter_x86_win.rb | 2 -- lib/msf/base/sessions/tty.rb | 2 -- lib/msf/base/simple/buffer.rb | 2 -- lib/msf/base/simple/payload.rb | 2 -- lib/msf/core/auxiliary/commandshell.rb | 2 -- lib/msf/core/auxiliary/web/form.rb | 2 -- lib/msf/core/auxiliary/web/fuzzable.rb | 2 -- lib/msf/core/auxiliary/web/path.rb | 2 -- lib/msf/core/auxiliary/web/target.rb | 2 -- lib/msf/core/exploit/browser_autopwn.rb | 6 +----- lib/msf/core/exploit/cmdstager.rb | 2 -- lib/msf/core/exploit/cmdstager_debug_asm.rb | 2 -- lib/msf/core/exploit/cmdstager_debug_write.rb | 2 -- lib/msf/core/exploit/cmdstager_tftp.rb | 2 -- lib/msf/core/exploit/cmdstager_vbs.rb | 2 -- lib/msf/core/exploit/cmdstager_vbs_adodb.rb | 2 -- lib/msf/core/exploit/dhcp.rb | 2 -- lib/msf/core/exploit/tftp.rb | 2 -- lib/msf/ui/console/command_dispatcher/payload.rb | 2 -- lib/rex/exploitation/cmdstager.rb | 2 -- lib/rex/exploitation/cmdstager/debug_asm.rb | 3 --- lib/rex/exploitation/cmdstager/debug_write.rb | 3 --- lib/rex/exploitation/cmdstager/tftp.rb | 2 -- lib/rex/exploitation/cmdstager/vbs.rb | 3 --- lib/rex/exploitation/jsobfu.rb | 2 -- lib/rex/proto/natpmp.rb | 6 +----- lib/rex/proto/ntlm/base.rb | 6 +----- lib/rex/proto/rfb.rb | 8 +------- lib/rex/proto/rfb.rb.ut.rb | 13 ++++--------- 37 files changed, 8 insertions(+), 100 deletions(-) diff --git a/lib/msf/base.rb b/lib/msf/base.rb index 5982de14cc..3a4f57225c 100644 --- a/lib/msf/base.rb +++ b/lib/msf/base.rb @@ -1,5 +1,4 @@ # -*- coding: binary -*- -### # # framework-base # -------------- @@ -13,8 +12,6 @@ # Beyond providing the default sessions, framework-base also provides # a wrapper interface to framework-core that makes some of the tasks, # such as exploitation, into easier to manage functions. -# -### # framework-base depends on framework-core require 'msf/core' diff --git a/lib/msf/base/sessions/meterpreter.rb b/lib/msf/base/sessions/meterpreter.rb index 211e52b4e1..2f8b79580a 100644 --- a/lib/msf/base/sessions/meterpreter.rb +++ b/lib/msf/base/sessions/meterpreter.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'msf/base' require 'msf/base/sessions/scriptable' diff --git a/lib/msf/base/sessions/meterpreter_java.rb b/lib/msf/base/sessions/meterpreter_java.rb index 7f298bf408..c92e58e782 100644 --- a/lib/msf/base/sessions/meterpreter_java.rb +++ b/lib/msf/base/sessions/meterpreter_java.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'msf/base/sessions/meterpreter' diff --git a/lib/msf/base/sessions/meterpreter_options.rb b/lib/msf/base/sessions/meterpreter_options.rb index fb467f39f4..c44b8c6f5e 100644 --- a/lib/msf/base/sessions/meterpreter_options.rb +++ b/lib/msf/base/sessions/meterpreter_options.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'shellwords' diff --git a/lib/msf/base/sessions/meterpreter_php.rb b/lib/msf/base/sessions/meterpreter_php.rb index 90cd75b2e7..2ba47c2c03 100644 --- a/lib/msf/base/sessions/meterpreter_php.rb +++ b/lib/msf/base/sessions/meterpreter_php.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'msf/base/sessions/meterpreter' diff --git a/lib/msf/base/sessions/meterpreter_x64_win.rb b/lib/msf/base/sessions/meterpreter_x64_win.rb index 84b56c9e69..450e26bf8d 100644 --- a/lib/msf/base/sessions/meterpreter_x64_win.rb +++ b/lib/msf/base/sessions/meterpreter_x64_win.rb @@ -1,7 +1,4 @@ # -*- coding: binary -*- -## -# $Id: meterpreter_options.rb 10595 2010-10-08 04:11:47Z hdm $ -## require 'msf/base/sessions/meterpreter' require 'msf/windows_error' diff --git a/lib/msf/base/sessions/meterpreter_x86_bsd.rb b/lib/msf/base/sessions/meterpreter_x86_bsd.rb index fcb55d3788..1f851e270c 100644 --- a/lib/msf/base/sessions/meterpreter_x86_bsd.rb +++ b/lib/msf/base/sessions/meterpreter_x86_bsd.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'msf/base/sessions/meterpreter' diff --git a/lib/msf/base/sessions/meterpreter_x86_linux.rb b/lib/msf/base/sessions/meterpreter_x86_linux.rb index df6029cf60..33e72d1be9 100644 --- a/lib/msf/base/sessions/meterpreter_x86_linux.rb +++ b/lib/msf/base/sessions/meterpreter_x86_linux.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'msf/base/sessions/meterpreter' diff --git a/lib/msf/base/sessions/meterpreter_x86_win.rb b/lib/msf/base/sessions/meterpreter_x86_win.rb index 12a259a892..2f44f0e640 100644 --- a/lib/msf/base/sessions/meterpreter_x86_win.rb +++ b/lib/msf/base/sessions/meterpreter_x86_win.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'msf/base/sessions/meterpreter' require 'msf/windows_error' diff --git a/lib/msf/base/sessions/tty.rb b/lib/msf/base/sessions/tty.rb index cf8dddf2d6..acaad4629d 100644 --- a/lib/msf/base/sessions/tty.rb +++ b/lib/msf/base/sessions/tty.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'msf/base' diff --git a/lib/msf/base/simple/buffer.rb b/lib/msf/base/simple/buffer.rb index 3f4992c071..13d26ab7c6 100644 --- a/lib/msf/base/simple/buffer.rb +++ b/lib/msf/base/simple/buffer.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'msf/base' diff --git a/lib/msf/base/simple/payload.rb b/lib/msf/base/simple/payload.rb index 7f6cae11dd..59357b1255 100644 --- a/lib/msf/base/simple/payload.rb +++ b/lib/msf/base/simple/payload.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'msf/base' diff --git a/lib/msf/core/auxiliary/commandshell.rb b/lib/msf/core/auxiliary/commandshell.rb index d4c91a454d..ae145c81be 100644 --- a/lib/msf/core/auxiliary/commandshell.rb +++ b/lib/msf/core/auxiliary/commandshell.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'msf/base/sessions/command_shell_options' diff --git a/lib/msf/core/auxiliary/web/form.rb b/lib/msf/core/auxiliary/web/form.rb index b899be34fd..6636db9414 100644 --- a/lib/msf/core/auxiliary/web/form.rb +++ b/lib/msf/core/auxiliary/web/form.rb @@ -1,9 +1,7 @@ -## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # Framework web site for more information on licensing and terms of use. # http://metasploit.com/framework/ -## require 'net/https' require 'net/http' diff --git a/lib/msf/core/auxiliary/web/fuzzable.rb b/lib/msf/core/auxiliary/web/fuzzable.rb index e3daebb393..d4e0e91c88 100644 --- a/lib/msf/core/auxiliary/web/fuzzable.rb +++ b/lib/msf/core/auxiliary/web/fuzzable.rb @@ -1,9 +1,7 @@ -## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # Framework web site for more information on licensing and terms of use. # http://metasploit.com/framework/ -## require 'net/https' require 'net/http' diff --git a/lib/msf/core/auxiliary/web/path.rb b/lib/msf/core/auxiliary/web/path.rb index c8ee856032..2344aa8c6c 100644 --- a/lib/msf/core/auxiliary/web/path.rb +++ b/lib/msf/core/auxiliary/web/path.rb @@ -1,9 +1,7 @@ -## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # Framework web site for more information on licensing and terms of use. # http://metasploit.com/framework/ -## require 'net/https' require 'net/http' diff --git a/lib/msf/core/auxiliary/web/target.rb b/lib/msf/core/auxiliary/web/target.rb index ea892fda81..09578c56a2 100644 --- a/lib/msf/core/auxiliary/web/target.rb +++ b/lib/msf/core/auxiliary/web/target.rb @@ -1,9 +1,7 @@ -## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # Framework web site for more information on licensing and terms of use. # http://metasploit.com/framework/ -## require 'net/https' require 'net/http' diff --git a/lib/msf/core/exploit/browser_autopwn.rb b/lib/msf/core/exploit/browser_autopwn.rb index a792abcc1e..f4b63f8251 100644 --- a/lib/msf/core/exploit/browser_autopwn.rb +++ b/lib/msf/core/exploit/browser_autopwn.rb @@ -1,14 +1,10 @@ # -*- coding: binary -*- -## # $Id$ -## - -## +# # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # Framework web site for more information on licensing and terms of use. # http://metasploit.com/framework/ -## require 'msf/core/auxiliary' diff --git a/lib/msf/core/exploit/cmdstager.rb b/lib/msf/core/exploit/cmdstager.rb index 5e2e551a54..c99d29064f 100644 --- a/lib/msf/core/exploit/cmdstager.rb +++ b/lib/msf/core/exploit/cmdstager.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'rex/exploitation/cmdstager' require 'msf/core/exploit/exe' diff --git a/lib/msf/core/exploit/cmdstager_debug_asm.rb b/lib/msf/core/exploit/cmdstager_debug_asm.rb index 979edb6bec..508307a25d 100644 --- a/lib/msf/core/exploit/cmdstager_debug_asm.rb +++ b/lib/msf/core/exploit/cmdstager_debug_asm.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'msf/core/exploit/cmdstager' diff --git a/lib/msf/core/exploit/cmdstager_debug_write.rb b/lib/msf/core/exploit/cmdstager_debug_write.rb index 707369d2f7..8b73ac8adf 100644 --- a/lib/msf/core/exploit/cmdstager_debug_write.rb +++ b/lib/msf/core/exploit/cmdstager_debug_write.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'msf/core/exploit/cmdstager' diff --git a/lib/msf/core/exploit/cmdstager_tftp.rb b/lib/msf/core/exploit/cmdstager_tftp.rb index 3b11683878..5549a687bd 100644 --- a/lib/msf/core/exploit/cmdstager_tftp.rb +++ b/lib/msf/core/exploit/cmdstager_tftp.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'rex/text' require 'msf/core/exploit/tftp' diff --git a/lib/msf/core/exploit/cmdstager_vbs.rb b/lib/msf/core/exploit/cmdstager_vbs.rb index 0f75595916..1247d118a7 100644 --- a/lib/msf/core/exploit/cmdstager_vbs.rb +++ b/lib/msf/core/exploit/cmdstager_vbs.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'msf/core/exploit/cmdstager' diff --git a/lib/msf/core/exploit/cmdstager_vbs_adodb.rb b/lib/msf/core/exploit/cmdstager_vbs_adodb.rb index b723abbc4a..b6a082a2a1 100644 --- a/lib/msf/core/exploit/cmdstager_vbs_adodb.rb +++ b/lib/msf/core/exploit/cmdstager_vbs_adodb.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id: $ -## require 'msf/core/exploit/cmdstager' diff --git a/lib/msf/core/exploit/dhcp.rb b/lib/msf/core/exploit/dhcp.rb index 655e70877f..455c204d84 100644 --- a/lib/msf/core/exploit/dhcp.rb +++ b/lib/msf/core/exploit/dhcp.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'rex/proto/dhcp' diff --git a/lib/msf/core/exploit/tftp.rb b/lib/msf/core/exploit/tftp.rb index feb197e9ec..c20250f5d8 100644 --- a/lib/msf/core/exploit/tftp.rb +++ b/lib/msf/core/exploit/tftp.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'rex/proto/tftp' diff --git a/lib/msf/ui/console/command_dispatcher/payload.rb b/lib/msf/ui/console/command_dispatcher/payload.rb index c3449fc484..8b6a248384 100644 --- a/lib/msf/ui/console/command_dispatcher/payload.rb +++ b/lib/msf/ui/console/command_dispatcher/payload.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'rex/parser/arguments' diff --git a/lib/rex/exploitation/cmdstager.rb b/lib/rex/exploitation/cmdstager.rb index 298976ec9e..89c04de2ba 100644 --- a/lib/rex/exploitation/cmdstager.rb +++ b/lib/rex/exploitation/cmdstager.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'rex/exploitation/cmdstager/base' require 'rex/exploitation/cmdstager/vbs' diff --git a/lib/rex/exploitation/cmdstager/debug_asm.rb b/lib/rex/exploitation/cmdstager/debug_asm.rb index 92d1aae809..a2eff63d21 100644 --- a/lib/rex/exploitation/cmdstager/debug_asm.rb +++ b/lib/rex/exploitation/cmdstager/debug_asm.rb @@ -1,7 +1,4 @@ # -*- coding: binary -*- -## -# $Id: debug_asm.rb 12595 2011-05-12 18:33:49Z jduck $ -## require 'rex/text' require 'rex/arch' diff --git a/lib/rex/exploitation/cmdstager/debug_write.rb b/lib/rex/exploitation/cmdstager/debug_write.rb index 1d0fdbc8d7..d795439890 100644 --- a/lib/rex/exploitation/cmdstager/debug_write.rb +++ b/lib/rex/exploitation/cmdstager/debug_write.rb @@ -1,7 +1,4 @@ # -*- coding: binary -*- -## -# $Id: debug_write.rb 12595 2011-05-12 18:33:49Z jduck $ -## require 'rex/text' require 'rex/arch' diff --git a/lib/rex/exploitation/cmdstager/tftp.rb b/lib/rex/exploitation/cmdstager/tftp.rb index 130ad91999..3607fb4ea7 100644 --- a/lib/rex/exploitation/cmdstager/tftp.rb +++ b/lib/rex/exploitation/cmdstager/tftp.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'rex/text' require 'rex/arch' diff --git a/lib/rex/exploitation/cmdstager/vbs.rb b/lib/rex/exploitation/cmdstager/vbs.rb index a699ad3820..c50e1b5350 100644 --- a/lib/rex/exploitation/cmdstager/vbs.rb +++ b/lib/rex/exploitation/cmdstager/vbs.rb @@ -1,7 +1,4 @@ # -*- coding: binary -*- -## -# $Id: vbs.rb 12595 2011-05-12 18:33:49Z jduck $ -## require 'rex/text' require 'rex/arch' diff --git a/lib/rex/exploitation/jsobfu.rb b/lib/rex/exploitation/jsobfu.rb index 844d9f8e64..2c8d51299a 100644 --- a/lib/rex/exploitation/jsobfu.rb +++ b/lib/rex/exploitation/jsobfu.rb @@ -1,7 +1,5 @@ # -*- coding: binary -*- -## # $Id$ -## require 'rex/text' require 'rkelly' diff --git a/lib/rex/proto/natpmp.rb b/lib/rex/proto/natpmp.rb index cf41512b54..e4aab9e7cc 100644 --- a/lib/rex/proto/natpmp.rb +++ b/lib/rex/proto/natpmp.rb @@ -1,11 +1,7 @@ # -*- coding: binary -*- -## -# # NAT-PMP protocol support # -# by Jon Hart -# -## +# @author Jon Hart require 'rex/proto/natpmp/constants' require 'rex/proto/natpmp/packet' diff --git a/lib/rex/proto/ntlm/base.rb b/lib/rex/proto/ntlm/base.rb index 94c027c91b..7db9bc5696 100644 --- a/lib/rex/proto/ntlm/base.rb +++ b/lib/rex/proto/ntlm/base.rb @@ -40,17 +40,13 @@ # The latter has a minor bug in its separate_keys function. # The third key has to begin from the 14th character of the # input string instead of 13th:) -#-- -# $Id: ntlm.rb 11678 2011-01-30 19:26:35Z hdm $ -#++ - -#this class defines the base type needed for other modules like message and crypt require 'rex/proto/ntlm/constants' module Rex module Proto module NTLM +# The base type needed for other modules like message and crypt class Base CONST = Rex::Proto::NTLM::Constants diff --git a/lib/rex/proto/rfb.rb b/lib/rex/proto/rfb.rb index 53e493e4df..378bc1428b 100644 --- a/lib/rex/proto/rfb.rb +++ b/lib/rex/proto/rfb.rb @@ -1,19 +1,13 @@ # -*- coding: binary -*- -## # $Id: $ -## - -## # # RFB protocol support # -# by Joshua J. Drake +# @author Joshua J. Drake # # Based on: # vnc_auth_none contributed by Matteo Cantoni # vnc_auth_login contributed by carstein -# -## require 'rex/proto/rfb/constants' require 'rex/proto/rfb/cipher' diff --git a/lib/rex/proto/rfb.rb.ut.rb b/lib/rex/proto/rfb.rb.ut.rb index d9771e7516..d06de6c4d2 100644 --- a/lib/rex/proto/rfb.rb.ut.rb +++ b/lib/rex/proto/rfb.rb.ut.rb @@ -1,23 +1,18 @@ #!/usr/bin/env ruby # -*- coding: binary -*- - -$:.unshift(File.join(File.dirname(__FILE__), '..', '..')) - -## +# # $Id: $ -## - -## # # RFB protocol support # -# by Joshua J. Drake +# @author Joshua J. Drake # # Based on: # vnc_auth_none contributed by Matteo Cantoni # vnc_auth_login contributed by carstein # -## + +$:.unshift(File.join(File.dirname(__FILE__), '..', '..')) require 'rex/socket' require 'rex/proto/rfb'