From 2bbae6b9c27c9f6b2e03badf8e7faa9a38974618 Mon Sep 17 00:00:00 2001 From: David Maloney Date: Fri, 1 May 2015 11:24:23 -0500 Subject: [PATCH] add #to_s to ntds account added to_s method to the NTDS account for easy output MSP-12357 --- lib/metasploit/framework/ntds/account.rb | 53 +++++++++++++++++++++++- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/lib/metasploit/framework/ntds/account.rb b/lib/metasploit/framework/ntds/account.rb index cefeca15e7..499ea42a65 100644 --- a/lib/metasploit/framework/ntds/account.rb +++ b/lib/metasploit/framework/ntds/account.rb @@ -91,8 +91,8 @@ module Metasploit @logon_count = get_int(data) @nt_history_count = get_int(data) @lm_history_count = get_int(data) - @expiry_data = get_string(data,30) - @logon_data = get_string(data,30) + @expiry_date = get_string(data,30) + @logon_date = get_string(data,30) @logon_time = get_string(data,30) @pass_date = get_string(data,30) @pass_time = get_string(data,30) @@ -103,6 +103,35 @@ module Metasploit @sid = data end + # @return [String] String representation of the account data + def to_s + <