updated hashes file path to script path
This commit is contained in:
@@ -19,7 +19,7 @@ $jsonStoredHashes = [System.Text.Encoding]::Unicode.GetString([System.Convert]::
|
||||
# convert from json to object
|
||||
$storedHashes = $($jsonStoredHashes | convertfrom-json)
|
||||
# get current file hashes
|
||||
$hashes = $(Get-ChildItem -Recurse C:\users\jgaunt\Git\bitwardenbackup\lib\ | Get-FileHash -Algorithm SHA256)
|
||||
$hashes = $(Get-ChildItem -Recurse "$PSScriptRoot\lib\" | Get-FileHash -Algorithm SHA256)
|
||||
|
||||
# very simple compare object and if anything is different, the count will be greater than zero. Exit and inform user that files might have been tempered with.
|
||||
$compareObjects = $(Compare-Object -Ref $storedHashes -Dif $hashes -Property Hash, Path)
|
||||
|
||||
Reference in New Issue
Block a user