Skip to content

Commit

Permalink
fix: fixes #23
Browse files Browse the repository at this point in the history
The string containing the file's content was not formatted properly and so the file wasn't made correctly.
  • Loading branch information
mzball-dt committed Jan 15, 2018
1 parent 1b0fab1 commit 23371e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion strippy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ if ( $MakeConfig ) {
$confloc = Join-Path $( Get-Location ) 'strippy.conf'
log mkconf trace "We're going to make the config file here: $confloc"
# Apologies if you're trying to read this next string.
$defaultConfig = '; Strippy Config file`r`n;Recurse=true`r`n;InPlace=false`r`n;Silent=false`r`n;MaxThreads=5`r`n`r`n[ Config ]`r`nIgnoredStrings="/0:0:0:0:0:0:0:0", "0.0.0.0", "127.0.0.1", "name", "applications", ""`r`n`r`n; These settings can use braces to include dynamic formatting: `r`n; {0} = Date/Time at processing`r`n; #notimplemented {1} = Depends on context. Name of specific file being processed where relevant otherwise it`s the name of the Folder/File provided to Strippy `r`nSanitisedFileFirstLine="This file was Sanitised at {0}.`r`n==`r`n`r`n"`r`nKeyListFirstLine="This keylist was created at {0}."`r`n;KeyFileName="Keylist.txt"`r`n;AlternateOutputFolder=".\sanitisedoutput"`r`n`r`n[ Rules ]`r`n;"Some Regex String here"="Replacement here"`r`n"((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))[^\d]"="Address"`r`n"\\\\([\w\-.]*?)\\"="Hostname"`r`n'
$defaultConfig = "; Strippy Config file`r`n;Recurse=true`r`n;InPlace=false`r`n;Silent=false`r`n;MaxThreads=5`r`n`r`n[ Config ]`r`nIgnoredStrings=""/0:0:0:0:0:0:0:0"", ""0.0.0.0"", ""127.0.0.1"", ""name"", ""applications"", ""`r`n`r`n; These settings can use braces to include dynamic formatting: `r`n; {0} = Date/Time at processing`r`n; #notimplemented {1} = Depends on context. Name of specific file being processed where relevant otherwise it`s the name of the Folder/File provided to Strippy `r`nSanitisedFileFirstLine=""This file was Sanitised at {0}.`r`n==`r`n`r`n""`r`nKeyListFirstLine=""This keylist was created at {0}.""`r`n;KeyFileName=""Keylist.txt""`r`n;AlternateOutputFolder="".\sanitisedoutput""`r`n`r`n[ Rules ]`r`n;""Some Regex String here""=""Replacement here""`r`n""((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))[^\d]""=""Address""`r`n""\\\\([\w\-.]*?)\\""=""Hostname""`r`n"
log mkconf trace "We're going to give it this content:`r`n$defaultConfig"

# Check to make sure we're not overwriting someone's config file
Expand Down

0 comments on commit 23371e3

Please sign in to comment.