Skip to content

Commit

Permalink
Update system.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitcoder authored Oct 26, 2023
1 parent 71654d9 commit 8d927d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hawk_scanner/internals/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from rich.table import Table
import json, requests, argparse, yaml, re, datetime, os, subprocess, platform, hashlib
from tinydb import TinyDB, Query
from pwd import getpwuid

# Create a TinyDB instance for storing previous alert hashes
db = TinyDB('previous_alerts.json')
Expand Down Expand Up @@ -61,6 +60,7 @@ def get_file_owner(file_path):
owner_name = ""
else:
try:
from pwd import getpwuid
# Use the 'os.stat()' method to get the file owner on non-Windows systems
file_stat = os.stat(file_path)
owner_name = file_stat.st_uid # You can also use pwd.getpwuid(file_stat.st_uid).pw_name to get the username
Expand Down

0 comments on commit 8d927d8

Please sign in to comment.