require 'sinatra' require 'sinatra/contrib' get '/' do < EOHTML end JS_LIB = "#{File.dirname( __FILE__ )}/" get '/jquery.js' do content_type 'text/javascript' IO.read "#{JS_LIB}/jquery-2.0.3.js" end get '/jquery.cookie.js' do content_type 'text/javascript' IO.read "#{JS_LIB}/jquery.cookie.js" end get '/angular.js' do content_type 'text/javascript' IO.read "#{JS_LIB}/angular-1.2.8.js" end get '/angular-route.js' do content_type 'text/javascript' IO.read "#{JS_LIB}/angular-route.js" end get '/data_trace/taint_depth/4' do < HTML end get '/data_trace/taint_depth/5' do < HTML end get '/data_trace/XMLHttpRequest.open' do < HTML end get '/data_trace/XMLHttpRequest.send' do < HTML end get '/data_trace/XMLHttpRequest.setRequestHeader' do < HTML end get '/data_trace/multiple-taints' do <<-EOHTML EOHTML end get '/data_trace/user-defined-global-functions' do <<-EOHTML EOHTML end %w(escape unescape encodeURIComponent decodeURIComponent encodeURI decodeURI).each do |function| get "/data_trace/window.#{function}" do <<-EOHTML EOHTML end end get '/data_trace/AngularJS/$http.delete' do <<-EOHTML EOHTML end get '/data_trace/AngularJS/$http.head' do <<-EOHTML EOHTML end get '/data_trace/AngularJS/$http.jsonp' do <<-EOHTML EOHTML end get '/data_trace/AngularJS/$http.get' do <<-EOHTML EOHTML end get '/data_trace/AngularJS/$http.put' do <<-EOHTML EOHTML end get '/data_trace/AngularJS/$http.post' do <<-EOHTML EOHTML end get '/data_trace/AngularJS/ngRoute/' do <<-EOHTML

JavaScript Projects

EOHTML end get '/data_trace/AngularJS/ngRoute/template.html' do <<-EOHTML Blah blah blah #{params[:taint]} EOHTML end get '/data_trace/AngularJS/ngRoute/project.js' do content_type 'text/javascript' <<-EOHTML angular.module('project', ['ngRoute']) .config(function($routeProvider) { $routeProvider .when('/', { templateUrl: 'template.html?taint=#{params[:taint]}' }) .otherwise({ redirectTo:'/' }); }); EOHTML end get '/data_trace/AngularJS.element' do <<-EOHTML
EOHTML end get '/data_trace/AngularJS/jqLite.html' do <<-EOHTML
EOHTML end get '/data_trace/AngularJS/jqLite.text' do <<-EOHTML
EOHTML end get '/data_trace/AngularJS/jqLite.val' do <<-EOHTML
EOHTML end get '/data_trace/AngularJS/jqLite.append' do <<-EOHTML
EOHTML end get '/data_trace/AngularJS/jqLite.prepend' do <<-EOHTML
EOHTML end get '/data_trace/AngularJS/jqLite.prop' do <<-EOHTML
EOHTML end get '/data_trace/AngularJS/jqLite.replaceWith' do <<-EOHTML
EOHTML end get '/data_trace/jQuery.cookie' do <<-EOHTML EOHTML end get '/data_trace/jQuery.ajax' do <<-EOHTML
EOHTML end get '/data_trace/jQuery.get' do <<-EOHTML
EOHTML end get '/data_trace/jQuery.post' do <<-EOHTML
EOHTML end get '/data_trace/jQuery.load' do <<-EOHTML
EOHTML end get '/data_trace/jQuery.html' do <<-EOHTML
EOHTML end get '/data_trace/jQuery.text' do <<-EOHTML
EOHTML end get '/data_trace/jQuery.val' do <<-EOHTML
EOHTML end get '/data_trace/jQuery.append' do <<-EOHTML
EOHTML end get '/data_trace/jQuery.before' do <<-EOHTML
EOHTML end get '/data_trace/jQuery.prepend' do <<-EOHTML
EOHTML end get '/data_trace/jQuery.prop' do <<-EOHTML
EOHTML end get '/data_trace/jQuery.replaceWith' do <<-EOHTML
EOHTML end get '/data_trace/HTMLElement.insertAdjacentHTML' do <<-EOHTML
EOHTML end get '/data_trace/Element.setAttribute' do <<-EOHTML
EOHTML end get '/data_trace/String.replace' do <<-EOHTML EOHTML end get '/data_trace/String.concat' do <<-EOHTML EOHTML end get '/data_trace/String.lastIndexOf' do <<-EOHTML EOHTML end get '/data_trace/String.indexOf' do <<-EOHTML EOHTML end get '/data_trace/Document.createTextNode' do <<-EOHTML EOHTML end get '/data_trace/HTMLDocument.writeln' do <<-EOHTML EOHTML end get '/data_trace/HTMLDocument.write' do <<-EOHTML EOHTML end get '/data_trace/Text.replaceWholeText' do <<-EOHTML
EOHTML end get '/data_trace/CharacterData.insertData' do <<-EOHTML
EOHTML end get '/data_trace/CharacterData.appendData' do <<-EOHTML
EOHTML end get '/data_trace/CharacterData.replaceData' do <<-EOHTML
EOHTML end get '/debug' do <<-EOHTML
EOHTML end get '/needs-injector' do <<-EOHTML
EOHTML end get '/without_javascript_support' do end