pwncat icon indicating copy to clipboard operation
pwncat copied to clipboard

Blank `XDG_CONFIG_HOME` not handled correctly

Open vulns-are-features-too opened this issue 3 years ago • 2 comments

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

  1. XDG_CONFIG_HOME is blank
  2. 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.

vulns-are-features-too avatar Jan 29 '22 04:01 vulns-are-features-too

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).

calebstewart avatar Feb 02 '22 21:02 calebstewart

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.

image image

AnubisSec avatar Sep 29 '22 17:09 AnubisSec