Commit Graph

306 Commits (286d78e13cd70442b51619fb59ee2f5036d14ca2)

Author SHA1 Message Date
Yaroslav Halchenko ba042c6e3a ENH: move pyinotify callback debug message into callback + delay string interpolations
12 years ago
Yaroslav Halchenko c29553354b ENH: FailManager -- improve log message to report total # of detected failures as well
12 years ago
Yaroslav Halchenko 5ea2ab14e6 ENH: elaborated debug log message about already detected failures
12 years ago
Yaroslav Halchenko 3b4084d471 BF: fixing up for handling of TAI64N timestamps and adding some unittest for prev commit (not effective much though)
12 years ago
Yaroslav Halchenko 7813340e1c Merge branch 'master' of https://github.com/sebres/fail2ban
12 years ago
Artur Penttinen 29d0df58be Added support for MySQL logfiles
12 years ago
Yaroslav Halchenko e3d3a6ac02 Merge branch 'datedetector-testcase' of https://github.com/kwirk/fail2ban
12 years ago
Steven Hiscocks 7a442f079f BF: When changing log target with python2.{4,5} handle KeyError
12 years ago
Steven Hiscocks 883892a683 Additional date/time formats for datedetector testcases
12 years ago
sebres b6bb2f88c1 invalid date recognition, irregular because of sorting template list, now via setRegex
12 years ago
Yaroslav Halchenko be42522bba Merge branch 'transmitter-testcase' of https://github.com/kwirk/fail2ban
12 years ago
Yaroslav Halchenko 5e5eaaf838 Merge pull request #134 from grooverdan/misc-fixes
12 years ago
Pascal Borreli a2b29b4875 Fixed typos
12 years ago
Steven Hiscocks 4bbbc07872 Added additional Transmitter tests, and some associated fixes
12 years ago
Daniel Black 23bbc60b1c do catch all exception
12 years ago
Daniel Black f0610c01d5 BF: allow more than single word for command action[start,stop,ban,unban,check] and for setcinfo too
12 years ago
Daniel Black c8c7b0b984 BF: general Exception catch was excessive. Only IOError and OSError are possible and has different meanings
12 years ago
Daniel Black 3665e6dc44 Add development documentation and framework for code coverage measurement
12 years ago
sebres d17b415371 invalid date recognition, irregular because of sorting template list (sometimes not reproducible by fail2ban-regex, cause will be not sorted)
12 years ago
Yaroslav Halchenko 59c35bc44a Downgrade log rotation detection message to DEBUG level from INFO. Closes: gh-129
12 years ago
Yaroslav Halchenko 154aa38e3f BF: do not shutdown logging until all jails stop -- so move into Server.quit()
12 years ago
Yaroslav Halchenko 012264dce1 BF: safeguard closing of log handlers + close in reverse order
12 years ago
Steven Hiscocks b36835f6f0 Added transmitter get cinfo option for action
12 years ago
Steven Hiscocks b6a68f5138 Fix for missing value in transmitter delaction
12 years ago
Steven Hiscocks ce3ab34dd8 Added ability to specify PID file
12 years ago
Yaroslav Halchenko f8983872ad BF: return str(host) to avoid spurious characters in the logs (Close gh-113)
12 years ago
Yaroslav Halchenko acab23bdfe RF: move exceptions used by both client and server into common/exceptions.py
12 years ago
Yaroslav Halchenko 6b2e76ba7f BF: pyinotify - use bitwise op on masks and do not try tracking newly created directories
12 years ago
blotus 96eb8986cc Escape ' and " in matches tag
12 years ago
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
13 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