Class NucleiVariableResolver
- Namespace
- Kuestenlogik.Bowire.Security.Templates.Nuclei
- Assembly
- Kuestenlogik.Bowire.Security.Templates.Nuclei.dll
Resolve Nuclei's {{VariableName}} placeholders against a
concrete scan target. Nuclei expands these placeholders before
sending the HTTP probe; Bowire's scanner doesn't speak the
Nuclei DSL, so we replace them at conversion time once the target
URL is known.
Phase 2c — the common subset of Nuclei's variable surface:
{{BaseURL}}— full base URL: scheme + host + port + base path.https://api.example.com:8443/v2→https://api.example.com:8443/v2.{{Hostname}}— host + port:api.example.com:8443.{{Host}}— host only:api.example.com.{{Port}}— port if specified, else default (80/443) by scheme.{{Path}}— base-URL path component (rarely used standalone).{{RandStr}}— random alphanumeric string, default length 8.{{RandStr_N}}— random alphanumeric string of length N (e.g.{{RandStr_16}}).{{RandInt}}/{{RandInt_N}}— random integer with N digits (default 6).
Phase 2c+ surface (deferred):
- DSL helper functions:
{{md5(BaseURL)}},{{base64(...)}},{{rand_text_alpha(N)}},{{to_lower(...)}}.
Phase 2f (shipped): {{interactsh-url}} resolves to an out-of-band
callback host when an interaction server is configured
(InteractshUrlFactory). Without one it
passes through untouched, so an OAST template yields no usable probe rather
than a meaningless one.
public static class NucleiVariableResolver
- Inheritance
-
NucleiVariableResolver
- Inherited Members
Methods
Resolve(string, NucleiVariableContext)
Replace every recognised {{...}} placeholder in
input with its resolved value from
context. Unrecognised placeholders pass
through literally — the surrounding template-runner may
surface them as "unresolved variable" findings, or the
caller may decide whether they're a hard error.
public static string Resolve(string input, NucleiVariableContext context)
Parameters
inputstringcontextNucleiVariableContext