Update autorecon.py

Fix for https://twitter.com/SandyF337/status/1387264368576917510
This commit is contained in:
Tib3rius 2021-04-28 00:58:11 -04:00
parent da59c5b3ad
commit cdea20a689
1 changed files with 6 additions and 2 deletions

View File

@ -221,7 +221,12 @@ def calculate_elapsed_time(start_time):
async def read_stream(stream, target, tag='?', patterns=[], color=Fore.BLUE):
address = target.address
while True:
line = ""
try:
line = await stream.readline()
except ValueError:
continue
if line:
line = str(line.rstrip(), 'utf8', 'ignore')
debug(color + '[' + Style.BRIGHT + address + ' ' + tag + Style.NORMAL + '] ' + Fore.RESET + '{line}', color=color)
@ -878,4 +883,3 @@ def main():
if __name__ == '__main__':
main()