hmarr/chromesheep — Issue #1: Running in Linux Mint 12
Author: EorlBrother
Created: 2012-02-09 12:42:59+00:00
State: open

hi,

I am trying to run chromesheep in Linux Mint 12 and am being confronted by various problems.
First I had to install (additionally to the ones mentioned in the README) the npm extensions jsdom and events. Installing jsdom solves the problem with the pcap_bindings error.
In the pcap file ($YOURHOMEDIRECTORY/.node/.npm/pcap/VERSIONNUMBER/package/pcap.js) I changed this:

```javascript
//for me at line 1345
TCP_tracker.prototype.setup_http_tracking = function (session) {
var self = this, http = {
request : {
headers : {},
url : "",
method : "",
body_len : 0,
http_version : null
},
response : {
headers : {},
status_code : null,
body_len : 0,
http_version : null
},
request_parser : new HTTPParser('request'), //change here
response_parser : new HTTPParser('response') //change here
};
```

This should solve an error which had to do with HTTPParser.REQUEST and HTTPParser.RESPONSE
Then in $YOURHOMEDIRECTORY/.node/.npm/websocket-server/VERSIONNUMBER/package/lib/_events.js I added the line

```javascript
EventEmitter.prototype.emit = function(type) {
if (type !== 'newListener' && (!this._events || !this._events[type]) &&
this._bubbleTarget && this._bubbleTarget[type]) {
this._bubbleTarget[type].emit.apply(this._bubbleTarget[type], arguments);
} else {
events.EventEmitter.prototype.setMaxListeners(0); //added line
events.EventEmitter.prototype.emit.apply(this, arguments);
}
};
```

This one solved a problem with an possible EventEmitter Memory leak

Now when trying to run nodesheep-server.js I end up with this forever until I Ctrl-C

```
Capturing packets on eth0
Listening on port 8181
```

My chromesheep Icon say "Cannot connect to the server". Any ideas?