this is currently super broken but i'm getting there.

This commit is contained in:
2020-05-14 14:23:14 -04:00
parent 8a5d484883
commit 676aa8d5b6
2 changed files with 14 additions and 1 deletions

View File

@@ -373,6 +373,8 @@ class HEConfig(BaseConfig):
schema_loc = 'https://tunnelbroker.net/tunnelInfo.php {0}'.format(default_xsd)
def __init__(self, creds, xml_url = 'https://tunnelbroker.net/tunnelInfo.php', *args, **kwargs):
# Creds are unique per tunnel... but we don't know the ID yet so we don't know which creds to use.
# TODO.
self.creds = creds
self.url = xml_url
req = requests.get(self.url,
@@ -406,7 +408,14 @@ class HEConfig(BaseConfig):
with_comments = True))
class HETunnel(object):
class HETunnelConfig(BaseConfig):
# TODO: RESTRUCTURE THIS and create an HETunnel() object
default_xsd = 'http://schema.xml.r00t2.io/projects/tunnelbroker.tun.xsd'
nsmap = {None: 'https://tunelbroker.net/tunnelInfo.php?tid',
'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
attr_qname = etree.QName('http://www.w3.org/2001/XMLSchema-instance', 'schemaLocation')
schema_loc = 'https://tunnelbroker.net/tunnelInfo.php?tid {0}'.format(default_xsd)
def __init__(self, tun_xml):
self.xml = tun_xml
self.id = None