Created By Furqan Wasi [email protected] Create On 7/5/2014 Wednesday,May
#Fixity File Verification Logic ###Receives Single File information to be verified
-
Check if given file exists at given path
-
Check if any file exists for given inode in last scanned file's list
-
If file exists and inode exists in last scan ( means file is still present and was also have been scanned by Fixity in it's last scan)
- if File Exists::YES AND Hashes are Same of File in last scan and given file::YES AND Have Same File Path of File in last scan and given file::YES AND Have Same I-Node of File in last scan and given file::YES
Result :: Confirmed File (FileExists::YES || SameHashOfFile::YES || SameFilePath::YES || Same I-Node::YES)
- if File Exists::YES AND Hashes are Same of File in last scan and given file::YES AND Have Same File Path of File in last scan and given file::NO AND Have Same I-Node of File in last scan and given file::YES
Result :: Moved or Renamed File (FileExists::YES ||SameHashOfFile::YES || SameFilePath::NO || Same I-Node::YES)
- if File Exists::YES AND Hashes are Same of File in last scan and given file::NO AND Have Same File Path of File in last scan and given file::YES AND Have Same I-Node of File in last scan and given file::YES
Result :: Changed File (FileExists::YES || SameHashOfFile::NO || SameFilePath::YES || Same I-Node::YES)
- if File Exists::YES AND Hashes are Same of File in last scan and given file::NO AND Have Same File Path of File in last scan and given file::NO AND Have Same I-Node of File in last scan and given file::YES
Result :: Changed File (FileExists::YES || SameHashOfFile::NO || SameFilePath::NO || Same I-Node::YES)
- if File Exists::YES AND Hashes are Same of File in last scan and given file::YES AND Have Same File Path of File in last scan and given file::YES AND Have Same I-Node of File in last scan and given file::YES
-
If file exists and file with same hash exists but inode dose not exists in last scan ( means file is still present and file with same hash exists but was not existing in directory , or was not scanned for some reason (could be because of filters))
-
if File Exists::YES AND Hashes are Same of File in last scan and given file::YES AND Have Same File Path of File in last scan and given file::YES AND Have Same I-Node of File in last scan and given file::NO
Result :: Confirmed File (FileExists::YES || SameHashOfFile::YES || SameFilePath::YES || Same I-Node::NO)
-
if File Exists::YES AND Hashes are Same of File in last scan and given file::NO AND Have Same File Path of File in last scan and given file::YES AND Have Same I-Node of File in last scan and given file::NO '''
Result :: Moved or Renamed File (FileExists::YES || SameHashOfFile::NO || SameFilePath::YES || Same I-Node::NO)
-
if File Exists::YES AND Hashes are Same of File in last scan and given file::YES AND Have Same File Path of File in last scan and given file::NO AND Have Same I-Node of File in last scan and given file::NO '''
Result :: Changed File (FileExists::YES || SameHashOfFile::YES || SameFilePath::NO || Same I-Node::NO)
-
-
If file exists but file with same hash dont exist and inode dose not exists in last scan ( means file is still present and file with same hash exists but was not existing in directory , or was not scanned for some reason (could be because of filters))
Result :: New File (FileExists::YES || SameHashOfFile::NO || SameFilePath::NO || Same I-Node::NO)
- Check if given file do not exist at given path and didnot fall in any of above condition will be considered as Removed
Result :: Removed File