Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- import re
- import matplotlib.pyplot as plt
- pattern = re.compile("cwnd:(\d+)")
- with open("sslog.txt") as input_file, open("cwnd.txt", "w") as output_file:
- while True:
- ip = input_file.readline()
- info = input_file.readline()
- if not ip or not info: # EOF
- break
- if "reno" not in info: # Take only data connection
- continue
- for match in re.finditer(pattern, info):
- output_file.write(match.group(1) + "\n")
Advertisement
Add Comment
Please, Sign In to add comment