Sha256: 1f84fa9d05e4fd6a791032dae4505e3a04b161ee28db0e6f9be6dc16a7d43c97

Contents?: true

Size: 606 Bytes

Versions: 14

Compression:

Stored size: 606 Bytes

Contents

require 'sinatra'
require_relative '../module_server'

def root
    File.expand_path( File.dirname( __FILE__ ) )
end

get '/' do
    <<-EOHTML
        <a href="/some/path.crap?input=bloo">Path</a>
    EOHTML
end

get '/some/path.crap' do
    <<-EOHTML
        Blah blah blah...#{params['input']}
    EOHTML
end

get '/some*' do
    req = URI.decode( env['PATH_INFO'].gsub( '/some', root ) ).gsub( '\\', '/' )
    req << '/' if !req.end_with?( '/' )

    #ap req
    if File.directory?( req )
        Dir.glob( req + '*' ).join( '<br/>' )
    elsif !File.exists?( req )
        'Does not exist'
    end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
arachni-0.4.7 spec/support/servers/modules/recon/directory_listing.rb
arachni-0.4.6 spec/support/servers/modules/recon/directory_listing.rb
arachni-0.4.5.2 spec/support/servers/modules/recon/directory_listing.rb
arachni-0.4.5.1 spec/support/servers/modules/recon/directory_listing.rb
arachni-0.4.5 spec/support/servers/modules/recon/directory_listing.rb
arachni-0.4.4 spec/support/servers/modules/recon/directory_listing.rb
arachni-0.4.3.2 spec/support/servers/modules/recon/directory_listing.rb
arachni-0.4.3.1 spec/support/servers/modules/recon/directory_listing.rb
arachni-0.4.3 spec/support/servers/modules/recon/directory_listing.rb
arachni-0.4.2 spec/servers/modules/recon/directory_listing.rb
arachni-0.4.1.3 spec/servers/modules/recon/directory_listing.rb
arachni-0.4.1.2 spec/servers/modules/recon/directory_listing.rb
arachni-0.4.1.1 spec/servers/modules/recon/directory_listing.rb
arachni-0.4.1 spec/servers/modules/recon/directory_listing.rb