chvancooten / NimPlant

A light-weight first-stage C2 implant written in Nim.
MIT License
779 stars 109 forks source link

'cd' command doesn't work. #10

Closed vysecurity closed 1 year ago

vysecurity commented 1 year ago

OS and version: ubuntu 20.04 Python version: 3 Nim version: 1.6 Using Docker: No


Issue Description The cd command doesn't work. Directory does not change.


Screenshots

Brave Browser-2023-03-01 at 02 47 54@2x

chvancooten commented 1 year ago

Hey, thanks for yet another report! 🙏 Interesting issue. I recall I've tested this to be working before, so it may have to do with something that changed in the underlying Nim libraries (?). Will definitely investigate for v1.2.

In the meantime, you can use cd \ to switch to the root directory of the current drive, but this may still cause issues with multiple drives.

chvancooten commented 1 year ago

Hey! This behavior was due to a path normalization bug in the Nim stdlib. I have removed normalization in https://github.com/chvancooten/NimPlant/commit/bef008f9f57c3ca7721d626e416aad15a362e62d, which doesn't seem to affect the cd command at all since it's just one OS anyway.

Note: To switch drives, the correct syntax is cd c:\ (with the trailing backslash) as it is with regular Windows. cd c: does not cause a path change.

image