Interactive Logon Policy ReportM Square Consulting, LLC View Python ScriptPublicly Available Timestamp: 20251201.1444 Background info: This project will lead to work on cases pertaining to incfile.com Python Script Source Code
import winreg
def get_interactive_logon_message():
try:
key_path = r"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System"
reg_key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, key_path)
message, _ = winreg.QueryValueEx(reg_key, "LegalNoticeText")
winreg.CloseKey(reg_key)
return message
except Exception as e:
return f"Error retrieving message: {e}"
if __name__ == "__main__":
print(get_interactive_logon_message())
Extracted Interactive Logon Message |
|