Update autorecon.py
Fix for https://twitter.com/SandyF337/status/1387264368576917510
This commit is contained in:
parent
da59c5b3ad
commit
cdea20a689
|
@ -221,7 +221,12 @@ def calculate_elapsed_time(start_time):
|
||||||
async def read_stream(stream, target, tag='?', patterns=[], color=Fore.BLUE):
|
async def read_stream(stream, target, tag='?', patterns=[], color=Fore.BLUE):
|
||||||
address = target.address
|
address = target.address
|
||||||
while True:
|
while True:
|
||||||
line = await stream.readline()
|
line = ""
|
||||||
|
try:
|
||||||
|
line = await stream.readline()
|
||||||
|
except ValueError:
|
||||||
|
continue
|
||||||
|
|
||||||
if line:
|
if line:
|
||||||
line = str(line.rstrip(), 'utf8', 'ignore')
|
line = str(line.rstrip(), 'utf8', 'ignore')
|
||||||
debug(color + '[' + Style.BRIGHT + address + ' ' + tag + Style.NORMAL + '] ' + Fore.RESET + '{line}', color=color)
|
debug(color + '[' + Style.BRIGHT + address + ' ' + tag + Style.NORMAL + '] ' + Fore.RESET + '{line}', color=color)
|
||||||
|
@ -878,4 +883,3 @@ def main():
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue