MCPcopy Create free account
hub / github.com/MatrixTM/MHDDoS / ts_srv

Method ts_srv

start.py:1614–1629  ·  view source on GitHub ↗
(domain)

Source from the content-addressed store, hash-verified

1612 # noinspection PyBroadException
1613 @staticmethod
1614 def ts_srv(domain):
1615 records = ['_ts3._udp.', '_tsdns._tcp.']
1616 DnsResolver = resolver.Resolver()
1617 DnsResolver.timeout = 1
1618 DnsResolver.lifetime = 1
1619 Info = {}
1620 for rec in records:
1621 try:
1622 srv_records = resolver.resolve(rec + domain, 'SRV')
1623 for srv in srv_records:
1624 Info[rec] = str(srv.target).rstrip('.') + ':' + str(
1625 srv.port)
1626 except:
1627 Info[rec] = 'Not found'
1628
1629 return Info
1630
1631 # noinspection PyUnreachableCode
1632 @staticmethod

Callers 1

runConsoleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected