Illegal Characters in Path
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start at the ResolveFileName method shown in the issue and reproduce the failure using an existing output directory. Trace how the filename, extension, timestamp, and OutputPrefix are combined before Path.Combine is called. Done means the same output-directory scenario completes without an Illegal Characters in Path error and preserves the intended output naming.
Written by the indexing model from the issue text.
Description
I ran into an issue where I specified an output directory (it exists), but for some reason when sharphound ran, it gave an "Illegal Characters in Path" error and died. Rohan said to file a bug and thinks it relates to the following code:
`public string ResolveFileName(string filename, string extension, bool addTimestamp)
{
var finalFilename = filename;
if (!filename.EndsWith(extension))
finalFilename = $"{filename}.{extension}";
if (extension is "json" or "zip" && Flags.RandomizeFilenames)
finalFilename = $"{Path.GetRandomFileName()}";
if (addTimestamp) finalFilename = $"{CurrentLoopTime}_{finalFilename}";
if (OutputPrefix != null) finalFilename = $"{OutputPrefix}_{finalFilename}";
var finalPath = Path.Combine(OutputDirectory, finalFilename);
return finalPath;
}`
- Dominant language
- C#
- Stars
- 1.3k
- Forks
- 266
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SpecterOps/SharpHound
-
DNS resolution error Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
SpecterOps/SharpHound#203 · 2 comments · 3 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
SpecterOps/SharpHound#194 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
SpecterOps/SharpHound#185 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
SpecterOps/SharpHound#177 · 7 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
SpecterOps/SharpHound#169 · 1 comment · 3 reactions ·
All issues in SpecterOps/SharpHound
Similar issues
-
[Feat] 조합 영역 구분선 개선 Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100