Changeset 55cfed


Ignore:
Timestamp:
09/20/09 17:11:15 (3 years ago)
Author:
J. A. Bezemer <J.A.Bezemer@…>
Branches:
master
Children:
401674
Parents:
2c2dd6
git-author:
J. A. Bezemer <J.A.Bezemer@…> (09/20/09 17:11:15)
git-committer:
Erik Ekman <erik@…> (02/04/12 20:34:03)
Message:

update client code #75

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/client.h

    ra1a2e3 r55cfed  
    2727void client_set_topdomain(const char *cp); 
    2828void client_set_password(const char *cp); 
     29void set_qtype(char *qtype); 
     30void set_downenc(char *encoding); 
    2931 
    3032int client_handshake(int dns_fd, int raw_mode, int autodetect_frag_size, int fragsize); 
  • src/iodine.c

    ra1a2e3 r55cfed  
    6262 
    6363        fprintf(stderr, "Usage: %s [-v] [-h] [-f] [-r] [-u user] [-t chrootdir] [-d device] " 
    64                         "[-P password] [-m maxfragsize] [-z context] [-F pidfile] " 
     64                        "[-P password] [-m maxfragsize] [-T type] [-O enc] [-z context] [-F pidfile] " 
    6565                        "[nameserver] topdomain\n", __progname); 
    6666        exit(2); 
     
    7373        fprintf(stderr, "iodine IP over DNS tunneling client\n"); 
    7474        fprintf(stderr, "Usage: %s [-v] [-h] [-f] [-r] [-u user] [-t chrootdir] [-d device] " 
    75                         "[-P password] [-m maxfragsize] [-z context] [-F pidfile] " 
     75                        "[-P password] [-m maxfragsize] [-T type] [-O enc] [-z context] [-F pidfile] " 
    7676                        "[nameserver] topdomain\n", __progname); 
    7777        fprintf(stderr, "  -v to print version info and exit\n"); 
     
    8484        fprintf(stderr, "  -P password used for authentication (max 32 chars will be used)\n"); 
    8585        fprintf(stderr, "  -m maxfragsize, to limit size of downstream packets\n"); 
     86        fprintf(stderr, "  -T dns type: NULL (default, fastest), TXT, CNAME, A (CNAME answer), MX\n"); 
     87        fprintf(stderr, "  -O downstream encoding (!NULL): Base32(default), Base64, or Raw (only TXT)\n"); 
    8688        fprintf(stderr, "  -z context, to apply specified SELinux context after initialization\n"); 
    8789        fprintf(stderr, "  -F pidfile to write pid to a file\n"); 
     
    134136        username = NULL; 
    135137        memset(password, 0, 33); 
     138        srand(time(NULL)); 
    136139        foreground = 0; 
    137140        newroot = NULL; 
     
    160163#endif 
    161164 
    162         while ((choice = getopt(argc, argv, "vfhru:t:d:P:m:F:")) != -1) { 
     165        while ((choice = getopt(argc, argv, "vfhru:t:d:P:m:F:T:O:")) != -1) { 
    163166                switch(choice) { 
    164167                case 'v': 
     
    201204                        pidfile = optarg; 
    202205                        break;     
     206                case 'T': 
     207                        set_qtype(optarg); 
     208                        break; 
     209                case 'O':       /* not -D, is Debug in server */ 
     210                        set_downenc(optarg); 
     211                        break; 
    203212                default: 
    204213                        usage(); 
     
    235244                client_set_nameserver(nameserv_addr, DNS_PORT); 
    236245        } else { 
     246                warnx("No nameserver found - not connected to any network?\n"); 
    237247                usage(); 
    238248                /* NOTREACHED */ 
Note: See TracChangeset for help on using the changeset viewer.