I'm catching a System.ArgumentException: Illegal characters in path when trying to script BinScope from the command line. BinScope is an SDLC audit tool from Microsoft, and the full output is below.
The exception is claiming an illegal character, but its not telling me what the illegal character is nor its location. I'm kind of at a loss because all the options are valid (according to binscope.exe /?), and all the paths are quoted.
Which character (or characters) is illegal in the path? How does one determine the offending character?
C:\Users\Audit\Desktop>binscope.exe /sdl "C:\Users\Audit\Deskt
op\Program\Agent\twprogram.exe" /sympath "C:\Users\Audit\De
sktop\Program\Agent\twprogram.pdb" /outdir "C:\Users\Audit\
Desktop\" /logfile twprogram.xml
Microsoft SDL BinScope binary analysis tool v1.0.4027.29711
Unhandled Exception: System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Bo
olean overwrite)
at Microsoft.MSEC.BinScope.BinScopeMain.Run(BinScopeConfiguration config, Bin
ScopeScanner scanner)
at Microsoft.MSEC.BinScope.BinScopeMain.Main(String[] args)
And:
C:\Users\Audit\Desktop>echo %PATH%
C:\Program Files (x86)\Microsoft\SDL BinScope\;C:\Windows\system32;C:\Windows;
C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\