Merge pull request #9486 from projectdiscovery/pussycat0x-patch-8

Rsync List Modules
patch-4
Dhiyaneshwaran 2024-06-05 13:49:20 +05:30 committed by GitHub
commit a2ad639a66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,48 @@
id: rsync-list-modules
info:
name: Rsync List Modules - Enumeration
author: pussycat0x
severity: low
description: |
Lists modules available for rsync (remote file sync) synchronization.
reference:
- https://nmap.org/nsedoc/scripts/rsync-list-modules.html
metadata:
verified: true
shodan-query: port:873
max-request: 1
tags: network,rsync,enum
javascript:
- code: |
const c = require("nuclei/net");
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
negative: true
words:
- "HTTP/1.1"
extractors:
- type: dsl
dsl:
- response