From 6cfb3ff4fc52c18bcb3e75ed8961c15f5b74b7c9 Mon Sep 17 00:00:00 2001 From: James Lee Date: Tue, 13 Mar 2012 14:08:58 -0600 Subject: [PATCH] Comment out extension TLV types I suspect this is a load order issue where sometimes the extension's TLV types are defined before hitting this and sometimes aren't. Nevertheless, pretty printing a TLV is not worth breaking all the payloads. --- lib/rex/post/meterpreter/packet.rb | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/rex/post/meterpreter/packet.rb b/lib/rex/post/meterpreter/packet.rb index 3086eb0ea2..1041890372 100644 --- a/lib/rex/post/meterpreter/packet.rb +++ b/lib/rex/post/meterpreter/packet.rb @@ -1,7 +1,5 @@ #!/usr/bin/env ruby -require 'rex/post/meterpreter/extensions/stdapi/tlv' - module Rex module Post module Meterpreter @@ -56,6 +54,7 @@ TLV_TYPE_REQUEST_ID = TLV_META_TYPE_STRING | 2 TLV_TYPE_EXCEPTION = TLV_META_TYPE_GROUP | 3 TLV_TYPE_RESULT = TLV_META_TYPE_UINT | 4 + TLV_TYPE_STRING = TLV_META_TYPE_STRING | 10 TLV_TYPE_UINT = TLV_META_TYPE_UINT | 11 TLV_TYPE_BOOL = TLV_META_TYPE_BOOL | 12 @@ -178,15 +177,15 @@ class Tlv when TLV_TYPE_MIGRATE_PAYLOAD; "MIGRATE-PAYLOAD" when TLV_TYPE_MIGRATE_ARCH; "MIGRATE-ARCH" - when Extensions::Stdapi::TLV_TYPE_NETWORK_INTERFACE; 'network-interface' - when Extensions::Stdapi::TLV_TYPE_IP; 'ip-address' - when Extensions::Stdapi::TLV_TYPE_NETMASK; 'netmask' - when Extensions::Stdapi::TLV_TYPE_MAC_ADDRESS; 'mac-address' - when Extensions::Stdapi::TLV_TYPE_MAC_NAME; 'interface-name' - when Extensions::Stdapi::TLV_TYPE_IP6_SCOPE; 'address-scope' - when Extensions::Stdapi::TLV_TYPE_INTERFACE_MTU; 'interface-mtu' - when Extensions::Stdapi::TLV_TYPE_INTERFACE_FLAGS; 'interface-flags' - when Extensions::Stdapi::TLV_TYPE_INTERFACE_INDEX; 'interface-index' + #when Extensions::Stdapi::TLV_TYPE_NETWORK_INTERFACE; 'network-interface' + #when Extensions::Stdapi::TLV_TYPE_IP; 'ip-address' + #when Extensions::Stdapi::TLV_TYPE_NETMASK; 'netmask' + #when Extensions::Stdapi::TLV_TYPE_MAC_ADDRESS; 'mac-address' + #when Extensions::Stdapi::TLV_TYPE_MAC_NAME; 'interface-name' + #when Extensions::Stdapi::TLV_TYPE_IP6_SCOPE; 'address-scope' + #when Extensions::Stdapi::TLV_TYPE_INTERFACE_MTU; 'interface-mtu' + #when Extensions::Stdapi::TLV_TYPE_INTERFACE_FLAGS; 'interface-flags' + #when Extensions::Stdapi::TLV_TYPE_INTERFACE_INDEX; 'interface-index' else; "unknown-#{type}" end