Create rsync.py

Added rsync plugins.
This commit is contained in:
Tib3rius 2021-08-21 22:20:54 -04:00
parent ca18ac9403
commit faf028693b
1 changed files with 27 additions and 0 deletions

27
plugins/rsync.py Normal file
View File

@ -0,0 +1,27 @@
from autorecon import ServiceScan
class NmapRsync(ServiceScan):
def __init__(self):
super().__init__()
self.name = 'Nmap Rsync'
self.tags = ['default', 'rsync']
def configure(self):
self.match_service_name('^rsync')
async def run(self, service):
await service.execute('nmap {nmap_extra} -sV -p {port} --script="banner,(rsync* or ssl*) and not (brute or broadcast or dos or external or fuzzer)" -oN "{scandir}/{protocol}_{port}_rsync_nmap.txt" -oX "{scandir}/xml/{protocol}_{port}_rsync_nmap.xml" {address}')
class RsyncList(ServiceScan):
def __init__(self):
super().__init__()
self.name = 'Rsync List Files'
self.tags = ['default', 'rsync']
def configure(self):
self.match_service_name('^rsync')
async def run(self, service):
await service.execute('rsync -av --list-only rsync://{address}:{port}', outfile='{protocol}_{port}_rsync_file_list.txt')