diff --git a/fiche.c b/fiche.c index b9e5b32..89141b4 100644 --- a/fiche.c +++ b/fiche.c @@ -9,11 +9,13 @@ Live example: http://code.solusipse.net/ ------------------------------------------------------------------------------- -usage: fiche [-pbsdolBuw]. - [-d domain] [-p port] [-s slug size] +usage: fiche [-epbsdolBuw]. + [-e] [-d domain] [-p port] [-s slug size] [-o output directory] [-B buffer size] [-u user name] [-l log file] [-b banlist] [-w whitelist] +-e option is for using an extended character set for the URL + Compile with Makefile or manually with -O2 and -pthread flags. To install use `make install` command. @@ -371,9 +373,12 @@ void parse_parameters(int argc, char **argv) { int c; - while ((c = getopt (argc, argv, "p:b:s:d:o:l:B:u:w:")) != -1) + while ((c = getopt (argc, argv, "ep:b:s:d:o:l:B:u:w:")) != -1) switch (c) { + case 'e': + snprintf(symbols, sizeof symbols, "%s", "abcdefghijklmnopqrstuvwxyz0123456789-+_=.ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + break; case 'd': snprintf(DOMAIN, sizeof DOMAIN, "%s%s%s", "http://", optarg, "/"); break; diff --git a/fiche.h b/fiche.h index 2189374..9aca10b 100644 --- a/fiche.h +++ b/fiche.h @@ -9,11 +9,13 @@ Live example: http://code.solusipse.net/ ------------------------------------------------------------------------------- -usage: fiche [-pbsdolBuw]. - [-d domain] [-p port] [-s slug size] +usage: fiche [-epbsdolBuw]. + [-e] [-d domain] [-p port] [-s slug size] [-o output directory] [-B buffer size] [-u user name] [-l log file] [-b banlist] [-w whitelist] +-e option is for using an extended character set for the URL + Compile with Makefile or manually with -O2 and -pthread flags. To install use `make install` command. @@ -50,13 +52,13 @@ char *BANFILE; char *WHITEFILE; char *WHITELIST; int PORT = 9999; -int SLUG_SIZE = 8; +int SLUG_SIZE = 4; int BUFSIZE = 32768; int QUEUE_SIZE = 500; char DOMAIN[128] = "http://localhost/"; +char symbols[67] = "abcdefghijklmnopqrstuvwxyz0123456789"; unsigned int time_seed; -const char *symbols = "abcdefghijklmnopqrstuvwxyz0123456789-+_=.ABCDEFGHIJKLMNOPQRSTUVWXYZ"; struct thread_arguments {