From b42cc67e547ae4617d1a2e126ff14594cd92d934 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Sat, 3 Oct 2009 19:48:15 +0000 Subject: [PATCH] Fixes the ASN.1 parser to work with ruby 1.9.1 git-svn-id: file:///home/svn/framework3/trunk@7121 4d416f70-5f16-0410-b530-b9f4589650da --- modules/auxiliary/scanner/discovery/sweep_udp.rb | 3 +-- modules/auxiliary/scanner/snmp/community.rb | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/auxiliary/scanner/discovery/sweep_udp.rb b/modules/auxiliary/scanner/discovery/sweep_udp.rb index 0b78503847..c9f1fdb798 100644 --- a/modules/auxiliary/scanner/discovery/sweep_udp.rb +++ b/modules/auxiliary/scanner/discovery/sweep_udp.rb @@ -186,8 +186,7 @@ class Metasploit3 < Msf::Auxiliary def _parse_asn1(data, tree) x = 0 while (data.length > 0) - t = data[0] - l = data[1] + t,l = data[0,2].unpack('CC') i = 2 if (l > 0x7f) diff --git a/modules/auxiliary/scanner/snmp/community.rb b/modules/auxiliary/scanner/snmp/community.rb index 68d2aa72f4..7fd7feea8b 100644 --- a/modules/auxiliary/scanner/snmp/community.rb +++ b/modules/auxiliary/scanner/snmp/community.rb @@ -184,8 +184,7 @@ class Metasploit3 < Msf::Auxiliary def _parse_asn1(data, tree) x = 0 while (data.length > 0) - t = data[0] - l = data[1] + t,l = data[0,2].unpack('CC') i = 2 if (l > 0x7f)