@@ -256,15 +256,15 @@ func TestGetPrintableDslFunctionSignatures(t *testing.T) {
256
256
generate_java_gadget(arg1, arg2, arg3 interface{}) interface{}
257
257
generate_jwt(jsonString, algorithm, optionalSignature string, optionalMaxAgeUnix interface{}) string
258
258
gzip(arg1 interface{}) interface{}
259
- gzip_decode(arg1 interface{}) interface{}
259
+ gzip_decode(data string, optionalReadLimit int) string
260
260
hex_decode(arg1 interface{}) interface{}
261
261
hex_encode(arg1 interface{}) interface{}
262
262
hex_to_dec(arg1 interface{}) interface{}
263
263
hmac(arg1, arg2, arg3 interface{}) interface{}
264
264
html_escape(arg1 interface{}) interface{}
265
265
html_unescape(arg1 interface{}) interface{}
266
266
index(arg1, arg2 interface{}) interface{}
267
- inflate(arg1 interface{}) interface{}
267
+ inflate(data string, optionalReadLimit int) string
268
268
ip_format(arg1, arg2 interface{}) interface{}
269
269
jarm(arg1 interface{}) interface{}
270
270
join(separator string, elements ...interface{}) string
@@ -329,7 +329,7 @@ func TestGetPrintableDslFunctionSignatures(t *testing.T) {
329
329
xor(args ...interface{}) interface{}
330
330
zip(file_entry string, content string, ... ) []byte
331
331
zlib(arg1 interface{}) interface{}
332
- zlib_decode(arg1 interface{}) interface{}
332
+ zlib_decode(data string, optionalReadLimit int) string
333
333
`
334
334
335
335
signatures := GetPrintableDslFunctionSignatures (true )
@@ -435,17 +435,23 @@ func TestDslExpressions(t *testing.T) {
435
435
`uniq("ab", "cd", "12", "34", "12", "cd")` : []string {"ab" , "cd" , "12" , "34" },
436
436
`join(" ", uniq("ab", "cd", "12", "34", "12", "cd"))` : "ab cd 12 34" ,
437
437
`join(", ", split(hex_encode("abcdefg"), 2))` : "61, 62, 63, 64, 65, 66, 67" ,
438
- `json_minify("{ \"name\": \"John Doe\", \"foo\": \"bar\" }")` : "{\" foo\" :\" bar\" ,\" name\" :\" John Doe\" }" ,
439
- `json_prettify("{\"foo\":\"bar\",\"name\":\"John Doe\"}")` : "{\n \" foo\" : \" bar\" ,\n \" name\" : \" John Doe\" \n }" ,
440
- `ip_format('127.0.0.1', '1')` : "127.0.0.1" ,
441
- `ip_format('127.0.0.1', '3')` : "0177.0.0.01" ,
442
- `ip_format('127.0.0.1', '5')` : "2130706433" ,
443
- `ip_format('127.0.1.0', '11')` : "127.0.256" ,
444
- "unpack('>I', '\xac \xd7 \t \xd0 ')" : - 272646673 ,
445
- "xor('\x01 \x02 ', '\x02 \x01 ')" : []uint8 ([]byte {0x3 , 0x3 }),
446
- `count("projectdiscovery", "e")` : 2 ,
447
- `concat(to_title("pRoJeCt"), to_title("diScOvErY"))` : "ProjectDiscovery" ,
448
- `concat(to_title("welcome "), "to", to_title(" watch"), to_title("mojo"))` : "Welcome to WatchMojo" ,
438
+ `json_minify("{ \"name\": \"John Doe\", \"foo\": \"bar\" }")` : "{\" foo\" :\" bar\" ,\" name\" :\" John Doe\" }" ,
439
+ `json_prettify("{\"foo\":\"bar\",\"name\":\"John Doe\"}")` : "{\n \" foo\" : \" bar\" ,\n \" name\" : \" John Doe\" \n }" ,
440
+ `ip_format('127.0.0.1', '1')` : "127.0.0.1" ,
441
+ `ip_format('127.0.0.1', '3')` : "0177.0.0.01" ,
442
+ `ip_format('127.0.0.1', '5')` : "2130706433" ,
443
+ `ip_format('127.0.1.0', '11')` : "127.0.256" ,
444
+ "unpack('>I', '\xac \xd7 \t \xd0 ')" : - 272646673 ,
445
+ "xor('\x01 \x02 ', '\x02 \x01 ')" : []uint8 ([]byte {0x3 , 0x3 }),
446
+ `count("projectdiscovery", "e")` : 2 ,
447
+ `concat(to_title("pRoJeCt"), to_title("diScOvErY"))` : "ProjectDiscovery" ,
448
+ `concat(to_title("welcome "), "to", to_title(" watch"), to_title("mojo"))` : "Welcome to WatchMojo" ,
449
+ `zlib_decode(hex_decode("789cf248cdc9c907040000ffff058c01f5"), 4)` : "Hell" ,
450
+ `gzip_decode(hex_decode("1f8b08000000000000fff248cdc9c907040000ffff8289d1f705000000"), 4)` : "Hell" ,
451
+ `inflate(hex_decode("f248cdc9c907040000ffff"), 4)` : "Hell" ,
452
+ `zlib_decode(hex_decode("789cf248cdc9c907040000ffff058c01f5"), 100)` : "Hello" ,
453
+ `gzip_decode(hex_decode("1f8b08000000000000fff248cdc9c907040000ffff8289d1f705000000"), 100)` : "Hello" ,
454
+ `inflate(hex_decode("f248cdc9c907040000ffff"), 100)` : "Hello" ,
449
455
}
450
456
451
457
testDslExpressions (t , dslExpressions )
0 commit comments