Repository: projectdiscovery/httpx (language: go)

Issue:
Include specified Vhost and SNI in json output
Hello pd team, thanks for developing these incredible tools. 

Is it possible to include specified vhost and/or sni values in json output of httpx?
for example:

```
httpx -u _URL_ -H "Host: google.com" -sni google.com
```
output of above command should include specified values in json output like this:

```json
{"host":"google.com", "sni":"google.com", ...}
```

thanks in advance!



Discussion / hints:

Fix patch:
diff --git a/runner/runner.go b/runner/runner.go
index 78d0dfc82..b2f607b1d 100644
--- a/runner/runner.go
+++ b/runner/runner.go
@@ -736,6 +736,9 @@ func (r *Runner) RunEnumeration() {
 
 		for resp := range output {
 
+			if r.options.SniName != "" {
+				resp.SNI = r.options.SniName
+			}
 			// call the callback function if any
 			// be careful and check for result.Err
 			if r.options.OnResult != nil {
diff --git a/runner/types.go b/runner/types.go
index 7ff332440..37b98c0d2 100644
--- a/runner/types.go
+++ b/runner/types.go
@@ -39,6 +39,7 @@ type Result struct {
 	Hashes             map[string]interface{} `json:"hash,omitempty" csv:"hash"`
 	ExtractRegex       []string               `json:"extract_regex,omitempty" csv:"extract_regex"`
 	CDNName            string                 `json:"cdn_name,omitempty" csv:"cdn_name"`
+	SNI                string                 `json:"sni,omitempty" csv:"sni"`
 	Port               string                 `json:"port,omitempty" csv:"port"`
 	Raw                string                 `json:"-" csv:"-"`
 	URL                string                 `json:"url,omitempty" csv:"url"`


Test patch: