1234567891011121314151617 |
- import re
- class SysteminfoLog:
- def __init__(self, logfile_str):
- self.log = logfile_str
- @property
- def ip_address(self):
- res = re.search(
- r"(LAN\-Verbindung|Ethernet)[^[]*\[01\]:\s([\d\.]+)",
- self.log["Errors"][0],
- re.MULTILINE,
- )
- if res:
- return res[2]
- return "0.0.0.0"
|