From 98831c3285646e239220ca4f132695bb51852f16 Mon Sep 17 00:00:00 2001 From: Tod Beardsley Date: Tue, 3 May 2011 07:51:09 +0000 Subject: [PATCH] Clean up an SNMP rescue clause that makes Windows Ruby builds sad. git-svn-id: file:///home/svn/framework3/trunk@12530 4d416f70-5f16-0410-b530-b9f4589650da --- lib/snmp/ber.rb | 1 - modules/auxiliary/scanner/snmp/snmp_login.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/snmp/ber.rb b/lib/snmp/ber.rb index d6b1b18a86..b750acd3b6 100644 --- a/lib/snmp/ber.rb +++ b/lib/snmp/ber.rb @@ -73,7 +73,6 @@ module BER #:nodoc:all class InvalidLength < RuntimeError; end class InvalidTag < RuntimeError; end class InvalidObjectId < RuntimeError; end - class InvalidLength < RuntimeError; end def assert_no_remainder(remainder) raise ParseError, remainder.inspect if (remainder and remainder != "") diff --git a/modules/auxiliary/scanner/snmp/snmp_login.rb b/modules/auxiliary/scanner/snmp/snmp_login.rb index 5f403bf14f..7fd185f5ae 100644 --- a/modules/auxiliary/scanner/snmp/snmp_login.rb +++ b/modules/auxiliary/scanner/snmp/snmp_login.rb @@ -152,7 +152,7 @@ class Metasploit3 < Msf::Auxiliary # Used to flag whether this version was compatible finished = true - rescue ::SNMP::UnsupportedPduTag, ::SNMP::InvalidPduTag, ::SNMP::ParseError, ::SNMP::InvalidErrorStatus, ::SNMP::InvalidTrapVarbind, ::SNMP::InvalidGenericTrap, ::SNMP::OutOfData, ::SNMP::InvalidLength, ::SNMP::InvalidTag, ::SNMP::InvalidObjectId, ::SNMP::InvalidLength, ::SNMP::ModuleNotLoadedError, ::SNMP::UnsupportedValueTag + rescue ::SNMP::UnsupportedPduTag, ::SNMP::InvalidPduTag, ::SNMP::ParseError, ::SNMP::InvalidErrorStatus, ::SNMP::InvalidTrapVarbind, ::SNMP::InvalidGenericTrap, ::SNMP::BER::OutOfData, ::SNMP::BER::InvalidLength, ::SNMP::BER::InvalidTag, ::SNMP::BER::InvalidObjectId, ::SNMP::MIB::ModuleNotLoadedError, ::SNMP::UnsupportedValueTag next rescue ::SNMP::UnsupportedVersion