Skip to content

Commit

Permalink
Fixes #8
Browse files Browse the repository at this point in the history
  • Loading branch information
cavejay committed Dec 2, 2017
1 parent 9dd4191 commit 05dcc79
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions strippy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
.NOTES
Author: Michael Ball
Version: 2.171018
Version: 2.0.1 - 171202
Compatability: Powershell 5+
.LINK
Expand Down Expand Up @@ -580,8 +580,13 @@ $JobFunctions = {
# dictionary to populate
$Keys = @{}
# Open file
Write-Verbose "Filtering out lines that match $killerFlags"
$f = [IO.file]::ReadAllLines( $fp ) -notmatch $killerFlags -join "`r`n"

if ($killerFlags) {
Write-Verbose "Filtering out lines that match $killerFlags"
$f = [IO.file]::ReadAllLines( $fp ) -notmatch $killerFlags -join "`r`n"
} else {
$f = [IO.file]::ReadAllLines( $fp ) -join "`r`n"
}

# Process file for tokens
$count = 1
Expand Down Expand Up @@ -676,8 +681,12 @@ function Sanitising-Stripper ( $finalKeyList, $files, [string] $OutputFolder, [s
# $VerbosePreference = $vPref
# $DebugPreference = $vPref

Write-Verbose "Filtering out lines that match $killerFlags"
$content = [IO.file]::ReadAllLines($file) -notmatch $killerFlags -join "`r`n"
if ($killerFlags) {
Write-Verbose "Filtering out lines that match $killerFlags"
$content = [IO.file]::ReadAllLines($file) -notmatch $killerFlags -join "`r`n"
} else {
$content = [IO.file]::ReadAllLines($file) -join "`r`n"
}
Write-Verbose "Loaded in content of $file"

$sanitisedOutput = Sanitise $firstline $finalKeyList $content $file
Expand Down

0 comments on commit 05dcc79

Please sign in to comment.