inhies/cjdcmd — pull request #49 by ehmry (2014-04-24 21:21:12+00:00)
Title: conversion to cobra command, nmap output for traceroute

I refactored the internals to use cobra, and I've tried to keep everything as similar as possible.
Some of the functions need testing to check for regressions, notably ping and traceroute, I used my own versions of those to avoid some of the old global variables.

New output:
```
./cjdcmd

Usage:
cjdcmd [command]

Available Commands:
ping :: Preforms a cjdns ping to a specified address.
route :: Prints all routes to a specific node
traceroute :: Performs a traceroute on a specific node by pinging each known hop to the target on all known paths
ip :: Converts a cjdns public key to its corresponding IPv6 address.
peers [] :: Displays a list of currently connected peers for a node, if no node is specified your peers are shown.
host :: Returns a list of all known IP addresses for a specified hostname or the hostname for an address.
cjdnsadmin <-file /path/to/cjdroute.conf> :: Generates a .cjdnsadmin file in your home diectory using the specified cjdroute.conf as input
addpeer '' :: Adds the peer details to your config file
addpass [password] :: Adds the password to your config file, or generates one and then adds that
listpass :: ALPHA FEATURE - List currently loaded peering passwords.
cleanconfig [-file] [-outfile] :: Strips all comments from the config file and saves it at outfile
log [--level level] [--file file] [--line] :: Prints cjdns logs to stdout
passgen [prefix] :: Generates a random alphanumeric password between 15 and 50 characters. If you provide [prefix], it will be prepended. This is to help you keep track of your peering passwords
dump :: Dumps the entire routing table to stdout.
memory :: Returns the bytes of memory allocated by the router
help [command] :: Help about any command

Available Flags:
-v, --verbose=false: verbose output

Use "cjdcmd help [command]" for more information about that command.
```