e.g. the domain test-chall.example.com is wrongly parsed, as the regex does not consider -:
This fixes it:
def get_subdomain_from_instance():
print(f"[+] If you run distrun this might take a bit")
io = connect(host, port)
io.sendlineafter(b"start a new instance\n", b"", timeout=5)
data = io.recvuntil(b"Wait some time", timeout=5).decode().strip()
res_ins = re.search("\[\+\] http.*\/\/([-a-zA-Z:\/\.\d]*)", data)
res = re.search("\[\+\] (http[-a-zA-Z:\/\.\d]*)", data)
return res[1].strip(), res_ins[1].strip()
Will make a PR whenever I have more time.
e.g. the domain
test-chall.example.comis wrongly parsed, as the regex does not consider-:This fixes it:
Will make a PR whenever I have more time.