Skip to content

Conversation

@parrasajad
Copy link
Contributor

@parrasajad parrasajad commented Sep 8, 2022

Proposed changes

Example:

$proxify -response-dsl "containss('response', 'test')" -v

                       _ ___    
   ___  _______ __ __ (_) _/_ __
  / _ \/ __/ _ \\ \ // / _/ // /
 / .__/_/  \___/_\_\/_/_/ \_, / 
/_/                      /___/  v0.0.7

                projectdiscovery.io

Use with caution. You are responsible for your actions
Developers assume no liability and are not responsible for any misuse or damage.
[INF] error parsing response DSL: Undefined function containss
[INF] The available custom DSL functions are:
        base64(arg1 interface{}) interface{}
        base64_decode(arg1 interface{}) interface{}
        base64_py(arg1 interface{}) interface{}
        contains(arg1, arg2 interface{}) interface{}
        contains_all(arg1, arg2 interface{}) interface{}
        contains_any(arg1, arg2 interface{}) interface{}
        equals_any(arg1, arg2 interface{}) interface{}
        hex_decode(arg1 interface{}) interface{}
        hex_encode(arg1 interface{}) interface{}
        html_escape(arg1 interface{}) interface{}
        html_unescape(arg1 interface{}) interface{}
        len(arg1 interface{}) interface{}
        md5(arg1 interface{}) interface{}
        mmh3(arg1 interface{}) interface{}
        rand_base(arg1, arg2, arg3 interface{}) interface{}
        rand_char(arg1, arg2 interface{}) interface{}
        rand_int(arg1, arg2 interface{}) interface{}
        rand_text_alpha(arg1, arg2 interface{}) interface{}
        rand_text_alphanumeric(arg1, arg2 interface{}) interface{}
        rand_text_numeric(arg1, arg2 interface{}) interface{}
        regex(arg1, arg2 interface{}) interface{}
        regex_all(arg1, arg2 interface{}) interface{}
        regex_any(arg1, arg2 interface{}) interface{}
        replace(arg1, arg2, arg3 interface{}) interface{}
        replace_regex(arg1, arg2, arg3 interface{}) interface{}
        reverse(arg1 interface{}) interface{}
        sha1(arg1 interface{}) interface{}
        sha256(arg1 interface{}) interface{}
        tolower(arg1 interface{}) interface{}
        toupper(arg1 interface{}) interface{}
        trim(arg1, arg2 interface{}) interface{}
        trimleft(arg1, arg2 interface{}) interface{}
        trimprefix(arg1, arg2 interface{}) interface{}
        trimright(arg1, arg2 interface{}) interface{}
        trimspace(arg1 interface{}) interface{}
        trimsuffix(arg1, arg2 interface{}) interface{}
        url_decode(arg1 interface{}) interface{}
        url_encode(arg1 interface{}) interface{}
        waitfor(arg1 interface{}) interface{}

[FTL] Could not run proxify: Undefined function containss
exit status 1

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Copy link
Contributor

@forgedhallpass forgedhallpass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the output it seems that we might use an older version of the DSL logic, because the methods were renamed to follow a uniform snake cased convention.

e.g. toupper -> to_upper and so on.

@parrasajad
Copy link
Contributor Author

parrasajad commented Sep 8, 2022

we are using github.com/projectdiscovery/dsl, which might have differences to nuclei DSL functions. Pushed the update to make it uniform across the projects.

        base64(arg1 interface{}) interface{}
        base64_decode(arg1 interface{}) interface{}
        base64_py(arg1 interface{}) interface{}
        contains(arg1, arg2 interface{}) interface{}
        contains_all(arg1, arg2 interface{}) interface{}
        contains_any(arg1, arg2 interface{}) interface{}
        equals_any(arg1, arg2 interface{}) interface{}
        hex_decode(arg1 interface{}) interface{}
        hex_encode(arg1 interface{}) interface{}
        html_escape(arg1 interface{}) interface{}
        html_unescape(arg1 interface{}) interface{}
        len(arg1 interface{}) interface{}
        md5(arg1 interface{}) interface{}
        mmh3(arg1 interface{}) interface{}
        rand_base(arg1, arg2, arg3 interface{}) interface{}
        rand_char(arg1, arg2 interface{}) interface{}
        rand_int(arg1, arg2 interface{}) interface{}
        rand_text_alpha(arg1, arg2 interface{}) interface{}
        rand_text_alphanumeric(arg1, arg2 interface{}) interface{}
        rand_text_numeric(arg1, arg2 interface{}) interface{}
        regex(arg1, arg2 interface{}) interface{}
        regex_all(arg1, arg2 interface{}) interface{}
        regex_any(arg1, arg2 interface{}) interface{}
        replace(arg1, arg2, arg3 interface{}) interface{}
        replace_regex(arg1, arg2, arg3 interface{}) interface{}
        reverse(arg1 interface{}) interface{}
        sha1(arg1 interface{}) interface{}
        sha256(arg1 interface{}) interface{}
        to_lower(arg1 interface{}) interface{}
        to_upper(arg1 interface{}) interface{}
        trim(arg1, arg2 interface{}) interface{}
        trim_left(arg1, arg2 interface{}) interface{}
        trim_prefix(arg1, arg2 interface{}) interface{}
        trim_right(arg1, arg2 interface{}) interface{}
        trim_space(arg1 interface{}) interface{}
        trim_suffix(arg1, arg2 interface{}) interface{}
        url_decode(arg1 interface{}) interface{}
        url_encode(arg1 interface{}) interface{}
        wait_for(arg1 interface{}) interface{}

Copy link
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - posted one question about gologger vs fmt

@parrasajad parrasajad requested a review from Mzack9999 September 9, 2022 13:29
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@ehsandeep ehsandeep merged commit 96d4502 into dev Sep 12, 2022
@ehsandeep ehsandeep deleted the dsl-ux branch September 12, 2022 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide useful information around DSL signatures and parameters

5 participants