����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017-2021 Felix Fontein
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
def format_ttl(ttl):
if ttl is None:
return 'default'
sec = ttl % 60
ttl //= 60
min = ttl % 60
ttl //= 60
h = ttl
result = []
if h:
result.append('{0}h'.format(h))
if min:
result.append('{0}m'.format(min))
if sec:
result.append('{0}s'.format(sec))
return ' '.join(result)
class DNSRecord(object):
def __init__(self):
self.id = None
self.type = None
self.prefix = None
self.target = None
self.ttl = 86400 # 24 * 60 * 60
self.extra = {}
def clone(self):
result = DNSRecord()
result.id = self.id
result.type = self.type
result.prefix = self.prefix
result.target = self.target
result.ttl = self.ttl
result.extra = dict(self.extra)
return result
def __str__(self):
data = []
if self.id:
data.append('id: {0}'.format(self.id))
data.append('type: {0}'.format(self.type))
if self.prefix:
data.append('prefix: "{0}"'.format(self.prefix))
else:
data.append('prefix: (none)')
data.append('target: "{0}"'.format(self.target))
data.append('ttl: {0}'.format(format_ttl(self.ttl)))
if self.extra:
data.append('extra: {0}'.format(self.extra))
return 'DNSRecord(' + ', '.join(data) + ')'
def __repr__(self):
return self.__str__()
def sorted_ttls(ttls):
return sorted(ttls, key=lambda ttl: 0 if ttl is None else ttl)
def format_records_for_output(records, record_name, prefix=None, record_converter=None):
ttls = sorted_ttls(set([record.ttl for record in records]))
entry = {
'prefix': prefix or '',
'type': min([record.type for record in records]) if records else None,
'ttl': ttls[0] if len(ttls) > 0 else None,
'value': [record.target for record in records],
}
if record_converter:
entry['value'] = record_converter.process_values_to_user(entry['type'], entry['value'])
if record_name is not None:
entry['record'] = record_name
if len(ttls) > 1:
entry['ttls'] = ttls
return entry
def format_record_for_output(record, record_name, prefix=None, record_converter=None):
entry = {
'prefix': prefix or '',
'type': record.type,
'ttl': record.ttl,
'value': record.target,
'extra': record.extra,
}
if record_converter:
entry['value'] = record_converter.process_value_to_user(entry['type'], entry['value'])
if record_name is not None:
entry['record'] = record_name
return entry
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| conversion | Folder | 0755 |
|
|
| hetzner | Folder | 0755 |
|
|
| hosttech | Folder | 0755 |
|
|
| module | Folder | 0755 |
|
|
| argspec.py | File | 1.86 KB | 0644 |
|
| http.py | File | 2.64 KB | 0644 |
|
| json_api_helper.py | File | 8.17 KB | 0644 |
|
| names.py | File | 1.96 KB | 0644 |
|
| options.py | File | 1.13 KB | 0644 |
|
| provider.py | File | 3.17 KB | 0644 |
|
| record.py | File | 2.91 KB | 0644 |
|
| resolver.py | File | 8.49 KB | 0644 |
|
| wsdl.py | File | 11.63 KB | 0644 |
|
| zone.py | File | 1.09 KB | 0644 |
|
| zone_record_api.py | File | 9.05 KB | 0644 |
|
| zone_record_helpers.py | File | 5.25 KB | 0644 |
|