diff options
author | Boian Bonev <bbonev@ipacct.com> | 2012-10-30 08:18:39 +0200 |
---|---|---|
committer | Boian Bonev <bbonev@ipacct.com> | 2012-10-30 08:18:39 +0200 |
commit | 9fc27002f6566f01bc68303ed8496ae0059601f4 (patch) | |
tree | 40bd2a54aa6445a9fbd9cba603c44ee90e211121 | |
parent | fcd2e8043815a9f5ccfb11786579e1563adfb889 (diff) | |
parent | 11b726cee17622304839279fdce47feb9b86f4f7 (diff) | |
download | MAC-Telnet-9fc27002f6566f01bc68303ed8496ae0059601f4.tar.gz MAC-Telnet-9fc27002f6566f01bc68303ed8496ae0059601f4.zip |
Merge branch 'master' of https://github.com/haakonnessjoen/MAC-Telnet
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | README.markdown | 27 | ||||
-rw-r--r-- | config.h | 2 | ||||
-rw-r--r-- | docs/mactelnet.1 | 7 | ||||
-rw-r--r-- | mactelnet.c | 74 | ||||
-rw-r--r-- | mndp.c | 15 | ||||
-rw-r--r-- | mndp.h | 6 | ||||
-rw-r--r-- | po/mactelnet.pot | 105 | ||||
-rw-r--r-- | po/nb.po | 466 |
9 files changed, 655 insertions, 62 deletions
@@ -5,13 +5,16 @@ CC?=gcc all: macping mndp mactelnet mactelnetd -clean: dist-clean +clean: distclean -dist-clean: +distclean: rm -f mactelnet macping mactelnetd mndp rm -f *.o -dist: dist-clean po/mactelnet.pot +potclean: + rm -f po/*.pot + +dist: distclean potclean pot install: all install-docs install -d $(DESTDIR)/usr/bin @@ -27,6 +30,8 @@ install-docs: install -d $(DESTDIR)/usr/share/man/man1/ install docs/*.1 $(DESTDIR)/usr/share/man/man1/ +pot: po/mactelnet.pot + po/mactelnet.pot: *.c xgettext --package-name=mactelnet --msgid-bugs-address=haakon.nessjoen@gmail.com -d mactelnet -C -c_ -k_ -kgettext_noop *.c -o po/mactelnet.pot @@ -42,8 +47,8 @@ interfaces.o: interfaces.c interfaces.h md5.o: md5.c md5.h ${CC} -Wall ${CFLAGS} -c md5.c -mactelnet: config.h mactelnet.c mactelnet.h protocol.o console.c console.h interfaces.o md5.o - ${CC} -Wall ${CFLAGS} ${LDFLAGS} -o mactelnet mactelnet.c protocol.o console.c interfaces.o md5.o ${LIBS} +mactelnet: config.h mactelnet.c mactelnet.h protocol.o console.c console.h interfaces.o md5.o mndp.c + ${CC} -Wall ${CFLAGS} ${LDFLAGS} -o mactelnet mactelnet.c protocol.o console.c interfaces.o md5.o -DFROM_MACTELNET mndp.c ${LIBS} mactelnetd: config.h mactelnetd.c protocol.o interfaces.o console.c console.h users.o users.h md5.o ${CC} -Wall ${CFLAGS} ${LDFLAGS} -o mactelnetd mactelnetd.c protocol.o console.c interfaces.o users.o md5.o ${LIBS} diff --git a/README.markdown b/README.markdown index e1bd784..45d4cd8 100644 --- a/README.markdown +++ b/README.markdown @@ -1,8 +1,7 @@ MAC-Telnet for Linux ==================== -A linux console tool for connecting to MikroTik RouterOS devices via their -ethernet address. +Console tools for connecting to, and serving, devices using MikroTik RouterOS MAC-Telnet protocol. Installation ------------ @@ -22,17 +21,23 @@ Usage ----- # mactelnet -h - Usage: mactelnet <MAC|identity> [-h] [-n] [-t <timeout>] [-u <username>] [-p <password>] + Usage: mactelnet <MAC|identity> [-h] [-n] [-t <timeout>] [-u <user>] [-p <password>] [-U <user>] | -l Parameters: - MAC MAC-Address of the RouterOS device. Use mndp to discover them. - identity The identity/name of your RouterOS device. Uses MNDP protocol to find it.. - -n Do not use broadcast packets. Less insecure but requires root privileges. - -t Amount of seconds to wait for a response on each interface. - -u Specify username on command line. - -p Specify password on command line. - -h This help. - + MAC MAC-Address of the RouterOS/mactelnetd device. Use mndp to + discover it. + identity The identity/name of your destination device. Uses + MNDP protocol to find it. + -l List/Search for routers nearby. (using MNDP) + -n Do not use broadcast packets. Less insecure but requires + root privileges. + -t <timeout> Amount of seconds to wait for a response on each interface. + -u <user> Specify username on command line. + -p <password> Specify password on command line. + -U <user> Drop privileges to this user. Used in conjunction with -n + for security. + -q Quiet mode. + -h This help. Example: @@ -21,7 +21,7 @@ #define DEBUG 0 -#define PROGRAM_VERSION "0.3.3" +#define PROGRAM_VERSION "0.4.0" #if defined(__APPLE__) && defined(__MACH__) #define PLATFORM_NAME "Mac OS X" diff --git a/docs/mactelnet.1 b/docs/mactelnet.1 index 7ca091e..d29591d 100644 --- a/docs/mactelnet.1 +++ b/docs/mactelnet.1 @@ -12,6 +12,13 @@ If specified, the hostname (identity) will be looked up via MNDP discovery. These programs follow the usual GNU command line syntax. A summary of options is included below. .TP +.B \-l +This will discover RouterOS or MAC-Telnetd enabled devices. It will +list the MAC-address software version, and uptime of every device +or machine it discovers. To exit the discovery, use +.B Control + C +\. +.TP .B \-n Do not use broadcast packets. A tad less insecure but requires root privileges. This means that ethernet packets will have the specified mac-address as the packet diff --git a/mactelnet.c b/mactelnet.c index c78b262..19624ea 100644 --- a/mactelnet.c +++ b/mactelnet.c @@ -22,6 +22,7 @@ #include <stdlib.h> #include <stdio.h> #include <unistd.h> +#include <pwd.h> #include <errno.h> #include <fcntl.h> #include <signal.h> @@ -43,6 +44,7 @@ #include "interfaces.h" #include "config.h" #include "mactelnet.h" +#include "mndp.h" #define PROGRAM_NAME "MAC-Telnet" @@ -76,6 +78,7 @@ static int keepalive_counter = 0; static unsigned char encryptionkey[128]; static char username[255]; static char password[255]; +static char nonpriv_username[255]; struct net_interface interfaces[MAX_INTERFACES]; struct net_interface *active_interface; @@ -91,6 +94,30 @@ static void print_version() { fprintf(stderr, PROGRAM_NAME " " PROGRAM_VERSION "\n"); } +void drop_privileges(char *username) { + struct passwd *user = (struct passwd *) getpwnam(username); + if (user == NULL) { + fprintf(stderr, _("Failed dropping privileges. The user %s is not a valid username on local system.\n"), username); + exit(1); + } + if (getuid() == 0) { + /* process is running as root, drop privileges */ + if (setgid(user->pw_gid) != 0) { + fprintf(stderr, _("setgid: Error dropping group privileges\n")); + exit(1); + } + if (setuid(user->pw_uid) != 0) { + fprintf(stderr, _("setuid: Error dropping user privileges\n")); + exit(1); + } + /* Verify if the privileges were developed. */ + if (setuid(0) != -1) { + fprintf(stderr, _("Failed to drop privileges\n")); + exit(1); + } + } +} + static int send_udp(struct mt_packet *packet, int retransmit) { int sent_bytes; @@ -262,7 +289,7 @@ static int handle_packet(unsigned char *data, int data_len) { the data is raw terminal data to be outputted to the terminal. */ else if (cpkt.cptype == MT_CPTYPE_PLAINDATA) { cpkt.data[cpkt.length] = 0; - printf("%s", cpkt.data); + fputs((const char *)cpkt.data, stdout); } /* END_AUTH means that the user/password negotiation is done, and after this point @@ -400,6 +427,7 @@ int main (int argc, char **argv) { struct sockaddr_in si_me; unsigned char buff[1500]; unsigned char print_help = 0, have_username = 0, have_password = 0; + unsigned char drop_priv = 0; int c; int optval = 1; @@ -408,7 +436,7 @@ int main (int argc, char **argv) { textdomain("mactelnet"); while (1) { - c = getopt(argc, argv, "nqt:u:p:vh?"); + c = getopt(argc, argv, "lnqt:u:p:U:vh?"); if (c == -1) { break; @@ -434,6 +462,13 @@ int main (int argc, char **argv) { have_password = 1; break; + case 'U': + /* Save nonpriv_username */ + strncpy(nonpriv_username, optarg, sizeof(nonpriv_username) - 1); + nonpriv_username[sizeof(nonpriv_username) - 1] = '\0'; + drop_priv = 1; + break; + case 't': connect_timeout = atoi(optarg); break; @@ -447,6 +482,10 @@ int main (int argc, char **argv) { quiet_mode = 1; break; + case 'l': + return mndp(); + break; + case 'h': case '?': print_help = 1; @@ -456,18 +495,24 @@ int main (int argc, char **argv) { } if (argc - optind < 1 || print_help) { print_version(); - fprintf(stderr, _("Usage: %s <MAC|identity> [-h] [-n] [-t <timeout>] [-u <username>] [-p <password>]\n"), argv[0]); + fprintf(stderr, _("Usage: %s <MAC|identity> [-h] [-n] [-t <timeout>] [-u <user>] [-p <password>] [-U <user>] | -l\n"), argv[0]); if (print_help) { fprintf(stderr, _("\nParameters:\n" - " MAC MAC-Address of the RouterOS/mactelnetd device. Use mndp to discover it.\n" - " identity The identity/name of your destination device. Uses MNDP protocol to find it.\n" - " -n Do not use broadcast packets. Less insecure but requires root privileges.\n" - " -t Amount of seconds to wait for a response on each interface.\n" - " -u Specify username on command line.\n" - " -p Specify password on command line.\n" - " -q Quiet mode.\n" - " -h This help.\n" + " MAC MAC-Address of the RouterOS/mactelnetd device. Use mndp to\n" + " discover it.\n" + " identity The identity/name of your destination device. Uses\n" + " MNDP protocol to find it.\n" + " -l List/Search for routers nearby. (using MNDP)\n" + " -n Do not use broadcast packets. Less insecure but requires\n" + " root privileges.\n" + " -t <timeout> Amount of seconds to wait for a response on each interface.\n" + " -u <user> Specify username on command line.\n" + " -p <password> Specify password on command line.\n" + " -U <user> Drop privileges to this user. Used in conjunction with -n\n" + " for security.\n" + " -q Quiet mode.\n" + " -h This help.\n" "\n")); } return 1; @@ -488,6 +533,13 @@ int main (int argc, char **argv) { } sockfd = net_init_raw_socket(); + + if (drop_priv) { + drop_privileges(nonpriv_username); + } + } else if (drop_priv) { + fprintf(stderr, _("The -U option must be used in conjunction with the -n parameter.\n")); + return 1; } /* Receive regular udp packets with this socket */ @@ -28,15 +28,26 @@ #define _(String) gettext (String) +/* This file is also used for the -l option in mactelnet */ +#ifndef FROM_MACTELNET + /* Protocol data direction, not used here, but obligatory for protocol.c */ unsigned char mt_direction_fromserver = 0; int main(int argc, char **argv) { +#else +int mndp(void) { +#endif int sock,result; int optval = 1; struct sockaddr_in si_me, si_remote; unsigned char buff[MT_PACKET_LEN]; +#ifdef FROM_MACTELNET + /* mactelnet.c has this set to 1 */ + mt_direction_fromserver = 0; +#endif + setlocale(LC_ALL, ""); bindtextdomain("mactelnet","/usr/share/locale"); textdomain("mactelnet"); @@ -77,6 +88,8 @@ int main(int argc, char **argv) { } } + printf("\n\E[1m%-17s %s\E[m\n", _("MAC-Address"), _("Identity (platform version hardware) uptime")); + while(1) { struct mt_mndp_info *packet; /* Wait for a UDP packet */ @@ -91,7 +104,7 @@ int main(int argc, char **argv) { if (packet != NULL) { /* Print it */ - printf(" %-17s %s", ether_ntoa((struct ether_addr *)packet->address), packet->identity); + printf("%-17s %s", ether_ntoa((struct ether_addr *)packet->address), packet->identity); if (packet->platform != NULL) { printf(" (%s %s %s)", packet->platform, packet->version, packet->hardware); } @@ -0,0 +1,6 @@ +#ifndef _MNDP_H +#define _MNDP_H + +int mndp(void); + +#endif
\ No newline at end of file diff --git a/po/mactelnet.pot b/po/mactelnet.pot index 415844c..22a579c 100644 --- a/po/mactelnet.pot +++ b/po/mactelnet.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: mactelnet\n" "Report-Msgid-Bugs-To: haakon.nessjoen@gmail.com\n" -"POT-Creation-Date: 2012-02-28 15:15+0100\n" +"POT-Creation-Date: 2012-07-17 21:29+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -67,7 +67,7 @@ msgstr "" msgid "You need to have root privileges to use %s.\n" msgstr "" -#: macping.c:207 mndp.c:57 protocol.c:429 +#: macping.c:207 mndp.c:68 protocol.c:429 #, c-format msgid "Error binding to %s:%d\n" msgstr "" @@ -92,84 +92,115 @@ msgstr "" msgid "%s Reply of %d bytes of unequal data\n" msgstr "" -#: mactelnet.c:154 +#: mactelnet.c:100 +#, c-format +msgid "" +"Failed dropping privileges. The user %s is not a valid username on local " +"system.\n" +msgstr "" + +#: mactelnet.c:106 +#, c-format +msgid "setgid: Error dropping group privileges\n" +msgstr "" + +#: mactelnet.c:110 +#, c-format +msgid "setuid: Error dropping user privileges\n" +msgstr "" + +#: mactelnet.c:115 +#, c-format +msgid "Failed to drop privileges\n" +msgstr "" + +#: mactelnet.c:181 #, c-format msgid "" "\n" "Connection timed out\n" msgstr "" -#: mactelnet.c:303 +#: mactelnet.c:330 #, c-format msgid "Connection closed.\n" msgstr "" -#: mactelnet.c:309 +#: mactelnet.c:336 #, c-format msgid "Unhandeled packet type: %d received from server %s\n" msgstr "" -#: mactelnet.c:331 +#: mactelnet.c:358 #, c-format msgid "Error: No suitable devices found\n" msgstr "" -#: mactelnet.c:459 +#: mactelnet.c:498 #, c-format msgid "" -"Usage: %s <MAC|identity> [-h] [-n] [-t <timeout>] [-u <username>] [-p " -"<password>]\n" +"Usage: %s <MAC|identity> [-h] [-n] [-t <timeout>] [-u <user>] [-p " +"<password>] [-U <user>] | -l\n" msgstr "" -#: mactelnet.c:462 +#: mactelnet.c:501 #, c-format msgid "" "\n" "Parameters:\n" -" MAC MAC-Address of the RouterOS/mactelnetd device. Use mndp to " -"discover it.\n" -" identity The identity/name of your destination device. Uses MNDP protocol " -"to find it.\n" -" -n Do not use broadcast packets. Less insecure but requires root " -"privileges.\n" -" -t Amount of seconds to wait for a response on each interface.\n" -" -u Specify username on command line.\n" -" -p Specify password on command line.\n" -" -q Quiet mode.\n" -" -h This help.\n" +" MAC MAC-Address of the RouterOS/mactelnetd device. Use mndp to\n" +" discover it.\n" +" identity The identity/name of your destination device. Uses\n" +" MNDP protocol to find it.\n" +" -l List/Search for routers nearby. (using MNDP)\n" +" -n Do not use broadcast packets. Less insecure but requires\n" +" root privileges.\n" +" -t <timeout> Amount of seconds to wait for a response on each " +"interface.\n" +" -u <user> Specify username on command line.\n" +" -p <password> Specify password on command line.\n" +" -U <user> Drop privileges to this user. Used in conjunction with -n\n" +" for security.\n" +" -q Quiet mode.\n" +" -h This help.\n" "\n" msgstr "" -#: mactelnet.c:486 +#: mactelnet.c:531 #, c-format msgid "You need to have root privileges to use the -n parameter.\n" msgstr "" -#: mactelnet.c:518 +#: mactelnet.c:541 +#, c-format +msgid "The -U option must be used in conjunction with the -n parameter.\n" +msgstr "" + +#: mactelnet.c:570 #, c-format msgid "Login: " msgstr "" -#: mactelnet.c:525 +#: mactelnet.c:577 msgid "Password: " msgstr "" -#: mactelnet.c:550 +#: mactelnet.c:602 #, c-format msgid "Connecting to %s..." msgstr "" -#: mactelnet.c:560 mactelnetd.c:244 mactelnetd.c:981 +#: mactelnet.c:612 mactelnetd.c:244 mactelnetd.c:981 #, c-format msgid "Error binding to %s:%d, %s\n" msgstr "" -#: mactelnet.c:565 +#: mactelnet.c:617 #, c-format msgid "Connection failed.\n" msgstr "" -#: mactelnet.c:569 +#: mactelnet.c:621 #, c-format msgid "done\n" msgstr "" @@ -329,27 +360,35 @@ msgstr "" msgid "Timeout\r\n" msgstr "" -#: mndp.c:62 +#: mndp.c:73 #, c-format msgid "Searching for MikroTik routers... Abort with CTRL+C.\n" msgstr "" -#: mndp.c:66 +#: mndp.c:77 #, c-format msgid "Unable to send broadcast packets: Operating in receive only mode.\n" msgstr "" -#: mndp.c:76 +#: mndp.c:87 #, c-format msgid "Unable to send broadcast packet: Operating in receive only mode.\n" msgstr "" -#: mndp.c:85 +#: mndp.c:91 +msgid "MAC-Address" +msgstr "" + +#: mndp.c:91 +msgid "Identity (platform version hardware) uptime" +msgstr "" + +#: mndp.c:98 #, c-format msgid "An error occured. aborting\n" msgstr "" -#: mndp.c:99 +#: mndp.c:112 #, c-format msgid " up %d days %d hours" msgstr "" diff --git a/po/nb.po b/po/nb.po new file mode 100644 index 0000000..cf7e19c --- /dev/null +++ b/po/nb.po @@ -0,0 +1,466 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: mactelnet\n" +"Report-Msgid-Bugs-To: haakon.nessjoen@gmail.com\n" +"POT-Creation-Date: 2012-07-17 21:29+0200\n" +"PO-Revision-Date: 2012-09-23 00:08+0100\n" +"Last-Translator: Håkon Nessjøen <haakon.nessjoen@gmail.com>\n" +"Language-Team: Håkon Nessjøen <haakon.nessjoen@gmail.com>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.3\n" +"Language: nb\n" +"X-Poedit-SourceCharset: UTF-8\n" + +#: interfaces.c:287 +#, c-format +msgid "packet size too large\n" +msgstr "pakkestørrelse for stor\n" + +#: macping.c:89 +#, c-format +msgid "%d packets transmitted, %d packets received, %d%% packet loss\n" +msgstr "%d pakker sendt, %d pakker mottatt, %d%% pakketap\n" + +#: macping.c:90 +#, c-format +msgid "round-trip min/avg/max = %.2f/%.2f/%.2f ms\n" +msgstr "returtid min/gjennomsnitt/maks = %.2f/%.2f/%.2f ms\n" + +#: macping.c:149 +#, c-format +msgid "" +"Number of packets to send must be more than 0 and less than 100 in fast " +"mode.\n" +msgstr "Antall pakker må være mer enn 0 og mindre enn 100 i hurtig-modus.\n" + +#: macping.c:155 +#, c-format +msgid "Usage: %s <MAC> [-h] [-f] [-c <count>] [-s <packet size>]\n" +msgstr "Bruksmåte: %s <MAC> [-h] [-f] [-c <antall>] [-s <pakkestørrelse>]\n" + +#: macping.c:158 +#, c-format +msgid "" +"\n" +"Parameters:\n" +" MAC MAC-Address of the RouterOS/mactelnetd device.\n" +" -f Fast mode, do not wait before sending next ping request.\n" +" -s Specify size of ping packet.\n" +" -c Number of packets to send. (0 = unlimited)\n" +" -h This help.\n" +"\n" +msgstr "" +"\n" +"Parametere:\n" +" MAC MAC-Adressen til RouterOS/mactelnetd enheten.\n" +" -f Hurtig-modus, send ping forespørsler uten pause.\n" +" -s Spesifiser pakkestørrelsen.\n" +" -c Antall pakker som skal sendes. (0 = uendelig)\n" +" -h Denne hjelpen.\n" +"\n" + +#: macping.c:170 +#, c-format +msgid "Packet size must be between 18 and %d\n" +msgstr "Pakkestørrelse må være mellom 18 og %d\n" + +#: macping.c:179 mactelnetd.c:940 +#, c-format +msgid "You need to have root privileges to use %s.\n" +msgstr "Du trenger superbruker-rettigheter for å bruke %s.\n" + +#: macping.c:207 mndp.c:68 protocol.c:429 +#, c-format +msgid "Error binding to %s:%d\n" +msgstr "Klarte ikke binde mot %s:%d\n" + +#: macping.c:266 +#, c-format +msgid "Error sending packet.\n" +msgstr "Klarte ikke sende pakke.\n" + +#: macping.c:284 +#, c-format +msgid "%s ping timeout\n" +msgstr "%s ping tidsavbrudd\n" + +#: macping.c:322 +#, c-format +msgid "%s %d byte, ping time %.2f ms%s\n" +msgstr "%s %d byte, ping tid %.2f ms%s\n" + +#: macping.c:324 +#, c-format +msgid "%s Reply of %d bytes of unequal data\n" +msgstr "%s Retur av %d byter med usammensvarende data\n" + +#: mactelnet.c:100 +#, c-format +msgid "" +"Failed dropping privileges. The user %s is not a valid username on local " +"system.\n" +msgstr "" +"Klarte ikke droppe privilegier. Brukernavnet %s er ikke gyldig på det lokale " +"systemet.\n" + +#: mactelnet.c:106 +#, c-format +msgid "setgid: Error dropping group privileges\n" +msgstr "setgid: Klarte ikke droppe gruppeprivilegier\n" + +#: mactelnet.c:110 +#, c-format +msgid "setuid: Error dropping user privileges\n" +msgstr "setud: Klarte ikke droppe brukerprivilegier\n" + +#: mactelnet.c:115 +#, c-format +msgid "Failed to drop privileges\n" +msgstr "Klarte ikke droppe privilegier\n" + +#: mactelnet.c:181 +#, c-format +msgid "" +"\n" +"Connection timed out\n" +msgstr "" +"\n" +"Tilkoblingen fikk tidsavbrudd\n" + +#: mactelnet.c:330 +#, c-format +msgid "Connection closed.\n" +msgstr "Tilkoblingen ble stengt.\n" + +#: mactelnet.c:336 +#, c-format +msgid "Unhandeled packet type: %d received from server %s\n" +msgstr "Uhåndtert pakketype: %d mottatt fra server %s\n" + +#: mactelnet.c:358 +#, c-format +msgid "Error: No suitable devices found\n" +msgstr "Feil: Ingen brukbare enheter funnet\n" + +#: mactelnet.c:498 +#, c-format +msgid "" +"Usage: %s <MAC|identity> [-h] [-n] [-t <timeout>] [-u <user>] [-p " +"<password>] [-U <user>] | -l\n" +msgstr "" +"Bruksmåte: %s <MAC|identitet> [-h] [-n] [-t <tidsbegrensning>] [-u " +"<brukernavn>] [-p <passord>] [-U <brukernavn>] | -l\n" + +#: mactelnet.c:501 +#, c-format +msgid "" +"\n" +"Parameters:\n" +" MAC MAC-Address of the RouterOS/mactelnetd device. Use mndp to\n" +" discover it.\n" +" identity The identity/name of your destination device. Uses\n" +" MNDP protocol to find it.\n" +" -l List/Search for routers nearby. (using MNDP)\n" +" -n Do not use broadcast packets. Less insecure but requires\n" +" root privileges.\n" +" -t <timeout> Amount of seconds to wait for a response on each " +"interface.\n" +" -u <user> Specify username on command line.\n" +" -p <password> Specify password on command line.\n" +" -U <user> Drop privileges to this user. Used in conjunction with -n\n" +" for security.\n" +" -q Quiet mode.\n" +" -h This help.\n" +"\n" +msgstr "" +"\n" +"Parametere:\n" +" MAC MAC-Adressen til RouterOS/mactelnetd enheten. Bruk mndb " +"for\n" +" å finne den.\n" +" identitet Identiteten til enheten. Bruker MNDP protokollen\n" +" til å finne den.\n" +" -l List/Søk etter routere i nærheten. (ved å bruke MNDP)\n" +" -n Ikke bruk broadcast pakker. Mindre usikkert, men bruker\n" +" root privilegier.\n" +" -t <tidsbegr.> Antall sekunder å vente for respons på hvert grensesnitt.\n" +" -u <user> Spesifiser brukernavn på kommando-linjen.\n" +" -p <password> Spesifiser passord på kommando-linjen.\n" +" -U <user> Dropp privilegier til denne brukeren. Brukes i forbindelse\n" +" med -n for sikkerhet.\n" +" -q Stille-modus.\n" +" -h Denne hjelpen.\n" +"\n" + +#: mactelnet.c:531 +#, c-format +msgid "You need to have root privileges to use the -n parameter.\n" +msgstr "Du trenger root privilegier for å bruke -n parameteren.\n" + +#: mactelnet.c:541 +#, c-format +msgid "The -U option must be used in conjunction with the -n parameter.\n" +msgstr "-U parameteren må brukes i forbindelse med -n parameteren.\n" + +#: mactelnet.c:570 +#, c-format +msgid "Login: " +msgstr "Bruker: " + +#: mactelnet.c:577 +msgid "Password: " +msgstr "Passord: " + +#: mactelnet.c:602 +#, c-format +msgid "Connecting to %s..." +msgstr "Kobler til %s…" + +#: mactelnet.c:612 mactelnetd.c:244 mactelnetd.c:981 +#, c-format +msgid "Error binding to %s:%d, %s\n" +msgstr "Problemer med å binde til %s:%d, %s\n" + +#: mactelnet.c:617 +#, c-format +msgid "Connection failed.\n" +msgstr "Tilkobling feilet.\n" + +#: mactelnet.c:621 +#, c-format +msgid "done\n" +msgstr "ferdig\n" + +#: mactelnetd.c:249 +#, c-format +msgid "Listening on %s for %s\n" +msgstr "Lytter på %s for %s\n" + +#: mactelnetd.c:409 +#, c-format +msgid "(%d) Invalid login by %s." +msgstr "(%d) Ugyldig login av %s." + +#. _ Please include both \r and \n in translation, this is needed for the terminal emulator. +#: mactelnetd.c:412 +msgid "Login failed, incorrect username or password\r\n" +msgstr "Login feilet, ugyldig brukernavn eller passord\r\n" + +#. _ Please include both \r and \n in translation, this is needed for the terminal emulator. +#: mactelnetd.c:429 +msgid "Terminal error\r\n" +msgstr "Terminalfeil\r\n" + +#: mactelnetd.c:440 +#, c-format +msgid "(%d) Login ok, but local user not accessible (%s)." +msgstr "(%d) Login ok, men lokal bruker er ikke tilgjengelig (%s)." + +#. _ Please include both \r and \n in translation, this is needed for the terminal emulator. +#: mactelnetd.c:442 +msgid "Local user not accessible\r\n" +msgstr "Lokal bruker er ikke tilgjengelig\r\n" + +#: mactelnetd.c:451 +#, c-format +msgid "Error opening %s: %s" +msgstr "Klarer ikke åpne %s: %s" + +#. _ Please include both \r and \n in translation, this is needed for the terminal emulator. +#: mactelnetd.c:453 +msgid "Error opening terminal\r\n" +msgstr "Klarer ikke åpne terminal\r\n" + +#: mactelnetd.c:464 +#, c-format +msgid "(%d) User %s logged in." +msgstr "(%d) Bruker %s logget inn." + +#: mactelnetd.c:502 +#, c-format +msgid "(%d) Could not log in %s (%d:%d): setuid/setgid: %s" +msgstr "(%d) Kunne ikke logge inn %s (%d:%d): setuid/setgid: %s" + +#. _ Please include both \r and \n in translation, this is needed for the terminal emulator. +#: mactelnetd.c:504 +msgid "Internal error\r\n" +msgstr "Intern feil\r\n" + +#: mactelnetd.c:510 +#, c-format +msgid "(%d) User %s disconnected with " +msgstr "(%d) Bruker %s frakoblet med " + +#: mactelnetd.c:603 +#, c-format +msgid "(%d) Unhandeled control packet type: %d" +msgstr "(%d) Uhåndtert kontrollpakke-type: %d" + +#: mactelnetd.c:649 +#, c-format +msgid "(%d) New connection from %s." +msgstr "(%d) Ny tilkobling fra %s." + +#: mactelnetd.c:677 mactelnetd.c:1111 +#, c-format +msgid "(%d) Connection closed." +msgstr "(%d) Tilkobling lukket." + +#: mactelnetd.c:723 +#, c-format +msgid "(%d) Unhandeled packet type: %d" +msgstr "(%d) Uhåndtert pakke-type: %d" + +#. _ Please include both \r and \n in translation, this is needed for the terminal emulator. +#: mactelnetd.c:816 +msgid "" +"\r\n" +"\r\n" +"Daemon shutting down.\r\n" +msgstr "" +"\r\n" +"\r\n" +"Tjener avslutter.\r\n" + +#: mactelnetd.c:818 +msgid "Daemon shutting down" +msgstr "Tjener avslutter" + +#: mactelnetd.c:849 +msgid "SIGHUP: Reloading interfaces" +msgstr "SIGHUP: Laster grensesnitt på nytt" + +#: mactelnetd.c:860 +msgid "No devices found! Exiting.\n" +msgstr "Ingen enheter funnet! Avslutter.\n" + +#: mactelnetd.c:874 +#, c-format +msgid "(%d) Connection closed because interface %s is gone." +msgstr "(%d) Tilkobling lukket på grunn av at %s er borte." + +#: mactelnetd.c:927 +#, c-format +msgid "Usage: %s [-f|-n|-h]\n" +msgstr "Bruksmåte: %s [-f|-n|-h]\n" + +#: mactelnetd.c:930 +#, c-format +msgid "" +"\n" +"Parameters:\n" +" -f Run process in foreground.\n" +" -n Do not use broadcast packets. Just a tad less insecure.\n" +" -h This help.\n" +"\n" +msgstr "" +"\n" +"Parametere:\n" +" -f Kjør prosessen i forgrunn.\n" +" -n Ikke bruk broadcast pakker. Bare såvidt litt mer usikkert.\n" +" -h Denne hjelpen.\n" +"\n" + +#: mactelnetd.c:1003 +#, c-format +msgid "MNDP: Error binding to %s:%d, %s\n" +msgstr "MNDP: Klarte ikke binde til %s:%d, %s\n" + +#: mactelnetd.c:1007 +#, c-format +msgid "Bound to %s:%d" +msgstr "Bundet to %s:%d" + +#: mactelnetd.c:1033 +msgid "Unable to find any valid network interfaces\n" +msgstr "Klarte ikke finne noen gyldige nettverksgrensesnitt\n" + +#: mactelnetd.c:1109 +#, c-format +msgid "(%d) Connection to user %s closed." +msgstr "(%d) Tilkobling til bruker %s lukket." + +#: mactelnetd.c:1119 +#, c-format +msgid "(%d) Waiting for ack\n" +msgstr "(%d) Venter på ack\n" + +#: mactelnetd.c:1135 +#, c-format +msgid "(%d) Session timed out" +msgstr "(%d) Sesjonen utgikk på tidsavbrudd" + +#. _ Please include both \r and \n in translation, this is needed for the terminal emulator. +#: mactelnetd.c:1138 +msgid "Timeout\r\n" +msgstr "Tidsavbrudd\r\n" + +#: mndp.c:73 +#, c-format +msgid "Searching for MikroTik routers... Abort with CTRL+C.\n" +msgstr "Søker etter MikroTik rutere… Avbryt med CTRL+C.\n" + +#: mndp.c:77 +#, c-format +msgid "Unable to send broadcast packets: Operating in receive only mode.\n" +msgstr "Klarer ikke sende broadcast pakker: Jobber i kun-motta-modus.\n" + +#: mndp.c:87 +#, c-format +msgid "Unable to send broadcast packet: Operating in receive only mode.\n" +msgstr "Klarer ikke sende broadcast pakke: Jobber i kun-motta-modus.\n" + +#: mndp.c:91 +msgid "MAC-Address" +msgstr "MAC-Adresse" + +#: mndp.c:91 +msgid "Identity (platform version hardware) uptime" +msgstr "Identitet (plattform versjon maskinvare) oppetid" + +#: mndp.c:98 +#, c-format +msgid "An error occured. aborting\n" +msgstr "En feil oppstod. avbryter\n" + +#: mndp.c:112 +#, c-format +msgid " up %d days %d hours" +msgstr " oppe %d dager %d timer" + +#: protocol.c:84 protocol.c:148 +#, c-format +msgid "add_control_packet: ERROR, too large packet. Exceeds %d bytes\n" +msgstr "add_control_packet: FEIL, for stor pakke. Overstiger %d byter\n" + +#: protocol.c:280 +#, c-format +msgid "mndp_add_attribute: ERROR, too large packet. Exceeds %d bytes\n" +msgstr "mndp_add_attribute: FEIL, for stor pakke. Overstiger %d byter\n" + +#: protocol.c:444 +#, c-format +msgid "Unable to send broadcast packet: Router lookup will be slow\n" +msgstr "Klarer ikke sende broadcast pakke: Ruter søk vil være tregt\n" + +#: protocol.c:527 +#, c-format +msgid "Searching for '%s'..." +msgstr "Søker etter '%s'..." + +#: protocol.c:531 +#, c-format +msgid "not found\n" +msgstr "ikke funnet\n" + +#: protocol.c:538 +#, c-format +msgid "found\n" +msgstr "funnet\n" |