From fdc1b1fc9e11e788644a1734289b7f4a2c9c7597 Mon Sep 17 00:00:00 2001 From: pussycat0x <65701233+pussycat0x@users.noreply.github.com> Date: Wed, 5 Jun 2024 00:15:52 +0530 Subject: [PATCH] Update rsync-list-modules.yaml --- .../enumeration/rsync/rsync-list-modules.yaml | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/javascript/enumeration/rsync/rsync-list-modules.yaml b/javascript/enumeration/rsync/rsync-list-modules.yaml index e4a8a069a4..c43f98be8d 100644 --- a/javascript/enumeration/rsync/rsync-list-modules.yaml +++ b/javascript/enumeration/rsync/rsync-list-modules.yaml @@ -1,7 +1,7 @@ id: rsync-list-modules info: - name: Rsync List Modules + name: Rsync List Modules - Enumeration author: pussycat0x severity: low description: | @@ -17,22 +17,26 @@ info: javascript: - code: | const c = require("nuclei/net"); - let s = "@RSYNCD: 31.0\n\n" - let conn = c.Open('tcp', `${Host}:${Port}`); - conn.Send(s); - response =(conn.RecvString(1024)) - response; + const data = "@RSYNCD: 31.0\n\n" + const conn = c.Open('tcp', `${Host}:${Port}`); + conn.Send(data); + response = conn.RecvFullString(1024) + const rsyncRegex = /@RSYNCD: EXIT|@RSYNCD: 31.0|@RSYNCD:|@RSYNCD: 30.0/g; + const resultString = response.replace(rsyncRegex, ""); + const whitespaceRegex = /[\s\t\n]+/g; + const finalResult = resultString.replace(whitespaceRegex, " "); + if (finalResult.trim() === "") { + exit(); + } + else{ + finalResult + } args: Host: "{{Host}}" Port: 873 - matchers: - - type: word - words: - - "RSYNCD: " - extractors: - - type: regex - regex: - - '(.*)' + - type: dsl + dsl: + - response