Skip to content

Adding support for global env variables - #916

Merged
ehsandeep merged 4 commits into
devfrom
643-feature-env-variables-support
Aug 9, 2021
Merged

ehsandeep merged 4 commits into
devfrom
643-feature-env-variables-support

Conversation

@Mzack9999

Copy link
Copy Markdown
Member

No description provided.

@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label Aug 8, 2021
@Mzack9999 Mzack9999 self-assigned this Aug 8, 2021
@Mzack9999 Mzack9999 linked an issue Aug 8, 2021 that may be closed by this pull request

@Ice3man543 Ice3man543 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably implement some sort of caching in the EnvVars() function so that when it is called each time, the loading of the values will happen only once and all the later calls will reuse the same map that was generated.

@ehsandeep

Copy link
Copy Markdown
Member

Example template:-

requests:
  - method: GET
    path:
      - "{{BaseURL}}"
    headers:
      Content-Type: '{{SHELL}}'
./nuclei -u https://example.com -t env.yaml -env-vars

Example request:-

GET / HTTP/1.1
Host: example.com
Content-Type: /bin/zsh

@ehsandeep
ehsandeep merged commit 3ed04dd into dev Aug 9, 2021
@ehsandeep
ehsandeep deleted the 643-feature-env-variables-support branch August 9, 2021 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Enhancement Most issues will probably ask for additions or changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Adding environment variable support using helper functions

3 participants