Commit Graph

277 Commits (90d6a4a6cd8c2de9004239039c82dba80e562384)

Author SHA1 Message Date
Daniel Black fd7929863b name -> IP is a normal DNS lookup not a reverse
12 years ago
Yaroslav Halchenko 67145d8b78 ENH: assure that all date templates have unique names
12 years ago
Yaroslav Halchenko d1625253eb ENH: debug msgs on which template was taken (+ use "is" for None comparisons)
12 years ago
Yaroslav Halchenko 2b6366656f BF: make sorting of date templates stable
12 years ago
Yaroslav Halchenko 37a2e59d69 BF: guarantee that IP is stored as a base, non-unicode str (Closes gh-91)
12 years ago
Yaroslav Halchenko f10537941b ENH: To help with gh-87 added hints into the log on some failure return codes (e.g. 0x7f00 for this one)
12 years ago
Yaroslav Halchenko b159eabb51 BF: do not enable pyinotify backend if pyinotify is too old (Closes gh-80)
12 years ago
Yaroslav Halchenko f52ba9923a ENH: downgrade "already banned" from WARN to INFO level (Closes gh-79)
12 years ago
David Engeset 2d672d1c81 Added in while loop to process the Fail Manager after the requested banned IP was added to its queue. This solves the issue of needing to touch the log file that is being monitored to get the IP to be banned accordingly. Added in import of FailManagerEmpty exception class.
12 years ago
Yaroslav Halchenko f14c7ae401 ENH: refactored previous commit to make it more Pythonic (With prev commit closes gh-86, gh-81)
12 years ago
David Engeset 6288ec2757 Added in command option to unban and IP, just like using 'banip'. Command looks like: fail2ban-client set <jail name> unbanip <ip>
12 years ago
Yaroslav Halchenko 8e64c281dd BF: in code we should use MyTime wrapper instead of time module directly
12 years ago
Yaroslav Halchenko 09355663f7 BF: (python 2.4) -- access to staticmethod should go via Class
12 years ago
Yaroslav Halchenko 5becaf8ef2 BF: (python 2.[45]) store backends names in a list to use .index later on (Closes gh-83)
12 years ago
Yaroslav Halchenko 83109bce14 BF: escape the content of <matches> since its value could contain arbitrary symbols
12 years ago
Yaroslav Halchenko 2d66f31ef5 ENH: instead of "Invalid command" warning log exception why command failed
12 years ago
Yaroslav Halchenko c6f5d854d3 ENH+BF: filtergamin -- to be more inline with current design of filterinotify
13 years ago
Yaroslav Halchenko d9248a6cf8 BF+RF: pyinotify refreshes watcher upon CREATE, unified/simplified *(add|del)LogPath among *Filters
13 years ago
Yaroslav Halchenko 3c95121a8b BF: pyinotify -- monitor the parent directory for IN_CREATE + process freshly added file (Closes gh-44)
13 years ago
Yaroslav Halchenko baa09098f0 RF/BF: just use pyinotify.ThreadedNotifier thread in filterpyinotify
13 years ago
Yaroslav Halchenko 25674a95f8 RF: filter.py -- single readline in a loop
13 years ago
Yaroslav Halchenko b3614d4ea2 ENH: FilterPoll -- adjusted some msgs + allowed to operate without jail (for testing)
13 years ago
Yaroslav Halchenko 9b360bb12d ENH: minor, just trailing spaces/tabs + reformated a string
13 years ago
Yaroslav Halchenko 3989d24967 BF: usedns=no was not working at all
13 years ago
Chris Reffett a018a26133 Fixed addBannedIP to add enough failures to trigger a ban, rather than
13 years ago
Yaroslav Halchenko 2245ff5b41 ENH: rudimentary __repr__ for Filter and Jail + moved usedns into set method
13 years ago
Yaroslav Halchenko b257be4cd1 BF+ENH: added %m-%d-%Y pattern + do not add %Y for Feb 29 fix if already present in the pattern
13 years ago
Yaroslav Halchenko ed16ecc50a Enforce "ip" field returned as str, not unicode so that log message stays non-unicode
13 years ago
Lee Clemens d73a71f5cf ENH: Add usedns parameter for the jails
13 years ago
Lee Clemens e7dce7cc5a BF: Added logging above ValueError, since only INVALID COMMAND is printed by calling method
13 years ago
Lee Clemens 3282f86651 capitalized Jail
13 years ago
Lee Clemens 642d9afb9a Reformated printing of jail's name to be consistent with init's info messages
13 years ago
Lee Clemens a1898b1840 Fixed and added error message if no backends initialized. INVALID COMMAND is printed when RuntimeError is raised, so we don't get to see the error's message
13 years ago
Yaroslav Halchenko 29c8e43354 BF: must be named _initPolling to be consistent with the 'polling' value
13 years ago
Lee Clemens b7adb29088 Spelling, Changed docstring to comment
13 years ago
Yaroslav Halchenko f90d53fc26 RF: traverse known backends in a loop
13 years ago
Yaroslav Halchenko 7413817f9a RF: for pyinotify's filter -- adjusted authors/copyright and avoided super() for old-style class
13 years ago
Lee Clemens 02894623cf Moved dict() above debug statement
13 years ago
Lee Clemens aa4514bffa Removed PYINOTIFY prefix to debug statement for Callback for Event
13 years ago
Lee Clemens 5c4ec6e7fb Renamed Notifier and Watch Manager to start with __ prefix
13 years ago
Lee Clemens 4c13063498 Added addLogPath and delLogPath functionality (adds/removes paths from the WatchManager)
13 years ago
Lee Clemens b0830385ed Update Free Software Foundation's address
13 years ago
Lee Clemens 8a2e26403a Merge remote-tracking branch 'upstream/master'
13 years ago
Lee Clemens adca2b87e8 Changed Copyright information
13 years ago
Leonardo Chiquitto a7d47e8b36 Update Free Software Foundation's address
13 years ago
Lee Clemens 4bf4d4ddb5 Removed wd assignment and irrelevant comment
13 years ago
Lee Clemens d1050350db Added pyinotify backend
13 years ago
Lee Clemens e442503133 Added pyinotify backend
13 years ago
Yaroslav Halchenko 3e1983a8ec Revert "ENH: server.py -- addLogPath with tail=True"
13 years ago
Yaroslav Halchenko db39c7438a ENH: added custom timeformat with '.' as separator. Close gh-1
13 years ago
Yaroslav Halchenko 16322440ed BF: stop all communications before stopping the jails (Close gh-7)
13 years ago
Yaroslav Halchenko fbce415622 ENH: added logging while stopping the jails
13 years ago
Yaroslav Halchenko eda7efbca3 ENH: fix of syntax for compatibility with Python 2.4
13 years ago
Yaroslav Halchenko bd658fc74b ENH: stay compatible with python < 2.5 (use md5 if hashlib is N/A)
13 years ago
Markos Chandras 492d8e5ff8 BF: use hashlib instead of deprecated md5
13 years ago
Yaroslav Halchenko fd4c151353 BF: be able to detect time for VNC recording only 2 letters of year (closes: #537610)
13 years ago
Yaroslav Halchenko 927a01a076 ENH: server.py -- addLogPath with tail=True
13 years ago
Yaroslav Halchenko a33135c24d ENH: set/getFile for ticket.py -- found in source distribution of 0.8.4
13 years ago
Yaroslav Halchenko a9be451079 ENH: removed expansion for few Date and Revision SVN keywords
13 years ago
Yaroslav Halchenko 9d45e35642 BF: return declaration of TABLE back (thanks to michaelberg79)
13 years ago
Łukasz 5f235427aa Update server/datetemplate.py
13 years ago
Tom Hendrikx 22b700766c format output of matches data.
13 years ago
Yaroslav Halchenko de8786dd1d ENH: introduced usa of Ticket.__matches throughout
13 years ago
Yaroslav Halchenko b52d420575 ENH: added 'matches' to the Ticket(s) and deprecated "custom" constructors for derived *Tickets
13 years ago
Yaroslav Halchenko ed6daa70bf ENH: modelines for emacs and vim to assure consistent indentation scheme (tabs)
13 years ago
Yaroslav Halchenko 19c9ac4fb5 ENH: failmanager -- additional debug message about # of known failures
13 years ago
Yaroslav Halchenko 1674b7b4f2 ENH: rudimentary __str__ for the ticket
13 years ago
Yaroslav Halchenko 6641b1ce8b ENH: few debug messages and use MyTime.localtime instead of straight time.time
13 years ago
Yaroslav Halchenko b6d50c1dea ENH: Added localtime() to MyTime
13 years ago
Yaroslav Halchenko 3a58d0e6e4 BF: Lock server's executeCmd to prevent racing among iptables calls (Closes: #554162)
13 years ago
Yaroslav Halchenko 12304f7a3e Tai64N stores time in GMT, we need to convert to local time before returning
14 years ago
Yaroslav Halchenko 2a38820ed6 debug entry for lines ignored due to falling below findtime (v2)
14 years ago
Arturo 'Buanzo' Busleiman 7aad6685af added time module. bug reported in buanzo's blog at http://blogs.buanzo.com.ar/2009/04/fail2ban-patch-ban-ip-address-manually.html
15 years ago
Cyril Jaquier 8007a02539 - Patch to make log file descriptors cloexec to stop leaking file descriptors on
15 years ago
Cyril Jaquier a3d6ae19f6 - Check the inode number for rotation in addition to checking the first line of the file. Thanks to Jonathan Kamens.
15 years ago
Arturo 'Buanzo' Busleiman 3e3a68f9de added traceback to asyncserver.py's import.
15 years ago
Arturo 'Buanzo' Busleiman 5945ca09ae moved logging shutdown out of quit(), into end of start() in server.py
15 years ago
Arturo 'Buanzo' Busleiman a1a106a27e added "Ban IP" command to fail2ban branch 0.8
15 years ago
Cyril Jaquier b88956e898 - Added helper module in common.
15 years ago
Arturo 'Buanzo' Busleiman 81e2fe8306 added 'unexpected communication error' fix to ChangeLog. Added formatExceptionInfo to server/asyncserver.py
15 years ago
Arturo 'Buanzo' Busleiman b2f0bfe751 added missing import sys to asyncserver.py
15 years ago
Arturo 'Buanzo' Busleiman 08a36ca657 more readable code for python version comparison
15 years ago
Arturo 'Buanzo' Busleiman fd898c9eac added python version detection to asyncore.loop(use_poll=True|False)
15 years ago
Arturo 'Buanzo' Busleiman e09fad559a Fix for python 2.6 / 3.0 incompatibility
15 years ago
Cyril Jaquier 0cf733e878 - Fixed maxretry/findtime rate. Many thanks to Christos Psonis. Tracker #2019714.
16 years ago
Cyril Jaquier 3155bc8f03 - Use timetuple instead of utctimetuple for ISO 8601. Maybe not a 100% correct fix but seems to work. Tracker #2500276.
16 years ago
Cyril Jaquier abd061bad8 - Changed <HOST> template to be more restrictive. Debian bug #514163.
16 years ago
Cyril Jaquier 6b9896c332 - Added CPanel date format. Thanks to David Collins. Tracker #1967610.
16 years ago
Cyril Jaquier 024a77a679 - Removed print.
16 years ago
Cyril Jaquier 870f9d9ea7 - Removed begin-line anchor for "standard" timestamp. Fixed Debian bug #500824.
16 years ago
Cyril Jaquier f6d44e6bc8 - Added new time format. No idea from where it comes...
16 years ago
Cyril Jaquier 6ee4843d11 - Try to match the regex even if the line does not contain a valid date/time. Described in Debian #491253. Thanks to Yaroslav Halchenko.
17 years ago
Cyril Jaquier 9e2a4a935a - Added date template for Day-Month-Year Hour:Minute:Second.
17 years ago
Cyril Jaquier e064ebba45 - Added date pattern for Hour:Minute:Second. Thanks to Andreas Itzchak Rehberg.
17 years ago
Cyril Jaquier b26f9ca97a - Use current day and month instead of Jan 1st if both are not available in the log. Thanks to Andreas Itzchak Rehberg.
17 years ago
Cyril Jaquier cc62cd7076 - Use poll instead of select in asyncore.loop. This should solve the "Unknown error 514". Thanks to Michael Geiger and Klaus Lehmann.
17 years ago
Cyril Jaquier 8da2fe515a - Added and changed some logging level and messages.
17 years ago
Cyril Jaquier 298adc4d43 - Added ISO 8601 date/time format.
17 years ago
Cyril Jaquier 46dab37bfe - Added "Day/Month/Year Hour:Minute:Second" date template. Thanks to Dennis Winter.
17 years ago
Cyril Jaquier 56357d18df - Changed some log level.
17 years ago