--- /dev/null
+# Logs
+logs
+*.log
+
+# Runtime data
+pids
+*.pid
+*.seed
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directory
+# https://docs.npmjs.com/cli/shrinkwrap#caveats
+node_modules
+
+# Debug log from npm
+npm-debug.log
--- /dev/null
+var express = require('express');
+var path = require('path');
+var favicon = require('serve-favicon');
+var logger = require('morgan');
+var cookieParser = require('cookie-parser');
+var bodyParser = require('body-parser');
+var sassMiddleware = require('node-sass-middleware');
+
+var index = require('./routes/index');
+var play = require('./routes/play');
+
+var app = express();
+
+// view engine setup
+app.set('views', path.join(__dirname, 'views'));
+app.set('view engine', 'pug');
+
+// uncomment after placing your favicon in /public
+//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
+app.use(logger('dev'));
+app.use(bodyParser.json());
+app.use(bodyParser.urlencoded({ extended: false }));
+app.use(cookieParser());
+app.use(sassMiddleware({
+ src: path.join(__dirname, 'public'),
+ dest: path.join(__dirname, 'public'),
+ sourceMap: true
+}));
+app.use(express.static(path.join(__dirname, 'public')));
+
+app.use('/', index);
+app.use('/play', play);
+
+// catch 404 and forward to error handler
+app.use(function(req, res, next) {
+ var err = new Error('Not Found');
+ err.status = 404;
+ next(err);
+});
+
+// error handler
+app.use(function(err, req, res, next) {
+ // set locals, only providing error in development
+ res.locals.message = err.message;
+ res.locals.error = req.app.get('env') === 'development' ? err : {};
+
+ // render the error page
+ res.status(err.status || 500);
+ res.render('error');
+});
+
+module.exports = app;
--- /dev/null
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var app = require('../app');
+var debug = require('debug')('phishing-site:server');
+var http = require('http');
+
+/**
+ * Get port from environment and store in Express.
+ */
+
+var port = normalizePort(process.env.PORT || '3000');
+app.set('port', port);
+
+/**
+ * Create HTTP server.
+ */
+
+var server = http.createServer(app);
+
+/**
+ * Listen on provided port, on all network interfaces.
+ */
+
+server.listen(port);
+server.on('error', onError);
+server.on('listening', onListening);
+
+/**
+ * Normalize a port into a number, string, or false.
+ */
+
+function normalizePort(val) {
+ var port = parseInt(val, 10);
+
+ if (isNaN(port)) {
+ // named pipe
+ return val;
+ }
+
+ if (port >= 0) {
+ // port number
+ return port;
+ }
+
+ return false;
+}
+
+/**
+ * Event listener for HTTP server "error" event.
+ */
+
+function onError(error) {
+ if (error.syscall !== 'listen') {
+ throw error;
+ }
+
+ var bind = typeof port === 'string'
+ ? 'Pipe ' + port
+ : 'Port ' + port;
+
+ // handle specific listen errors with friendly messages
+ switch (error.code) {
+ case 'EACCES':
+ console.error(bind + ' requires elevated privileges');
+ process.exit(1);
+ break;
+ case 'EADDRINUSE':
+ console.error(bind + ' is already in use');
+ process.exit(1);
+ break;
+ default:
+ throw error;
+ }
+}
+
+/**
+ * Event listener for HTTP server "listening" event.
+ */
+
+function onListening() {
+ var addr = server.address();
+ var bind = typeof addr === 'string'
+ ? 'pipe ' + addr
+ : 'port ' + addr.port;
+ debug('Listening on ' + bind);
+}
--- /dev/null
+{
+ "name": "phishing-site",
+ "version": "0.0.0",
+ "private": true,
+ "scripts": {
+ "start": "node ./bin/www"
+ },
+ "dependencies": {
+ "body-parser": "~1.17.1",
+ "cookie-parser": "~1.4.3",
+ "debug": "~2.6.3",
+ "express": "~4.15.2",
+ "morgan": "~1.8.1",
+ "node-sass-middleware": "0.9.8",
+ "pug": "~2.0.0-beta11",
+ "serve-favicon": "~2.4.2"
+ }
+}
--- /dev/null
+body {
+ font: 24pt "Lucida Grande", Helvetica, Arial, sans-serif;
+ float: left;
+ width: 100%; }
+
+.index {
+ margin-left: auto;
+ margin-right: auto;
+ padding-top: 20%;
+ width: 50%; }
+ .index span,
+ .index a {
+ float: left;
+ text-align: center;
+ width: 100%; }
+
+/*# sourceMappingURL=style.css.map */
\ No newline at end of file
--- /dev/null
+{
+ "version": 3,
+ "file": "style.css",
+ "sources": [
+ "style.scss"
+ ],
+ "mappings": "AAAA,AAAA,IAAI,CAAC;EACH,IAAI,EAAE,kDAAmD;EACzD,KAAK,EAAE,IAAK;EACZ,KAAK,EAAE,IAAK,GACb;;AAED,AAAA,MAAM,CAAC;EACL,WAAW,EAAE,IAAK;EAClB,YAAY,EAAE,IAAK;EACnB,WAAW,EAAE,GAAI;EACjB,KAAK,EAAE,GAAI,GAOZ;EAXD,AAKE,MALI,CAKJ,IAAI;EALN,AAME,MANI,CAMJ,CAAC,CAAC;IACA,KAAK,EAAE,IAAK;IACZ,UAAU,EAAE,MAAO;IACnB,KAAK,EAAE,IAAK,GACb",
+ "names": []
+}
\ No newline at end of file
--- /dev/null
+body {
+ font: 24pt "Lucida Grande", Helvetica, Arial, sans-serif;
+ float: left;
+ width: 100%;
+}
+
+.index {
+ margin-left: auto;
+ margin-right: auto;
+ padding-top: 20%;
+ width: 50%;
+ span,
+ a {
+ float: left;
+ text-align: center;
+ width: 100%;
+ }
+}
--- /dev/null
+var express = require('express');
+var router = express.Router();
+
+/* GET home page. */
+router.get('/', function(req, res, next) {
+ res.render('index', { title: 'The best game ever' });
+});
+
+module.exports = router;
--- /dev/null
+var express = require('express');
+var path = require('path');
+var router = express.Router();
+
+/* Download page. */
+router.get('/', function(req, res, next) {
+ var fileName = "game.wgt";
+
+ var options = {
+ root: path.join(__dirname, '../public/game'),
+ headers: {
+ 'x-timestamp': Date.now(),
+ 'x-sent': true,
+ 'Content-disposition': 'attachment; filename=' + fileName
+ }
+ };
+
+ res.sendFile(fileName, options, function (err) {
+ if (err) {
+ next(err);
+ } else {
+ console.log('Sent:', fileName);
+ }
+ });
+});
+
+module.exports = router;
--- /dev/null
+extends layout
+
+block content
+ h1= message
+ h2= error.status
+ pre #{error.stack}
--- /dev/null
+extends layout
+
+block content
+ div(class='index')
+ span= title
+ a(class='button' href='/play') Play now
--- /dev/null
+doctype html
+html
+ head
+ title= title
+ link(rel='stylesheet', href='/stylesheets/style.css')
+ body
+ block content