Introduction
Introduction Statistics Contact Development Disclaimer Help
Still a work in progress, closer - warvox - VoIP based wardialing tool, forked …
Log
Files
Refs
README
---
commit 384b73e9317c52d227b226504ddc07016da7fa65
parent 11e8b26bad69969870b96fa4f730a2873bff1e43
Author: HD Moore <[email protected]>
Date: Wed, 10 Oct 2012 01:29:49 -0500
Still a work in progress, closer
Diffstat:
M web/Gemfile | 34 ++++++++---------------------…
M web/Gemfile.lock | 28 ++++++++++++++++++++++++++++
R web/public/images/balloon.png -> w… | 0
R web/public/images/bluefade.jpg -> … | 0
R web/public/images/close.gif -> web… | 0
R web/public/images/left-round.png -… | 0
R web/public/images/loading.gif -> w… | 0
R web/public/images/logo.png -> web/… | 0
R web/public/images/logo_raw.xcf -> … | 0
R web/public/images/musicplayer.swf … | 0
R web/public/images/rails.png -> web… | 0
R web/public/images/right-round.png … | 0
R web/public/images/round_bot.png ->… | 0
R web/public/images/round_top.png ->… | 0
R web/public/javascripts/FusionChart… | 0
R web/public/javascripts/application… | 0
R web/public/javascripts/controls.js… | 0
R web/public/javascripts/custom.js -… | 0
R web/public/javascripts/dragdrop.js… | 0
R web/public/javascripts/effects.js … | 0
A web/app/assets/javascripts/lightbo… | 426 +++++++++++++++++++++++++++…
R web/public/javascripts/prototype.j… | 0
R web/public/javascripts/rails.js ->… | 0
A web/app/assets/stylesheets/global.… | 556 +++++++++++++++++++++++++++…
R web/public/stylesheets/ie7.css -> … | 0
R web/public/stylesheets/lightbox.cs… | 0
R web/public/stylesheets/overlay.png… | 0
R web/public/stylesheets/scaffold.cs… | 0
M web/app/views/analyze/view.html.erb | 4 ++--
M web/app/views/analyze/view_matches… | 8 ++++----
M web/app/views/layouts/warvox.html.… | 10 ++++------
M web/app/views/shared/_header.html.… | 2 +-
M web/config/application.rb | 38 ++++++++++++++++++++++++-----…
M web/config/boot.rb | 13 +++----------
M web/config/database.yml | 11 +++++++++++
M web/config/environments/developmen… | 21 ++++++++++++++++-----
M web/config/environments/production… | 49 +++++++++++++++++++++------…
M web/config/initializers/inflection… | 5 +++++
M web/config/initializers/secret_tok… | 6 ------
M web/config/initializers/session_st… | 6 +++---
A web/config/initializers/wrap_param… | 14 ++++++++++++++
M web/db/schema.rb | 24 +++++++-----------------
D web/public/javascripts/lightbox.js | 426 -----------------------------…
D web/public/stylesheets/global.css | 556 ------------------------------
44 files changed, 1152 insertions(+), 1085 deletions(-)
---
diff --git a/web/Gemfile b/web/Gemfile
@@ -1,33 +1,17 @@
source 'http://rubygems.org'
gem 'rails', '3.2.8'
-
-# Bundle edge Rails instead:
-# gem 'rails', :git => 'git://github.com/rails/rails.git'
-
gem 'pg', '0.11'
-# Use unicorn as the web server
-# gem 'unicorn'
-
-# Deploy with Capistrano
-# gem 'capistrano'
-
-# To use debugger
-# gem 'ruby-debug'
-
-# Bundle the extra gems:
-# gem 'bj'
-# gem 'nokogiri'
-# gem 'sqlite3-ruby', :require => 'sqlite3'
-# gem 'aws-s3', :require => 'aws/s3'
-
-# Bundle gems for the local environment. Make sure to
-# put test-only gems in this group so their generators
-# and rake tasks are available in development mode:
-# group :development, :test do
-# gem 'webrat'
-# end
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+ gem 'sass-rails', '~> 3.2.3'
+ gem 'coffee-rails', '~> 3.2.1'
+ gem 'therubyracer', :platforms => :ruby
+ gem 'uglifier', '>= 1.0.3'
+end
+gem 'jquery-rails'
gem 'will_paginate', '~> 3.0'
gem 'dynamic_form'
diff --git a/web/Gemfile.lock b/web/Gemfile.lock
@@ -30,12 +30,25 @@ GEM
multi_json (~> 1.0)
arel (3.0.2)
builder (3.0.3)
+ coffee-rails (3.2.2)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.2.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.3.3)
dynamic_form (1.1.4)
erubis (2.7.0)
+ execjs (1.4.0)
+ multi_json (~> 1.0)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
+ jquery-rails (2.1.3)
+ railties (>= 3.1.0, < 5.0)
+ thor (~> 0.14)
json (1.7.5)
+ libv8 (3.3.10.4)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
@@ -69,23 +82,38 @@ GEM
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
+ sass (3.2.1)
+ sass-rails (3.2.5)
+ railties (~> 3.2.0)
+ sass (>= 3.1.10)
+ tilt (~> 1.3)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
+ therubyracer (0.10.1)
+ libv8 (~> 3.3.10)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.11)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.33)
+ uglifier (1.3.0)
+ execjs (>= 0.3.0)
+ multi_json (~> 1.0, >= 1.0.2)
will_paginate (3.0.3)
PLATFORMS
ruby
DEPENDENCIES
+ coffee-rails (~> 3.2.1)
dynamic_form
+ jquery-rails
pg (= 0.11)
rails (= 3.2.8)
+ sass-rails (~> 3.2.3)
+ therubyracer
+ uglifier (>= 1.0.3)
will_paginate (~> 3.0)
diff --git a/web/public/images/balloon.png b/web/app/assets/images/balloon.png
Binary files differ.
diff --git a/web/public/images/bluefade.jpg b/web/app/assets/images/bluefade.jpg
Binary files differ.
diff --git a/web/public/images/close.gif b/web/app/assets/images/close.gif
Binary files differ.
diff --git a/web/public/images/left-round.png b/web/app/assets/images/left-roun…
Binary files differ.
diff --git a/web/public/images/loading.gif b/web/app/assets/images/loading.gif
Binary files differ.
diff --git a/web/public/images/logo.png b/web/app/assets/images/logo.png
Binary files differ.
diff --git a/web/public/images/logo_raw.xcf b/web/app/assets/images/logo_raw.xcf
Binary files differ.
diff --git a/web/public/images/musicplayer.swf b/web/app/assets/images/musicpla…
Binary files differ.
diff --git a/web/public/images/rails.png b/web/app/assets/images/rails.png
Binary files differ.
diff --git a/web/public/images/right-round.png b/web/app/assets/images/right-ro…
Binary files differ.
diff --git a/web/public/images/round_bot.png b/web/app/assets/images/round_bot.…
Binary files differ.
diff --git a/web/public/images/round_top.png b/web/app/assets/images/round_top.…
Binary files differ.
diff --git a/web/public/javascripts/FusionCharts.js b/web/app/assets/javascript…
diff --git a/web/public/javascripts/application.js b/web/app/assets/javascripts…
diff --git a/web/public/javascripts/controls.js b/web/app/assets/javascripts/co…
diff --git a/web/public/javascripts/custom.js b/web/app/assets/javascripts/cust…
diff --git a/web/public/javascripts/dragdrop.js b/web/app/assets/javascripts/dr…
diff --git a/web/public/javascripts/effects.js b/web/app/assets/javascripts/eff…
diff --git a/web/app/assets/javascripts/lightbox.js b/web/app/assets/javascript…
@@ -0,0 +1,426 @@
+/*
+ Lightbox JS: Fullsize Image Overlays
+ by Lokesh Dhakar - http://www.huddletogether.com
+
+ For more information on this script, visit:
+ http://huddletogether.com/projects/lightbox/
+
+ Script featured on Dynamic Drive code library Jan 24th, 06':
+ http://www.dynamicdrive.com
+
+ Licensed under the Creative Commons Attribution 2.5 License - http://c…
+ (basically, do anything you want, just leave my name and link)
+
+ Table of Contents
+ -----------------
+ Configuration
+
+ Functions
+ - getPageScroll()
+ - getPageSize()
+ - pause()
+ - getKey()
+ - listenKey()
+ - showLightbox()
+ - hideLightbox()
+ - initLightbox()
+ - addLoadEvent()
+
+ Function Calls
+ - addLoadEvent(initLightbox)
+
+*/
+
+
+
+//
+// Configuration
+//
+
+// If you would like to use a custom loading image or close button reference t…
+var loadingImage = '/assets/loading.gif';
+var closeButton = '/assets/close.gif';
+
+
+
+
+
+//
+// getPageScroll()
+// Returns array with x,y page scroll values.
+// Core code from - quirksmode.org
+//
+function getPageScroll(){
+
+ var yScroll;
+
+ if (self.pageYOffset) {
+ yScroll = self.pageYOffset;
+ } else if (document.documentElement && document.documentElement.scroll…
+ yScroll = document.documentElement.scrollTop;
+ } else if (document.body) {// all other Explorers
+ yScroll = document.body.scrollTop;
+ }
+
+ arrayPageScroll = new Array('',yScroll)
+ return arrayPageScroll;
+}
+
+
+
+//
+// getPageSize()
+// Returns array with page width, height and window width, height
+// Core code from - quirksmode.org
+// Edit for Firefox by pHaez
+//
+function getPageSize(){
+
+ var xScroll, yScroll;
+
+ if (window.innerHeight && window.scrollMaxY) {
+ xScroll = document.body.scrollWidth;
+ yScroll = window.innerHeight + window.scrollMaxY;
+ } else if (document.body.scrollHeight > document.body.offsetHeight){ /…
+ xScroll = document.body.scrollWidth;
+ yScroll = document.body.scrollHeight;
+ } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozil…
+ xScroll = document.body.offsetWidth;
+ yScroll = document.body.offsetHeight;
+ }
+
+ var windowWidth, windowHeight;
+ if (self.innerHeight) { // all except Explorer
+ windowWidth = self.innerWidth;
+ windowHeight = self.innerHeight;
+ } else if (document.documentElement && document.documentElement.client…
+ windowWidth = document.documentElement.clientWidth;
+ windowHeight = document.documentElement.clientHeight;
+ } else if (document.body) { // other Explorers
+ windowWidth = document.body.clientWidth;
+ windowHeight = document.body.clientHeight;
+ }
+
+ // for small pages with total height less then height of the viewport
+ if(yScroll < windowHeight){
+ pageHeight = windowHeight;
+ } else {
+ pageHeight = yScroll;
+ }
+
+ // for small pages with total width less then width of the viewport
+ if(xScroll < windowWidth){
+ pageWidth = windowWidth;
+ } else {
+ pageWidth = xScroll;
+ }
+
+
+ arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeigh…
+ return arrayPageSize;
+}
+
+
+//
+// pause(numberMillis)
+// Pauses code execution for specified time. Uses busy code, not good.
+// Code from http://www.faqts.com/knowledge_base/view.phtml/aid/1602
+//
+function pause(numberMillis) {
+ var now = new Date();
+ var exitTime = now.getTime() + numberMillis;
+ while (true) {
+ now = new Date();
+ if (now.getTime() > exitTime)
+ return;
+ }
+}
+
+//
+// getKey(key)
+// Gets keycode. If 'x' is pressed then it hides the lightbox.
+//
+
+function getKey(e){
+ if (e == null) { // ie
+ keycode = event.keyCode;
+ } else { // mozilla
+ keycode = e.which;
+ }
+ key = String.fromCharCode(keycode).toLowerCase();
+
+ if(key == 'x'){ hideLightbox(); }
+}
+
+
+//
+// listenKey()
+//
+function listenKey () { document.onkeypress = getKey; }
+
+
+//
+// showLightbox()
+// Preloads images. Pleaces new image in lightbox then centers and displays.
+//
+function showLightbox(objLink)
+{
+ // prep objects
+ var objOverlay = document.getElementById('overlay');
+ var objLightbox = document.getElementById('lightbox');
+ var objCaption = document.getElementById('lightboxCaption');
+ var objImage = document.getElementById('lightboxImage');
+ var objLoadingImage = document.getElementById('loadingImage');
+ var objLightboxDetails = document.getElementById('lightboxDetails');
+
+
+ var arrayPageSize = getPageSize();
+ var arrayPageScroll = getPageScroll();
+
+ // center loadingImage if it exists
+ if (objLoadingImage) {
+ objLoadingImage.style.top = (arrayPageScroll[1] + ((arrayPageS…
+ objLoadingImage.style.left = (((arrayPageSize[0] - 20 - objLoa…
+ objLoadingImage.style.display = 'block';
+ }
+
+ // set height of Overlay to take up whole page and show
+ objOverlay.style.height = (arrayPageSize[1] + 'px');
+ objOverlay.style.display = 'block';
+
+ // preload image
+ imgPreload = new Image();
+
+ imgPreload.onload=function(){
+ objImage.src = objLink.href;
+
+ // center lightbox and make sure that the top and left values …
+ // and the image placed outside the viewport
+ var lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35…
+ var lightboxLeft = ((arrayPageSize[0] - 20 - imgPreload.width)…
+
+ objLightbox.style.top = (lightboxTop < 0) ? "0px" : lightboxTo…
+ objLightbox.style.left = (lightboxLeft < 0) ? "0px" : lightbox…
+
+
+ objLightboxDetails.style.width = imgPreload.width + 'px';
+
+ if(objLink.getAttribute('title')){
+ objCaption.style.display = 'block';
+ //objCaption.style.width = imgPreload.width + 'px';
+ objCaption.innerHTML = objLink.getAttribute('title');
+ } else {
+ objCaption.style.display = 'none';
+ }
+
+ // A small pause between the image loading and displaying is r…
+ // this prevents the previous image displaying for a short bur…
+ if (navigator.appVersion.indexOf("MSIE")!=-1){
+ pause(250);
+ }
+
+ if (objLoadingImage) { objLoadingImage.style.display = …
+ objLightbox.style.display = 'block';
+
+ // After image is loaded, update the overlay height as the new…
+ // increased the overall page height.
+ arrayPageSize = getPageSize();
+ objOverlay.style.height = (arrayPageSize[1] + 'px');
+
+ // Check for 'x' keypress
+ listenKey();
+
+ return false;
+ }
+
+ imgPreload.src = objLink.href;
+
+}
+
+
+
+
+
+//
+// hideLightbox()
+//
+function hideLightbox()
+{
+ // get objects
+ objOverlay = document.getElementById('overlay');
+ objLightbox = document.getElementById('lightbox');
+
+ // hide lightbox and overlay
+ objOverlay.style.display = 'none';
+ objLightbox.style.display = 'none';
+
+ // disable keypress listener
+ document.onkeypress = '';
+}
+
+
+
+
+//
+// initLightbox()
+// Function runs on window load, going through link tags looking for rel="ligh…
+// These links receive onclick events that enable the lightbox display for the…
+// The function also inserts html markup at the top of the page which will be …
+// container for the overlay pattern and the inline image.
+//
+function initLightbox()
+{
+
+ if (!document.getElementsByTagName){ return; }
+ var anchors = document.getElementsByTagName("a");
+
+ // loop through all anchor tags
+ for (var i=0; i<anchors.length; i++){
+ var anchor = anchors[i];
+
+ if (anchor.getAttribute("href") && (anchor.getAttribute("rel")…
+ anchor.onclick = function () {showLightbox(this); retu…
+ }
+ }
+
+ // the rest of this code inserts html at the top of the page that look…
+ //
+ // <div id="overlay">
+ // <a href="#" onclick="hideLightbox(); return false;">…
+ // </div>
+ // <div id="lightbox">
+ // <a href="#" onclick="hideLightbox(); return false;" …
+ // <img id="closeButton" />
+ // <img id="lightboxImage" />
+ // </a>
+ // <div id="lightboxDetails">
+ // <div id="lightboxCaption"></div>
+ // <div id="keyboardMsg"></div>
+ // </div>
+ // </div>
+
+ var objBody = document.getElementsByTagName("body").item(0);
+
+ // create overlay div and hardcode some functional styles (aesthetic s…
+ var objOverlay = document.createElement("div");
+ objOverlay.setAttribute('id','overlay');
+ objOverlay.onclick = function () {hideLightbox(); return false;}
+ objOverlay.style.display = 'none';
+ objOverlay.style.position = 'absolute';
+ objOverlay.style.top = '0';
+ objOverlay.style.left = '0';
+ objOverlay.style.zIndex = '90';
+ objOverlay.style.width = '100%';
+ objBody.insertBefore(objOverlay, objBody.firstChild);
+
+ var arrayPageSize = getPageSize();
+ var arrayPageScroll = getPageScroll();
+
+ // preload and create loader image
+ var imgPreloader = new Image();
+
+ // if loader image found, create link to hide lightbox and create load…
+ imgPreloader.onload=function(){
+
+ var objLoadingImageLink = document.createElement("a");
+ objLoadingImageLink.setAttribute('href','#');
+ objLoadingImageLink.onclick = function () {hideLightbox(); ret…
+ objOverlay.appendChild(objLoadingImageLink);
+
+ var objLoadingImage = document.createElement("img");
+ objLoadingImage.src = loadingImage;
+ objLoadingImage.setAttribute('id','loadingImage');
+ objLoadingImage.style.position = 'absolute';
+ objLoadingImage.style.zIndex = '150';
+ objLoadingImageLink.appendChild(objLoadingImage);
+
+ imgPreloader.onload=function(){}; // clear onLoa…
+
+ return false;
+ }
+
+ imgPreloader.src = loadingImage;
+
+ // create lightbox div, same note about styles as above
+ var objLightbox = document.createElement("div");
+ objLightbox.setAttribute('id','lightbox');
+ objLightbox.style.display = 'none';
+ objLightbox.style.position = 'absolute';
+ objLightbox.style.zIndex = '100';
+ objBody.insertBefore(objLightbox, objOverlay.nextSibling);
+
+ // create link
+ var objLink = document.createElement("a");
+ objLink.setAttribute('href','#');
+ objLink.setAttribute('title','Click to close');
+ objLink.onclick = function () {hideLightbox(); return false;}
+ objLightbox.appendChild(objLink);
+
+ // preload and create close button image
+ var imgPreloadCloseButton = new Image();
+
+ // if close button image found,
+ imgPreloadCloseButton.onload=function(){
+
+ var objCloseButton = document.createElement("img");
+ objCloseButton.src = closeButton;
+ objCloseButton.setAttribute('id','closeButton');
+ objCloseButton.style.position = 'absolute';
+ objCloseButton.style.zIndex = '200';
+ objLink.appendChild(objCloseButton);
+
+ return false;
+ }
+
+ imgPreloadCloseButton.src = closeButton;
+
+ // create image
+ var objImage = document.createElement("img");
+ objImage.setAttribute('id','lightboxImage');
+ objLink.appendChild(objImage);
+
+ // create details div, a container for the caption and keyboard message
+ var objLightboxDetails = document.createElement("div");
+ objLightboxDetails.setAttribute('id','lightboxDetails');
+ objLightbox.appendChild(objLightboxDetails);
+
+ // create caption
+ var objCaption = document.createElement("div");
+ objCaption.setAttribute('id','lightboxCaption');
+ objCaption.style.display = 'none';
+ objLightboxDetails.appendChild(objCaption);
+
+ // create keyboard message
+ var objKeyboardMsg = document.createElement("div");
+ objKeyboardMsg.setAttribute('id','keyboardMsg');
+ objKeyboardMsg.innerHTML = 'press <kbd>x</kbd> to close';
+ objLightboxDetails.appendChild(objKeyboardMsg);
+
+
+}
+
+
+
+
+//
+// addLoadEvent()
+// Adds event to window.onload without overwriting currently assigned onload f…
+// Function found at Simon Willison's weblog - http://simon.incutio.com/
+//
+function addLoadEvent(func)
+{
+ var oldonload = window.onload;
+ if (typeof window.onload != 'function'){
+ window.onload = func;
+ } else {
+ window.onload = function(){
+ oldonload();
+ func();
+ }
+ }
+
+}
+
+
+
+addLoadEvent(initLightbox); // run initLightbox onLoad
diff --git a/web/public/javascripts/prototype.js b/web/app/assets/javascripts/p…
diff --git a/web/public/javascripts/rails.js b/web/app/assets/javascripts/rails…
diff --git a/web/app/assets/stylesheets/global.css.erb b/web/app/assets/stylesh…
@@ -0,0 +1,556 @@
+/* global element overrides */
+
+body {
+ height: 100%;
+ background: #fff;
+ margin: 0;
+ padding: 0;
+ font-family: Tahoma, sans-serif;
+ font-size: 12px;
+ color: #555;
+}
+
+img {
+ border: none;
+}
+
+table {
+ border: none;
+ padding: 0;
+ margin: 0;
+}
+
+a:link, a:visited {
+ color: #003366;
+ text-decoration: none;
+}
+
+a:hover, a:active {
+ color: #cc0033;
+ text-decoration: underline;
+}
+
+h1 {
+ color: #333;
+ margin-top: 0;
+ padding-top: 0;
+ font-weight: normal;
+ font-size: 36px;
+}
+
+h2 {
+ font-size: 1.4em;
+ margin-bottom: 4px;
+}
+
+h3 {
+ font-size: 1.05em;
+ font-weight: normal;
+ font-style: italic;
+}
+
+/* unique elements */
+
+#content {
+ padding: 0;
+ margin: 0 auto;
+ width: 800px;
+ line-height: 1.5;
+}
+
+#main {
+ border: 0;
+ padding: 0;
+ background-color: white;
+ padding-top: 6px;
+ padding-left: 18px;
+ padding-right: 20px;
+ margin-top: -3px;
+ margin-bottom: -3px;
+}
+
+#main img {
+ max-width: 530px;
+}
+
+#footer {
+
+ margin: 0;
+ text-align: center;
+}
+
+#quote {
+ font-size: 12px;
+ padding: 10px;
+ margin: 0 auto;
+ width: 70%;
+ background: #dddddd;
+ margin-bottom: 10px;
+}
+
+#copyright {
+ padding: 10px;
+ text-align: center;
+ font-size: 10px;
+ color: #cccccc;
+}
+
+#header {
+ width: 800px;
+ margin: 0 auto 10px;
+ color: white;
+
+}
+
+#logo {
+ float: left;
+ margin-top: 0px;
+}
+
+
+
+#warvox_stats {
+ margin-top: 5px;
+ border: 1px solid black;
+ font-size: 12px;
+ color: #555;
+}
+
+#warvox_stats td {
+ margin-left: 20px;
+ padding: 0 10px 0px 6px;
+}
+
+
+#warvox_conf {
+ margin-top: 5px;
+ border: 1px solid black;
+ font-size: 12px;
+ color: #555;
+}
+
+#warvox_conf td {
+ margin-left: 20px;
+ padding: 0 10px 0px 6px;
+}
+
+#warvox_blacklist {
+ margin-top: 5px;
+ border: 1px solid black;
+ font-size: 12px;
+ color: #555;
+}
+
+#warvox_blacklist td {
+ margin-left: 20px;
+ padding: 0 10px 0px 6px;
+}
+
+#home_logo {
+ border: 0;
+}
+
+#home_links {
+
+}
+
+#home_intro, #home_intro td {
+ border: 0;
+}
+
+#home_table {
+ border: 0;
+ margin-top: 0px;
+}
+
+#home_table td {
+ border: 0;
+}
+
+#home_text {
+ padding-left: 20px;
+}
+
+#navwrap {
+ margin-top: 10px;
+ padding-top: 10px;
+ text-align: center;
+}
+
+#nav {
+ margin: 0 0 0 0 auto;
+ padding: 10px;
+}
+
+#sections_container {
+ font-size: 14px;
+}
+
+#sections_ul {
+ margin: 0;
+ padding: 0;
+ white-space: nowrap;
+}
+
+#sections_ul li {
+ display: inline;
+ list-style-type: none;
+}
+
+#sections_container a {
+ padding: 5px 10px 5px 10px;
+ line-height: 28px;
+}
+
+#sections_container a:link, #sections_container a:visited {
+ color: #fff;
+ background: black repeat-x top;
+ text-decoration: none;
+ font-variant: small-caps;
+}
+
+#sections_container a:hover {
+ color: #fff;
+ background: red repeat-x top;
+ text-decoration: none;
+ font-variant: small-caps;
+}
+
+#sections_active {
+ font-weight: bold;
+}
+
+#subsections_active {
+ font-weight: bold;
+}
+
+#subsections_container {
+ font-size: 12px;
+ padding-top: 5px;
+}
+
+#subsections_ul {
+ margin: 0;
+ padding: 0;
+ white-space: nowrap;
+}
+
+#subsections_ul li {
+ display: inline;
+ list-style-type: none;
+}
+
+#subsections_container a {
+ padding: 5px 10px 5px 10px;
+ line-height: 20px;
+}
+
+#subsections_container a:link, #subsections_container a:visited {
+ color: #fff;
+ background: #333333 repeat-x top;
+ text-decoration: none;
+ font-variant: small-caps;
+}
+
+#subsections_container a:hover {
+ color: #fff;
+ background: #440000 repeat-x top;
+ text-decoration: none;
+ font-variant: small-caps;
+}
+
+
+#calls_pie1 {
+ text-align: center;
+}
+#calls_pie2 {
+ text-align: center;
+}
+#calls_pie3 {
+ text-align: center;
+}
+
+/* non-unique elements */
+
+
+.title {
+ font-size: 20px;
+ font-weight: bold;
+ color: black;
+ font-variant: small-caps;
+}
+
+.active_job_row {
+ background: yellow;
+}
+
+.table_scaffold {
+ margin-top: 5px;
+ border: 1px solid black;
+ font-size: 12px;
+ color: #555;
+}
+
+.table_scaffold th {
+ font-size: 14px;
+ text-decoration: underline;
+}
+
+.table_scaffold td {
+ margin-left: 20px;
+ padding: 0 10px 0px 6px;
+ border: 1px solid #cccccc;
+}
+
+.header_item {
+ font-weight: bold;
+}
+
+.date-header {
+ background: url('<%= asset_path 'bluefade.jpg' %>') #222222 repeat-x t…
+ color: white;
+ padding: 2px;
+ margin: 2px;
+ font-weight: bold;
+ padding-left: 8px;
+ font-variant: small-caps;
+ border: 0;
+}
+
+.date-header-center {
+ background: url('<%= asset_path 'bluefade.jpg' %>') #8c0000 repeat-x t…
+ color: white;
+ padding: 2px;
+ margin: 2px;
+ font-weight: bold;
+ padding-left: 8px;
+ font-variant: small-caps;
+ text-align: center;
+ border: 0;
+}
+
+
+.balloon {
+ background: url('<%= asset_path 'balloon.jpg' %>') repeat-x top;
+ width: 277px;
+ height: 98px;
+ color: white;
+ margin: 40px auto;
+}
+
+.balloon_links {
+ float: left;
+ margin-top: 10px;
+ margin-left: 6px;
+
+}
+
+.balloon_links p {
+ font-size: 14px;
+ font-weight: bold;
+ margin: 0;
+}
+
+.balloon_links a, .balloon_links a:link, .balloon_links a:visited {
+ font-size: 12px;
+ color: white;
+ text-decoration: none;
+ margin-left: 12px;
+}
+
+.balloon_links a:hover, .balloon_links a:active {
+ color: yellow;
+ text-decoration: underline;
+}
+
+.balloon_icon {
+ float: left;
+ padding-top: 25px;
+ padding-left: 14px;
+}
+
+.box_full {
+ position: relative;
+ clear: both;
+ width: 790px;
+}
+
+#round_top {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ height: 9px;
+ margin-bottom: -2px;
+ visibility: hidden;
+}
+
+#round_bot {
+ padding: 0;
+ border: 0;
+ margin-top: -2px;
+ height: 15px;
+ visibility: hidden;
+}
+
+.box_full p {
+ line-height: 1.5em;
+}
+
+
+.intro {
+ font-size: 14px;
+}
+
+.center {
+ text-align: center;
+}
+
+.code {
+ font-family: fixed, courier new;
+ color: black;
+ background: #dddddd;
+ padding: 0.25em 0.25em 0.25em 0.25em;
+}
+
+.fatp {
+ margin: 2.0em 0 0.5em;
+}
+
+.announce {
+ padding: 0px 20px 0px 20px;
+ line-height: 1.5;
+ font-size: 12px;
+ font-weight: bold;
+}
+
+.vulnTitle {
+ font-weight: bold;
+ font-size: 10pt;
+ padding-bottom: 2em;
+}
+
+.vulnHeader {
+ font-weight: bold;
+}
+
+.vulnText {
+ padding-bottom: 1em;
+}
+
+.vulnInfoTable {
+ background: #dddddd;
+
+}
+
+.vulnInfoHeader {
+ font-weight: bold;
+}
+
+.vulnInfoData {
+
+}
+
+.talk_title {
+ font-family: verdana, sans-serif, arial, helvetica;
+ font-size: 9pt;
+ padding: 0.1em 0.5em 0.15em .5em;
+ font-weight: bold;
+}
+
+.materials {
+ background: #dddddd;
+ padding: 10px 10px 10px 10px;
+ border: 1px solid black;
+}
+
+
+
+.level1
+{
+ list-style: none;
+ text-align: left;
+ padding: 0em 0em 1em 0em;
+ font-size: 16px;
+ font-weight: bold;
+}
+.level1 li
+{
+ padding: 1em .25em 0.25em 0.25em;
+}
+
+.level2
+{
+ list-style: circle;
+ text-align: left;
+ padding: 0em 0.25em 0.25em 4em;
+}
+.level2 li
+{
+ padding: 0.25em .25em 0.25em 0.25em;
+ font-size: 14px;
+ font-weight: bold;
+}
+
+.level3
+{
+ list-style: square;
+ text-align: left;
+ padding: 0em 0.25em 0.25em 4em;
+}
+.level3 li
+{
+ padding: 0.25em .25em 0.25em 0.25em;
+}
+
+
+
+.boxTable
+{
+ border-left-style: solid;
+ border-top-style: solid;
+ border-right-style: solid;
+ border-bottom-style: solid;
+ border-color: #dddddd;
+ font-family: verdana, sans-serif;
+ font-size: 8pt;
+ background-color: #dddddd;
+}
+.boxInnerTable
+{
+ font-family: verdana, sans-serif;
+ font-size: 8pt;
+}
+.boxTdHeader
+{
+ border-width: 0 0 0 0;
+ border-color: #dddddd;
+ border-left-style: solid;
+ border-top-style: solid;
+ border-right-style: solid;
+ border-bottom-style: solid;
+ background-color: #dddddd;
+ color: black;
+ height: 20px;
+ font-weight: bold
+}
+.boxTd
+{
+ border-width: 0 0 0 0;
+ border-left-style: solid;
+ border-top-style: solid;
+ border-right-style: solid;
+ border-bottom-style: solid;
+}
+.boxTd1
+{
+ background-color: #eeeeee;
+}
+.boxTd2
+{
+ background-color: #eeeeee;
+}
+.boxTh
+{
+ background-color: #dddddd;
+}
+
diff --git a/web/public/stylesheets/ie7.css b/web/app/assets/stylesheets/ie7.css
diff --git a/web/public/stylesheets/lightbox.css b/web/app/assets/stylesheets/l…
diff --git a/web/public/stylesheets/overlay.png b/web/app/assets/stylesheets/ov…
Binary files differ.
diff --git a/web/public/stylesheets/scaffold.css b/web/app/assets/stylesheets/s…
diff --git a/web/app/views/analyze/view.html.erb b/web/app/views/analyze/view.h…
@@ -22,12 +22,12 @@
<object
type="application/x-shockwave-flash"
- data="/images/musicplayer.swf?song_url=<%=resource_ana…
+ data="/assets/musicplayer.swf?song_url=<%=resource_ana…
width="20"
height="17"
style="margin-bottom: -5px;"
>
- <param name="movie" value="/musicplayer.swf?song_url=<…
+ <param name="movie" value="/assets/musicplayer.swf?son…
<param name="wmode" value="transparent"></param>
</object>
<b><%= dial_result.number %></b>
diff --git a/web/app/views/analyze/view_matches.html.erb b/web/app/views/analyz…
@@ -13,12 +13,12 @@
<object
type="application/x-shockwave-flash"
- data="/images/musicplayer.swf?song_url=<%=resource_ana…
+ data="/assets/musicplayer.swf?song_url=<%=resource_ana…
width="20"
height="17"
style="margin-bottom: -5px;"
>
- <param name="movie" value="/musicplayer.swf?song_url=<…
+ <param name="movie" value="/assets/musicplayer.swf?son…
<param name="wmode" value="transparent"></param>
</object>
@@ -66,12 +66,12 @@
<object
type="application/x-shockwave-flash"
- data="/images/musicplayer.swf?song_url=<%=resource_ana…
+ data="/assets/musicplayer.swf?song_url=<%=resource_ana…
width="20"
height="17"
style="margin-bottom: -5px;"
>
- <param name="movie" value="/musicplayer.swf?song_url=<…
+ <param name="movie" value="/assets/musicplayer.swf?son…
<param name="wmode" value="transparent"></param>
</object>
diff --git a/web/app/views/layouts/warvox.html.erb b/web/app/views/layouts/warv…
@@ -2,12 +2,10 @@
<html>
<head>
<title><%= @title || "WarVOX" %></title>
- <%= stylesheet_link_tag :all %>
- <%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
- <%= stylesheet_link_tag 'global', 'lightbox' %>
+ <%= stylesheet_link_tag 'global' %>
<!--[if IE 7]><%= stylesheet_link_tag 'ie7' %><![endif]-->
- <%= javascript_include_tag 'custom', 'prototype', 'effects', 'FusionCharts',…
+ <%= javascript_include_tag 'jquery' %>
</head>
<body>
@@ -17,7 +15,7 @@
<div id="content">
<div class="box_full">
- <img src="/images/round_top.png" id="round_top" alt=""/>
+ <img src="<%= asset_path('round_top.png') %>" id="round_top" alt=""/>
<div id="main">
<%= yield %>
<br/><br/>
@@ -27,7 +25,7 @@
</div>
</div>
- <img src="/images/round_bot.png" id="round_bot" alt=""/>
+ <img src="<%= asset_path('round_bot.png') %>" id="round_bot" alt=""/>
</div>
</div>
diff --git a/web/app/views/shared/_header.html.erb b/web/app/views/shared/_head…
@@ -1,7 +1,7 @@
<div id="header">
<span width='50%'>
- <a href="/"><img id="logo" src="/images/logo.png" alt="WarVOX …
+ <a href="/"><img id="logo" src="/assets/logo.png" alt="WarVOX …
</span>
<span width='50%'>
diff --git a/web/config/application.rb b/web/config/application.rb
@@ -1,14 +1,16 @@
require File.expand_path('../boot', __FILE__)
+require 'rails/all'
# Bootstrap the WarVOX code base
$:.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
require 'warvox'
-require 'rails/all'
-
-# If you have a Gemfile, require the gems listed there, including any gems
-# you've limited to :test, :development, or :production.
-Bundler.require(:default, Rails.env) if defined?(Bundler)
+if defined?(Bundler)
+ # If you precompile assets before deploying to production, use this line
+ Bundler.require(*Rails.groups(:assets => %w(development test)))
+ # If you want your assets lazily compiled in production, use this line
+ # Bundler.require(:default, :assets, Rails.env)
+end
module Web
class Application < Rails::Application
@@ -34,13 +36,33 @@ module Web
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml…
# config.i18n.default_locale = :de
- # JavaScript files you want as :defaults (application.js is always include…
- # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
-
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
+ config.filter_parameters += [:password, :pass]
+
+ # Enable escaping HTML in JSON.
+ config.active_support.escape_html_entities_in_json = true
+
+ # Use SQL instead of Active Record's schema dumper when creating the datab…
+ # This is necessary if your schema can't be completely dumped by the schem…
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
+
+ # Enforce whitelist mode for mass assignment.
+ # This will create an empty whitelist of attributes available for mass-ass…
+ # in your app. As such, your models will need to explicitly whitelist or b…
+ # parameters by using an attr_accessible or attr_protected declaration.
+ config.active_record.whitelist_attributes = true
+
+ # Enable the asset pipeline
+ config.assets.enabled = true
+
+ # Version of your assets, change this if you want to expire all your assets
+ config.assets.version = '1.0'
+
+ # Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password, :pass]
config.session_store :cookie_store, :key => "_warvox"
diff --git a/web/config/boot.rb b/web/config/boot.rb
@@ -1,13 +1,6 @@
require 'rubygems'
# Set up gems listed in the Gemfile.
-gemfile = File.expand_path('../../Gemfile', __FILE__)
-begin
- ENV['BUNDLE_GEMFILE'] = gemfile
- require 'bundler'
- Bundler.setup
-rescue Bundler::GemNotFound => e
- STDERR.puts e.message
- STDERR.puts "Try running `bundle install`."
- exit!
-end if File.exist?(gemfile)
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
diff --git a/web/config/database.yml b/web/config/database.yml
@@ -8,3 +8,14 @@ production:
pool: 100
timeout: 5
+development:
+ adapter: postgresql
+ database: warvox
+ username: warvox
+ password: "<yourpass>"
+ host: 127.0.0.1
+ port: 5433
+ pool: 100
+ timeout: 5
+
+
diff --git a/web/config/environments/development.rb b/web/config/environments/d…
@@ -1,9 +1,9 @@
Web::Application.configure do
- # Settings specified here will take precedence over those in config/environm…
+ # Settings specified here will take precedence over those in config/applicat…
# In the development environment your application's code is reloaded on
- # every request. This slows down response time but is perfect for developme…
- # since you don't have to restart the webserver when you make code changes.
+ # every request. This slows down response time but is perfect for development
+ # since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
@@ -11,7 +11,6 @@ Web::Application.configure do
# Show full error reports and disable caching
config.consider_all_requests_local = true
- config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send
@@ -22,5 +21,17 @@ Web::Application.configure do
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
-end
+ # Raise exception on mass assignment protection for Active Record models
+ config.active_record.mass_assignment_sanitizer = :strict
+
+ # Log the query plan for queries taking more than this (works
+ # with SQLite, MySQL, and PostgreSQL)
+ config.active_record.auto_explain_threshold_in_seconds = 0.5
+
+ # Do not compress assets
+ config.assets.compress = false
+
+ # Expands the lines which load the assets
+ config.assets.debug = true
+end
diff --git a/web/config/environments/production.rb b/web/config/environments/pr…
@@ -1,7 +1,6 @@
Web::Application.configure do
- # Settings specified here will take precedence over those in config/environm…
+ # Settings specified here will take precedence over those in config/applicat…
- # The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
@@ -9,31 +8,46 @@ Web::Application.configure do
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
- # Specifies the header that your server uses for sending files
- config.action_dispatch.x_sendfile_header = "X-Sendfile"
+ # Disable Rails's static asset server (Apache or nginx will already do this)
+ config.serve_static_assets = true
+
+ # Compress JavaScripts and CSS
+ config.assets.compress = false
+
+ # Don't fallback to assets pipeline if a precompiled asset is missed
+ config.assets.compile = true
- # For nginx:
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
+ # Generate digests for assets URLs
+ config.assets.digest = true
+
+ # Defaults to nil and saved in location specified by config.assets.prefix
+ # config.assets.manifest = YOUR_PATH
+
+ # Specifies the header that your server uses for sending files
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
- # If you have no front-end server that supports something like X-Sendfile,
- # just comment this out and Rails will serve the files
+ # Force all access to the app over SSL, use Strict-Transport-Security, and u…
+ # config.force_ssl = true
# See everything in the log (default is :info)
- config.log_level = :error
+ config.log_level = :debug
+
+ # Prepend all log lines with the following tags
+ # config.log_tags = [ :subdomain, :uuid ]
# Use a different logger for distributed setups
- # config.logger = SyslogLogger.new
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
# Use a different cache store in production
# config.cache_store = :mem_cache_store
- # Disable Rails's static asset server
- # In production, Apache or nginx will already do this
- config.serve_static_assets = true
-
- # Enable serving of images, stylesheets, and javascripts from an asset server
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
+ # Precompile additional assets (application.js, application.css, and all non…
+ config.assets.precompile += %w( jquery.js prototype.js effects.js FusionChar…
+
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
@@ -46,5 +60,8 @@ Web::Application.configure do
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
-end
+ # Log the query plan for queries taking more than this (works
+ # with SQLite, MySQL, and PostgreSQL)
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
+end
diff --git a/web/config/initializers/inflections.rb b/web/config/initializers/i…
@@ -8,3 +8,8 @@
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
+#
+# These inflection rules are supported but not enabled by default:
+# ActiveSupport::Inflector.inflections do |inflect|
+# inflect.acronym 'RESTful'
+# end
diff --git a/web/config/initializers/secret_token.rb b/web/config/initializers/…
@@ -1,7 +1 @@
-# Be sure to restart your server when you modify this file.
-
-# Your secret key for verifying the integrity of signed cookies.
-# If you change this key, all old signed cookies will become invalid!
-# Make sure the secret is at least 30 characters and all random,
-# no regular words or you'll be exposed to dictionary attacks.
Web::Application.config.secret_token = WarVOX::Config.load_session_key
diff --git a/web/config/initializers/session_store.rb b/web/config/initializers…
@@ -1,8 +1,8 @@
# Be sure to restart your server when you modify this file.
-Web::Application.config.session_store :cookie_store, :key => '_web_session'
+Web::Application.config.session_store :cookie_store, key: '_warvox_session'
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
-# (create the session table with "rake db:sessions:create")
-# Web::Application.config.session_store :active_record_store
+# (create the session table with "rails generate session_migration")
+# Ttt::Application.config.session_store :active_record_store
diff --git a/web/config/initializers/wrap_parameters.rb b/web/config/initialize…
@@ -0,0 +1,14 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format …
+ActiveSupport.on_load(:action_controller) do
+ wrap_parameters format: [:json]
+end
+
+# Disable root element in JSON by default.
+ActiveSupport.on_load(:active_record) do
+ self.include_root_in_json = false
+end
diff --git a/web/db/schema.rb b/web/db/schema.rb
@@ -1,3 +1,4 @@
+# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definiti…
@@ -21,8 +22,8 @@ ActiveRecord::Schema.define(:version => 20110801000003) do
t.datetime "started_at"
t.datetime "completed_at"
t.boolean "processed"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.text "cid_mask"
end
@@ -36,8 +37,8 @@ ActiveRecord::Schema.define(:version => 20110801000003) do
t.integer "ringtime"
t.text "rawfile"
t.boolean "processed"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.datetime "processed_at"
t.text "cid"
t.float "peak_freq"
@@ -65,20 +66,9 @@ ActiveRecord::Schema.define(:version => 20110801000003) do
t.text "user"
t.text "pass"
t.integer "lines"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.boolean "enabled"
end
- create_table "signatures", :force => true do |t|
- t.datetime "created_at"
- t.datetime "updated_at"
- t.string "name"
- t.string "category"
- t.text "description"
- t.string "mode"
- t.string "print", :limit => nil
- t.text "rules"
- end
-
end
diff --git a/web/public/javascripts/lightbox.js b/web/public/javascripts/lightb…
@@ -1,426 +0,0 @@
-/*
- Lightbox JS: Fullsize Image Overlays
- by Lokesh Dhakar - http://www.huddletogether.com
-
- For more information on this script, visit:
- http://huddletogether.com/projects/lightbox/
-
- Script featured on Dynamic Drive code library Jan 24th, 06':
- http://www.dynamicdrive.com
-
- Licensed under the Creative Commons Attribution 2.5 License - http://c…
- (basically, do anything you want, just leave my name and link)
-
- Table of Contents
- -----------------
- Configuration
-
- Functions
- - getPageScroll()
- - getPageSize()
- - pause()
- - getKey()
- - listenKey()
- - showLightbox()
- - hideLightbox()
- - initLightbox()
- - addLoadEvent()
-
- Function Calls
- - addLoadEvent(initLightbox)
-
-*/
-
-
-
-//
-// Configuration
-//
-
-// If you would like to use a custom loading image or close button reference t…
-var loadingImage = '/images/loading.gif';
-var closeButton = '/images/close.gif';
-
-
-
-
-
-//
-// getPageScroll()
-// Returns array with x,y page scroll values.
-// Core code from - quirksmode.org
-//
-function getPageScroll(){
-
- var yScroll;
-
- if (self.pageYOffset) {
- yScroll = self.pageYOffset;
- } else if (document.documentElement && document.documentElement.scroll…
- yScroll = document.documentElement.scrollTop;
- } else if (document.body) {// all other Explorers
- yScroll = document.body.scrollTop;
- }
-
- arrayPageScroll = new Array('',yScroll)
- return arrayPageScroll;
-}
-
-
-
-//
-// getPageSize()
-// Returns array with page width, height and window width, height
-// Core code from - quirksmode.org
-// Edit for Firefox by pHaez
-//
-function getPageSize(){
-
- var xScroll, yScroll;
-
- if (window.innerHeight && window.scrollMaxY) {
- xScroll = document.body.scrollWidth;
- yScroll = window.innerHeight + window.scrollMaxY;
- } else if (document.body.scrollHeight > document.body.offsetHeight){ /…
- xScroll = document.body.scrollWidth;
- yScroll = document.body.scrollHeight;
- } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozil…
- xScroll = document.body.offsetWidth;
- yScroll = document.body.offsetHeight;
- }
-
- var windowWidth, windowHeight;
- if (self.innerHeight) { // all except Explorer
- windowWidth = self.innerWidth;
- windowHeight = self.innerHeight;
- } else if (document.documentElement && document.documentElement.client…
- windowWidth = document.documentElement.clientWidth;
- windowHeight = document.documentElement.clientHeight;
- } else if (document.body) { // other Explorers
- windowWidth = document.body.clientWidth;
- windowHeight = document.body.clientHeight;
- }
-
- // for small pages with total height less then height of the viewport
- if(yScroll < windowHeight){
- pageHeight = windowHeight;
- } else {
- pageHeight = yScroll;
- }
-
- // for small pages with total width less then width of the viewport
- if(xScroll < windowWidth){
- pageWidth = windowWidth;
- } else {
- pageWidth = xScroll;
- }
-
-
- arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeigh…
- return arrayPageSize;
-}
-
-
-//
-// pause(numberMillis)
-// Pauses code execution for specified time. Uses busy code, not good.
-// Code from http://www.faqts.com/knowledge_base/view.phtml/aid/1602
-//
-function pause(numberMillis) {
- var now = new Date();
- var exitTime = now.getTime() + numberMillis;
- while (true) {
- now = new Date();
- if (now.getTime() > exitTime)
- return;
- }
-}
-
-//
-// getKey(key)
-// Gets keycode. If 'x' is pressed then it hides the lightbox.
-//
-
-function getKey(e){
- if (e == null) { // ie
- keycode = event.keyCode;
- } else { // mozilla
- keycode = e.which;
- }
- key = String.fromCharCode(keycode).toLowerCase();
-
- if(key == 'x'){ hideLightbox(); }
-}
-
-
-//
-// listenKey()
-//
-function listenKey () { document.onkeypress = getKey; }
-
-
-//
-// showLightbox()
-// Preloads images. Pleaces new image in lightbox then centers and displays.
-//
-function showLightbox(objLink)
-{
- // prep objects
- var objOverlay = document.getElementById('overlay');
- var objLightbox = document.getElementById('lightbox');
- var objCaption = document.getElementById('lightboxCaption');
- var objImage = document.getElementById('lightboxImage');
- var objLoadingImage = document.getElementById('loadingImage');
- var objLightboxDetails = document.getElementById('lightboxDetails');
-
-
- var arrayPageSize = getPageSize();
- var arrayPageScroll = getPageScroll();
-
- // center loadingImage if it exists
- if (objLoadingImage) {
- objLoadingImage.style.top = (arrayPageScroll[1] + ((arrayPageS…
- objLoadingImage.style.left = (((arrayPageSize[0] - 20 - objLoa…
- objLoadingImage.style.display = 'block';
- }
-
- // set height of Overlay to take up whole page and show
- objOverlay.style.height = (arrayPageSize[1] + 'px');
- objOverlay.style.display = 'block';
-
- // preload image
- imgPreload = new Image();
-
- imgPreload.onload=function(){
- objImage.src = objLink.href;
-
- // center lightbox and make sure that the top and left values …
- // and the image placed outside the viewport
- var lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35…
- var lightboxLeft = ((arrayPageSize[0] - 20 - imgPreload.width)…
-
- objLightbox.style.top = (lightboxTop < 0) ? "0px" : lightboxTo…
- objLightbox.style.left = (lightboxLeft < 0) ? "0px" : lightbox…
-
-
- objLightboxDetails.style.width = imgPreload.width + 'px';
-
- if(objLink.getAttribute('title')){
- objCaption.style.display = 'block';
- //objCaption.style.width = imgPreload.width + 'px';
- objCaption.innerHTML = objLink.getAttribute('title');
- } else {
- objCaption.style.display = 'none';
- }
-
- // A small pause between the image loading and displaying is r…
- // this prevents the previous image displaying for a short bur…
- if (navigator.appVersion.indexOf("MSIE")!=-1){
- pause(250);
- }
-
- if (objLoadingImage) { objLoadingImage.style.display = …
- objLightbox.style.display = 'block';
-
- // After image is loaded, update the overlay height as the new…
- // increased the overall page height.
- arrayPageSize = getPageSize();
- objOverlay.style.height = (arrayPageSize[1] + 'px');
-
- // Check for 'x' keypress
- listenKey();
-
- return false;
- }
-
- imgPreload.src = objLink.href;
-
-}
-
-
-
-
-
-//
-// hideLightbox()
-//
-function hideLightbox()
-{
- // get objects
- objOverlay = document.getElementById('overlay');
- objLightbox = document.getElementById('lightbox');
-
- // hide lightbox and overlay
- objOverlay.style.display = 'none';
- objLightbox.style.display = 'none';
-
- // disable keypress listener
- document.onkeypress = '';
-}
-
-
-
-
-//
-// initLightbox()
-// Function runs on window load, going through link tags looking for rel="ligh…
-// These links receive onclick events that enable the lightbox display for the…
-// The function also inserts html markup at the top of the page which will be …
-// container for the overlay pattern and the inline image.
-//
-function initLightbox()
-{
-
- if (!document.getElementsByTagName){ return; }
- var anchors = document.getElementsByTagName("a");
-
- // loop through all anchor tags
- for (var i=0; i<anchors.length; i++){
- var anchor = anchors[i];
-
- if (anchor.getAttribute("href") && (anchor.getAttribute("rel")…
- anchor.onclick = function () {showLightbox(this); retu…
- }
- }
-
- // the rest of this code inserts html at the top of the page that look…
- //
- // <div id="overlay">
- // <a href="#" onclick="hideLightbox(); return false;">…
- // </div>
- // <div id="lightbox">
- // <a href="#" onclick="hideLightbox(); return false;" …
- // <img id="closeButton" />
- // <img id="lightboxImage" />
- // </a>
- // <div id="lightboxDetails">
- // <div id="lightboxCaption"></div>
- // <div id="keyboardMsg"></div>
- // </div>
- // </div>
-
- var objBody = document.getElementsByTagName("body").item(0);
-
- // create overlay div and hardcode some functional styles (aesthetic s…
- var objOverlay = document.createElement("div");
- objOverlay.setAttribute('id','overlay');
- objOverlay.onclick = function () {hideLightbox(); return false;}
- objOverlay.style.display = 'none';
- objOverlay.style.position = 'absolute';
- objOverlay.style.top = '0';
- objOverlay.style.left = '0';
- objOverlay.style.zIndex = '90';
- objOverlay.style.width = '100%';
- objBody.insertBefore(objOverlay, objBody.firstChild);
-
- var arrayPageSize = getPageSize();
- var arrayPageScroll = getPageScroll();
-
- // preload and create loader image
- var imgPreloader = new Image();
-
- // if loader image found, create link to hide lightbox and create load…
- imgPreloader.onload=function(){
-
- var objLoadingImageLink = document.createElement("a");
- objLoadingImageLink.setAttribute('href','#');
- objLoadingImageLink.onclick = function () {hideLightbox(); ret…
- objOverlay.appendChild(objLoadingImageLink);
-
- var objLoadingImage = document.createElement("img");
- objLoadingImage.src = loadingImage;
- objLoadingImage.setAttribute('id','loadingImage');
- objLoadingImage.style.position = 'absolute';
- objLoadingImage.style.zIndex = '150';
- objLoadingImageLink.appendChild(objLoadingImage);
-
- imgPreloader.onload=function(){}; // clear onLoa…
-
- return false;
- }
-
- imgPreloader.src = loadingImage;
-
- // create lightbox div, same note about styles as above
- var objLightbox = document.createElement("div");
- objLightbox.setAttribute('id','lightbox');
- objLightbox.style.display = 'none';
- objLightbox.style.position = 'absolute';
- objLightbox.style.zIndex = '100';
- objBody.insertBefore(objLightbox, objOverlay.nextSibling);
-
- // create link
- var objLink = document.createElement("a");
- objLink.setAttribute('href','#');
- objLink.setAttribute('title','Click to close');
- objLink.onclick = function () {hideLightbox(); return false;}
- objLightbox.appendChild(objLink);
-
- // preload and create close button image
- var imgPreloadCloseButton = new Image();
-
- // if close button image found,
- imgPreloadCloseButton.onload=function(){
-
- var objCloseButton = document.createElement("img");
- objCloseButton.src = closeButton;
- objCloseButton.setAttribute('id','closeButton');
- objCloseButton.style.position = 'absolute';
- objCloseButton.style.zIndex = '200';
- objLink.appendChild(objCloseButton);
-
- return false;
- }
-
- imgPreloadCloseButton.src = closeButton;
-
- // create image
- var objImage = document.createElement("img");
- objImage.setAttribute('id','lightboxImage');
- objLink.appendChild(objImage);
-
- // create details div, a container for the caption and keyboard message
- var objLightboxDetails = document.createElement("div");
- objLightboxDetails.setAttribute('id','lightboxDetails');
- objLightbox.appendChild(objLightboxDetails);
-
- // create caption
- var objCaption = document.createElement("div");
- objCaption.setAttribute('id','lightboxCaption');
- objCaption.style.display = 'none';
- objLightboxDetails.appendChild(objCaption);
-
- // create keyboard message
- var objKeyboardMsg = document.createElement("div");
- objKeyboardMsg.setAttribute('id','keyboardMsg');
- objKeyboardMsg.innerHTML = 'press <kbd>x</kbd> to close';
- objLightboxDetails.appendChild(objKeyboardMsg);
-
-
-}
-
-
-
-
-//
-// addLoadEvent()
-// Adds event to window.onload without overwriting currently assigned onload f…
-// Function found at Simon Willison's weblog - http://simon.incutio.com/
-//
-function addLoadEvent(func)
-{
- var oldonload = window.onload;
- if (typeof window.onload != 'function'){
- window.onload = func;
- } else {
- window.onload = function(){
- oldonload();
- func();
- }
- }
-
-}
-
-
-
-addLoadEvent(initLightbox); // run initLightbox onLoad
diff --git a/web/public/stylesheets/global.css b/web/public/stylesheets/global.…
@@ -1,556 +0,0 @@
-/* global element overrides */
-
-body {
- height: 100%;
- background: #fff;
- margin: 0;
- padding: 0;
- font-family: Tahoma, sans-serif;
- font-size: 12px;
- color: #555;
-}
-
-img {
- border: none;
-}
-
-table {
- border: none;
- padding: 0;
- margin: 0;
-}
-
-a:link, a:visited {
- color: #003366;
- text-decoration: none;
-}
-
-a:hover, a:active {
- color: #cc0033;
- text-decoration: underline;
-}
-
-h1 {
- color: #333;
- margin-top: 0;
- padding-top: 0;
- font-weight: normal;
- font-size: 36px;
-}
-
-h2 {
- font-size: 1.4em;
- margin-bottom: 4px;
-}
-
-h3 {
- font-size: 1.05em;
- font-weight: normal;
- font-style: italic;
-}
-
-/* unique elements */
-
-#content {
- padding: 0;
- margin: 0 auto;
- width: 800px;
- line-height: 1.5;
-}
-
-#main {
- border: 0;
- padding: 0;
- background-color: white;
- padding-top: 6px;
- padding-left: 18px;
- padding-right: 20px;
- margin-top: -3px;
- margin-bottom: -3px;
-}
-
-#main img {
- max-width: 530px;
-}
-
-#footer {
-
- margin: 0;
- text-align: center;
-}
-
-#quote {
- font-size: 12px;
- padding: 10px;
- margin: 0 auto;
- width: 70%;
- background: #dddddd;
- margin-bottom: 10px;
-}
-
-#copyright {
- padding: 10px;
- text-align: center;
- font-size: 10px;
- color: #cccccc;
-}
-
-#header {
- width: 800px;
- margin: 0 auto 10px;
- color: white;
-
-}
-
-#logo {
- float: left;
- margin-top: 0px;
-}
-
-
-
-#warvox_stats {
- margin-top: 5px;
- border: 1px solid black;
- font-size: 12px;
- color: #555;
-}
-
-#warvox_stats td {
- margin-left: 20px;
- padding: 0 10px 0px 6px;
-}
-
-
-#warvox_conf {
- margin-top: 5px;
- border: 1px solid black;
- font-size: 12px;
- color: #555;
-}
-
-#warvox_conf td {
- margin-left: 20px;
- padding: 0 10px 0px 6px;
-}
-
-#warvox_blacklist {
- margin-top: 5px;
- border: 1px solid black;
- font-size: 12px;
- color: #555;
-}
-
-#warvox_blacklist td {
- margin-left: 20px;
- padding: 0 10px 0px 6px;
-}
-
-#home_logo {
- border: 0;
-}
-
-#home_links {
-
-}
-
-#home_intro, #home_intro td {
- border: 0;
-}
-
-#home_table {
- border: 0;
- margin-top: 0px;
-}
-
-#home_table td {
- border: 0;
-}
-
-#home_text {
- padding-left: 20px;
-}
-
-#navwrap {
- margin-top: 10px;
- padding-top: 10px;
- text-align: center;
-}
-
-#nav {
- margin: 0 0 0 0 auto;
- padding: 10px;
-}
-
-#sections_container {
- font-size: 14px;
-}
-
-#sections_ul {
- margin: 0;
- padding: 0;
- white-space: nowrap;
-}
-
-#sections_ul li {
- display: inline;
- list-style-type: none;
-}
-
-#sections_container a {
- padding: 5px 10px 5px 10px;
- line-height: 28px;
-}
-
-#sections_container a:link, #sections_container a:visited {
- color: #fff;
- background: black repeat-x top;
- text-decoration: none;
- font-variant: small-caps;
-}
-
-#sections_container a:hover {
- color: #fff;
- background: red repeat-x top;
- text-decoration: none;
- font-variant: small-caps;
-}
-
-#sections_active {
- font-weight: bold;
-}
-
-#subsections_active {
- font-weight: bold;
-}
-
-#subsections_container {
- font-size: 12px;
- padding-top: 5px;
-}
-
-#subsections_ul {
- margin: 0;
- padding: 0;
- white-space: nowrap;
-}
-
-#subsections_ul li {
- display: inline;
- list-style-type: none;
-}
-
-#subsections_container a {
- padding: 5px 10px 5px 10px;
- line-height: 20px;
-}
-
-#subsections_container a:link, #subsections_container a:visited {
- color: #fff;
- background: #333333 repeat-x top;
- text-decoration: none;
- font-variant: small-caps;
-}
-
-#subsections_container a:hover {
- color: #fff;
- background: #440000 repeat-x top;
- text-decoration: none;
- font-variant: small-caps;
-}
-
-
-#calls_pie1 {
- text-align: center;
-}
-#calls_pie2 {
- text-align: center;
-}
-#calls_pie3 {
- text-align: center;
-}
-
-/* non-unique elements */
-
-
-.title {
- font-size: 20px;
- font-weight: bold;
- color: black;
- font-variant: small-caps;
-}
-
-.active_job_row {
- background: yellow;
-}
-
-.table_scaffold {
- margin-top: 5px;
- border: 1px solid black;
- font-size: 12px;
- color: #555;
-}
-
-.table_scaffold th {
- font-size: 14px;
- text-decoration: underline;
-}
-
-.table_scaffold td {
- margin-left: 20px;
- padding: 0 10px 0px 6px;
- border: 1px solid #cccccc;
-}
-
-.header_item {
- font-weight: bold;
-}
-
-.date-header {
- background: url('/images/bluefade.jpg') #222222 repeat-x top;
- color: white;
- padding: 2px;
- margin: 2px;
- font-weight: bold;
- padding-left: 8px;
- font-variant: small-caps;
- border: 0;
-}
-
-.date-header-center {
- background: url('/images/bluefade.jpg') #8c0000 repeat-x top;
- color: white;
- padding: 2px;
- margin: 2px;
- font-weight: bold;
- padding-left: 8px;
- font-variant: small-caps;
- text-align: center;
- border: 0;
-}
-
-
-.balloon {
- background: url('/images/balloon.png') repeat-x top;
- width: 277px;
- height: 98px;
- color: white;
- margin: 40px auto;
-}
-
-.balloon_links {
- float: left;
- margin-top: 10px;
- margin-left: 6px;
-
-}
-
-.balloon_links p {
- font-size: 14px;
- font-weight: bold;
- margin: 0;
-}
-
-.balloon_links a, .balloon_links a:link, .balloon_links a:visited {
- font-size: 12px;
- color: white;
- text-decoration: none;
- margin-left: 12px;
-}
-
-.balloon_links a:hover, .balloon_links a:active {
- color: yellow;
- text-decoration: underline;
-}
-
-.balloon_icon {
- float: left;
- padding-top: 25px;
- padding-left: 14px;
-}
-
-.box_full {
- position: relative;
- clear: both;
- width: 790px;
-}
-
-#round_top {
- padding: 0;
- border: 0;
- margin: 0;
- height: 9px;
- margin-bottom: -2px;
- visibility: hidden;
-}
-
-#round_bot {
- padding: 0;
- border: 0;
- margin-top: -2px;
- height: 15px;
- visibility: hidden;
-}
-
-.box_full p {
- line-height: 1.5em;
-}
-
-
-.intro {
- font-size: 14px;
-}
-
-.center {
- text-align: center;
-}
-
-.code {
- font-family: fixed, courier new;
- color: black;
- background: #dddddd;
- padding: 0.25em 0.25em 0.25em 0.25em;
-}
-
-.fatp {
- margin: 2.0em 0 0.5em;
-}
-
-.announce {
- padding: 0px 20px 0px 20px;
- line-height: 1.5;
- font-size: 12px;
- font-weight: bold;
-}
-
-.vulnTitle {
- font-weight: bold;
- font-size: 10pt;
- padding-bottom: 2em;
-}
-
-.vulnHeader {
- font-weight: bold;
-}
-
-.vulnText {
- padding-bottom: 1em;
-}
-
-.vulnInfoTable {
- background: #dddddd;
-
-}
-
-.vulnInfoHeader {
- font-weight: bold;
-}
-
-.vulnInfoData {
-
-}
-
-.talk_title {
- font-family: verdana, sans-serif, arial, helvetica;
- font-size: 9pt;
- padding: 0.1em 0.5em 0.15em .5em;
- font-weight: bold;
-}
-
-.materials {
- background: #dddddd;
- padding: 10px 10px 10px 10px;
- border: 1px solid black;
-}
-
-
-
-.level1
-{
- list-style: none;
- text-align: left;
- padding: 0em 0em 1em 0em;
- font-size: 16px;
- font-weight: bold;
-}
-.level1 li
-{
- padding: 1em .25em 0.25em 0.25em;
-}
-
-.level2
-{
- list-style: circle;
- text-align: left;
- padding: 0em 0.25em 0.25em 4em;
-}
-.level2 li
-{
- padding: 0.25em .25em 0.25em 0.25em;
- font-size: 14px;
- font-weight: bold;
-}
-
-.level3
-{
- list-style: square;
- text-align: left;
- padding: 0em 0.25em 0.25em 4em;
-}
-.level3 li
-{
- padding: 0.25em .25em 0.25em 0.25em;
-}
-
-
-
-.boxTable
-{
- border-left-style: solid;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-color: #dddddd;
- font-family: verdana, sans-serif;
- font-size: 8pt;
- background-color: #dddddd;
-}
-.boxInnerTable
-{
- font-family: verdana, sans-serif;
- font-size: 8pt;
-}
-.boxTdHeader
-{
- border-width: 0 0 0 0;
- border-color: #dddddd;
- border-left-style: solid;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- background-color: #dddddd;
- color: black;
- height: 20px;
- font-weight: bold
-}
-.boxTd
-{
- border-width: 0 0 0 0;
- border-left-style: solid;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
-}
-.boxTd1
-{
- background-color: #eeeeee;
-}
-.boxTd2
-{
- background-color: #eeeeee;
-}
-.boxTh
-{
- background-color: #dddddd;
-}
-
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.