Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cs fix, remove protege, cross-platform fix

  • Loading branch information...
commit 183e20a69a0145cc077934deebbbd3d1d348af0e 1 parent fb1c5f0
@contra contra authored
View
2  examples/express-test.coffee
@@ -1,4 +1,4 @@
-fusker = require '../lib/fusker'
+fusker = require '../lib/main'
express = require 'express'
fusker.config.dir = process.cwd()
View
4 examples/test.coffee
@@ -1,4 +1,4 @@
-fusker = require '../lib/fusker'
+fusker = require '../lib/main'
fusker.config.dir = __dirname
fusker.config.banLength = 1
@@ -27,7 +27,7 @@ io.sockets.on 'connection', (socket) ->
socket.on 'TestObject', (msg) ->
console.log 'HelloServer3! Contents: ' + msg
- /* Uncomment the attack senders in index.html to test these */
+ # Uncomment the attack senders in index.html to test these
socket.on 'TestSQL', (msg) ->
console.log 'SQL Handled! Contents: ' + msg
View
4 lib/fusker.coffee
@@ -1,5 +1,3 @@
-require('coffee-script');
-require 'protege'
require('node-log').setName 'fusker'
fusker = {}
@@ -8,7 +6,7 @@ fusker.config = require './config'
fusker.http = require './http'
fusker.express = require './express'
fusker.socket = require './socketio'
-fusker.patterns = require './patterns'
+fusker.patterns = require('xemplar').security
module.exports = fusker
View
6 lib/http.coffee
@@ -15,11 +15,11 @@ http = {}
http.detectives = []
http.payloads = []
-http.detect = (args...) -> http.detectives.merge args
-http.punish = (args...) -> http.payloads.merge args
+http.detect = (args...) -> http.detectives.push arg for arg in args
+http.punish = (args...) -> http.payloads.push arg for arg in args
http.createServer = (port, username, password) ->
- log.info ('Creating HTTP server on port ' + port).green
+ log.info 'Creating HTTP server on port ' + port
log.info 'Detectives: ' + http.detectives
log.info 'Payloads: ' + http.payloads
if username? and password?
View
2  lib/main.js
@@ -0,0 +1,2 @@
+require('coffee-script');
+module.exports = require('./fusker.coffee');
View
4 lib/socketio.coffee
@@ -12,8 +12,8 @@ socketio = {}
socketio.detectives = []
socketio.payloads = []
-socketio.detect = (args...) -> socketio.detectives.merge args
-socketio.punish = (args...) -> socketio.payloads.merge args
+socketio.detect = (args...) -> socketio.detectives.push arg for arg in args
+socketio.punish = (args...) -> socketio.payloads.push arg for arg in args
socketio.listen = (server) ->
log.info 'Creating Socket.IO server!'.green
View
26 package.json
@@ -1,32 +1,22 @@
{
"name": "fusker",
"description": "Application firewall. Detect, prevent, and fight back against hackers in the lulziest ways possible",
- "version": "0.2.0",
+ "version": "0.2.1",
"homepage": "http://github.com/wearefractal/fusker",
+ "repository": "http://github.com/wearefractal/fusker.git",
"keywords": ["fusker", "hack", "protect", "csrf", "lfi", "xss", "sqli", "injection", "attack", "blacklist", "express", "socket", "security", "firewall"],
- "author": "Contra <contra@australia.edu> (http://wearefractal.com)",
- "main": "./lib/fusker.coffee",
- "directories": {
- "lib": "./lib"
- },
- "repository": {
- "type": "git",
- "url": "http://github.com/wearefractal/fusker.git"
- },
+ "author":"Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
+ "main": "./lib/main.js",
+
"dependencies": {
"socket.io": ">= 0.7.4",
"coffee-script": "*",
- "colors":"*",
- "protege":"*",
"mime":"*",
- "digest":"*",
+ "digest":">= 0.0.5",
"node-log":"*",
- "async":"*"
+ "async":"*",
+ "xemplar":"*"
},
- "contributors": [{
- "name": "Contra",
- "github": "https://github.com/Contra"
- }],
"engines": {
"node": "*"
},
Please sign in to comment.
Something went wrong with that request. Please try again.