Sha256: 0001bbda7a578f2c1332dd639ad2a3e1b4bc22d3a157e5c876df22c029bae056

Contents?: true

Size: 916 Bytes

Versions: 2

Compression:

Stored size: 916 Bytes

Contents

=begin
    Copyright 2010-2017 Sarosys LLC <http://www.sarosys.com>

    This file is part of the Arachni Framework project and is subject to
    redistribution and commercial restrictions. Please see the Arachni Framework
    web site for more information on licensing and terms of use.
=end

module Arachni
module Platform::Fingerprinters

# Identifies PHP resources.
#
# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
# @version 0.1.1
class PHP < Platform::Fingerprinter

    EXTENSION = /php\d*/  # In case it's php5 or something.
    SESSIONID = 'phpsessid'

    def run
        if uri.path =~ /.php\d*\/*/ || extension =~ EXTENSION ||
            parameters.include?( SESSIONID ) ||
            server_or_powered_by_include?( 'php' ) ||
            headers.include?( 'x-php-pid' ) ||
            cookies.include?( SESSIONID )

            platforms << :php
        end
    end

end

end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
arachni-1.5.1 components/fingerprinters/languages/php.rb
arachni-1.5 components/fingerprinters/languages/php.rb