Sha256: d59d8cd0106917e424bd6b26d728a2657065bfe096a2dfbfc27a8a623f18e6c5
Contents?: true
Size: 957 Bytes
Versions: 3
Compression:
Stored size: 957 Bytes
Contents
# frozen_string_literal: true ## # This file is part of WhatWeb and may be subject to # redistribution and commercial restrictions. Please see the WhatWeb # web site for more information on licensing and terms of use. # http://www.morningstarsecurity.com/research/whatweb ## WhatWeb::Plugin.define "PasswordField" do @author = "Caleb Anderson" @version = "0.1" @description = "find password fields" # Matches # @matches = [ { name: "rss link type", regexp: /<input [^>]*?type=["']password["'][^>]*>/i }, ] # Passive # def passive(target) m = [] fields = target.body.scan(/<input [^>]*?type=["']password["'][^>]*>/i) fields.each do |field| name = begin field.scan(/name=["'](.*?)["']/i).first.first rescue StandardError nil end # rescues when there is no name= element m << { name: "field name", string: name } unless name.nil? end m end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
simple_whatweb-0.2.1 | lib/whatweb/plugins/password_field.rb |
simple_whatweb-0.2.0 | lib/whatweb/plugins/password_field.rb |
simple_whatweb-0.1.0 | lib/whatweb/plugins/password_field.rb |