📦 Initialize Geulbeot structure and merge Prompts & test projects
This commit is contained in:
14
02. Prompts/문서생성/codedomain/미분류_과업_Python_v01.py
Normal file
14
02. Prompts/문서생성/codedomain/미분류_과업_Python_v01.py
Normal file
@@ -0,0 +1,14 @@
|
||||
def collect_app_usage(days_back):
|
||||
server = 'localhost'
|
||||
log_type = 'Security'
|
||||
hand = win32evtlog.OpenEventLog(server, log_type)
|
||||
flags = win32evtlog.EVENTLOG_BACKWARDS_READ | win32evtlog.EVENTLOG_SEQUENTIAL_READ
|
||||
|
||||
usage_records = []
|
||||
cutoff_date = datetime.datetime.now() - datetime.timedelta(days=days_back)
|
||||
|
||||
events = True
|
||||
while events:
|
||||
events = win32evtlog.ReadEventLog(hand, flags, 0)
|
||||
for ev_obj in events:
|
||||
event_time = ev_obj.TimeGenerated
|
||||
Reference in New Issue
Block a user