Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Show start errors more clearly, update documentation and bump version.

  • Loading branch information...
commit 7f10e6eb4b36c93a48f742582b25dc378b9e8b9e 1 parent 2776336
@mnot authored
View
11 README.md
@@ -43,11 +43,22 @@ means you should point at:
> http://localhost:8000/
+On some operating systems, you may need to specify the interface to listen
+on. For example:
+
+ > htracr 8000 eth0
+
+and in some cases, you may need permission to listen to the device, making
+the appopriate command line something like:
+
+ > sudo htracr 8000 eth0
+
Then, press 'start' to start capturing HTTP traffic, and 'stop' to show it.
Currently, htracr only captures traffic on port 80.
The slider will adjust the time scale.
+
## Contact
Mark Nottingham <mnot@mnot.net>
View
7 htracr.js
@@ -215,13 +215,16 @@ var htracr = {
server_conn[local_port].push(details)
},
+ usage: function () {
+ console.log("Usage: htracr listen-port [device]")
+ process.exit(1)
+ }
}
// port to listen to
var port = parseInt(argv._[0])
if (! port || port == NaN) {
- console.log("Usage: test-browser.js listen-port [device]")
- process.exit(1)
+ htracr.usage()
}
// device to snoop on
View
5 lib/asset/htracr-client.js
@@ -104,8 +104,9 @@ htracr = {
jQuery("#stop").show();
self.pulse_logo();
} else {
- // TODO: make end-user visible.
- console.log("start problem: " + req.responseText);
+ var error = eval("(" + req.responseText + ")");
+ alert("Sorry, I can't start the sniffer; it says \"" + error.message + "\".");
+ console.log("start problem: " + error);
}
}
};
View
3  lib/server.js
@@ -44,8 +44,7 @@ function req_done(request, response, htracr) {
htracr.start_capture()
} catch (e) {
response.writeHead(500, {'content-type': 'text/plain'})
- response.end(e.description)
- console.log("Problem starting capture: " + e)
+ response.end(JSON.stringify(e))
return
}
response.writeHead(200, {'content-type': 'text/plain'})
View
2  package.json
@@ -1,7 +1,7 @@
{ "name" : "htracr"
, "description" : "HTTP sniffing and low-level visualisation"
, "keywords" : [ "sniffer", "HTTP", "trace" ]
-, "version" : "0.1.0"
+, "version" : "0.1.1"
, "homepage" : "https://github.com/mnot/htracr"
, "author" : "Mark Nottingham <mnot@mnot.net> (http://www.mnot.net/)"
, "contributors" :
Please sign in to comment.
Something went wrong with that request. Please try again.