Commit Graph

1973 Commits (42a59189f39cf62e275a8057643fdf183fe575a9)

Author SHA1 Message Date
Keith Chason 42a59189f3
Fix mis-spellings and other comment cleanup (#3704) 2023-05-19 21:06:39 +05:30
GitHub Action 9f07977411 Auto Generate Syntax Docs + JSONSchema [Mon May 15 13:47:53 UTC 2023] 🤖 2023-05-15 13:47:53 +00:00
Shubham Rasal 2dd13b9afb
Allow additional properties for variables inside jsonschema (#3669)
* Allow additional properties in variables inside jsonschema

* Update variables jsonschema function

* Add tags for archive and mime-type
2023-05-15 19:15:11 +05:30
Shubham Rasal 06ab56abea
fix memory leak in dns templates (#3676)
* fix memory leak

* update test to cover the string slice case
2023-05-12 17:29:37 +05:30
GitHub Action e995b0ce48 Auto Generate Syntax Docs + JSONSchema [Wed May 10 21:58:38 UTC 2023] 🤖 2023-05-10 21:58:38 +00:00
Shubham Rasal 9c2fa8f9c4
Add payload in dns protocol (#3632)
* add execute function in dns

* Add payload in dns protocol

* Add integration test to cover dns payload

- also check command line overriding a payload variable

* Update matchedAt and remove trailing dot

* Consider payload data for request count

- Update verbose output to print question
- Update dns requests Requests function to consider payload data

* update gitignore

* bump nuclei version to v2.9.4-dev

---------

Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
2023-05-11 03:26:29 +05:30
sandeep ced8d96df2 dev version update 2023-05-09 15:13:40 +05:30
Tarun Koyalwar c62dc01f9f
uncover logic refactor to v0.0.4 (#3663)
* uncover logic refactor to v0.0.4

* remove deprecated import: stringsutil
2023-05-09 03:57:56 +05:30
GitHub Action 5c62e7a296 Auto Generate Syntax Docs + JSONSchema [Thu May 4 11:28:35 UTC 2023] 🤖 2023-05-04 11:28:35 +00:00
Mzack9999 9bf2ec09fc
Merge pull request #3644 from projectdiscovery/any-query
added any dns query
2023-05-04 13:26:31 +02:00
sandeep 79a1c99da7 version update 2023-05-04 01:47:41 +05:30
Tarun Koyalwar 37aaa5ebaa
add support for resolving old template paths (#3635)
* add support for resolving old template paths

* skip resolving if new path is specified

* add debug statement

* show error if fallback failed

* remove debug statement

* remove fallback errors

* print warning for deprecated paths

* add warnings for  deprecated paths/protocol names

* misc update

---------

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2023-05-04 01:43:41 +05:30
sandeep 82f7a0e939 added any dns query 2023-05-03 21:50:06 +05:30
Tarun Koyalwar 9b3a55d6c0
fix panic while parsing tlsx response (#3641) 2023-05-03 20:47:08 +05:30
lu4nx 027880af34
update rod to v0.112.9 #3552 (#3637)
* update rod to v0.112.9

* removed unused reflection

---------

Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2023-05-03 14:40:58 +05:30
Shubham Rasal 449afc0c5c
Issue 3564 var override (#3599)
* Check if the variables are override by other means

- you can override the template variable value using command line flags

* Update lazy eval logic

- previously, we were checking any function/expression in variable
- now, update the logic, lazy eval only if variable contains any
  protocol variable(global)

* add integration tests

* Add test to check the dsl function working in variable

* gather all generate variables logic in utils

* go mod update

* Refactor the generate variables function

* go mod update+ fix typo

---------

Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
2023-05-02 23:49:56 +05:30
Shubham Rasal f640187709
Expose DNS fields for matchers and extractors (#3613)
* Extend dns extractor to dns answer records

* add test template

* Ignore error for dns variables are not found

* Add all the records of answer section

* Fixed the wrong typecasting
2023-05-02 17:13:11 +05:30
Sandeep Singh d55ad995d0
tlsx dep update (#3633)
* tlsx dep update

* upgrde httpx => 1.3.0

* Fix check for OS made in MustDisableSandbox() (#3631)

Signed-off-by: iamargus95 <kamathsuraj95@gmail.com>

* Fix wrong template loading in dev branch (#3629)

* Templates wrong loading

* Add tests to cover following scenarios

- check optional fields only if template loaded
- it should return warning only if template is loaded

* enable color in windows (#3634)

* enable color in windows

* fixed win workflow

* typo update

---------

Signed-off-by: iamargus95 <kamathsuraj95@gmail.com>
Co-authored-by: Ramana Reddy <ramanaredy.manda@gmail.com>
Co-authored-by: Suraj Kamath <kamathsuraj95@gmail.com>
Co-authored-by: Shubham Rasal <shubham@projectdiscovery.io>
2023-05-02 16:22:41 +05:30
Shubham Rasal 6ebb8e98f4
Fix wrong template loading in dev branch (#3629)
* Templates wrong loading

* Add tests to cover following scenarios

- check optional fields only if template loaded
- it should return warning only if template is loaded
2023-05-02 15:12:55 +05:30
Suraj Kamath 537814bae8
Fix check for OS made in MustDisableSandbox() (#3631)
Signed-off-by: iamargus95 <kamathsuraj95@gmail.com>
2023-05-02 15:04:24 +05:30
Tarun Koyalwar 7f5e4e2336
aws signer: fix missing x-content-sha256 header (#3601)
* fix missing x-content-sha256 header

* fix variable priority in self-contained templates

* remove debug statement

* adds generic raw request parser for self-contained req

* more integration tests

* bug fix: 10x faster race requests

* fix failing integration test
2023-05-01 12:15:35 +05:30
Dogan Can Bakir 4e0ccb38be
Check severity att while validating (#3540)
* Make severity attribute required

* Update test err msg

* minor

* Do not strict check serverity

* Fix failing test

* Don't print warning in workflow loader

- workflow loader that contains tags load all the template and parse it
- i.e it iw printing warning recursively, ignore as the templates
  already getting valiated

* Fix error typo

* Resolve comments

- split the function into two diff

---------

Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
Co-authored-by: shubhamrasal <shubhamdharmarasal@gmail.com>
2023-04-27 15:27:30 +05:30
Suraj Kamath 78f1ade6c6
Update -tc flag to filter fields within the classification section (#3606)
* Add fields from Classification section in a template to the -tc flag expression evaluation

Signed-off-by: iamargus95 <kamathsuraj95@gmail.com>

* Add tests for filtering Classification section using -tc flag

Signed-off-by: iamargus95 <kamathsuraj95@gmail.com>

* Fix hyphenated Metadata keys beings added to parameters

Signed-off-by: iamargus95 <kamathsuraj95@gmail.com>

* Add tests to the fix for hyphenated fields encountered in Metadata section

Signed-off-by: iamargus95 <kamathsuraj95@gmail.com>

---------

Signed-off-by: iamargus95 <kamathsuraj95@gmail.com>
2023-04-27 00:15:35 +05:30
Tarun Koyalwar 4e6ef4490e
duplicated params in self contained requests (#3608)
* fix duplicated params in self-contained+ export extracted values to file

* add integration tests + fix percentage overflow in pb

* fix integration test template id

* integration test: validate if file exists
2023-04-26 12:35:07 +05:30
Mzack9999 ea5f8a0638
Additional nil check on interactsh client (#3590) 2023-04-25 23:49:23 +05:30
Mzack9999 64adad131f Removing redundant code with utils 2023-04-23 21:37:25 +02:00
sandeep fe234cf32d version update 2023-04-20 04:44:54 +05:30
sandeep 871e7016fc version update 2023-04-20 03:39:33 +05:30
Keith Chason dcb003211c
Gitlab Custom Templates (#3570)
* Configuration options for GitLab template pulls

* GitLab client creation

* GitLab hooks and property renames

* Fix filesystem writing and update environment variables

* Fix type error in formatted error message

* Migrate directory config to new nucleiconfig file

* refactor + add custom templates to tm

* typo fix + only show installed ct with -tv

* add default gitlab url if not given

* fix template valid failure

---------

Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
2023-04-20 03:12:52 +05:30
Keith Chason b211d6fa44
Duplicate error message, variable collision fix, method doc references (#3568) 2023-04-20 02:22:34 +05:30
Mzack9999 978d0bcc23
Replacing goos with osutils (#3571)
* Replacing goos with osutils

* pleasing his majesty the linter
2023-04-19 23:00:15 +05:30
Tarun Koyalwar bf08913cd0
update logic + config management refactor (#3567)
* adds template manager

* refactor: checkpoint

* centrailized config & template download logic

* refactor removed unused code

* use global template directory

* update related bug fixes

* bug fix create cfg dir if missing

* fix lint error

* bug fix skip writing template dir in callback

* misc update

* remove unused code

* use strings.equalfold for comparison

---------

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2023-04-19 21:58:48 +05:30
Shubham Rasal d0f22f8b73
Issue 3488 http race (#3533)
* debug

* Add body after the request creation

* fix race_count template hangs

* remove printf

* update if condition
2023-04-19 01:57:53 +05:30
Keith Chason 786ee982ed
Azure Blob Storage Custom Template Provider (#3542)
* Initial library creation for downloading blobs from Azure

* Environment variable hooks for Azure config values

* Missing configuration checks for Azure blob connection

* Package dependencies for Azure client library

* Make output directory if it doesn't exist, add log for downloaded templates

* Add example formats for Azure properties

* Add path to the output after download

* Only download .yaml files instead of also .yml .json
2023-04-17 13:48:06 +05:30
Mzack9999 6f4b1ae48a
Replacing ccache with generic gcache (#3523)
* Replacing ccache with generic gcache

* fixing lint issues

* removing unecessary hashing + using errorutils

* making test more tolerant

* removing dead code + refactor

* removing redundant code

* removing race

* maint

* moving code

* adding more iterations

* note + typo

* temporary fixing stop-at-first-match with interact

* wrapping internal map with mux

* sort before running integration test

* fix deadlock in requestShouldStopAtFirstMatch

* add timeout to integration_test workflow

* attempting to remove outer lock

* adds interactsh protocol tests in integration_test

---------

Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
2023-04-16 23:19:35 +05:30
Keith Chason 8ffbebb5ea
Correct spelling in "access" and add arg types (#3536) 2023-04-13 18:06:54 +05:30
Ramana Reddy 6ffdfcf19c
fix rate-limit on query fuzzing (#3458) (#3532) 2023-04-12 23:55:21 +05:30
Tarun Koyalwar ece20ec15c
use proxyutils + fix proxy panic (#3526) 2023-04-12 12:49:58 +05:30
Shubham Rasal 45cc676f96
Evaluate payload variables (#3503)
* Evaluate payload variables

* Add variables evaluation

* Extend variables test

- to check evaluation of global variables in variables
- to check evaluation of golbal variables in payload

* Add default and cli variables to websocket, whois and dns proto

- use url.Parse with urlutil.Parse
2023-04-12 01:50:58 +05:30
Keith Chason 3476f4d1d6
JSONL(ine) Export (#3504) (#3505)
* Add initial hooks for JSONL export

* Add newline character after each result

* fix integration test (#3506)

* fix integration test

* fix interactsh fatal error

* fix default report-config.yaml

---------

Co-authored-by: Tarun Koyalwar <45962551+tarunKoyalwar@users.noreply.github.com>
Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
2023-04-08 17:44:41 +05:30
Tarun Koyalwar a185348194
fix integration test (#3506)
* fix integration test

* fix interactsh fatal error
2023-04-04 10:09:52 +08:00
sandeep 38f448d352 Update config.go 2023-04-02 15:26:32 +05:30
Sandeep Singh e6bd5db6fb
tlsx go mod update (#3490) 2023-04-02 13:40:45 +05:30
GitHub Action c5086527df Auto Generate Syntax Docs + JSONSchema [Sun Apr 2 07:54:23 UTC 2023] 🤖 2023-04-02 07:54:23 +00:00
Sandeep Singh abfaa84825
Add CPE field to Classification struct (#3489)
* Add CPE field to Classification struct

* Added EPSSScore to Classification
2023-04-02 13:23:13 +05:30
mlec ed31fc4449
fix(links): Replace Master to Main in links 🩹 (#3485)
Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
2023-03-31 16:27:15 +05:30
Keith Chason 4d96025bec
JSON Export Handling Updates (#3466)
* Switch -json to -jsonl

* Add JSON output file

* Update docs for EN and ID

* Fix linting issue with error wrap

* Add -j flag

* Fix call for short flag

* Correct typo "Ciper" to "Cipher" (#3468)

* migrate dsl helper functions to dsl repo (#3461)

* migrate dsl pkg code to dsl repo

* fix lint error

* upgrade dsl dependency

* upgrade deps

---------

Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>

* chore(deps): bump github.com/projectdiscovery/httpx in /v2 (#3469)

Bumps [github.com/projectdiscovery/httpx](https://github.com/projectdiscovery/httpx) from 1.2.7 to 1.2.9.
- [Release notes](https://github.com/projectdiscovery/httpx/releases)
- [Changelog](https://github.com/projectdiscovery/httpx/blob/main/.goreleaser.yml)
- [Commits](https://github.com/projectdiscovery/httpx/compare/v1.2.7...v1.2.9)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/httpx
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/weppos/publicsuffix-go in /v2 (#3472)

Bumps [github.com/weppos/publicsuffix-go](https://github.com/weppos/publicsuffix-go) from 0.20.0 to 0.30.0.
- [Release notes](https://github.com/weppos/publicsuffix-go/releases)
- [Changelog](https://github.com/weppos/publicsuffix-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/weppos/publicsuffix-go/compare/v0.20.0...v0.30.0)

---
updated-dependencies:
- dependency-name: github.com/weppos/publicsuffix-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/projectdiscovery/wappalyzergo in /v2 (#3473)

Bumps [github.com/projectdiscovery/wappalyzergo](https://github.com/projectdiscovery/wappalyzergo) from 0.0.81 to 0.0.88.
- [Release notes](https://github.com/projectdiscovery/wappalyzergo/releases)
- [Commits](https://github.com/projectdiscovery/wappalyzergo/compare/v0.0.81...v0.0.88)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/wappalyzergo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/projectdiscovery/hmap in /v2 (#3470)

Bumps [github.com/projectdiscovery/hmap](https://github.com/projectdiscovery/hmap) from 0.0.10 to 0.0.11.
- [Release notes](https://github.com/projectdiscovery/hmap/releases)
- [Commits](https://github.com/projectdiscovery/hmap/compare/v0.0.10...v0.0.11)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/hmap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* debug catalog path

* use paths instead of filepath for aws path

* deps update (#3477)

* deps update

* fixing gologger via callback

* Moved `json-export` flag to the other exporters

* Switch "json[-_]exporter to jsonexporter"

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ramana Reddy <90540245+RamanaReddy0M@users.noreply.github.com>
Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
Co-authored-by: shubhamrasal <shubhamdharmarasal@gmail.com>
2023-03-31 15:29:29 +05:30
Mzack9999 34000e1b6b
deps update (#3477)
* deps update

* fixing gologger via callback
2023-03-29 02:42:08 +05:30
Mzack9999 42660be8c1
Merge pull request #3474 from projectdiscovery/issue-3467-fix-catalog-test
fix aws s3 bucket catalog path mismatch
2023-03-28 22:51:03 +02:00
Tarun Koyalwar b1c54ef117 use paths instead of filepath for aws path 2023-03-28 20:08:24 +05:30