Sha256: 331023c37722dff4ffc5a1a13079f62d0eb61ad308fb363bd0510f47c5a5f7a1

Contents?: true

Size: 927 Bytes

Versions: 5

Compression:

Stored size: 927 Bytes

Contents

=begin
    Copyright 2010-2015 Tasos Laskos <tasos.laskos@arachni-scanner.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

5 entries across 5 versions & 1 rubygems

Version Path
arachni-1.3.2 components/fingerprinters/languages/php.rb
arachni-1.3.1 components/fingerprinters/languages/php.rb
arachni-1.3 components/fingerprinters/languages/php.rb
arachni-1.2.1 components/fingerprinters/languages/php.rb
arachni-1.2 components/fingerprinters/languages/php.rb