153 Commits

Author SHA1 Message Date
Ice3man
ea4e8cc265
Added version comparison helpers (#1783)
* Added version comparison helpers

* Added multiple condition example

* Added variadic version of compare_versions

* Fixed failing DSL integration test
2022-04-07 00:48:34 +05:30
Ice3man
159d84465d Fixed failing DSL tests 2022-03-29 17:51:40 +05:30
Xavier Stevens
4a65097194 Squashed commit of the following:
commit b590de2de14923e4cb35dd19845e12833a4ccbfa
Author: Xavier Stevens <xstevens@users.noreply.github.com>
Date:   Wed Mar 23 08:29:37 2022 -0700

    Updated rand_ip to use variadic args

commit ea883be8c0aa56174a1301252129289334659f3f
Author: Xavier Stevens <xstevens@users.noreply.github.com>
Date:   Tue Mar 22 16:59:19 2022 -0700

    Updated rand_ip function to handle multiple CIDRs
2022-03-23 08:37:05 -07:00
mzack
6213454cb3 small code refactor 2022-03-22 15:16:22 +01:00
skhalsa-sigsci
63eccc85ba random ip helper function 2022-03-21 17:39:10 -07:00
Ice3man
be0e4b227c Pad date and time helper strings with double digits 2022-03-21 16:32:21 +05:30
Ice3man
bebdb29706 Added time + zlib dsl functions + misc 2022-03-16 14:12:26 +05:30
mzack
1991f16eb3 exposing dynamicvalues to ongoing iteration 2022-03-11 13:32:55 +01:00
mzack
f7c2226c39 Adding number/string conversion helpers 2022-03-10 10:57:59 +01:00
Ice3man
ca7e30b3fb Added tests for DSL function + misc 2022-03-10 11:56:11 +05:30
mzack
ea9f9c9c9a fixing logic condition + removing redundant code 2022-03-03 07:18:35 +01:00
mzack
2334195bac adding deduping in matches + extract 2022-03-02 08:31:23 +01:00
mzack
6cb522c9b2 Merge branch 'dev' into issue-1594-regexp 2022-02-28 11:42:46 +01:00
mzack
06ab0dfa99 making code more uniform with chosen architecture 2022-02-26 09:06:43 +01:00
Ice3man
deca1095ed Added gzip_decode helper function 2022-02-25 22:37:50 +05:30
mzack
763ec611ab . 2022-02-25 01:49:14 +01:00
mzack
1551feda5a temporary line calculation with multiple file read
todo: replace with one pass scan via io.reader
2022-02-23 23:32:25 +01:00
mzack
6746071979 Refactoring file templates to handle large files in chunks + removing deprecated io methods 2022-02-23 13:54:46 +01:00
Ice3man
7d83d3f8c9
Added line number for file results + stats fixes (#1495)
* Added line number for file results + stats fixes

* Misc

* Improved file result line calculation as per review

* Added new match-all attribute for file template matcher line count
2022-02-10 15:59:05 +05:30
Sandeep Singh
59762ae266
Merge pull request #1503 from projectdiscovery/dsl_concat
DSL concat function
2022-01-18 21:34:21 +05:30
forgedhallpass
7f6c72853f feat: introduce 'concat' DSL function #1502 2022-01-17 13:32:15 +02:00
Ice3man
6e71313d2b Misc changes to description 2022-01-17 15:35:27 +05:30
Ice3man
24326389a4
Added interactsh additional variables support (#1468)
* Added interactsh additional variables support

* Added support for interact server rotation

* Misc fixes to interact related modules

* Fixed a crash with interactsh

* Perform deduplication of output extract data before printing
2022-01-13 13:22:43 +05:30
mzack
256c1f411e fixing mmh3 signed int32 calculation 2022-01-04 18:10:20 +01:00
mzack
357916a6e2 Replacing murmur3 with internal safe-pointer version 2022-01-02 09:09:10 +01:00
Sajad
5200bcd94f
Whois Protocol Support (using rdap) (#1354)
* init rdap

* add an integration test, option to supply RDAP server to execute the request on

* add rdap protocolMappings

* add debug info, add IP, ASN query type support

* rename rdap to whois, Host to Query in template

* rename pending rdap to whois

* remove port from whois varaiables

* set Host variable even if input is not a parsable url
2021-12-16 17:08:02 +05:30
forgedhallpass
85e0b96d51
bug: fixed couple of bugs in the DSL functions (#1372)
* feat: Improve DSL function UX #1295

Sort the output signatures

* feat: Improve DSL function UX #1295

Sort the output signatures.
Lint: simplified the sorting.

* bug: fixed couple of bugs in the DSL functions

Input number parameters are stored as float64 types, hence the type conversion should happen accordingly. Affected functions:
* rand_int
* wait_for
* unix_time
* rand_text_numeric

Added tests for all functions.
Related: #1261

* bug: fixed couple of bugs in the DSL functions

Handle cases when the optional input character set is an empty string. Affected methods:
* rand_char
* rand_base

* bug: fixed couple of bugs in the DSL functions

Change rand_char to return a one character string, instead of the character code

* refactor: Minor integration test changes to show the actual and expected result numbers

* test: Added integration test for all existing DSL functions

* test: Added integration test for all existing DSL functions

Fixing linter issues.

* feat: Add "repeat" DSL function

* test: Add "repeat" DSL function
2021-12-15 19:33:57 +05:30
forgedhallpass
10cf1053f8
feat: Improve DSL function UX #1295 (#1351)
* feat: Improve DSL function UX #1295

Sort the output signatures

* feat: Improve DSL function UX #1295

Sort the output signatures.
Lint: simplified the sorting.
2021-12-09 14:02:01 +05:30
forgedhallpass
2d5784d992 Merge branch 'dev' into dsl_signatures 2021-12-07 18:22:10 +02:00
forgedhallpass
d05c4dc122 refactor: renamed misleading receiver names 2021-12-07 18:01:34 +02:00
forgedhallpass
79aed22d46 feat: Improve DSL function UX #1295
Added support for letting people know if:
* the DSL expression does not return a boolean value
* an invalid custom function signature was provided and then display all available function signatures
* an invalid function was provided and then display the correct signature

Unified the DSL function names to use snake case. The old signatures are also kept for backward compatibility.
2021-12-07 17:34:36 +02:00
Sajad Parra
7a96a7c931 Merge branch 'dev' into dsl-variable-support 2021-12-02 16:50:50 +05:30
Sandeep Singh
3b68c29f48
Merge pull request #1288 from projectdiscovery/dynamic-value-reuse-http
Reusing dynamically extracted values as iterators in http request
2021-12-02 16:27:59 +05:30
Sajad Parra
5b99921d75 add unit and integration tests for dsl variable #555 2021-11-30 20:20:43 +05:30
Ice3man543
72a387c40a Merge from dev 2021-11-30 16:55:09 +05:30
Ice3man543
eb7c704d36 Merging from dev 2021-11-30 16:23:39 +05:30
Sajad Parra
d97aee01c3 Merge branch 'dev' of https://github.com/projectdiscovery/nuclei into dsl-variable-support 2021-11-29 13:36:09 +05:30
forgedhallpass
c61ec5f673 feat: Improve DSL function UX #1295 2021-11-26 17:14:25 +02:00
forgedhallpass
7e22d70ded refactor/documentation: typos and grammatical errors 2021-11-25 18:54:16 +02:00
forgedhallpass
47340f06b0 refactor: uniformly sorted imports 2021-11-25 17:09:20 +02:00
forgedhallpass
3fd1f57b96 refactor: godoc and comment uniformization
Adding space after // and before the godoc/comment
2021-11-25 17:03:56 +02:00
forgedhallpass
c8d009654c fix: Receiver mismatch warnings 2021-11-25 16:57:43 +02:00
Ice3man543
caaa5c6594 Automatically generate docs for enum values 2021-11-25 19:34:01 +05:30
Sajad Parra
7e9272776d add variable support to dsl, remove dynamicValues from request struct 2021-11-25 16:19:42 +05:30
Ice3man543
393babe3c3 Made iterate of values controllable with iterate-all-values flag in http 2021-11-24 22:40:17 +05:30
Ice3man543
273233bb81 Fixed a bug with mergemanymaps + misc lint fixes 2021-11-24 21:56:55 +05:30
Ice3man543
ef5b476c6d Reusing dynamically extracted values as iterators in http request
This PR adds the support in http module to iterate over the dynamically extracted data from extractors
and use it in other requests. This allows nuclei to follow links on pages, do operations with
multiple versions of the same extracted value, etc.
2021-11-24 21:08:08 +05:30
Ice3man543
bdf1c2010b Fixed jsonschema for matchertype missing String() 2021-11-20 19:50:18 +05:30
Ice3man543
66dacccfb4 Fixed matcher type integer issue 2021-11-20 19:47:05 +05:30
LuitelSamikshya
4b8ec29d8d
struct to enums changes for Matchers (#1246)
* struct to enums changes for Matchers
2021-11-19 16:24:09 +05:30