Browse Source

small fix

git-svn-id: file:///home/svn/framework3/trunk@10353 4d416f70-5f16-0410-b530-b9f4589650
Carlos Perez 9 years ago
parent
commit
a5c92b7a52
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      scripts/meterpreter/enum_shares.rb

+ 5
- 5
scripts/meterpreter/enum_shares.rb View File

@@ -38,9 +38,9 @@ def enum_run_unc(base_key)
38 38
 	unc_paths = []
39 39
 	full_path = "#{base_key}\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU"
40 40
 	registry_enumvals(full_path).each do |k|
41
-		if not k =~ /MRUList/
41
+		if k =~ /./
42 42
 			run_entrie = registry_getvaldata(full_path,k)
43
-			unc_paths << run_entrie if run_entrie =~ /^\\\\*/
43
+			unc_paths << run_entrie if run_entrie =~ /^\\\\/
44 44
 		end
45 45
 	end
46 46
 	return unc_paths
@@ -78,8 +78,8 @@ if client.platform =~ /win32|64/
78 78
 	enum_conf_shares()
79 79
 	user = client.sys.config.getuid
80 80
 	if user != "NT AUTHORITY\\SYSTEM"
81
-		mount_history + enum_recent_mounts("HKEY_CURRENT_USER")
82
-		run_history + enum_run_unc("HKEY_CURRENT_USER")
81
+		mount_history = enum_recent_mounts("HKEY_CURRENT_USER")
82
+		run_history = enum_run_unc("HKEY_CURRENT_USER")
83 83
 	else
84 84
 		user_sid = []
85 85
 		key = "HKU\\"
@@ -107,7 +107,7 @@ if client.platform =~ /win32|64/
107 107
 	#Enumerate UNC Paths entered in the Dialog box
108 108
 	if run_history.length > 0
109 109
 		print_status("Recent UNC paths entered in Run Dialog found:")
110
-		mount_history.each do |i|
110
+		run_history.each do |i|
111 111
 			print_status("\t#{i}")
112 112
 		end
113 113
 		print_status()

Loading…
Cancel
Save