Sha256: 79b13375c6cc2192688b684c4718a19407fcfbcd93ce2107e9edbd6241b3cbd2
Contents?: true
Size: 1.05 KB
Versions: 251
Compression:
Stored size: 1.05 KB
Contents
# frozen_string_literal: true require 'logger' module PWN module Plugins # This plugin is used to instantiate a PWN logger with a custom message format module PWNLogger # Supported Method Parameters:: # PWN::Plugins::PWNLogger.create( # ) public_class_method def self.create logger = Logger.new($stdout) logger.level = Logger::INFO logger.datetime_format = '%Y-%m-%d %H:%M:%S' logger.formatter = proc do |severity, _datetime, _progname, msg| # TODO: Include datetime & progname vars "[#{severity}] #{msg}\n" end logger rescue StandardError => e raise e end # Author(s):: 0day Inc. <request.pentest@0dayinc.com> public_class_method def self.authors 'AUTHOR(S): 0day Inc. <request.pentest@0dayinc.com> ' end # Display Usage for this Module public_class_method def self.help puts "USAGE: logger = #{self}.create() #{self}.authors " end end end end
Version data entries
251 entries across 251 versions & 1 rubygems