Nuclei config path .nuclei-config/nuclei instead of $HOME/.config/nuclei #4395
-
I'm currently developing a web interface using Laravel framework for managing and running multiple Nuclei instances but since the update of Nuclei v3, it has been unable to recognize the correct config path when run using Symfony/Process together with Laravel Horizon and Supervisor. $command = $command = ['nuclei', '-u', $url_name, '-stats', '-mp', $metrics_port, '-silent', '-nm', '-nc', '-duc', '-jle', storage_path() . '/nuclei-results/scan_' . $nuclei_scan->id . '.json'];
$process = new Process($command);
$process->setTimeout(null);
$process->start(); I tried to log the Error Output of the process. It seems that Nuclei was trying to find the config file in
Running Nuclei from CLI doesn't seem to have any problems:
Nuclei was run under www-data user. My web app works fine with Nuclei v2.9.15 but i want to make it as up-to-date as possible. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@revirven , thanks for reaching out with, nuclei v3 we have switched to using to fix this and change directory to any other location by overriding env variable specific to your platform for linux you can add env like
or other preferred directory you want to use Note: you can now also change location of resume files by overriding cache directory https://pkg.go.dev/os#UserCacheDir |
Beta Was this translation helpful? Give feedback.
-
@tarunKoyalwar, Sorry for the late response. I have done some tests and realized that Symfony/Process executes commands in an isolated environment where every environment variables are removed except for the ones specified in Your reply had helped me in resolving the problem, much appreciated. |
Beta Was this translation helpful? Give feedback.
@revirven , thanks for reaching out with, nuclei v3 we have switched to using
os.UserConfigDir
in go which respects sandbox env's and other enforced options. while using nuclei if it is not able to find config directory of that user in this casewww-data
nuclei creates a new config dir with name.nuclei-config
.to fix this and change directory to any other location by overriding env variable specific to your platform
for linux you can add env like
or other preferred directory you want to use
Note: you can now also change location of resume files by overriding cache directory https://pkg.go.dev/os#UserCacheDir