| aes_gcm(key, plaintext interface) []byte | 使用密钥对字符串进行 AES GCM 加密 | {{hex_encode(aes_gcm("AES256Key-32Characters1234567890", "exampleplaintext"))}} | ec183a153b8e8ae7925beed74728534b57a60920c0b009eaa7608a34e06325804c096d7eebccddea3e5ed6c4 |
| base64(src interface) string | Base64 编码字符串 | base64("Hello") | SGVsbG8= |
| base64_decode(src interface) []byte | Base64 解码字符串 | base64_decode("SGVsbG8=") | Hello |
| base64_py(src interface) string | 像 Python 一样编码字符串为 base64(带换行符) | base64_py("Hello") | SGVsbG8=\n |
| bin_to_dec(binaryNumber number | string) float64 | 将输入的二进制数转换为十进制格式 | bin_to_dec("0b1010")
bin_to_dec(1010) | 10 |
| compare_versions(versionToCheck string, constraints …string) bool | 比较第一个版本参数与提供的约束条件 | compare_versions('v1.0.0', '\>v0.0.1', '\<v1.0.1') | true |
| concat(arguments …interface) string | 连接给定的多个参数以形成字符串 | concat("Hello", 123, "world) | Hello123world |
| contains(input, substring interface) bool | 验证字符串是否包含子字符串 | contains("Hello", "lo") | true |
| contains_all(input interface, substrings …string) bool | 验证输入是否包含所有子字符串 | contains("Hello everyone", "lo", "every") | true |
| contains_any(input interface, substrings …string) bool | 验证输入是否包含任何子字符串 | contains("Hello everyone", "abc", "llo") | true |
| date_time(dateTimeFormat string, optionalUnixTime interface) string | 使用简化或 go 样式布局返回当前或给定 unix 时间的格式化日期时间 | date_time("%Y-%M-%D %H:%m")
date_time("%Y-%M-%D %H:%m", 1654870680)
date_time("2006-01-02 15:04", unix_time()) | 2022-06-10 14:18 |
| dec_to_hex(number number | string) string | 将输入的数字转换为十六进制格式 | dec_to_hex(7001)" | 1b59 |
| ends_with(str string, suffix …string) bool | 检查字符串是否以任何提供的子字符串结尾 | ends_with("Hello", "lo") | true |
| generate_java_gadget(gadget, cmd, encoding interface) string | 生成 Java 反序列化 Gadget | generate_java_gadget("dns", "{{interactsh-url}}", "base64") | rO0ABXNyABFqYXZhLnV0aWwuSGFzaE1hcAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAAAx3CAAAABAAAAABc3IADGphdmEubmV0LlVSTJYlNzYa/ORyAwAHSQAIaGFzaENvZGVJAARwb3J0TAAJYXV0aG9yaXR5dAASTGphdmEvbGFuZy9TdHJpbmc7TAAEZmlsZXEAfgADTAAEaG9zdHEAfgADTAAIcHJvdG9jb2xxAH4AA0wAA3JlZnEAfgADeHD//////////3QAAHQAAHEAfgAFdAAFcHh0ACpjYWhnMmZiaW41NjRvMGJ0MHRzMDhycDdlZXBwYjkxNDUub2FzdC5mdW54 |
| generate_jwt(json, algorithm, signature, unixMaxAge) []byte | 使用在 JSON 字符串中提供的声明、签名和指定的算法生成 JSON Web Token (JWT) | generate_jwt("{\"name\":\"John Doe\",\"foo\":\"bar\"}", "HS256", "hello-world") | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJuYW1lIjoiSm9obiBEb2UifQ.EsrL8lIcYJR_Ns-JuhF3VCllCP7xwbpMCCfHin_WT6U |
| gzip(input string) string | 使用 GZip 压缩输入 | base64(gzip("Hello")) | +H4sIAAAAAAAA//JIzcnJBwQAAP//gonR9wUAAAA= |
| gzip_decode(input string) string | 使用 GZip 解压缩输入 | gzip_decode(hex_decode("1f8b08000000000000fff248cdc9c907040000ffff8289d1f705000000")) | Hello |
| hex_decode(input interface) []byte | 对给定输入进行十六进制解码 | hex_decode("6161") | aa |
| hex_encode(input interface) string | 对给定输入进行十六进制编码 | hex_encode("aa") | 6161 |
| hex_to_dec(hexNumber number | string) float64 | 将输入的十六进制数转换为十进制格式 | hex_to_dec("ff")
hex_to_dec("0xff") | 255 |
| hmac(algorithm, data, secret) string | 接受哈希函数类型、数据和密钥的 hmac 函数 | hmac("sha1", "test", "scrt") | 8856b111056d946d5c6c92a21b43c233596623c6 |
| html_escape(input interface) string | 对给定输入进行 HTML 转义 | html_escape("\<body\>test\</body\>") | <body>test</body> |
| html_unescape(input interface) string | 对给定输入进行 HTML 反转义 | html_unescape("<body>test</body>") | \<body\>test\</body\> |
| join(separator string, elements …interface) string | 使用指定的分隔符连接给定的元素 | join("_", 123, "hello", "world") | 123_hello_world |
| json_minify(json) string | 通过移除不必要的空白来压缩 JSON 字符串 | json_minify("{ \"name\": \"John Doe\", \"foo\": \"bar\" }") | {"foo":"bar","name":"John Doe"} |
| json_prettify(json) string | 通过添加缩进来美化 JSON 字符串 | json_prettify("{\"foo\":\"bar\",\"name\":\"John Doe\"}") | {\n \"foo\": \"bar\",\n \"name\": \"John Doe\"\n} |
| len(arg interface) int | 返回输入的长度 | len("Hello") | 5 |
| line_ends_with(str string, suffix …string) bool | 检查字符串的任何行是否以任何提供的子字符串结尾 | line_ends_with("Hello\nHi", "lo") | true |
| line_starts_with(str string, prefix …string) bool | 检查字符串的任何行是否以任何提供的子字符串开头 | line_starts_with("Hi\nHello", "He") | true |
| md5(input interface) string | 计算输入的 MD5(消息摘要)哈希值 | md5("Hello") | 8b1a9953c4611296a827abf8c47804d7 |
| mmh3(input interface) string | 计算输入的 MMH3 (MurmurHash3) 哈希值 | mmh3("Hello") | 316307400 |
| oct_to_dec(octalNumber number | string) float64 | 将输入的八进制数转换为十进制格式 | oct_to_dec("0o1234567")
oct_to_dec(1234567) | 342391 |
| print_debug(args …interface) | 打印给定输入或表达式的值。用于调试。 | print_debug(1+2, "Hello") | 3 Hello |
| rand_base(length uint, optionalCharSet string) string | 生成给定长度的随机字符序列,使用可选的字符集(默认为字母和数字) | rand_base(5, "abc") | caccb |
| rand_char(optionalCharSet string) string | 从可选的字符集(默认为字母和数字)生成一个随机字符 | rand_char("abc") | a |
| rand_int(optionalMin, optionalMax uint) int | 在给定的可选限制范围内生成一个随机整数(默认为 0 - MaxInt32) | rand_int(1, 10) | 6 |
| rand_text_alpha(length uint, optionalBadChars string) string | 生成给定长度的随机字母字符串,排除可选的不需要的字符 | rand_text_alpha(10, "abc") | WKozhjJWlJ |
| rand_text_alphanumeric(length uint, optionalBadChars string) string | 生成给定长度的随机字母数字字符串,排除可选的不需要的字符 | rand_text_alphanumeric(10, "ab12") | NthI0IiY8r |
| rand_ip(cidr …string) string | 生成一个随机 IP 地址 | rand_ip("192.168.0.0/24") | 192.168.0.171 |
| rand_text_numeric(length uint, optionalBadNumbers string) string | 生成给定长度的随机数字字符串,排除可选的不需要的数字 | rand_text_numeric(10, 123) | 0654087985 |
| regex(pattern, input string) bool | 测试给定的正则表达式是否匹配输入字符串 | regex("H([a-z]+)o", "Hello") | true |
| remove_bad_chars(input, cutset interface) string | 从输入中移除指定的字符 | remove_bad_chars("abcd", "bc") | ad |
| repeat(str string, count uint) string | 将输入字符串重复指定的次数 | repeat("../", 5) | ../../../../../ |
| replace(str, old, new string) string | 在给定输入中替换指定的子字符串 | replace("Hello", "He", "Ha") | Hallo |
| replace_regex(source, regex, replacement string) string | 替换输入中匹配给定正则表达式的子字符串 | replace_regex("He123llo", "(\\d+)", "") | Hello |
| reverse(input string) string | 反转给定输入 | reverse("abc") | cba |
| sha1(input interface) string | 计算输入的 SHA1 (Secure Hash 1) 哈希值 | sha1("Hello") | f7ff9e8b7bb2e09b70935a5d785e0cc5d9d0abf0 |
| sha256(input interface) string | 计算输入的 SHA256 (Secure Hash 256) 哈希值 | sha256("Hello") | 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969 |
| starts_with(str string, prefix …string) bool | 检查字符串是否以任何提供的子字符串开头 | starts_with("Hello", "He") | true |
| to_lower(input string) string | 将输入转换为小写字符 | to_lower("HELLO") | hello |
| to_unix_time(input string, layout string) int | 使用默认或用户提供的布局解析字符串日期时间,然后返回其 Unix 时间戳 | to_unix_time("2022-01-13T16:30:10+00:00")
to_unix_time("2022-01-13 16:30:10")
to_unix_time("13-01-2022 16:30:10", "02-01-2006 15:04:05") | 1642091410 |
| to_upper(input string) string | 将输入转换为大写字符 | to_upper("hello") | HELLO |
| trim(input, cutset string) string | 返回输入的一个切片,其中移除了所有在 cutset 中包含的首尾 Unicode 码点 | trim("aaaHelloddd", "ad") | Hello |
| trim_left(input, cutset string) string | 返回输入的一个切片,其中移除了所有在 cutset 中包含的开头 Unicode 码点 | trim_left("aaaHelloddd", "ad") | Helloddd |
| trim_prefix(input, prefix string) string | 返回不含提供的前缀字符串的输入 | trim_prefix("aaHelloaa", "aa") | Helloaa |
| trim_right(input, cutset string) string | 返回一个字符串,其中移除了所有在 cutset 中包含的尾部 Unicode 码点 | trim_right("aaaHelloddd", "ad") | aaaHello |
| trim_space(input string) string | 返回一个字符串,其中移除了 Unicode 定义的所有首尾空白 | trim_space(" Hello ") | "Hello" |
| trim_suffix(input, suffix string) string | 返回不含提供的后缀字符串的输入 | trim_suffix("aaHelloaa", "aa") | aaHello |
| unix_time(optionalSeconds uint) float64 | 返回当前 Unix 时间(自 1970 年 1 月 1 日 UTC 以来经过的秒数),加上可选的秒数 | unix_time(10) | 1639568278 |
| url_decode(input string) string | 对输入字符串进行 URL 解码 | url_decode("https:%2F%2Fprojectdiscovery.io%3Ftest=1") | https://projectdiscovery.io?test=1 |
| url_encode(input string) string | 对输入字符串进行 URL 编码 | url_encode("https://projectdiscovery.io/test?a=1") | https%3A%2F%2Fprojectdiscovery.io%2Ftest%3Fa%3D1 |
| wait_for(seconds uint) | 暂停执行给定秒数 | wait_for(10) | true |
| zlib(input string) string | 使用 Zlib 压缩输入 | base64(zlib("Hello")) | eJzySM3JyQcEAAD//wWMAfU= |
| zlib_decode(input string) string | 使用 Zlib 解压缩输入 | zlib_decode(hex_decode("789cf248cdc9c907040000ffff058c01f5")) | Hello |
| resolve(host string, format string) string | 使用您定义的 DNS 类型解析主机 | resolve("localhost",4) | 127.0.0.1 |
| ip_format(ip string, format string) string | 接收一个输入 IP 并根据此图例将其转换为另一种格式,第二个参数表示转换索引,必须在 1 到 11 之间 | ip_format("127.0.0.1", 3) | 0177.0.0.01 |