26 Commits

Author SHA1 Message Date
Tarun Koyalwar
f7fe99f806
add flow support in template (i.e javascript scripting) (#4015)
* add flow logic

* progress

* working POC

* fix string slice normalization issue in variables

* update

* fix nil panic

* remove poll()

* load file with sandbox and more

* fix failing integration tests

* JS: log: print in vardump format

* fix missing id in protocols

* fix proto prefix in template context

* flow: add unit tests

* conditional flow support using flow

* fix proto callbacks + more unit tests

* adds integration test

* conditional flow: check if req has any matchers

* fix lint error

* deprecate iterate-all+ missing multi-proto implementation

* fix ip input in raw request

* JS: feat dedupe object+ more builtin funcs

* feat: hide protocol result using hide

* feat: async execution

* complete async execution support

* fix condition-flow without any matchers

* refactor: template executer package (tmplexec)

* flow executor working

* fix data race in templateCtx

* templateCtx redesign

* fix failing unit test

* add multiprotocol support to deprecated syntax

* fix race condition in utils & tlsx

* add documentation in flow package

* remove regions.txt file

* fix minor issue with self contained templates

* fix typos of copilot

* dep + misc update

* fix reqID: use req.Type instead of template.Type

---------

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2023-08-31 18:03:01 +05:30
Mzack9999
e5154d362a
fixing payload load (#3927)
* fixing payload load

* Added tests for load payloads edge-case + fixed error

* Added separate flags for network and file sandbox

* Fixed tests for payload loader

* Fixed integration tests locally

* readme update

---------

Co-authored-by: Ice3man <nizamulrana@gmail.com>
Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2023-07-14 19:39:32 +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
Ice3man
e7fb40a413 Added sandboxing for payload files and requests 2022-11-16 13:49:24 +05:30
Ice3man
d956f08cb9
Added attack-type option to override template attack-type (#2724)
* Added attack-type option to override template attack-type

* Added docs + integration tests
2022-10-19 03:51:45 +05:30
Ice3man
67d5769cd9
Added initial catalog interface implementation (#2318)
* Added initial catalog interface implementation

* Added OpenFile to Catalog + disk catalog implementation

* Fixed merge issues

Co-authored-by: sandeep <sandeep@projectdiscovery.io>
2022-08-10 11:05:58 -07:00
mzack
e244768f32 Fixing typo in variable name while validating template payloads 2021-12-08 19:27:47 +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
Ice3man543
8ad3ebcd05 Made code changes as per review comments 2021-11-05 03:01:41 +05:30
Ice3man543
a60b10afca Added an enum for attackType 2021-11-04 02:41:56 +05:30
Ice3man543
a7c8d0473c Removed duplicate attackType logic + move attackType to generators 2021-11-04 02:28:48 +05:30
sandeep
a9cb83ff27 misc sniper cleanups 2021-10-13 13:19:00 +05:30
Ice3man543
aacbb28052 Removed sniper + made batteringram default + misc 2021-10-09 19:46:23 +05:30
forgedhallpass
555e609173 Merge remote-tracking branch 'origin/dev' into code_smells 2021-09-07 17:36:34 +03:00
forgedhallpass
0ce33927c7 Typo fixes. 2021-09-07 17:31:46 +03:00
Sajad Parra
761d62f3de remove pitchfork validation 2021-09-01 20:03:53 +05:30
savik
fb18feea76
fixed pitchfork validation 2021-08-10 12:34:37 +03:00
Ice3man543
8512b684c5 Lint errors fix 2021-02-26 13:13:11 +05:30
Ice3man543
a12051799d Added support for multiple sniper payloads 2020-12-30 13:57:15 +05:30
Ice3man543
aefa2717f7 Added payload validation + misc 2020-12-29 12:08:46 +05:30
Ice3man543
651a5edfbb HTTP executor refactor + simplifying logics 2020-12-28 20:02:26 +05:30
Ice3man543
e8a17e18ca Fixed payload generators bug 2020-12-26 22:52:33 +05:30
Ice3man543
2b50d99c0c Misc work on extractor and replacer 2020-12-24 12:56:28 +05:30
Ice3man543
3fc7291e16 Fixed generator bugs, test cases 2020-12-22 01:21:05 +05:30
Ice3man543
1fa79d6f1f Added reworked generators package 2020-12-22 01:02:38 +05:30