# 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 ## # Version 0.2 # # Fixed regex ## WhatWeb::Plugin.define "Panasonic-Network-Camera" do @author = "Brendan Coles " # 2010-07-20 @version = "0.2" @description = "Panasonic network cameras" # About 18,400 Google results for inurl:"ViewerFrame?Mode=" @ 2010-07-20 # 288 Google results for inurl:"CgiStart?page=" @ 2010-07-20 # Dorks # @dorks = [ 'inurl:"ViewerFrame?Mode="', 'inurl:"CgiStart?page="' ] # Matches # @matches = [ { text: 'WJ-NT104 MAIN PAGE', version: "WJ-NT104" }, { text: ' Network Camera' }, { regexp: // }, { regexp: // }, # WJ-HD200/WJ-HD220 Digital Disk Recorder Series { text: '' }, { text: 'Digital Disk Recorder WJ-HD220 CONTROL MAIN PAGE', version: "WJ-HD220" }, { text: 'WJ-HD200 DigitalDiskRecorder CONTROL MAIN PAGE', version: "WJ-HD200" }, { text: 'window.location.replace("/view/idconv.cgi?UID=%i&FILE=/hdrindex.html&PAGE="+myDate.getTime());' }, ] # Passive # def passive(target) m = [] # Version Detection if / /.match?(target.body) if / ([\d\-A-Z]+)<\/B>/.match?(target.body) version = target.body.scan(/ ([\d\-A-Z]+)<\/B>/)[0][0] m << { version: version } end end # Return passive matches m end end