Skip to content

Commit

Permalink
Fixed error where temp files disappear during sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
disloops committed Mar 6, 2020
1 parent d95c981 commit 6bca0c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions psadify.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def get_last_attacks():
# used to skip private IP ranges
internal_ip_re = re.compile('^(?:10|127|172\.(?:1[6-9]|2[0-9]|3[01])|192\.168)\..*')

# PSAD log files sorted by date
files = sorted(glob.iglob('/var/log/psad/*'), key=os.path.getctime, reverse=True)
# PSAD IP log files sorted by date
files = sorted(glob.iglob('/var/log/psad/[1-2]*'), key=os.path.getctime, reverse=True)

# imperfect science of extracting info from WHOIS data
country_re = re.compile('^country:', flags=re.IGNORECASE)
Expand Down

0 comments on commit 6bca0c5

Please sign in to comment.