Commit Graph

32 Commits (6534deedc6cb29ce7910c21f8bd982cd3f0832c4)

Author SHA1 Message Date
Shubham Rasal 6b142d794a
Issue 2254 uncover integration (#2786)
* nuclei -uq 'vuln:CVE-2021-26855' -t cves/2021/

- `nuclei -uq 'vuln:CVE-2021-26855' -t cves/2021/`

* Add automatic template execution using metadata

- Query uncover after the template is loaded.
- Add the received hosts to the input provider from uncover
- Make NormalizeStoreInputValue() function public to add hosts from the
  runner after uncover hosts received.

* run go mod tidy

* Remove unnecessary comments

* Resolve the requested changes

- move uncover code to protocols/common/uncover package
- Use uncover delay to create uncover rate limiter
- Use single ratelimiter object and remove not required ratelimiters
- Create Set() method for input provider interface
- Rename normalizeStoreInputValue to Set() method

* Solved the uncover running twice.

- flag StringSliceVarP adds the default value twice in the variable
- Check if provider keys exists or not
- Add uncover help block to english readme.md

* Add uncover field functionality

- ./nuclei -uq 'vuln:CVE-2021-26855' -t dns -duc -uf host
- ./nuclei -uq 'vuln:CVE-2021-26855' -t dns -duc -uf ip:port

* Update error messages and solve nuclei hang for wrong uncover engine

- Get uncover engine values from uncover package

* Resolve merge conflicts

* misc option update

* Update logging for templates

- remove duplicate env log printing
- Log message for template queries

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2022-11-16 11:12:39 +05:30
Mzack9999 1fbbca66f9
Adding support to scan all v4/v6 IPs (#2709)
* Adding support to scan all v4/v6 IPs

* adding tests

* metainput prototype

* using new signature

* fixing nil pointer

* adding request context with metadata

* removing log instruction

* fixing merge conflicts

* adding clone helpers

* attempting to fix ipv6 square parenthesis wrap

* fixing dialed ip info

* fixing syntax

* fixing output ip selection

* adding integration tests

* disabling test due to gh ipv6 issue

* using ipv4 only due to GH limited networking

* extending metainput marshaling

* fixing hmap key

* adding test for httpx integration

* fixing lint error

* reworking marshaling/id-calculation

* adding ip version validation

* improving handling non url targets

* fixing condition check
2022-11-09 18:48:56 +05:30
vrenzolaverace 2aaf2a2158
Use utils helpers libraries (#2809) (#2810)
* Use utils helpers libraries (#2809)

* Use utils helpers libraries (#2809)
2022-11-07 01:54:23 +05:30
Ice3man 363ffb75db
Added probing for URL + input based on protocol (#2614)
* Added workflow names based condition

* Added conditional filtering to workflow executor

* Replaced names with single name stringslice

* Added probing for URL + input based on protocol

* Remove debug comments

* Fixed typo

* Fixed failing tests

* Fixed workflow matcher condition + tests

* Fixed workflow item name

* Switch to if-else

* Fixed review comment strict

* Increase bulk size

* Added default port for SSL protocol + misc changes

* Fixed failing tests

* Fixed misc changes to executer

* Fixed failing self-contained and offlinehttp tests

* Fixed atomic increment operation

* misc update

* Fixed failing builds

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2022-10-20 17:23:00 +05:30
Shubham Rasal 897dbe8e4c
Add AS input support (#2712)
* Add AS input support

- Integrate mapcidr asn function to handle ASN number input support
- Check if input is ASN number or not. If yes then query for cidrs
- issue #2706

* Remove \r coz of failing test cases in windows os

* Replace newline char for windows

* remove extra line

* rename goldenfile dir to tests

* fixing folder name

Co-authored-by: mzack <marco.rivoli.nvh@gmail.com>
2022-10-14 00:25:00 +05:30
Shubham Rasal 3ebd1f689b
cidr input support #2665 (#2675)
* Add CIDR input support

- Add expandCIDRInputValue function which accepts the cidr,
  and stores the IPs into hmap. It uses mapcidr to get the expanded IPs
- Add test case to test expandCIDRInputValue and isCIDR function
- Update dsl_test.go which had typo. coz of failing test

* Resolve the requested changes
2022-10-07 14:28:02 +05:30
Mzack9999 781e4e6105
Shared Execution Context Prototype (#2576)
* renaming var

* Introducing shared execution context prototype

* fixing field name

* adding shared values propagation

* adding shared context lock

* add slice values normalization

* adding integration tests

* adding metadata support for dns

* adding multi-protocol context sharing test

* removing debug test files

* moving contextargs around

* adding comments

* refactoring code

- getter/setter for complex types
- using pointers to avoid heap allocations
2022-10-03 15:42:20 +05:30
Ice3man 03c7e89d9e
Added workflow names based condition (#2594)
* Added workflow names based condition

* Added conditional filtering to workflow executor

* Replaced names with single name stringslice

* Fixed workflow matcher condition + tests

* Fixed workflow item name
2022-09-19 16:49:30 +05:30
mzack 37c016a5f0 fixing lint errors 2022-09-19 08:38:52 +02:00
Mike Rheinheimer 9efba05e0c
expose hosterrorscache.Cache as an interface (#2291)
* expose hosterrorscache as an interface, change signature to capture the error reason

* use the hosterrorscache.CacheInterface as struct field so users of Nuclei embedded can provide their own cache implementation

Co-authored-by: Mike Rheinheimer <mrheinheimer@atlassian.com>
2022-07-19 02:05:53 +05:30
Mzack9999 476773ff8c
Replacing hasstdin with helper library (#2191)
* Replacing hasstdin with helper library

* adding timeout reader on stdin

* adding large input read timeout

* reducing stdin timeout + nostdin flag

* go mod update

* readme update

* go mod tidy

Co-authored-by: sandeep <sandeep@projectdiscovery.io>
2022-06-30 17:51:54 +05:30
Sami 6ca4374f91
sonar category: String literals should not be duplicated (#1944)
* sonar category: String literals should not be duplicated

* lint error fix

* better naming conventions for constants

* improved naming conventions and methods
2022-05-12 15:40:14 +05:30
Ice3man ffe4fea237 Performance improvements + wappalyzer as default + misc 2022-03-08 12:43:24 +05:30
Ice3man d9a121344c Merge branch 'dev' of https://github.com/projectdiscovery/nuclei into automatic-workflows 2022-03-07 13:19:37 +05:30
forgedhallpass 72af50155d Typo fixes 2022-02-07 16:41:55 +02:00
Ice3man be75480256 Added initial smart workflow implementation 2022-01-18 20:59:37 +05:30
mzack 1f878192ec Merge branch 'dev' into issue-614-scan-resume 2021-12-23 13:15:47 +01:00
mzack 63b194c10a refactoring stop-resume logic with better tracking 2021-12-16 22:32:03 +01:00
Ice3man543 65a1858f94 fix #1303: speed regression due to missing goroutine in executer
Fixed speed regression introduced in dev due to missing go() statement when executing template input
2021-11-30 00:17:52 +05:30
mzack 2140ffa382 Adding stop-resume support 2021-11-29 14:38:45 +01: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
Mzack9999 ca9676f52e
Adding support for clustering within workflow (#1255)
* Adding support for clustering within workflow
2021-11-22 04:49:53 +05:30
Ice3man543 d442c51c1a Changed input to target in core 2021-11-08 16:14:47 +05:30
Ice3man543 8ad3ebcd05 Made code changes as per review comments 2021-11-05 03:01:41 +05:30
Ice3man543 390ca8b3c6 Merge from dev 2021-11-03 18:58:00 +05:30
Ice3man543 bdb415b0c7 Misc changes as per review 2021-11-03 02:23:48 +05:30
Ice3man543 5393cc4cd5 Adjusting packages for more API-type design 2021-10-29 03:19:43 +05:30
Ice3man543 0abc7202b1 Misc fixes with goflags 2021-10-28 17:45:38 +05:30
Ice3man543 d124dbacc7 Moved all important execution stuff to engine 2021-10-28 17:20:07 +05:30
Ice3man543 df78ea72c5 misc 2021-10-27 18:41:39 +05:30
Ice3man543 c16c93fe7c refactor the modules to core 2021-10-27 16:50:36 +05:30