You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a situation, where each host I want to scan requires a different value for a certain HTTP header.
While I could start Nuclei for each host and supply this either via -H or a variable passed in the template, ideally I can start Nuclei just once with a with a large array of hosts, given that it handles concurrency nicely :)
My approach thus was to supply a bunch of variables passed via the command line using -V, and then try to handle this in the template.
However, given that I need to use the Hostname variable here, I effectively end up having a nested variable expression where I want to use the output from the first helper function(s) as the variable name (not string!) for the outer expression.
Each Host should have the Host-ID defined via the command line.
However, currently the output for Host-ID is the name of host_var_name (aka the name of the variable I defined over the CLI), but not the value of the variable I defined over the command line:
GET /hello HTTP/1.1
Host: google.com
Host-ID: google_com_host_id
Is it possible to do this in Nuclei, maybe even in a cleaner way?
Or am I better of just starting a separate instance of Nuclei for each host I want to scan?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a situation, where each host I want to scan requires a different value for a certain HTTP header.
While I could start Nuclei for each host and supply this either via
-H
or a variable passed in the template, ideally I can start Nuclei just once with a with a large array of hosts, given that it handles concurrency nicely :)My approach thus was to supply a bunch of variables passed via the command line using
-V
, and then try to handle this in the template.However, given that I need to use the
Hostname
variable here, I effectively end up having a nested variable expression where I want to use the output from the first helper function(s) as the variable name (not string!) for the outer expression.Effectively, I want to do something like this:
nuclei -target https://google.com -target bing.com -target hey.com -V google_com_host_id=1337 -V bing_com_host_id=381782 -V hey_com_host_id=1121
And then with the template:
Each Host should have the Host-ID defined via the command line.
However, currently the output for
Host-ID
is the name ofhost_var_name
(aka the name of the variable I defined over the CLI), but not the value of the variable I defined over the command line:Is it possible to do this in Nuclei, maybe even in a cleaner way?
Or am I better of just starting a separate instance of Nuclei for each host I want to scan?
Beta Was this translation helpful? Give feedback.
All reactions