MCPcopy
hub / github.com/Xyntax/POC-T / poc

Function poc

script/rsync-weakpass.py:26–44  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

24
25
26def poc(url):
27 url = url.split('://')[-1]
28 host = url.split(':')[0]
29 port = url.split(':')[-1] if ':' in url else 873
30 res = initialisation(host, port)
31
32 # (True, '@RSYNCD:', ' 31.0', ['share', '@RSYNCD:EXIT'])
33 if res[0]:
34 if float(res[2]) < 30.0: # 判断版本,不兼容低版本的登录方式
35 return False
36
37 msg = ''
38 for i in range(len(res[3]) - 1):
39 _msg = ClientCommand(host, port, res[3][i])
40 if 'Module:' in _msg:
41 msg += _msg
42 return url + ' version:' + res[2].strip() + ' ' + msg if msg else False
43 else:
44 return False # exit
45
46
47def initialisation(host, port):

Callers

nothing calls this directly

Calls 3

initialisationFunction · 0.85
ClientCommandFunction · 0.85
splitMethod · 0.80

Tested by

no test coverage detected