From e8f46f97e1135a688013925f0eaaa2d77e8c12f9 Mon Sep 17 00:00:00 2001 From: Matthew Hall Date: Thu, 1 May 2014 15:42:04 +0100 Subject: [PATCH] Remove bin_to_hex function and replace with Rex::Text.to_hex --- lib/rex/proto/smb/server.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/rex/proto/smb/server.rb b/lib/rex/proto/smb/server.rb index 4ef2c021cc..820d35e5a6 100644 --- a/lib/rex/proto/smb/server.rb +++ b/lib/rex/proto/smb/server.rb @@ -125,11 +125,6 @@ class Server protected - # Converts bin to hex - def bin_to_hex(s) - s.unpack('H*').first - end - # # Handler to register new connections from the client # @@ -645,7 +640,7 @@ protected sub_command = pkt['Payload'].v['SetupData'].unpack("v").first dprint("Command is: #{sub_command.to_s}") - ar = bin_to_hex(buff).to_s + ar = Rex::Text.to_hex(buff, '').to_s mdc = ar[86..89] case sub_command