from scapy.all import *
name = 'telnet.pcap'
packet = rdpcap(name)
for i in packet:
if b'flag%7B' in bytes(i.payload):
print(bytes(i.payload).split(b'flag%7B')[1:])
break
if b'flag{' in bytes(i.payload):
print(bytes(i.payload).split(b'flag{')[1:])
break
ZnJvbSBzY2FweS5hbGwgaW1wb3J0ICoKCm5hbWUgPSAndGVsbmV0LnBjYXAnCnBhY2tldCA9IHJkcGNhcChuYW1lKQoKZm9yIGkgaW4gcGFja2V0OgoJaWYgYidmbGFnJTdCJyBpbiBieXRlcyhpLnBheWxvYWQpOgoJCXByaW50KGJ5dGVzKGkucGF5bG9hZCkuc3BsaXQoYidmbGFnJTdCJylbMTpdKQoJCWJyZWFrCglpZiBiJ2ZsYWd7JyBpbiBieXRlcyhpLnBheWxvYWQpOgoJCXByaW50KGJ5dGVzKGkucGF5bG9hZCkuc3BsaXQoYidmbGFneycpWzE6XSkKCQlicmVhaw==