mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-09-04 20:18:27 +02:00
Fixes #3287, Catch an exception from a directory scan
git-svn-id: file:///home/svn/framework3/trunk@11615 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
ae33e3ac71
commit
cc5a1ef731
@ -48,7 +48,14 @@ end
|
||||
}
|
||||
|
||||
def scan(path)
|
||||
client.fs.dir.foreach(path) {|x|
|
||||
begin
|
||||
dirs = client.fs.dir.foreach(path)
|
||||
rescue ::Rex::Post::Meterpreter::RequestError => e
|
||||
print_error("Error scanning #{path}: #{$!}")
|
||||
return
|
||||
end
|
||||
|
||||
dirs.each {|x|
|
||||
next if x =~ /^(\.|\.\.)$/
|
||||
fullpath = path + '\\' + x
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user