101 Commits

Author SHA1 Message Date
Shubham Rasal
721c4964d7
Issue 2613 custom template GitHub (#2630)
* Add custom template download/update support from github

- Accept the -gtr flag to accept the list of custom template
  repos(public/private)
- Accept the -gt flag for github token. It internally sets os.Env
  variable
- Update the flags from
   - -update to -nuclei-update for nuclei self update
   - -ut to -tup for template-update
   - -ud to -tud for custom template location
- Add github.go file which has code related to download and update
  custom templates repos.

* Reslove golint and test case error

* Take default template from community directory

- No need to give explicit community directory path.
- Update the integration test to support the change in path

* Update functional test script update template flag

* Update the path from community to nuclei-template

- Revert the code changes that were made to add community directory

* remove the comment

* Update the interactsh server url for testing

* Update race condition command

* update race condition cmd to download the templates

* Debug integration test failure

* update integration test to update templates

* Refactor downloadCustomTemplate function.

- Remove the log prining instead send the message.

* Add test case for custom template repo download

* move the download repo for loop into diff function

* refactor updateTemplate function.

* Create struct for github repos.

- Create customtemplate struct for repo.
- Add functions to customtemplate

* update readme.md file

* Refactor the downloadCustomTemplate function

- create const variables for github & community as template type
- Update gologger to INF
- Validate templateUpdate to accept only github & community value.
- Validate tempalteUpdate require githubTemplateRepo

* Resolve requested changes

* go mod update

* misc option update

* test update

* Revert back update-template flag to boolean.

- to update community templates
  `nuclei -ut`
- to update custom templates
  `nuclei -ut -gtr ehsandeep/mobile-nuclei-templates`

* Update readme to update flag documentation

* Update go.mod

Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2022-11-03 20:27:18 +05:30
Ice3man
b9472cf7e1
Added fuzzing support for query params + var dump feature (#2679)
* Added fuzzing support for query params + var dump feature

* Added query-fuzz integration test

* Fixed payloads + added keys-regex fuzz parameter

* Fixed interactsh not working + misc

* Fixed evaluation + added global variables/dsl support to payloads

* Misc fixes related to variables evaluations

* Added http variables support to fuzz

* misc

* Misc

* Added testing playground + misc renaming

* Added support for path and raw request to fuzzing

* Fixed fuzz integration test

* Fixed variable unresolved issue

* Add multiple parameter support with same name

* Added parameter value as 'value' dsl variable for parts

Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
2022-11-01 20:28:50 +05:30
Mzack9999
18f14b631c
Adding same host redirect support (#2655)
* simplifying test syntax

* adding same host redirect + refactoring redirect handling

* adding missing file

* adding support for template syntax

* adding integration test

* updating options

* fixing issue on same host redirect
2022-09-29 04:11:28 +05:30
Ice3man
466176e9e8
Merge pull request #2500 from projectdiscovery/goflags-update
Updated goflags to latest + misc
2022-08-30 11:52:25 +05:30
Sandeep Singh
e329428684
fix: make headless template validation optional (#2507) 2022-08-29 03:00:58 +05:30
Ice3man
8892250583 Updated goflags to latest + misc 2022-08-27 19:35:17 +05:30
Ice3man
7b7936b7a5
Added show-actions flag to display headless actions (#2456)
* Added show-actions flag to display headless actions

* misc update

* readme update

Co-authored-by: sandeep <sandeep@projectdiscovery.io>
2022-08-25 10:43:32 +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
LuitelSamikshya
3ccbfe4626 disable redirects flag 2022-04-27 11:19:44 -05:00
Sandeep Singh
c5712c98f4
Fixed the default behavior of srd flag (#1817)
* fix: fixed automatic storing of debug response

* small code refactor

Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
2022-04-06 16:49:36 +05:30
Sami
301307bb77
Issue 1705 save responses on disk (#1727)
* save response on disk

* lint error check

* store raw request/response

* lint error fix

* file path

* mock test fix

* readme update

* .txt extension

Co-authored-by: sandeep <sandeep@projectdiscovery.io>
2022-04-02 00:59:02 +05:30
Sajad Parra
bdc1b337e0 fix setting custom nuclei-templates directory #1611 2022-03-02 16:50:20 +05:30
Ice3man
010bab5aaf Fixed failing tests due to missing field declaration 2022-02-23 21:45:55 +05:30
Mzack9999
0732406a68
Uniform behavior for input CLI flags (#1569)
* Adding file normalized string slice support

* updating goflags
2022-02-09 10:16:17 +05:30
mzack
5889a39fb4 Disable internal standard library logger 2022-02-01 14:46:40 +01:00
Ice3man
8dfa9cee39
Added debug-req/resp support for interactsh interactions (#1491)
* Added debug-req/resp support for interactsh interactions

* Added format function for interact debug logs + misc fixes

* Added function for interact debug header

* Typo fix

* Enable debug logging for req/resp debug flag
2022-01-27 12:14:32 +05:30
Mzack9999
39519c01a6
Adding support for template id based execution (#1448) 2022-01-07 17:30:20 +05:30
Ice3man
fea3fabdf2
Misc changes to update logic (#1212)
* Misc changes to update logic

* Misc adjustments to update logic

* update: build check

* update: revert test update

Co-authored-by: sandeep <sandeep@projectdiscovery.io>
2021-12-16 13:59:19 +05:30
Sandeep Singh
a0da7452e3
Merge pull request #1315 from projectdiscovery/validate-flag
validate flag updates
2021-12-02 17:23:34 +05:30
LuitelSamikshya
6d5146e540 validate flag updates 2021-12-01 10:35:18 -06:00
Ice3man
d6cfa556b8
Merge pull request #1306 from projectdiscovery/fix-stdin-reading
fix: #1274 spawned nuclei child process hangs reading stdin
2021-11-30 00:28:00 +05:30
Ice3man543
c9943c0b2a fix: #1274 spawned nuclei child process hangs reading stdin
Next and final attempt at fixing the stdin parsing issue when spawing as child from nodejs
2021-11-29 14:38:55 +05:30
forgedhallpass
3fd1f57b96 refactor: godoc and comment uniformization
Adding space after // and before the godoc/comment
2021-11-25 17:03:56 +02:00
Sajad
f74ff3fc49
Tag based struct validation (#1256)
* Added tag based struct validation
2021-11-20 13:25:27 +05:30
Ice3man543
c1a35b3ff9 Merge branch 'dev' of https://github.com/projectdiscovery/nuclei into more-protocols 2021-11-11 17:21:25 +05:30
LuitelSamikshya
0e46d3e041
feat: Checking socks5 proxy before launching a scan #1001 (#1225)
* Proxy validation and list input support

Co-authored-by: Sajad Parra <parrasajad@gmail.com>
Co-authored-by: sandeep <sandeep@projectdiscovery.io>
2021-11-10 21:30:03 +05:30
Ice3man543
390ca8b3c6 Merge from dev 2021-11-03 18:58:00 +05:30
Ice3man543
97645dde52 Added new workpool package + Misc refactor 2021-10-27 15:53:04 +05:30
kchason
4b70560cc9 Merge branch 'master' into client-cert-auth 2021-10-21 13:59:39 -04:00
sandeep
fa79a16a9d reverting #1017 2021-10-21 05:56:15 +05:30
kchason
9c77f15012 Argument checks for presence and validity 2021-10-20 11:32:26 -04:00
mzack
fc31688f69 fixing lint errors 2021-10-07 12:40:18 +02:00
mzack
12b6b2ca89 Add support for CLI payload variables 2021-10-07 12:36:27 +02:00
forgedhallpass
d10dfb550e Implicitly set the headless flag if template validation was requested, in order to correctly validate headless templates instead of complaining about "cannot create template executer" 2021-09-30 19:07:59 +03:00
forgedhallpass
2baf695709 Merge remote-tracking branch 'origin/dev' into code_smells 2021-09-16 20:00:21 +03:00
Sandeep Singh
4845b85328
Merge pull request #1026 from projectdiscovery/github-rate-limit-fix
GitHub rate limit bug fix
2021-09-16 21:27:46 +05:30
forgedhallpass
9b45c31db8 Merge remote-tracking branch 'origin/dev' into code_smells 2021-09-16 15:49:51 +03:00
Ice3man543
4d52fb45e4 Misc changes to update and ignore handling 2021-09-15 04:01:40 +05:30
forgedhallpass
01d0fb485c Fixes 1016 # Implicitly enable the Verbose option if VerboseVerbose is set. 2021-09-13 22:18:43 +03:00
forgedhallpass
f9eb8ba8ac Changed/removed some documentation/comments 2021-09-01 17:34:51 +03:00
forgedhallpass
40d88d2304 In-lined error checks, reduced scope of error variables, introduced new error variables instead of re-using them 2021-08-31 12:55:52 +03:00
forgedhallpass
36b1c08edc Optimize template validation 2021-08-27 17:06:06 +03:00
Ice3man543
aaf38a531e Fixed lint errors + misc 2021-07-05 17:29:45 +05:30
Ice3man543
dff76e9cd2 Loader rewriter working poc 2021-07-01 14:36:40 +05:30
Ice3man543
7669e9781a Rework template loading into individual module + better tags and filters 2021-06-30 18:39:01 +05:30
Ice3man543
6804bd79e8 New ignore functionality + error to warning 2021-04-02 18:40:58 +05:30
Ice3man543
4a96f95086 Misc fixes 2021-03-14 01:39:52 +05:30
Ice3man543
0dd2e10fd2 Misc changes / fixes 2021-03-06 14:31:21 +05:30
Ice3man543
31ce4b12cd Added workflows flag + new templates flag to run newly added ones 2021-03-05 12:08:31 +05:30
Ice3man
58237f103a
Add headless chrome based templates support (#562) 2021-02-21 16:31:34 +05:30