Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix support for unicode paths in target-shell (copy) #440

Merged
merged 4 commits into from
Nov 13, 2023

Conversation

pyrco
Copy link
Contributor

@pyrco pyrco commented Nov 13, 2023

This PR adds lexer.whitespace_split = True to shlex in target-shell which improves handling unicode arguments for argparse.

This fixes ls and cat in target-shell when paths contain unicode characters.

Copy link

codecov bot commented Nov 13, 2023

Codecov Report

Merging #440 (9ef345a) into main (d4aaddc) will increase coverage by 0.15%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #440      +/-   ##
==========================================
+ Coverage   74.16%   74.31%   +0.15%     
==========================================
  Files         258      258              
  Lines       20632    20633       +1     
==========================================
+ Hits        15302    15334      +32     
+ Misses       5330     5299      -31     
Flag Coverage Δ
unittests 74.31% <100.00%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
dissect/target/tools/shell.py 52.52% <100.00%> (+4.19%) ⬆️

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@pyrco
Copy link
Contributor Author

pyrco commented Nov 13, 2023

I could not update the original branch in #436, so I duplicated the PR here so it can be merged

@pyrco pyrco merged commit 9ff2041 into main Nov 13, 2023
@pyrco pyrco deleted the fix/target-shell-unicode branch November 13, 2023 14:41
JSCU-CNI pushed a commit to JSCU-CNI/dissect.target that referenced this pull request Jan 2, 2024
This fixes ls and cat in target-shell when paths contain unicode characters.
Poeloe pushed a commit that referenced this pull request Feb 29, 2024
This fixes ls and cat in target-shell when paths contain unicode characters.
Zawadidone pushed a commit to Zawadidone/dissect.target that referenced this pull request Apr 5, 2024
This fixes ls and cat in target-shell when paths contain unicode characters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants