nuclei icon indicating copy to clipboard operation
nuclei copied to clipboard

Support for customizing the directory of all configuration files

Open M09Ic opened this issue 2 years ago • 3 comments

I don't have write access to the home directory in particular environment, but I didn't find any flag to custom .templates-config.json file. So, I would like to customize the directory for all configuration files. Like, -config-directory /tmp/nuclei/

M09Ic avatar Feb 17 '22 16:02 M09Ic

Hi, Just in case, you can do something like export HOME='/tmp' && nuclei ... to get around the fact that HOME is not defined, I use this technique and it works :)

JoshuaMart avatar Feb 18 '22 11:02 JoshuaMart

Hi, Just in case, you can do something like export HOME='/tmp' && nuclei ... to get around the fact that HOME is not defined, I use this technique and it works :)

Indeed, it works. Hopefully nuclei will provide a more elegant solution than hard-coding the config file path.

I tried to fix the problem by modifying the code myself, but it required multiple changes and could have caused unpredictable bugs, so I did not submit this pr.

M09Ic avatar Mar 15 '22 12:03 M09Ic

  • Add a new command line flag:
    -config-directory Override the default config path ($home/.config)
  • Create follow up tickets to allow execution when there are no write permission to .config folder (use in memory default values and download nuclei-templates to /tmp if not provided/found/writeable)

Mzack9999 avatar Jul 14 '22 13:07 Mzack9999

@M09Ic @JoshuaMart this is now supported in the latest version of nuclei, -config-directory flag can be used to override the default config path.

ehsandeep avatar Aug 26 '22 10:08 ehsandeep