Improve error reporting in winkd://

This commit is contained in:
pancake 2021-04-10 23:42:58 +02:00
parent d996327f36
commit 476efd4d2f
2 changed files with 3 additions and 0 deletions

View File

@ -32,6 +32,7 @@ static RIODesc *__open(RIO *io, const char *file, int rw, int mode) {
eprintf ("Usage: winkd://(host:port:key) | (/tmp/windbg.pipe)\n");
eprintf (" winkd://192.168.1.33:1234:key) # UDP to host:port:key\n");
eprintf (" winkd:///tmp # pipe - \\\\.\\pipe\\com_1 /tmp/windbg.pipe\n");
eprintf (" # key is base36(aes256) in x.x.x.x format\n");
return NULL;
}

View File

@ -102,6 +102,7 @@ static void *iob_net_open(const char *path) {
char *host = strdup (path);
char *port = strchr (host, ':');
if (R_STR_ISEMPTY (port)) {
eprintf ("Missing port. Use winkd://host:udp-port:x.x.x.x.\n");
free (host);
free (obj);
return NULL;
@ -109,6 +110,7 @@ static void *iob_net_open(const char *path) {
*port++ = 0;
char *key = strchr (port, ':');
if (R_STR_ISEMPTY (key)) {
eprintf ("Missing key. Use winkd://host:udp-port:x.x.x.x.\n");
free (host);
free (obj);
return NULL;