From 78f5ecb24ee67243901f521e8b33851b2f8c419d Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Tue, 21 Jul 2015 09:58:11 -0400 Subject: [PATCH] NTFS path limit is 255 characters --- README.md | 4 ++-- source/filepath.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ce84f4f..b94914b 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,6 @@ The program will do the following: Hopefully, having the txt produced by this program will help you easily restore files infected by cryptowall. The program was only written to search local hard drives (usb drives are included not network drives). It is advised to not run this on systems in which cryptowall is still encrypting files. Make sure the computer is clean (or running in safe mode) before running this program. -**Script 2 SMB Path Length** +**Script 2 SMB/NTFS Path Length** -This program will create a txt with a list of files whose path exceeds 260 characters. The program scans local drives and should be run on the server not the client. \ No newline at end of file +This program will create a txt with a list of files whose path exceeds 255 characters. The program scans local drives and should be run on the server not the client. \ No newline at end of file diff --git a/source/filepath.rb b/source/filepath.rb index 6d6ecc6..4433753 100644 --- a/source/filepath.rb +++ b/source/filepath.rb @@ -13,7 +13,7 @@ require_relative 'filecreate' #puts drive.DriveType if drive.DriveType == 2 @files = @filesUtil.findFilesByFileName(drive.Path,'*.*') - @filesTooLong = @files.select{|f| @filesUtil.getExpandedPathByFileName(f).length > 260} + @filesTooLong = @files.select{|f| @filesUtil.getExpandedPathByFileName(f).length > 255} @filesTooLong.each do |file| @whatToWrite = @filesUtil.getExpandedPathByFileName(file) @outputFile.writeWindowsFilePath(@whatToWrite)