Skip to content

Instantly share code, notes, and snippets.

View etdsoft's full-sized avatar

Daniel Martin etdsoft

View GitHub Profile
@etdsoft
etdsoft / fail2ban_notifier.rb
Last active March 3, 2023 18:21
Simple Fail2banNotifier for exception_notification (will submit a pull request and update gist when accepted).See: https://dradisframework.com/academy/knowledge-base/ruby/ruby-on-rails/protect-rails-application-with-fail2ban.html
class Fail2banNotifier
def initialize(options)
@default_options = options
@default_options[:logfile] ||= Rails.root.join('log', 'fail2ban.log')
# Roll over every 30M, keep 10 files
@logger ||= Logger.new(@default_options[:logfile], 10, 30*1024*1024)
end
def call(exception, options={})
<h1>Duo Web 2FA</h1>
<iframe id="duo_iframe" width="800" height="600" frameborder="0"></iframe>
<script type="text/javascript">
$(function(){
console.log('Duo.init');
Duo.init({
'host': '<%= DUOWEB[:host] %>',
'sig_request': '<%= @sig_request %>',

Keybase proof

I hereby claim:

  • I am etdsoft on github.
  • I am etd (https://keybase.io/etd) on keybase.
  • I have a public key whose fingerprint is CFB8 956C 1BAA BF8D 4239 6927 F3B6 AE59 3355 22C0

To claim this, I am signing this object: