Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Commit

Permalink
added resolve() docs (#123)
Browse files Browse the repository at this point in the history
* added resolve() docs

* dns types available
  • Loading branch information
xm1k3 authored Mar 3, 2023
1 parent 1ff6a1a commit f3d2046
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/templating-guide/helper-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Here is the list of all supported helper functions can be used in the RAW reques
| wait_for(seconds uint) | Pauses the execution for the given amount of seconds | `wait_for(10)` | `true` |
| zlib(input string) string | Compresses the input using Zlib | `base64(zlib("Hello"))` | `eJzySM3JyQcEAAD//wWMAfU=` |
| zlib_decode(input string) string | Decompresses the input using Zlib | `zlib_decode(hex_decode("789cf248cdc9c907040000ffff058c01f5"))` | `Hello` |
|resolve(host string, format string) string |Resolves a host using a dns type that you define| `resolve("localhost",4)`| `127.0.0.1`|
|ip_format(ip string, format string) string|It takes an input ip and converts it to another format according to this [legend](https://github.com/projectdiscovery/mapcidr/wiki/IP-Format-Index), the second parameter indicates the conversion index and must be between 1 and 11| `ip_format("127.0.0.1", 3)`| `0177.0.0.01`|

#### Deserialization helper functions
Expand Down Expand Up @@ -209,3 +210,24 @@ variables:
"name": "John Doe"
}
```

**`resolve`**

Format:

```yaml
{{resolve(host,format)}}
```

Here is a list of formats available for dns type:

- `4` or `a`
- `6` or `aaaa`
- `cname`
- `ns`
- `txt`
- `srv`
- `ptr`
- `mx`
- `soa`
- `caa`

0 comments on commit f3d2046

Please sign in to comment.