pwncat
pwncat copied to clipboard
Blank `XDG_CONFIG_HOME` not handled correctly
Bug Description
XDG_CONFIG_HOME is not set but running pwncat without -c doesn't apply ~/.config/pwncat/pwncatrc.
pwncat version
I'm using Arch Linux, installed using the BlackArch package pwncat-caleb
$ pwncat --version
0.5.1
Steps to Reproduce
XDG_CONFIG_HOMEis blank- Run pwncat without specifying
-c.
Expected Behavior
~/.config/pwncat/pwncatrc is used
Actual behavior
~/.config/pwncat/pwncatrc not used. Tested by having alias q exit123 in pwncatrc and seeing pwncat not complaining about it.
I can replicate this. It seems I was incorrectly using $XDG_DATA_HOME by mistake (which means it was looking in ~/.local/share/pwncatrc which is incorrect).
I've implemented some updates to fix this, and improve configuration and custom module handling in general over in #242. If you have the time/ability to check out that branch and let me know if it addresses your issue, I'd appreciate it! If not, I understand. I have tested that (at least for me) it loads configurations correctly now from ~/.config/pwncat/pwncatrc as it should (and also from places like /etc/pwncat/pwncatrc since it is obeying the XDG spec now).
So this fixed some of the issues I was having, unrelated to OP. I see this branch properly parses the config file within ~/.config/pwncat/, but the only thing i still can't get to work is the function on_load.