xombrero-1.6.4004075500017500000000000000000001247066410500123165ustar00dhillwheelxombrero-1.6.4/Makefile010064400017500000000000000056061247066410500140410ustar00dhillwheelPREFIX?=/usr/local BINDIR=${PREFIX}/bin CFLAGS+= -DXT_DS_RESOURCE_DIR=\"$(PREFIX)/share/xombrero/\" PROG=xombrero MAN=xombrero.1 DEBUG= -g SRCS= cookie.c inspector.c marco.c about.c whitelist.c settings.c inputfocus.c SRCS+= history.c completion.c tldlist.c externaleditor.c unix.c xombrero.c CFLAGS+= -O2 -Wall -Wno-format-extra-args -Wunused -Wextra -Wno-unused-parameter CFLAGS+= -Wno-missing-field-initializers -Wno-sign-compare CFLAGS+= -Wno-deprecated-declarations -Wfloat-equal ${DEBUG} CFLAGS+= -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE CFLAGS+= -I. -I${.CURDIR} LDADD= -lutil GTK_VERSION ?= gtk3 .if ${GTK_VERSION} == "gtk2" LIBS+= gtk+-2.0 LIBS+= webkit-1.0 .else LIBS+= gtk+-3.0 LIBS+= webkitgtk-3.0 .endif LIBS+= libsoup-2.4 LIBS+= gnutls GTK_CFLAGS!= pkg-config --cflags $(LIBS) GTK_LDFLAGS!= pkg-config --libs $(LIBS) CFLAGS+= $(GTK_CFLAGS) LDFLAGS+= $(GTK_LDFLAGS) BUILDVERSION != sh "${.CURDIR}/buildver.sh" .if !${BUILDVERSION} == "" CPPFLAGS+= -DXOMBRERO_BUILDSTR=\"$(BUILDVERSION)\" .endif MANDIR= ${PREFIX}/man/man CLEANFILES += ${.CURDIR}/javascript.h javascript.h tooltip.h xombrero.cat1 xombrero.core JSFILES += hinting.js JSFILES += input-focus.js JSFILES += autoscroll.js .for _js in ${JSFILES} JSCURDIR += ${.CURDIR}/${_js} .endfor javascript.h: ${JSFILES} js-merge-helper.pl perl ${.CURDIR}/js-merge-helper.pl \ ${JSCURDIR} > javascript.h tooltip.h: ${MAN} ascii2txt.pl txt2tooltip.pl mandoc -Tascii ${.CURDIR}/${MAN} | \ perl ${.CURDIR}/ascii2txt.pl | \ perl ${.CURDIR}/txt2tooltip.pl > tooltip.h beforeinstall: install -m 755 -d ${PREFIX}/bin install -m 755 -d ${PREFIX}/man/man1/ install -m 755 -d ${PREFIX}/share/xombrero install -m 755 -d ${PREFIX}/share/applications install -m 644 ${.CURDIR}/xombrero.css ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/xombrero.desktop ${PREFIX}/share/applications install -m 644 ${.CURDIR}/xombreroicon16.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/xombreroicon32.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/xombreroicon48.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/xombreroicon64.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/xombreroicon128.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/xombreroicon256.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/favicon.ico ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/tld-rules ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/style.css ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/hsts-preload ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/user-agent-headers ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/http-accept-headers ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/torenabled.ico ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/tordisabled.ico ${PREFIX}/share/xombrero ${PROG} ${OBJS} beforedepend: javascript.h tooltip.h .include xombrero-1.6.4/README.md010064400017500000000000000026061247066410500136550ustar00dhillwheelxombrero ======== xombrero is a minimalist web browser with sophisticated security features designed-in, rather than through an add-on after-the-fact. In particular, it provides both persistent and per-session controls for scripts and cookies, making it easy to thwart tracking and scripting attacks. In additional to providing a familiar mouse-based interface like other web browsers, it offers a set of vi-like keyboard commands for users who prefer to keep their hands on their keyboard. The default settings provide a secure environment. With simple keyboard commands, the user can "whitelist" specific sites, allowing cookies and scripts from those sites. For more information, please visit https://opensource.conformal.com/wiki/xombrero ## GPG Verification Key All official release tags are signed by Conformal so users can ensure the code has not been tampered with and is coming from Conformal. To verify the signature perform the following: - Download the public key from the Conformal website at https://opensource.conformal.com/GIT-GPG-KEY-conformal.txt - Import the public key into your GPG keyring: ```bash gpg --import GIT-GPG-KEY-conformal.txt ``` - Verify the release tag with the following command where `TAG_NAME` is a placeholder for the specific tag: ```bash git tag -v TAG_NAME ``` ## License xombrero is ISC licensed unless otherwise specified in individual files xombrero-1.6.4/about.c010064400017500000000000001526511247066410500136620ustar00dhillwheel/* * Copyright (c) 2010, 2011 Marco Peereboom * Copyright (c) 2011 Stevan Andjelkovic * Copyright (c) 2010, 2011, 2012 Edd Barrett * Copyright (c) 2011 Todd T. Fries * Copyright (c) 2011 Raphael Graf * Copyright (c) 2011 Michal Mazurek * Copyright (c) 2012 Josh Rickmar * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include /* * xombrero "protocol" (xtp) * We use this for managing stuff like downloads and favorites. They * make magical HTML pages in memory which have xxxt:// links in order * to communicate with xombrero's internals. These links take the format: * xxxt://class/session_key/action/arg * * Don't begin xtp class/actions as 0. atoi returns that on error. * * Typically we have not put addition of items in this framework, as * adding items is either done via an ex-command or via a keybinding instead. */ #define XT_HTML_TAG "\n" #define XT_DOCTYPE "\n" #define XT_PAGE_STYLE "\n" int js_show_wl(struct tab *, struct karg *); int pl_show_wl(struct tab *, struct karg *); int https_show_wl(struct tab *, struct karg *); int xtp_page_set(struct tab *, struct karg *); int xtp_page_rt(struct tab *, struct karg *); int marco(struct tab *, struct karg *); int startpage(struct tab *, struct karg *); const char * marco_message(int *); void update_cookie_tabs(struct tab *apart_from); int about_webkit(struct tab *, struct karg *); int allthethings(struct tab *, struct karg *); /* * If you change the index of any of these, correct the * XT_XTP_TAB_MEANING_* macros in xombrero.h! */ struct about_type about_list[] = { { XT_URI_ABOUT_ABOUT, xtp_page_ab }, { XT_URI_ABOUT_ALLTHETHINGS, allthethings }, { XT_URI_ABOUT_BLANK, blank }, { XT_URI_ABOUT_CERTS, ca_cmd }, { XT_URI_ABOUT_COOKIEWL, cookie_show_wl }, { XT_URI_ABOUT_COOKIEJAR, xtp_page_cl }, { XT_URI_ABOUT_DOWNLOADS, xtp_page_dl }, { XT_URI_ABOUT_FAVORITES, xtp_page_fl }, { XT_URI_ABOUT_HELP, help }, { XT_URI_ABOUT_HISTORY, xtp_page_hl }, { XT_URI_ABOUT_JSWL, js_show_wl }, { XT_URI_ABOUT_SET, xtp_page_set }, { XT_URI_ABOUT_STATS, stats }, { XT_URI_ABOUT_MARCO, marco }, { XT_URI_ABOUT_STARTPAGE, startpage }, { XT_URI_ABOUT_PLUGINWL, pl_show_wl }, { XT_URI_ABOUT_HTTPS, https_show_wl }, { XT_URI_ABOUT_WEBKIT, about_webkit }, { XT_URI_ABOUT_SEARCH, xtp_page_sl }, { XT_URI_ABOUT_RUNTIME, xtp_page_rt }, { XT_URI_ABOUT_SECVIOLATION, NULL }, }; struct search_type { const char *name; const char *url; } search_list[] = { { "Google (SSL)", "https://encrypted.google.com/search?q=%s" }, { "Bing", "http://www.bing.com/search?q=%s" }, { "Yahoo", "http://search.yahoo.com/search?p=%s" }, { "DuckDuckGo", "https://duckduckgo.com/?q=%s" }, { "DuckDuckGo (HTML)", "https://duckduckgo.com/html?q=%s" }, { "DuckDuckGo (Lite)", "https://duckduckgo.com/lite?q=%s" }, { "Ixquick", "https://ixquick.com/do/search?q=%s" }, { "Startpage", "https://startpage.com/do/search?q=%s" }, }; /* * Session IDs. * We use these to prevent people putting xxxt:// URLs on * websites in the wild. We generate 8 bytes and represent in hex (16 chars) */ #define XT_XTP_SES_KEY_SZ 8 #define XT_XTP_SES_KEY_HEX_FMT \ "%02" PRIx8 "%02" PRIx8 "%02" PRIx8 "%02" PRIx8 "%02" PRIx8 "%02" PRIx8 "%02" PRIx8 "%02" PRIx8 int updating_fl_tabs = 0; int updating_dl_tabs = 0; int updating_hl_tabs = 0; int updating_cl_tabs = 0; int updating_sl_tabs = 0; int updating_sv_tabs = 0; int updating_set_tabs = 0; struct download_list downloads; size_t about_list_size(void) { return (LENGTH(about_list)); } gchar * get_html_page(gchar *title, gchar *body, gchar *head, bool addstyles) { gchar *r; r = g_strdup_printf(XT_DOCTYPE XT_HTML_TAG "\n" "%s\n" "%s" "%s" "\n" "\n" "

%s

\n" "%s\n\n" "", title, addstyles ? XT_PAGE_STYLE : "", head, title, body); return (r); } /* * Display a web page from a HTML string in memory, rather than from a URL */ void load_webkit_string(struct tab *t, const char *str, gchar *title, int nohist) { char file[PATH_MAX]; int i; if (g_signal_handler_is_connected(t->wv, t->progress_handle)) g_signal_handler_disconnect(t->wv, t->progress_handle); /* we set this to indicate we want to manually do navaction */ if (t->bfl && !nohist) { t->item = webkit_web_back_forward_list_get_current_item(t->bfl); if (t->item) g_object_ref(t->item); } t->xtp_meaning = XT_XTP_TAB_MEANING_NORMAL; if (title) { /* set t->xtp_meaning */ for (i = 0; i < LENGTH(about_list); i++) if (!strcmp(title, about_list[i].name)) { t->xtp_meaning = i; break; } webkit_web_view_load_string(t->wv, str, NULL, encoding, XT_XTP_STR); #if GTK_CHECK_VERSION(2, 20, 0) gtk_spinner_stop(GTK_SPINNER(t->spinner)); gtk_widget_hide(t->spinner); #endif snprintf(file, sizeof file, "%s" PS "%s", resource_dir, icons[0]); xt_icon_from_file(t, file); } if (t->xtp_meaning == XT_XTP_TAB_MEANING_NORMAL && t->session_key != NULL) { g_free(t->session_key); t->session_key = NULL; } t->progress_handle = g_signal_connect(t->wv, "notify::progress", G_CALLBACK(webview_progress_changed_cb), t); } int blank(struct tab *t, struct karg *args) { if (t == NULL) show_oops(NULL, "blank invalid parameters"); load_webkit_string(t, "", XT_URI_ABOUT_BLANK, 0); return (0); } int help(struct tab *t, struct karg *args) { char *page, *head, *body; if (t == NULL) show_oops(NULL, "help invalid parameters"); head = "" "\n"; body = "xombrero man page https://opensource.conformal.com/" "cgi-bin/man-cgi?xombrero"; page = get_html_page(XT_NAME, body, head, FALSE); load_webkit_string(t, page, XT_URI_ABOUT_HELP, 0); g_free(page); return (0); } int stats(struct tab *t, struct karg *args) { char *page, *body, *s, line[64 * 1024]; uint64_t line_count = 0; FILE *r_cookie_f; if (t == NULL) show_oops(NULL, "stats invalid parameters"); line[0] = '\0'; if (save_rejected_cookies) { if ((r_cookie_f = fopen(rc_fname, "r"))) { for (;;) { s = fgets(line, sizeof line, r_cookie_f); if (s == NULL || feof(r_cookie_f) || ferror(r_cookie_f)) break; line_count++; } fclose(r_cookie_f); snprintf(line, sizeof line, "
Cookies blocked(*) total: %" PRIu64, line_count); } else show_oops(t, "Can't open blocked cookies file: %s", strerror(errno)); } body = g_strdup_printf( "Cookies blocked(*) this session: %" PRIu64 "%s" "

* results vary based on settings

", blocked_cookies, line); page = get_html_page("Statistics", body, "", 0); g_free(body); load_webkit_string(t, page, XT_URI_ABOUT_STATS, 0); g_free(page); return (0); } void show_certs(struct tab *t, gnutls_x509_crt_t *certs, size_t cert_count, char *title) { gnutls_datum_t *cinfo; char *tmp, *body; int i; body = g_strdup(""); for (i = 0; i < cert_count; i++) { cinfo = gnutls_malloc(sizeof *cinfo); if (gnutls_x509_crt_print(certs[i], GNUTLS_CRT_PRINT_FULL, cinfo)) { gnutls_free(cinfo); g_free(body); return; } tmp = body; body = g_strdup_printf("%s

Cert #%d

%s
", body, i, cinfo->data); gnutls_free(cinfo); g_free(tmp); } tmp = get_html_page(title, body, "", 0); g_free(body); load_webkit_string(t, tmp, XT_URI_ABOUT_CERTS, 0); g_free(tmp); } int ca_cmd(struct tab *t, struct karg *args) { FILE *f = NULL; int rv = 1, certs_read; unsigned int certs = 0; struct stat sb; gnutls_datum_t dt; gnutls_x509_crt_t *c = NULL; char *certs_buf = NULL, *s; if ((f = fopen(ssl_ca_file, "r")) == NULL) { show_oops(t, "Can't open CA file: %s", ssl_ca_file); return (1); } if (fstat(fileno(f), &sb) == -1) { show_oops(t, "Can't stat CA file: %s", ssl_ca_file); goto done; } certs_buf = g_malloc(sb.st_size + 1); if (fread(certs_buf, 1, sb.st_size, f) != sb.st_size) { show_oops(t, "Can't read CA file: %s", strerror(errno)); goto done; } certs_buf[sb.st_size] = '\0'; s = certs_buf; while ((s = strstr(s, "BEGIN CERTIFICATE"))) { certs++; s += strlen("BEGIN CERTIFICATE"); } bzero(&dt, sizeof dt); dt.data = (unsigned char *)certs_buf; dt.size = sb.st_size; c = gnutls_malloc(sizeof(*c) * certs); certs_read = gnutls_x509_crt_list_import(c, &certs, &dt, GNUTLS_X509_FMT_PEM, 0); if (certs_read <= 0) { show_oops(t, "No cert(s) available"); goto done; } show_certs(t, c, certs_read, "Certificate Authority Certificates"); done: if (c) gnutls_free(c); if (certs_buf) g_free(certs_buf); if (f) fclose(f); return (rv); } int cookie_show_wl(struct tab *t, struct karg *args) { args->i = XT_SHOW | XT_WL_PERSISTENT | XT_WL_SESSION; wl_show(t, args, "Cookie White List", &c_wl); return (0); } int js_show_wl(struct tab *t, struct karg *args) { args->i = XT_SHOW | XT_WL_PERSISTENT | XT_WL_SESSION; wl_show(t, args, "JavaScript White List", &js_wl); return (0); } int cookie_cmd(struct tab *t, struct karg *args) { if (args->i & XT_SHOW) wl_show(t, args, "Cookie White List", &c_wl); else if (args->i & XT_WL_TOGGLE) { args->i |= XT_WL_RELOAD; toggle_cwl(t, args); } else if (args->i & XT_SAVE) { args->i |= XT_WL_RELOAD; wl_save(t, args, XT_WL_COOKIE); } else if (args->i & XT_DELETE) { remove_cookie_all(); update_cookie_tabs(NULL); } return (0); } int js_cmd(struct tab *t, struct karg *args) { if (args->i & XT_SHOW) wl_show(t, args, "JavaScript White List", &js_wl); else if (args->i & XT_SAVE) { args->i |= XT_WL_RELOAD; wl_save(t, args, XT_WL_JAVASCRIPT); } else if (args->i & XT_WL_TOGGLE) { args->i |= XT_WL_RELOAD; toggle_js(t, args); } else if (args->i & XT_DELETE) show_oops(t, "'js delete' currently unimplemented"); return (0); } int pl_show_wl(struct tab *t, struct karg *args) { args->i = XT_SHOW | XT_WL_PERSISTENT | XT_WL_SESSION; wl_show(t, args, "Plugin White List", &pl_wl); return (0); } int pl_cmd(struct tab *t, struct karg *args) { if (args->i & XT_SHOW) wl_show(t, args, "Plugin White List", &pl_wl); else if (args->i & XT_SAVE) { args->i |= XT_WL_RELOAD; wl_save(t, args, XT_WL_PLUGIN); } else if (args->i & XT_WL_TOGGLE) { args->i |= XT_WL_RELOAD; toggle_pl(t, args); } else if (args->i & XT_DELETE) show_oops(t, "'plugin delete' currently unimplemented"); return (0); } int https_show_wl(struct tab *t, struct karg *args) { args->i = XT_SHOW | XT_WL_PERSISTENT | XT_WL_SESSION; wl_show(t, args, "HTTPS Force List", &force_https); return (0); } int https_cmd(struct tab *t, struct karg *args) { if (args->i & XT_SHOW) wl_show(t, args, "HTTPS Force List", &force_https); else if (args->i & XT_SAVE) { args->i |= XT_WL_RELOAD; wl_save(t, args, XT_WL_HTTPS); } else if (args->i & XT_WL_TOGGLE) { args->i |= XT_WL_RELOAD; toggle_force_https(t, args); } else if (args->i & XT_DELETE) show_oops(t, "https delete' currently unimplemented"); return (0); } /* * cancel, remove, etc. downloads */ void xtp_handle_dl(struct tab *t, uint8_t cmd, int id, const char *query) { struct download find, *d = NULL; #ifndef __MINGW32__ char *file = NULL; const char *uri = NULL; #endif DNPRINTF(XT_D_DOWNLOAD, "download control: cmd %d, id %d\n", cmd, id); /* some commands require a valid download id */ if (cmd != XT_XTP_DL_LIST) { /* lookup download in question */ find.id = id; d = RB_FIND(download_list, &downloads, &find); if (d == NULL) { show_oops(t, "%s: no such download", __func__); return; } } /* decide what to do */ switch (cmd) { case XT_XTP_DL_START: /* our downloads always needs to be * restarted if called from here */ download_start(t, d, XT_DL_RESTART); break; case XT_XTP_DL_CANCEL: webkit_download_cancel(d->download); g_object_unref(d->download); RB_REMOVE(download_list, &downloads, d); break; case XT_XTP_DL_UNLINK: #ifdef __MINGW32__ /* XXX uri's aren't handled properly on windows? */ unlink(webkit_download_get_destination_uri(d->download)); #else uri = webkit_download_get_destination_uri(d->download); if ((file = g_filename_from_uri(uri, NULL, NULL)) != NULL) { unlink(file); g_free(file); } #endif /* FALLTHROUGH */ case XT_XTP_DL_REMOVE: webkit_download_cancel(d->download); /* just incase */ g_object_unref(d->download); RB_REMOVE(download_list, &downloads, d); break; case XT_XTP_DL_LIST: /* Nothing */ break; default: show_oops(t, "%s: unknown command", __func__); break; }; xtp_page_dl(t, NULL); } void xtp_handle_hl(struct tab *t, uint8_t cmd, int id, const char *query) { struct history *h, *next, *ht; int i = 1; switch (cmd) { case XT_XTP_HL_REMOVE: /* walk backwards, as listed in reverse */ for (h = RB_MAX(history_list, &hl); h != NULL; h = next) { next = RB_PREV(history_list, &hl, h); if (id == i) { RB_REMOVE(history_list, &hl, h); g_free((gpointer) h->title); g_free((gpointer) h->uri); g_free(h); break; } i++; } break; case XT_XTP_HL_REMOVE_ALL: RB_FOREACH_SAFE(h, history_list, &hl, ht) RB_REMOVE(history_list, &hl, h); break; case XT_XTP_HL_LIST: /* Nothing - just xtp_page_hl() below */ break; default: show_oops(t, "%s: unknown command", __func__); break; }; xtp_page_hl(t, NULL); } /* remove a favorite */ void remove_favorite(struct tab *t, int index) { char file[PATH_MAX], *title, *uri = NULL; char *new_favs, *tmp; FILE *f; int i; size_t len, lineno; /* open favorites */ snprintf(file, sizeof file, "%s" PS "%s", work_dir, XT_FAVS_FILE); if ((f = fopen(file, "r")) == NULL) { show_oops(t, "%s: can't open favorites: %s", __func__, strerror(errno)); return; } /* build a string which will become the new favorites file */ new_favs = g_strdup(""); for (i = 1;;) { if ((title = fparseln(f, &len, &lineno, NULL, 0)) == NULL) if (feof(f) || ferror(f)) break; /* XXX THIS IS NOT THE RIGHT HEURISTIC */ if (len == 0) { free(title); title = NULL; continue; } if ((uri = fparseln(f, &len, &lineno, NULL, 0)) == NULL) { if (feof(f) || ferror(f)) { show_oops(t, "%s: can't parse favorites %s", __func__, strerror(errno)); goto clean; } } /* as long as this isn't the one we are deleting add to file */ if (i != index) { tmp = new_favs; new_favs = g_strdup_printf("%s%s\n%s\n", new_favs, title, uri); g_free(tmp); } free(uri); uri = NULL; free(title); title = NULL; i++; } fclose(f); /* write back new favorites file */ if ((f = fopen(file, "w")) == NULL) { show_oops(t, "%s: can't open favorites: %s", __func__, strerror(errno)); goto clean; } if (fwrite(new_favs, strlen(new_favs), 1, f) != 1) show_oops(t, "%s: can't fwrite", __func__); fclose(f); clean: if (uri) free(uri); if (title) free(title); g_free(new_favs); } int add_favorite(struct tab *t, struct karg *args) { char file[PATH_MAX]; FILE *f; char *line = NULL; size_t urilen, linelen; gchar *argtitle = NULL; const gchar *uri, *title; if (t == NULL) return (1); /* don't allow adding of xtp pages to favorites */ if (t->xtp_meaning != XT_XTP_TAB_MEANING_NORMAL) { show_oops(t, "%s: can't add xtp pages to favorites", __func__); return (1); } snprintf(file, sizeof file, "%s" PS "%s", work_dir, XT_FAVS_FILE); if ((f = fopen(file, "r+")) == NULL) { show_oops(t, "Can't open favorites file: %s", strerror(errno)); return (1); } if (args->s && strlen(g_strstrip(args->s))) argtitle = html_escape(g_strstrip(args->s)); title = argtitle ? argtitle : get_title(t, FALSE); uri = get_uri(t); if (title == NULL || uri == NULL) { show_oops(t, "can't add page to favorites"); goto done; } urilen = strlen(uri); for (;;) { if ((line = fparseln(f, &linelen, NULL, NULL, 0)) == NULL) { if (feof(f)) break; else { show_oops(t, "Error reading favorites file: %s", strerror(errno)); goto done; } } if (linelen == urilen && !strcmp(line, uri)) goto done; free(line); line = NULL; } fprintf(f, "\n%s\n%s", title, uri); done: if (argtitle) g_free(argtitle); if (line) free(line); fclose(f); update_favorite_tabs(NULL); return (0); } char * search_engine_add(char *body, const char *name, const char *url, const char *key, int select) { char *b = body; body = g_strdup_printf("%s" "%s" "%s" "" "[ Select ]" "\n", body, name, url, XT_XTP_STR, XT_XTP_SL, key, XT_XTP_SL_SET, select); g_free(b); return (body); } void xtp_handle_ab(struct tab *t, uint8_t cmd, int arg, const char *query) { char config[PATH_MAX]; char *cmdstr; char **sv; switch (cmd) { case XT_XTP_AB_EDIT_CONF: if (external_editor == NULL || strlen(external_editor) == 0) { show_oops(t, "external_editor is unset"); break; } snprintf(config, sizeof config, "%s" PS ".%s", pwd->pw_dir, XT_CONF_FILE); sv = g_strsplit(external_editor, "", -1); cmdstr = g_strjoinv(config, sv); g_strfreev(sv); sv = g_strsplit_set(cmdstr, " \t", -1); if (!g_spawn_async(NULL, sv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL)) show_oops(t, "%s: could not spawn process", __func__); g_strfreev(sv); g_free(cmdstr); break; default: show_oops(t, "%s, invalid about command", __func__); break; }; xtp_page_ab(t, NULL); } void xtp_handle_fl(struct tab *t, uint8_t cmd, int arg, const char *query) { struct karg args = {0}; switch (cmd) { case XT_XTP_FL_LIST: /* nothing, just the below call to xtp_page_fl() */ break; case XT_XTP_FL_REMOVE: remove_favorite(t, arg); args.i = XT_DELETE; break; default: show_oops(t, "%s: invalid favorites command", __func__); break; }; xtp_page_fl(t, &args); } void xtp_handle_cl(struct tab *t, uint8_t cmd, int arg, const char *query) { switch (cmd) { case XT_XTP_CL_LIST: /* nothing, just xtp_page_cl() */ break; case XT_XTP_CL_REMOVE: remove_cookie(arg); break; case XT_XTP_CL_REMOVE_DOMAIN: remove_cookie_domain(arg); break; case XT_XTP_CL_REMOVE_ALL: remove_cookie_all(); break; default: show_oops(t, "%s: unknown cookie xtp command", __func__); break; }; xtp_page_cl(t, NULL); } void xtp_handle_sl(struct tab *t, uint8_t cmd, int arg, const char *query) { const char *search; char *enc_search, *uri; char **sv; switch (cmd) { case XT_XTP_SL_SET: set_search_string((char *)search_list[arg].url); if (save_runtime_setting("search_string", search_list[arg].url)) show_oops(t, "could not set search_string in runtime"); break; default: show_oops(t, "%s: unknown search xtp command", __func__); break; }; search = gtk_entry_get_text(GTK_ENTRY(t->search_entry)); /* static */ enc_search = soup_uri_encode(search, XT_RESERVED_CHARS); sv = g_strsplit(search_string, "%s", 2); uri = g_strjoinv(enc_search, sv); load_uri(t, uri); g_free(enc_search); g_strfreev(sv); g_free(uri); } void xtp_handle_sv(struct tab *t, uint8_t cmd, int id, const char *query) { SoupURI *soupuri = NULL; struct karg args = {0}; struct secviolation find, *sv; find.xtp_arg = id; if ((sv = RB_FIND(secviolation_list, &svl, &find)) == NULL) return; args.ptr = (void *)sv->t; args.s = sv->uri; switch (cmd) { case XT_XTP_SV_SHOW_NEW_CERT: args.i = XT_SHOW; if (cert_cmd(t, &args)) { xtp_page_sv(t, &args); return; } break; case XT_XTP_SV_SHOW_CACHED_CERT: args.i = XT_CACHE | XT_SHOW; if (cert_cmd(t, &args)) { xtp_page_sv(t, &args); return; } break; case XT_XTP_SV_ALLOW_SESSION: soupuri = soup_uri_new(sv->uri); wl_add(soupuri->host, &svil, 0); load_uri(t, sv->uri); focus_webview(t); break; case XT_XTP_SV_CACHE: args.i = XT_CACHE; if (cert_cmd(t, &args)) { xtp_page_sv(t, &args); return; } load_uri(t, sv->uri); focus_webview(t); break; default: show_oops(t, "%s: invalid secviolation command", __func__); break; }; g_free(sv->uri); if (soupuri) soup_uri_free(soupuri); RB_REMOVE(secviolation_list, &svl, sv); } void xtp_handle_rt(struct tab *t, uint8_t cmd, int id, const char *query) { struct set_reject *sr; GHashTable *new_settings = NULL; int modify; char *val, *curval, *s; int i = 0; switch (cmd) { case XT_XTP_RT_SAVE: if (query == NULL) break; new_settings = soup_form_decode(query); for (i = 0; i < get_settings_size(); ++i) { if (!rs[i].activate) continue; val = (char *)g_hash_table_lookup(new_settings, rs[i].name); modify = 0; switch (rs[i].type) { case XT_S_INT: /* FALLTHROUGH */ case XT_S_BOOL: if (atoi(val) != *rs[i].ival) modify = 1; break; case XT_S_DOUBLE: if (atof(val) < (*rs[i].dval - 0.0001) || atof(val) > (*rs[i].dval + 0.0001)) modify = 1; break; case XT_S_STR: s = (rs[i].sval == NULL || *rs[i].sval == NULL) ? "" : *rs[i].sval; if (rs[i].sval && g_strcmp0(val, s)) modify = 1; else if (rs[i].s && rs[i].s->get) { curval = rs[i].s->get(NULL); if (g_strcmp0(val, curval)) modify = 1; g_free(curval); } break; case XT_S_INVALID: /* FALLTHROUGH */ default: break; } if (rs[i].activate(val)) { sr = g_malloc(sizeof *sr); sr->name = g_strdup(rs[i].name); sr->value = g_strdup(val); TAILQ_INSERT_TAIL(&srl, sr, entry); continue; } if (modify) if (save_runtime_setting(rs[i].name, val)) show_oops(t, "error"); } break; default: show_oops(t, "%s: invalid set command", __func__); break; } if (new_settings) g_hash_table_destroy(new_settings); xtp_page_rt(t, NULL); } /* link an XTP class to it's session key and handler function */ struct xtp_despatch { uint8_t xtp_class; void (*handle_func)(struct tab *, uint8_t, int, const char *query); }; struct xtp_despatch xtp_despatches[] = { { XT_XTP_DL, xtp_handle_dl }, { XT_XTP_HL, xtp_handle_hl }, { XT_XTP_FL, xtp_handle_fl }, { XT_XTP_CL, xtp_handle_cl }, { XT_XTP_SL, xtp_handle_sl }, { XT_XTP_AB, xtp_handle_ab }, { XT_XTP_SV, xtp_handle_sv }, { XT_XTP_RT, xtp_handle_rt }, { XT_XTP_INVALID, NULL } }; /* * generate a session key to secure xtp commands. * pass in a ptr to the key in question and it will * be modified in place. */ void generate_xtp_session_key(char **key) { uint8_t rand_bytes[XT_XTP_SES_KEY_SZ]; if (key == NULL) return; /* free old key */ if (*key != NULL) g_free(*key); /* make a new one */ arc4random_buf(rand_bytes, XT_XTP_SES_KEY_SZ); *key = g_strdup_printf(XT_XTP_SES_KEY_HEX_FMT, rand_bytes[0], rand_bytes[1], rand_bytes[2], rand_bytes[3], rand_bytes[4], rand_bytes[5], rand_bytes[6], rand_bytes[7]); DNPRINTF(XT_D_DOWNLOAD, "%s: new session key '%s'\n", __func__, *key); } /* * validate a xtp session key. * return (1) if OK */ int validate_xtp_session_key(struct tab *t, char *key) { if (t == NULL || t->session_key == NULL || key == NULL) return (0); if (strcmp(t->session_key, key) != 0) { show_oops(t, "%s: xtp session key mismatch possible spoof", __func__); return (0); } return (1); } /* * is the url xtp protocol? (xxxt://) * if so, parse and despatch correct bahvior */ int parse_xtp_url(struct tab *t, const char *uri_str) { SoupURI *uri = NULL; struct xtp_despatch *dsp, *dsp_match = NULL; int ret = FALSE; int class = 0; char **sv = NULL; /* * uri->host = class * sv[0] = session key * sv[1] = command * sv[2] = optional argument */ DNPRINTF(XT_D_URL, "%s: url %s\n", __func__, uri_str); if ((uri = soup_uri_new(uri_str)) == NULL) goto clean; if (strncmp(uri->scheme, XT_XTP_SCHEME, strlen(XT_XTP_SCHEME))) goto clean; if (uri->host == NULL || strlen(uri->host) == 0) goto clean; if ((sv = g_strsplit(uri->path + 1, "/", 3)) == NULL) goto clean; if (sv[0] == NULL || sv[1] == NULL) goto clean; dsp = xtp_despatches; class = atoi(uri->host); while (dsp->xtp_class) { if (dsp->xtp_class == class) { dsp_match = dsp; break; } dsp++; } /* did we find one atall? */ if (dsp_match == NULL) { show_oops(t, "%s: no matching xtp despatch found", __func__); goto clean; } /* check session key and call despatch function */ if (validate_xtp_session_key(t, sv[0])) { ret = TRUE; /* all is well, this was a valid xtp request */ if (sv[2]) dsp_match->handle_func(t, atoi(sv[1]), atoi(sv[2]), uri->query); else dsp_match->handle_func(t, atoi(sv[1]), 0, uri->query); } clean: if (uri) soup_uri_free(uri); if (sv) g_strfreev(sv); return (ret); } /* * update all favorite tabs apart from one. Pass NULL if * you want to update all. */ void update_favorite_tabs(struct tab *apart_from) { struct tab *t; if (!updating_fl_tabs) { updating_fl_tabs = 1; /* stop infinite recursion */ TAILQ_FOREACH(t, &tabs, entry) if ((t->xtp_meaning == XT_XTP_TAB_MEANING_FL) && (t != apart_from)) xtp_page_fl(t, NULL); updating_fl_tabs = 0; } } /* * update all download tabs apart from one. Pass NULL if * you want to update all. */ void update_download_tabs(struct tab *apart_from) { struct tab *t; if (!updating_dl_tabs) { updating_dl_tabs = 1; /* stop infinite recursion */ TAILQ_FOREACH(t, &tabs, entry) if ((t->xtp_meaning == XT_XTP_TAB_MEANING_DL) && (t != apart_from)) xtp_page_dl(t, NULL); updating_dl_tabs = 0; } } /* * update all cookie tabs apart from one. Pass NULL if * you want to update all. */ void update_cookie_tabs(struct tab *apart_from) { struct tab *t; if (!updating_cl_tabs) { updating_cl_tabs = 1; /* stop infinite recursion */ TAILQ_FOREACH(t, &tabs, entry) if ((t->xtp_meaning == XT_XTP_TAB_MEANING_CL) && (t != apart_from)) xtp_page_cl(t, NULL); updating_cl_tabs = 0; } } /* * update all history tabs apart from one. Pass NULL if * you want to update all. */ void update_history_tabs(struct tab *apart_from) { struct tab *t; if (!updating_hl_tabs) { updating_hl_tabs = 1; /* stop infinite recursion */ TAILQ_FOREACH(t, &tabs, entry) if ((t->xtp_meaning == XT_XTP_TAB_MEANING_HL) && (t != apart_from)) xtp_page_hl(t, NULL); updating_hl_tabs = 0; } } /* * update all search tabs apart from one. Pass NULL if * you want to update all. */ void update_search_tabs(struct tab *apart_from) { struct tab *t; if (!updating_sl_tabs) { updating_sl_tabs = 1; /* stop infinite recursion */ TAILQ_FOREACH(t, &tabs, entry) if ((t->xtp_meaning == XT_XTP_TAB_MEANING_SL) && (t != apart_from)) xtp_page_sl(t, NULL); updating_sl_tabs = 0; } } int xtp_page_ab(struct tab *t, struct karg *args) { char *page, *body; if (t == NULL) { show_oops(NULL, "about invalid parameters"); return (-1); } generate_xtp_session_key(&t->session_key); body = g_strdup_printf("Version: %s" #ifdef XOMBRERO_BUILDSTR "
Build: %s" #endif "
WebKit: %d.%d.%d" "
User Agent: %d.%d" #ifdef WEBKITGTK_API_VERSION "
WebKit API: %.1f" #endif "
Configuration: %s" PS ".%s" " (remember to restart the browser after any changes)" "

" "Authors:" "

    " "
  • Marco Peereboom <marco@peereboom.us>
  • " "
  • Stevan Andjelkovic <stevan@student.chalmers.se>
  • " "
  • Edd Barrett <vext01@gmail.com>
  • " "
  • Todd T. Fries <todd@fries.net>
  • " "
  • Raphael Graf <r@undefined.ch>
  • " "
  • Michal Mazurek <akfaew@jasminek.net>
  • " "
  • Josh Rickmar <jrick@devio.us>
  • " "
  • David Hill <dhill@mindcry.org>
  • " "
" "Copyrights and licenses can be found on the xombrero " "website" "

", #ifdef XOMBRERO_BUILDSTR version, XOMBRERO_BUILDSTR, #else version, #endif WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION, WEBKIT_MICRO_VERSION, WEBKIT_USER_AGENT_MAJOR_VERSION, WEBKIT_USER_AGENT_MINOR_VERSION #ifdef WEBKITGTK_API_VERSION ,WEBKITGTK_API_VERSION #endif ,pwd->pw_dir, XT_XTP_STR, XT_XTP_AB, t->session_key ? t->session_key : "", XT_XTP_AB_EDIT_CONF, XT_CONF_FILE ); page = get_html_page("About", body, "", 0); g_free(body); load_webkit_string(t, page, XT_URI_ABOUT_ABOUT, 0); g_free(page); return (0); } /* show a list of favorites (bookmarks) */ int xtp_page_fl(struct tab *t, struct karg *args) { char file[PATH_MAX]; FILE *f; char *uri = NULL, *title = NULL; size_t len, lineno = 0; int i, failed = 0; char *body, *tmp, *page = NULL; const char delim[3] = {'\\', '\\', '\0'}; DNPRINTF(XT_D_FAVORITE, "%s:", __func__); if (t == NULL) { show_oops(NULL, "%s: bad param", __func__); return (-1); } generate_xtp_session_key(&t->session_key); /* open favorites */ snprintf(file, sizeof file, "%s" PS "%s", work_dir, XT_FAVS_FILE); if ((f = fopen(file, "r")) == NULL) { show_oops(t, "Can't open favorites file: %s", strerror(errno)); return (1); } /* body */ if (args && args->i & XT_DELETE) body = g_strdup_printf("" "" "\n"); else body = g_strdup_printf("
#LinkRm
" "\n"); for (i = 1;;) { if ((title = fparseln(f, &len, &lineno, delim, 0)) == NULL) break; if (strlen(title) == 0) { free(title); title = NULL; continue; } if ((uri = fparseln(f, &len, &lineno, delim, 0)) == NULL) if (feof(f) || ferror(f)) { show_oops(t, "favorites file corrupt"); failed = 1; break; } tmp = body; if (args && args->i & XT_DELETE) body = g_strdup_printf("%s" "" "" "" "\n", body, i, uri, title, XT_XTP_STR, XT_XTP_FL, t->session_key ? t->session_key : "", XT_XTP_FL_REMOVE, i); else body = g_strdup_printf("%s" "" "" "\n", body, i, uri, title); g_free(tmp); free(uri); uri = NULL; free(title); title = NULL; i++; } fclose(f); /* if none, say so */ if (i == 1) { tmp = body; body = g_strdup_printf("%s" "", body, (args && args->i & XT_DELETE) ? 3 : 2); g_free(tmp); } tmp = body; body = g_strdup_printf("%s
#Link
%d%s" "X
%d%s
" "No favorites - To add one use the 'favadd' command." "
", body); g_free(tmp); if (uri) free(uri); if (title) free(title); /* render */ if (!failed) { page = get_html_page("Favorites", body, "", 1); load_webkit_string(t, page, XT_URI_ABOUT_FAVORITES, 0); g_free(page); } update_favorite_tabs(t); if (body) g_free(body); return (failed); } /* * Return a new string with a download row (in html) * appended. Old string is freed. */ char * xtp_page_dl_row(struct tab *t, char *html, struct download *dl) { WebKitDownloadStatus stat; const gchar *destination; gchar *d; char *status_html = NULL, *cmd_html = NULL, *new_html; gdouble progress; char cur_sz[FMT_SCALED_STRSIZE]; char tot_sz[FMT_SCALED_STRSIZE]; char *xtp_prefix; DNPRINTF(XT_D_DOWNLOAD, "%s: dl->id %d\n", __func__, dl->id); /* All actions wil take this form: * xxxt://class/seskey */ xtp_prefix = g_strdup_printf("%s%d/%s/", XT_XTP_STR, XT_XTP_DL, t->session_key); stat = webkit_download_get_status(dl->download); switch (stat) { case WEBKIT_DOWNLOAD_STATUS_FINISHED: status_html = g_strdup_printf("Finished"); cmd_html = g_strdup_printf( "Remove / Unlink", xtp_prefix, XT_XTP_DL_REMOVE, dl->id, xtp_prefix, XT_XTP_DL_UNLINK, dl->id); break; case WEBKIT_DOWNLOAD_STATUS_STARTED: /* gather size info */ progress = 100 * webkit_download_get_progress(dl->download); fmt_scaled( webkit_download_get_current_size(dl->download), cur_sz); fmt_scaled( webkit_download_get_total_size(dl->download), tot_sz); status_html = g_strdup_printf( "
" "
" "
" "
" "
%s of %s (%.2f%%)
", progress, cur_sz, tot_sz, progress); cmd_html = g_strdup_printf("Cancel", xtp_prefix, XT_XTP_DL_CANCEL, dl->id); break; /* LLL */ case WEBKIT_DOWNLOAD_STATUS_CANCELLED: status_html = g_strdup_printf("Cancelled"); cmd_html = g_strdup_printf( "Restart / Remove / Unlink", xtp_prefix, XT_XTP_DL_START, dl->id, xtp_prefix, XT_XTP_DL_REMOVE, dl->id, xtp_prefix, XT_XTP_DL_UNLINK, dl->id); break; case WEBKIT_DOWNLOAD_STATUS_ERROR: status_html = g_strdup_printf("Error!"); cmd_html = g_strdup_printf( "Restart / Remove / Unlink", xtp_prefix, XT_XTP_DL_START, dl->id, xtp_prefix, XT_XTP_DL_REMOVE, dl->id, xtp_prefix, XT_XTP_DL_UNLINK, dl->id); break; case WEBKIT_DOWNLOAD_STATUS_CREATED: cmd_html = g_strdup_printf("Start / Cancel", xtp_prefix, XT_XTP_DL_START, dl->id, xtp_prefix, XT_XTP_DL_CANCEL, dl->id); status_html = g_strdup_printf("Created"); break; default: show_oops(t, "%s: unknown download status", __func__); }; destination = webkit_download_get_destination_uri(dl->download); /* we might not have a destination set yet */ if (!destination) destination = webkit_download_get_suggested_filename(dl->download); d = g_strdup(destination); /* copy for basename */ new_html = g_strdup_printf( "%s\n%s%s" "%s\n", html, basename(d), status_html, cmd_html); g_free(d); g_free(html); if (status_html) g_free(status_html); if (cmd_html) g_free(cmd_html); g_free(xtp_prefix); return new_html; } /* cookie management XTP page */ int xtp_page_cl(struct tab *t, struct karg *args) { char *body, *page, *tmp; int i = 1; /* all ids start 1 */ int domain_id = 0; GSList *sc, *pc, *pc_start; SoupCookie *c; char *type, *table_headers, *last_domain; DNPRINTF(XT_D_CMD, "%s", __func__); if (t == NULL) { show_oops(NULL, "%s invalid parameters", __func__); return (1); } generate_xtp_session_key(&t->session_key); /* table headers */ table_headers = g_strdup_printf("" "" "" "" "" "" "" "" "\n"); sc = soup_cookie_jar_all_cookies(s_cookiejar); pc = soup_cookie_jar_all_cookies(p_cookiejar); pc_start = pc; body = g_strdup_printf("\n", XT_XTP_STR, XT_XTP_CL, t->session_key, XT_XTP_CL_REMOVE_ALL); last_domain = g_strdup(""); for (; sc; sc = sc->next) { c = sc->data; if (strcmp(last_domain, c->domain) != 0) { /* new domain */ domain_id ++; g_free(last_domain); last_domain = g_strdup(c->domain); if (body != NULL) { tmp = body; body = g_strdup_printf("%s
TypeNameValuePathExpiresSecureHTTP
only
Rm
" "

%s

%s\n", body, c->domain, XT_XTP_STR, XT_XTP_CL, t->session_key, XT_XTP_CL_REMOVE_DOMAIN, domain_id, table_headers); g_free(tmp); } else { /* first domain */ body = g_strdup_printf("

%s

" "%s\n", c->domain, XT_XTP_STR, XT_XTP_CL, t->session_key, XT_XTP_CL_REMOVE_DOMAIN, domain_id, table_headers); } } type = "Session"; for (pc = pc_start; pc; pc = pc->next) if (soup_cookie_equal(pc->data, c)) { type = "Session + Persistent"; break; } tmp = body; body = g_strdup_printf( "%s\n" "%s" "%s" "" " " "" "%s" "%s" "%d" "%d" "" "X\n", body, type, c->name, c->value, c->path, c->expires ? soup_date_to_string(c->expires, SOUP_DATE_COOKIE) : "", c->secure, c->http_only, XT_XTP_STR, XT_XTP_CL, t->session_key, XT_XTP_CL_REMOVE, i ); g_free(tmp); i++; } soup_cookies_free(sc); soup_cookies_free(pc); /* small message if there are none */ if (i == 1) { body = g_strdup_printf("%s\nNo Cookies\n", table_headers); } tmp = body; body = g_strdup_printf("%s", body); g_free(tmp); page = get_html_page("Cookie Jar", body, "", TRUE); g_free(body); g_free(table_headers); g_free(last_domain); load_webkit_string(t, page, XT_URI_ABOUT_COOKIEJAR, 0); update_cookie_tabs(t); g_free(page); return (0); } int xtp_page_hl(struct tab *t, struct karg *args) { char *body, *page, *tmp; struct history *h; int i = 1; /* all ids start 1 */ DNPRINTF(XT_D_CMD, "%s", __func__); if (t == NULL) { show_oops(NULL, "%s invalid parameters", __func__); return (1); } generate_xtp_session_key(&t->session_key); /* body */ body = g_strdup_printf("" "" "" "\n", XT_XTP_STR, XT_XTP_HL, t->session_key, XT_XTP_HL_REMOVE_ALL); RB_FOREACH_REVERSE(h, history_list, &hl) { tmp = body; body = g_strdup_printf( "%s\n" "" "" "" "\n", body, h->uri, h->uri, h->title, ctime(&h->time), XT_XTP_STR, XT_XTP_HL, t->session_key, XT_XTP_HL_REMOVE, i); g_free(tmp); i++; } /* small message if there are none */ if (i == 1) { tmp = body; body = g_strdup_printf("%s\n\n", body); g_free(tmp); } tmp = body; body = g_strdup_printf("%s
URITitleLast visitedRm
%s%s%s" "X
No History
", body); g_free(tmp); page = get_html_page("History", body, "", TRUE); g_free(body); /* * update all history manager tabs as the xtp session * key has now changed. No need to update the current tab. * Already did that above. */ update_history_tabs(t); load_webkit_string(t, page, XT_URI_ABOUT_HISTORY, 0); g_free(page); return (0); } /* * Generate a web page detailing the status of any downloads */ int xtp_page_dl(struct tab *t, struct karg *args) { struct download *dl; char *body, *page, *tmp; char *ref; int n_dl = 1; DNPRINTF(XT_D_DOWNLOAD, "%s", __func__); if (t == NULL) { show_oops(NULL, "%s invalid parameters", __func__); return (1); } generate_xtp_session_key(&t->session_key); /* header - with refresh so as to update */ if (refresh_interval >= 1) ref = g_strdup_printf( "\n", refresh_interval, XT_XTP_STR, XT_XTP_DL, t->session_key, XT_XTP_DL_LIST); else ref = g_strdup(""); body = g_strdup_printf("
" "

\n\n[ Refresh Downloads ]\n" "

\n\n", XT_XTP_STR, XT_XTP_DL, t->session_key, XT_XTP_DL_LIST); RB_FOREACH_REVERSE(dl, download_list, &downloads) { body = xtp_page_dl_row(t, body, dl); n_dl++; } /* message if no downloads in list */ if (n_dl == 1) { tmp = body; body = g_strdup_printf("%s\n\n", body); g_free(tmp); } tmp = body; body = g_strdup_printf("%s
" "FileProgressCommand
" "No downloads
", body); g_free(tmp); page = get_html_page("Downloads", body, ref, 1); g_free(ref); g_free(body); /* * update all download manager tabs as the xtp session * key has now changed. No need to update the current tab. * Already did that above. */ update_download_tabs(t); load_webkit_string(t, page, XT_URI_ABOUT_DOWNLOADS, 0); g_free(page); return (0); } int xtp_page_sl(struct tab *t, struct karg *args) { int i; char *page, *body, *tmp; DNPRINTF(XT_D_SEARCH, "%s", __func__); generate_xtp_session_key(&t->session_key); if (t == NULL) { show_oops(NULL, "%s invalid parameters", __func__); return (1); } body = g_strdup_printf("

The xombrero authors will not choose a " "default search engine for you. What follows is a list of search " "engines (in no particular order) you may be interested in. " "To permanently choose a search engine, click [ Select ] to save " "search_string as a runtime setting, or set " "search_string to the appropriate URL in your xombrero " "configuration.

"); tmp = body; body = g_strdup_printf("%s\n" "" "\n", body); g_free(tmp); for (i = 0; i < (sizeof search_list / sizeof (struct search_type)); ++i) body = search_engine_add(body, search_list[i].name, search_list[i].url, t->session_key, i); tmp = body; body = g_strdup_printf("%s
NameURLSelect
", body); g_free(tmp); page = get_html_page("Choose a search engine", body, "", 1); g_free(body); /* * update all search tabs as the xtp session key has now changed. No * need to update the current tab. Already did that above. */ update_search_tabs(t); load_webkit_string(t, page, XT_URI_ABOUT_SEARCH, 0); g_free(page); return (0); } int xtp_page_sv(struct tab *t, struct karg *args) { SoupURI *soupuri; static int arg = 0; struct secviolation find, *sv; char *page, *body; if (t == NULL) { show_oops(NULL, "secviolation invalid parameters"); return (-1); } generate_xtp_session_key(&t->session_key); if (args == NULL) { find.xtp_arg = t->xtp_arg; sv = RB_FIND(secviolation_list, &svl, &find); if (sv == NULL) return (-1); } else { sv = g_malloc(sizeof(struct secviolation)); sv->xtp_arg = ++arg; t->xtp_arg = arg; sv->t = t; sv->uri = args->s; RB_INSERT(secviolation_list, &svl, sv); } if (sv->uri == NULL || (soupuri = soup_uri_new(sv->uri)) == NULL) return (-1); body = g_strdup_printf( "

You tried to access %s." "

The site's security certificate has been modified." "

The domain of the page you have tried to access, %s, " "has a different remote certificate then the local cached version " "from a previous visit. As a security precaution to help prevent " "against man-in-the-middle attacks, please choose one of the " "following actions to continue, or disable the " "warn_cert_changes setting in your xombrero " "configuration." "

Choose an action:" "
Allow for this session" "
Cache new certificate" "
Show cached certificate" "
Show new certificate", sv->uri, soupuri->host, XT_XTP_STR, XT_XTP_SV, t->session_key, XT_XTP_SV_ALLOW_SESSION, sv->xtp_arg, XT_XTP_STR, XT_XTP_SV, t->session_key, XT_XTP_SV_CACHE, sv->xtp_arg, XT_XTP_STR, XT_XTP_SV, t->session_key, XT_XTP_SV_SHOW_CACHED_CERT, sv->xtp_arg, XT_XTP_STR, XT_XTP_SV, t->session_key, XT_XTP_SV_SHOW_NEW_CERT, sv->xtp_arg); page = get_html_page("Security Violation", body, "", 0); g_free(body); load_webkit_string(t, page, XT_URI_ABOUT_SECVIOLATION, 1); g_free(page); if (soupuri) soup_uri_free(soupuri); return (0); } int startpage(struct tab *t, struct karg *args) { char *page, *body, *b; struct sp *s; if (t == NULL) show_oops(NULL, "startpage invalid parameters"); body = g_strdup_printf("Startup Exception(s):

"); TAILQ_FOREACH(s, &spl, entry) { b = body; body = g_strdup_printf("%s%s
", body, s->line); g_free(b); } page = get_html_page("Startup Exception", body, "", 0); g_free(body); load_webkit_string(t, page, XT_URI_ABOUT_STARTPAGE, 0); g_free(page); return (0); } void startpage_add(const char *fmt, ...) { va_list ap; char *msg; struct sp *s; if (fmt == NULL) return; va_start(ap, fmt); if ((msg = g_strdup_vprintf(fmt, ap)) == NULL) errx(1, "startpage_add failed"); va_end(ap); s = g_malloc0(sizeof *s); s->line = msg; TAILQ_INSERT_TAIL(&spl, s, entry); } gchar *show_g_object_settings(GObject *, char *, int); char * xt_g_object_serialize(GValue *value, const gchar *tname, char *str, int recurse) { int typeno = 0; char *valstr, *tmpstr, *tmpsettings; GObject *object; typeno = G_TYPE_FUNDAMENTAL( G_VALUE_TYPE(value) ); switch ( typeno ) { case G_TYPE_ENUM: valstr = g_strdup_printf("%d", g_value_get_enum(value)); break; case G_TYPE_CHAR: valstr = g_strdup_printf("%c", #if GLIB_CHECK_VERSION(2, 32, 0) g_value_get_schar(value)); #else g_value_get_char(value)); #endif break; case G_TYPE_UCHAR: valstr = g_strdup_printf("%c", g_value_get_uchar(value)); break; case G_TYPE_LONG: valstr = g_strdup_printf("%ld", g_value_get_long(value)); break; case G_TYPE_ULONG: valstr = g_strdup_printf("%ld", g_value_get_ulong(value)); break; case G_TYPE_INT: valstr = g_strdup_printf("%d", g_value_get_int(value)); break; case G_TYPE_INT64: valstr = g_strdup_printf("%" PRIo64, (int64_t) g_value_get_int64(value)); break; case G_TYPE_UINT: valstr = g_strdup_printf("%d", g_value_get_uint(value)); break; case G_TYPE_UINT64: valstr = g_strdup_printf("%" PRIu64, (uint64_t) g_value_get_uint64(value)); break; case G_TYPE_FLAGS: valstr = g_strdup_printf("0x%x", g_value_get_flags(value)); break; case G_TYPE_BOOLEAN: valstr = g_strdup_printf("%s", g_value_get_boolean(value) ? "TRUE" : "FALSE"); break; case G_TYPE_FLOAT: valstr = g_strdup_printf("%f", g_value_get_float(value)); break; case G_TYPE_DOUBLE: valstr = g_strdup_printf("%f", g_value_get_double(value)); break; case G_TYPE_STRING: valstr = g_strdup_printf("\"%s\"", g_value_get_string(value)); break; case G_TYPE_POINTER: valstr = g_strdup_printf("%p", g_value_get_pointer(value)); break; case G_TYPE_OBJECT: object = g_value_get_object(value); if (object != NULL) { if (recurse) { tmpstr = g_strdup_printf("%s ", str); tmpsettings = show_g_object_settings( object, tmpstr, recurse); g_free(tmpstr); if (strrchr(tmpsettings, '\n') != NULL) { valstr = g_strdup_printf("%s%s }", tmpsettings, str); g_free(tmpsettings); } else { valstr = tmpsettings; } } else { valstr = g_strdup_printf("<...>"); } } else { valstr = g_strdup_printf("settings[] = NULL"); } break; default: valstr = g_strdup_printf("type %s unhandled", tname); } return valstr; } gchar * show_g_object_settings(GObject *o, char *str, int recurse) { char *b, *p, *body, *valstr, *tmpstr; guint n_props = 0; int i, typeno = 0; GParamSpec *pspec; const gchar *tname; GValue value; GParamSpec **proplist; const gchar *name; if (!G_IS_OBJECT(o)) { fprintf(stderr, "%s is not a g_object\n", str); return g_strdup(""); } proplist = g_object_class_list_properties( G_OBJECT_GET_CLASS(o), &n_props); if (GTK_IS_WIDGET(o)) { name = gtk_widget_get_name(GTK_WIDGET(o)); } else { name = "settings"; } if (n_props == 0) { body = g_strdup_printf("%s[0] = { }", name); goto end_show_g_objects; } body = g_strdup_printf("%s[%d] = {\n", name, n_props); for (i=0; i < n_props; i++) { pspec = proplist[i]; tname = G_OBJECT_TYPE_NAME(pspec); bzero(&value, sizeof value); valstr = NULL; if (!(pspec->flags & G_PARAM_READABLE)) valstr = g_strdup_printf("not a readable property"); else { g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec)); g_object_get_property(G_OBJECT(o), pspec->name, &value); typeno = G_TYPE_FUNDAMENTAL( G_VALUE_TYPE(&value) ); } /* based on the type, recurse and display values */ if (valstr == NULL) { valstr = xt_g_object_serialize(&value, tname, str, recurse); } tmpstr = g_strdup_printf("%-13s %s%s%s,", tname, pspec->name, (typeno == G_TYPE_OBJECT) ? "." : " = ", valstr); b = body; #define XT_G_OBJECT_SPACING 50 p = strrchr(tmpstr, '\n'); if (p == NULL && strlen(tmpstr) > XT_G_OBJECT_SPACING) { body = g_strdup_printf( "%s%s %-50s\n%s %50s /* %3d flags=0x%08x */\n", body, str, tmpstr, str, "", i, pspec->flags); } else { char *fmt; int strspaces; if (p == NULL) strspaces = XT_G_OBJECT_SPACING; else strspaces = strlen(tmpstr) - (strlen(p) - strlen(str)) + XT_G_OBJECT_SPACING + 5; fmt = g_strdup_printf("%%s%%s %%-%ds /* %%3d flags=0x%%08x */\n", strspaces); body = g_strdup_printf(fmt, body, str, tmpstr, i, pspec->flags); g_free(fmt); } g_free(tmpstr); g_free(b); g_free(valstr); } end_show_g_objects: g_free(proplist); return (body); } char * xt_append_settings(char *str, GObject *object, char *name, int recurse) { char *newstr, *settings; settings = show_g_object_settings(object, name, recurse); if (str == NULL) str = g_strdup(""); newstr = g_strdup_printf("%s%s %s%s };\n", str, name, settings, name); g_free(str); return newstr; } int about_webkit(struct tab *t, struct karg *arg) { char *page, *body, *settingstr; settingstr = xt_append_settings(NULL, G_OBJECT(t->settings), "t->settings", 0); body = g_strdup_printf("

%s
\n", settingstr); g_free(settingstr); page = get_html_page("About Webkit", body, "", 0); g_free(body); load_webkit_string(t, page, XT_URI_ABOUT_WEBKIT, 0); g_free(page); return (0); } static int toplevelcount = 0; void xt_append_toplevel(GtkWindow *w, char **body) { char *n; n = g_strdup_printf("toplevel#%d", toplevelcount++); *body = xt_append_settings(*body, G_OBJECT(w), n, 0); g_free(n); } int allthethings(struct tab *t, struct karg *arg) { GList *list; char *page, *body, *b; body = xt_append_settings(NULL, G_OBJECT(t->wv), "t->wv", 1); body = xt_append_settings(body, G_OBJECT(t->inspector), "t->inspector", 1); #if 0 /* not until warnings are gone */ body = xt_append_settings(body, G_OBJECT(session), "session", 1); #endif toplevelcount = 0; list = gtk_window_list_toplevels(); g_list_foreach(list, (GFunc)g_object_ref, NULL); g_list_foreach(list, (GFunc)xt_append_toplevel, &body); g_list_foreach(list, (GFunc)g_object_unref, NULL); g_list_free(list); b = body; body = g_strdup_printf("
%scan paste clipboard = %d\n
", body, webkit_web_view_can_paste_clipboard(t->wv)); g_free(b); page = get_html_page("About All The Things _o/", body, "", 0); g_free(body); load_webkit_string(t, page, XT_URI_ABOUT_ALLTHETHINGS, 0); g_free(page); return (0); } xombrero-1.6.4/ascii2txt.pl010064400017500000000000000123131247066410500146410ustar00dhillwheel#!/bin/perl # Copyright (c) 2010,2011,2012 Todd T. Fries # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # read in 'mandoc -Tascii' formatted man pages, spit out txt useful for further # processing by other utilities use strict; use warnings; our $fileinfo = $ARGV[0]; our $verbose = 0; my $line; my @lines; while() { $line = $_; push @lines,$line; } my $oline = ""; my $fmtline = "%s"; foreach $line (@lines) { my $newline = ""; foreach my $seg (split(/(.\x08.)/,$line)) { my $newseg = $seg; $newseg =~ m/^(.)\x08(.)$/; if (!defined($1) || !defined($2)) { $newline .= $seg; next; } if ($1 eq $2) { $newline .= "${2}"; next; } if ($1 eq "_") { $newline .= "${2}"; next; } $newline .= $seg; next; } if ($verbose > 0) { printf STDERR "==> text{bf,it}\n line: <%s>\nnewline: <%s>\n",$line,$newline; } $line = $newline; $line =~ m/(.)\x08/; if (defined($1)) { printf STDERR "Removing %s\\x08\n",$1; } $line =~ s/.\x08//g; # combine adjacent entries foreach my $macro (("textbf", "textit")) { $oline = ""; while ($oline ne $line) { #printf STDERR "combine adjacent\n"; $oline = $line; $line =~ s/\xab\\${macro}\{([^\}]*)\}\xbb\xab\\${macro}\{([^\}]*)\}\xbb/\xab\\${macro}\{$1$2\}\xbb/g; } } # combine space separated foreach my $macro (("textbf")) { #printf STDERR "combine space\n"; $oline = ""; while ($oline ne $line) { $oline = $line; $line =~ s/\xab\\${macro}\{([^\}]*)\}\xbb[ ]+\xab\\${macro}\{([^\}]*)\}\xbb/\xab\\${macro}\{$1 $2\}\xbb/g; } } # do the substitution one at a time to be sure to add all man pages, not just the last ones per line. # XXX provide an exceptions list, audio(9) has mono(1) and stereo(2) # XXX references, which are _not_ man pages $oline = ""; while ($oline ne $line) { $oline=$line; $line =~ s/\{(http|ftp|https):\/\/(.*)\}/ $1:\/\/$2 /; if (0) { if ($line =~ m/ ([a-z][a-z0-9\.\-\_]*)\(([1-9])\)([,\.\) ])/) { my $quote = texquote($1); $line =~ s/ ([a-z][a-z0-9\.\-\_]*)\(([1-9])\)([,\.\) ])/ \xab\\man{$quote}{$2}\xbb$3/; } if ($line =~ m/ ([a-z][a-z0-9\.\-\_]*)\(([1-9])\)$/) { my $quote = texquote($1); $line =~ s/ ([a-z][a-z0-9\.\-\_]*)\(([1-9])\)$/ \xab\\man{$quote}{$2}\xbb/; } } } my @macros = ("textbf","textit","man","href"); # quote arguments for tex foreach my $macro (@macros) { my $newline = ""; foreach my $seg (split(/(\xab\\${macro}\{[^\xbb]*\}\xbb)/,$line)) { #printf STDERR "quote args\n"; my $newseg = $seg; # check for nesting first; we only want to escape the # inner most argument, process nested macro if it has a nested macro # since the nested macro won't catch in the other regex cases my $foundnest = 0; foreach my $nest (@macros) { if ($macro eq $nest) { next; } $newseg =~ m/^\xab\\${macro}\{[ ]*\\${nest}\{([^\xbb]*)\}\{([^\xbb]*)\}\}\xbb$/; if (defined($2)) { $foundnest = 1; $newline .= "\xab\\${macro}\{\\${nest}\{".texquote($1)."\}\{".texquote(${2})."\}\}\xbb"; last; } $newseg =~ m/^\xab\\${macro}\{[ ]*\\${nest}\{([^\xbb]*)\}\}\xbb$/; if (defined($1)) { $foundnest = 1; $newline .= "\xab\\${macro}\{\\${nest}\{".texquote($1)."\}\}\xbb"; last; } } if ($foundnest > 0) { next; } # check for 2 args first $newseg =~ m/^\xab\\${macro}\{([^\xbb]*)\}\{([^\xbb]*)\}\xbb$/; if (defined($2)) { $newline .= "\xab\\${macro}\{".texquote($1)."\}\{".texquote(${2})."\}\xbb"; next; } $newseg =~ m/^\xab\\${macro}\{([^\xbb]*)\}\xbb$/; if (defined($1)) { $newline .= "\xab\\${macro}\{".texquote($1)."\}\xbb"; next; } $newline .= $seg; } $line = $newline; } printf $fmtline,$line; } 1; sub texquote { my ($text) = @_; my ($ret) = ""; my ($esctest) = ""; my ($escbase) = "BaCkSlAsH"; my ($esccount) = 0; #$verbose++; if ($verbose > 0) { printf STDERR "\ntexquote: '%s' -> ",$text; } if ($text =~ m/\\/) { $esctest=sprintf "%s%d",$escbase,$esccount++; while ($text =~ m/$esctest/) { $esctest=sprintf "%s%d",$escbase,$esccount++; } $text =~ s/\\/$esctest/g; if ($verbose > 0) { printf STDERR "'%s' -> ",$text; } } $text =~ s/([%\{\}_#\&\$\^])/\\$1/g; $text =~ s/([<>\|\*~])/\{\$$1\$\}/g; if ($esccount > 0) { $text =~ s/$esctest/\$\\backslash\$/g; } if ($verbose > 0) { printf STDERR "'%s'\n",$text; } #$verbose--; return $text; } xombrero-1.6.4/autoscroll.js010064400017500000000000000140451247066410500151230ustar00dhillwheel/* MIT/X Consortium License * * Copyright (c) 2011-2012 Stefan Bolte * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ MouseAutoScroll = (function() { const SCROLL_ICON="transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAi5QTFRFAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAAEAAAAAAAAAAAAAAAAAAAAAAAAA////PMNlIQAAAKR0Uk5TAAAAD2p/JQqN+74iBn34sRkDbvT+ohIBX+78kwxQ5/mEB0Pf9XMEM9XwYgCLxhBc1tvc9f7Uu756BgQZHSXC/WIFCQMJu/1cCbv9XAm7/VwJu/1eB7f+YQa1/mEGtf5hBrX+YQgpLzTC/m4RFAhm5+vr+f/i0NOQCILHECPD6lUw0PBmAj3a9nUESuP6hQgAWOv8lA0CZ/H/pBIFdvWxGghQZRvM0CN6AAAAAWJLR0S5OrgWYAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAUJJREFUOMuV0FNzREEQhuET27ZtOxvbtm3btm10bOfnBV0bnJ3Zqv1u3+diphlGsImIionz6xKSUiAtQ++ycvIAJwqKtK6krAJweqaqpk7MQhqaWgBwfnGpraNLAsJ6+p8drq5vbg0MjQjA2AS+d3f/8GhqZs7TLSyBu6fnFytrGzaw/enw+vYOdvZs4ODo5OyCwNXN3cPTiw28fXz9/BFwAgKDgkn/CAlFEBZOOVREJIKoaAqIiUUQF08BCYkIkpIpICUVQVo6BWRkIsjKpoCcXAR5+RRQUIigqJhUS0rLyisQVFZV19TygLr6hsYmBM0trW3tHWzQCf/W1c0GPb1/e18/7yMGBn/70PAI4ZmjY9w+PjFJ/ObUNPaZ2TnyHeYXFr/60vIK5VDM6to6wMbmFkPd9s4u7O0zfHZweHTMCLYPkhas1aCqNgQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTEtMDQtMDdUMTE6Mjk6MzcrMDI6MDB8AZWGAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDExLTA0LTA3VDExOjI5OjM3KzAyOjAwDVwtOgAAAABJRU5ErkJggg==) no-repeat scroll center"; const SIZE = 32; const OFFSET = 5; var doc; Math.sign = function(x) { return x >=0 ? 1 : -1; }; var span = null; var x = 0; var y = 0; var ev = null; var timerId = 0; var cursorStyle = null; function startTimer() { timerId = window.setInterval(timer, 40); } function stopTimer () { window.clearInterval(timerId); timerId = 0; } function timer () { if (ev) { var scrollY = (ev.y - y); var scrollX = (ev.x - x); var b = scrollY > 0 && doc.documentElement.scrollHeight == (window.innerHeight + window.pageYOffset); var r = scrollX > 0 && doc.documentElement.scrollWidth == (window.innerWidth + window.pageXOffset); var l = scrollX < 0 && window.pageXOffset == 0; var t = scrollY < 0 && window.pageYOffset == 0; var offX = Math.abs(scrollX) < OFFSET; var offY = Math.abs(scrollY) < OFFSET; if ( timerId != 0 && (( b && r ) || ( b && l) || ( b && offX ) || ( t && r ) || ( t && l) || ( t && offX ) || (offY && r) || (offY && l) )) { stopTimer(); return; } window.scrollBy(scrollX - Math.sign(scrollX) * OFFSET, scrollY - Math.sign(scrollY) * OFFSET); } } function mouseMove (e) { if (timerId == 0) { startTimer(); } ev = e; } function init (e) { doc = e.target.ownerDocument; if (window.innerHeight >= doc.documentElement.scrollHeight && window.innerWidth >= doc.documentElement.scrollWidth) { return; } span = doc.createElement("div"); span.style.width = SIZE + "px"; span.style.height = SIZE + "px"; span.style.background = SCROLL_ICON; span.style.left = e.x - (SIZE / 2) + "px"; span.style.top = e.y - (SIZE / 2) + "px"; span.style.position = "fixed"; span.style.fontSize = SIZE + "px"; span.style.opacity = 0.6; cursorStyle = doc.defaultView.getComputedStyle(doc.body, null).cursor; doc.body.style.cursor = "move"; doc.body.appendChild(span); doc.addEventListener('mousemove', mouseMove, false); span = span; } function clear (e) { doc.body.style.cursor = cursorStyle; span.parentNode.removeChild(span); doc.removeEventListener('mousemove', mouseMove, false); stopTimer(); if (span) span = null; if (ev) ev = null; } function mouseUp (e) { /* Simulate click, click event does not work during scrolling */ if (Math.abs(e.x - x) < 5 && Math.abs(e.y - y) < 5) { init(e); window.removeEventListener('mouseup', mouseUp, false); } } function mouseDown (e) { var t = e.target; if (e.button == 0) { if (span) { clear(); } } else if (e.button == 1) { if (span) { clear(); } else if (!t.hasAttribute("href") && !t.hasAttribute("onmousedown") && !(t.hasAttribute("onclick"))) { x = e.x; y = e.y; window.addEventListener('mouseup', mouseUp, false); } } } window.addEventListener('mousedown', mouseDown, false); })(); xombrero-1.6.4/buildver.sh010075500017500000000000000001621247066410500145440ustar00dhillwheel#!/bin/sh CURDIR=$(dirname $0) if [ -d "$CURDIR/.git" ]; then cd "$CURDIR" git describe --tags | tr -d '\n' fi xombrero-1.6.4/completion.c010064400017500000000000000060211247066410500147060ustar00dhillwheel/* * Copyright (c) 2010, 2011 Marco Peereboom * Copyright (c) 2011 Stevan Andjelkovic * Copyright (c) 2010, 2011 Edd Barrett * Copyright (c) 2011 Todd T. Fries * Copyright (c) 2011 Raphael Graf * Copyright (c) 2011 Michal Mazurek * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include gboolean completion_select_cb(GtkEntryCompletion *widget, GtkTreeModel *model, GtkTreeIter *iter, struct tab *t) { gchar *value; /* XXX may require changes for GTK3 */ gtk_tree_model_get(model, iter, 0, &value, -1); load_uri(t, value); g_free(value); return (FALSE); } gboolean completion_hover_cb(GtkEntryCompletion *widget, GtkTreeModel *model, GtkTreeIter *iter, struct tab *t) { gchar *value; /* XXX may require changes for GTK3 */ gtk_tree_model_get(model, iter, 0, &value, -1); gtk_entry_set_text(GTK_ENTRY(t->uri_entry), value); gtk_editable_set_position(GTK_EDITABLE(t->uri_entry), -1); g_free(value); return (TRUE); } void completion_add_uri(const gchar *uri) { GtkTreeIter iter; /* add uri to list_store */ gtk_list_store_append(completion_model, &iter); gtk_list_store_set(completion_model, &iter, 0, uri, -1); } gboolean completion_match(GtkEntryCompletion *completion, const gchar *key, GtkTreeIter *iter, gpointer user_data) { gchar *value; gboolean match = FALSE; gtk_tree_model_get(GTK_TREE_MODEL(completion_model), iter, 0, &value, -1); if (value == NULL) return FALSE; match = match_uri(value, key); g_free(value); return (match); } void completion_add(struct tab *t) { /* enable completion for tab */ t->completion = gtk_entry_completion_new(); gtk_entry_completion_set_text_column(t->completion, 0); gtk_entry_set_completion(GTK_ENTRY(t->uri_entry), t->completion); gtk_entry_completion_set_model(t->completion, GTK_TREE_MODEL(completion_model)); gtk_entry_completion_set_match_func(t->completion, completion_match, NULL, NULL); gtk_entry_completion_set_minimum_key_length(t->completion, 1); gtk_entry_completion_set_inline_selection(t->completion, TRUE); g_signal_connect(G_OBJECT (t->completion), "match-selected", G_CALLBACK(completion_select_cb), t); g_signal_connect(G_OBJECT (t->completion), "cursor-on-match", G_CALLBACK(completion_hover_cb), t); } xombrero-1.6.4/config-checker.pl010075500017500000000000000152451247066410500156100ustar00dhillwheel#!/usr/bin/perl -P # Copyright (c) 2012 Stevan Andjelkovic # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. use constant SETTINGS => "settings.c"; use constant CONFIG => "xombrero.conf"; use constant MAIN => "xombrero.c"; # This is a script that checks if the default setting values of xombrero # (found in SETTINGS) are reflected by the CONFIG. It is meant to help # the developers; the end user need not bother with it. # The rule of the game: if a setting has a boolean value (i.e. on or # off), then the config value should be the negation of the default # value, otherwise (i.e. the value is non-boolean) the config value # should be the default value. sub follows_the_rule { my ($default_value, $config_value) = @_; # Boolean setting. if ($default_value =~ /^(0|1)$/) { if ($default_value != $config_value) { return (1); } # Non-boolean setting. } else { if ($default_value eq $config_value) { return (1); } } return (0); } # There are plenty of limitations, for example: struct settings are # ignored, some string settings are initialized in special ways (we only # account for strings initialized in main() using g_strdup.), etc. # The following are settings which will not be checked by the script, # because either they are exceptions to the rule or it is hard to check # them in a systematic way. Check them manually. my @unsupported = qw( url_regex http_proxy browser_mode default_script search_string cmd_font cmd_font_name oops_font oops_font_name tabbar_font tabbar_font_name statusbar_font statusbar_font_name runtime_settings cookie_wl js_wl keybinding mime_type alias ); # The -P flag invokes the C pre-processor. #define DEBUG (0) use strict; #if (DEBUG) use warnings; #endif my %settings = (); my %config = (); # ---------------------------------------------------------------------- # Main # Walk through SETTINGS and collect all settings and their default # values. Note that the default string values cannot be initialized in # SETTINGS. with_file(SETTINGS, \&process_settings, \%settings); # We need to go through MAIN to get the default string values. with_file(MAIN, \&process_main, \%settings); # Then walk through CONFIG and collect all settings and their config # values. with_file(CONFIG, \&process_config, \%config); # Finally check if the collected settings follow the rule. summary(); # ---------------------------------------------------------------------- # Helper subroutines # Higher-order subroutine that takes a file, a subroutine and a hash. It # opens the file and applies the subroutine to each line of the file. The # hash is used for debugging output. sub with_file { my ($file, $sub, $hash) = @_; open(my $fh, "<", $file) or die "Cannot open $file: $!"; while (<$fh>) { &$sub($_); } close($fh) or warn "Cannot close $file: $!"; if (DEBUG) { print("$file:\n" . "=" x length($file) . "\n"); while (my ($key, $value) = each(%{$hash})) { print "$key => $value\n"; } } } sub process_settings { # Save integer settings. if (/^[g]?int\s+(\w+)\s+=\s(\d+);/) { $settings{$1} = $2; } # Save float settings. if (/^[g]?float\s+(\w+)\s+=\s(\d+\.\d+);/) { $settings{$1} = $2; } # Save boolean settings. if (/^gboolean\s+(\w+)\s+=\s(\w+);/) { if ($2 eq "TRUE") { $settings{$1} = 1; } elsif ($2 eq "FALSE") { $settings{$1} = 0; } else { die "$1 got non-boolean value $2 in " . SETTINGS; } } # Save string setting. Note that the default string cannot be # initialized in SETTINGS, that is why we also process MAIN. if (/^[g]?char\s+\*(\w+)\s+=\s+NULL;/ or /^[g]?char\s+(\w+)\[\w+\];/) { $settings{$1} = "NULL"; } } my $found_main = 0; sub process_main { # Find main(), as that is where the strings are initialized. unless ($found_main) { if (/^main\(int argc, char \*argv\[\]\)$/) { $found_main = 1; } return; } # Once we found main(), get the string settings. for my $setting (keys %settings) { $setting = quotemeta $setting; if (/^\s+$setting\s+=\s+g_strdup\("(.*)"\);/) { $settings{$setting} = $1; } } } sub process_config { # Save integer and boolean settings. if (/^#\s+(\w+)\s+=\s+(\d+)$/) { $config{$1} = $2; return; } # Save float settings. if (/^#\s+(\w+)\s+=\s+(\d+\.\d+)$/) { $config{$1} = $2; return; } # Save string settings. if (/^#\s+(\w+)\s+=\s+(.*)$/) { $config{$1} = $2; } } my @breaks_the_rule = (); my @missing_in_config = (); my @missing_in_settings = (); sub summary { print_with_sep("Summary", "="); # Collect settings that are in SETTINGS, but missing in CONFIG # as well as settings that break the rule. while (my ($setting, $default_value) = each(%settings)) { my $config_value = $config{$setting}; if (!defined $config_value) { push(@missing_in_config, $setting); next; } if (!follows_the_rule($default_value, $config_value)) { push(@breaks_the_rule, $setting); } } # Collect settings that are in CONFIG, but not in SETTINGS. for my $setting (keys %config) { if (!defined $settings{$setting}) { push(@missing_in_settings, $setting); } } # Report the settings that break the rule. print_with_sep("Settings that break the rule", "-"); for my $setting (@breaks_the_rule) { print SETTINGS . ":\t$setting = $settings{$setting}\n" . CONFIG . ":\t$setting = $config{$setting}\n\n" unless $setting ~~ @unsupported; } # Report the settings that are in SETTINGS, but not in CONFIG. print_with_sep("Settings in " . SETTINGS . " that are not in " . CONFIG, "-"); map { print "$_ = $settings{$_}\n" unless $_ ~~ @unsupported } @missing_in_config; # And vice versa. print_with_sep("Settings in " . CONFIG . " that are not in " . SETTINGS, "-"); map { print "$_ = $config{$_}\n" unless $_ ~~ @unsupported } @missing_in_settings; print_with_sep("Manually check the following", "-"); map { print "$_\n" } @unsupported; } sub print_with_sep { my ($line, $sep) = @_; print "\n$line\n" . $sep x length($line) . "\n"; } xombrero-1.6.4/cookie.c010064400017500000000000000145531247066410500140170ustar00dhillwheel/* * Copyright (c) 2010, 2011 Marco Peereboom * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include #define XT_REJECT_FILE ("rejected.txt") #define XT_COOKIE_FILE ("cookies.txt") /* hooked functions */ void (*_soup_cookie_jar_add_cookie)(SoupCookieJar *, SoupCookie *); void (*_soup_cookie_jar_delete_cookie)(SoupCookieJar *, SoupCookie *); void print_cookie(char *msg, SoupCookie *c) { if (c == NULL) return; if (msg) { DNPRINTF(XT_D_COOKIE, "%s\n", msg); } DNPRINTF(XT_D_COOKIE, "name : %s\n", c->name); DNPRINTF(XT_D_COOKIE, "value : %s\n", c->value); DNPRINTF(XT_D_COOKIE, "domain : %s\n", c->domain); DNPRINTF(XT_D_COOKIE, "path : %s\n", c->path); DNPRINTF(XT_D_COOKIE, "expires : %s\n", c->expires ? soup_date_to_string(c->expires, SOUP_DATE_HTTP) : ""); DNPRINTF(XT_D_COOKIE, "secure : %d\n", c->secure); DNPRINTF(XT_D_COOKIE, "http_only: %d\n", c->http_only); DNPRINTF(XT_D_COOKIE, "====================================\n"); } void set_hook(void **hook, char *name) { if (hook == NULL) errx(1, "set_hook"); if (*hook == NULL) { *hook = dlsym(RTLD_NEXT, name); if (*hook == NULL) errx(1, "can't hook %s", name); } } /* override libsoup soup_cookie_equal because it doesn't look at domain */ gboolean soup_cookie_equal(SoupCookie *cookie1, SoupCookie *cookie2) { g_return_val_if_fail(cookie1, FALSE); g_return_val_if_fail(cookie2, FALSE); return (!strcmp (cookie1->name, cookie2->name) && !strcmp (cookie1->value, cookie2->value) && !strcmp (cookie1->path, cookie2->path) && !strcmp (cookie1->domain, cookie2->domain)); } void transfer_cookies(void) { GSList *cf; SoupCookie *sc, *pc; cf = soup_cookie_jar_all_cookies(p_cookiejar); for (;cf; cf = cf->next) { pc = cf->data; sc = soup_cookie_copy(pc); _soup_cookie_jar_add_cookie(s_cookiejar, sc); } soup_cookies_free(cf); } void soup_cookie_jar_delete_cookie(SoupCookieJar *jar, SoupCookie *c) { GSList *cf; SoupCookie *ci; print_cookie("soup_cookie_jar_delete_cookie", c); if (cookies_enabled == 0) return; if (jar == NULL || c == NULL) return; /* find and remove from persistent jar */ cf = soup_cookie_jar_all_cookies(p_cookiejar); for (;cf; cf = cf->next) { ci = cf->data; if (soup_cookie_equal(ci, c)) { _soup_cookie_jar_delete_cookie(p_cookiejar, ci); break; } } soup_cookies_free(cf); /* delete from session jar */ _soup_cookie_jar_delete_cookie(s_cookiejar, c); } void soup_cookie_jar_add_cookie(SoupCookieJar *jar, SoupCookie *cookie) { struct wl_entry *w = NULL; SoupCookie *c; FILE *r_cookie_f; char *public_suffix; DNPRINTF(XT_D_COOKIE, "soup_cookie_jar_add_cookie: %p %p %p\n", jar, p_cookiejar, s_cookiejar); if (cookies_enabled == 0) return; /* see if we are up and running */ if (p_cookiejar == NULL) { _soup_cookie_jar_add_cookie(jar, cookie); return; } /* disallow p_cookiejar adds, shouldn't happen */ if (jar == p_cookiejar) return; /* sanity */ if (jar == NULL || cookie == NULL) return; /* check if domain is valid */ public_suffix = tld_get_suffix(cookie->domain[0] == '.' ? cookie->domain + 1 : cookie->domain); if (public_suffix == NULL || (enable_cookie_whitelist && (w = wl_find(cookie->domain, &c_wl)) == NULL)) { blocked_cookies++; DNPRINTF(XT_D_COOKIE, "soup_cookie_jar_add_cookie: reject %s\n", cookie->domain); if (save_rejected_cookies) { if ((r_cookie_f = fopen(rc_fname, "a+")) == NULL) { show_oops(NULL, "can't open reject cookie file"); return; } fseek(r_cookie_f, 0, SEEK_END); fprintf(r_cookie_f, "%s%s\t%s\t%s\t%s\t%lu\t%s\t%s\n", cookie->http_only ? "#HttpOnly_" : "", cookie->domain, *cookie->domain == '.' ? "TRUE" : "FALSE", cookie->path, cookie->secure ? "TRUE" : "FALSE", cookie->expires ? (gulong)soup_date_to_time_t(cookie->expires) : 0, cookie->name, cookie->value); fflush(r_cookie_f); fclose(r_cookie_f); } if (!allow_volatile_cookies) return; } if (cookie->expires == NULL && session_timeout) { soup_cookie_set_expires(cookie, soup_date_new_from_now(session_timeout)); print_cookie("modified add cookie", cookie); } /* see if we are white listed for persistence */ if ((w && w->handy) || (enable_cookie_whitelist == 0)) { /* add to persistent jar */ c = soup_cookie_copy(cookie); print_cookie("soup_cookie_jar_add_cookie p_cookiejar", c); _soup_cookie_jar_add_cookie(p_cookiejar, c); } /* add to session jar */ print_cookie("soup_cookie_jar_add_cookie s_cookiejar", cookie); _soup_cookie_jar_add_cookie(s_cookiejar, cookie); } void setup_cookies(void) { char file[PATH_MAX]; set_hook((void *)&_soup_cookie_jar_add_cookie, "soup_cookie_jar_add_cookie"); set_hook((void *)&_soup_cookie_jar_delete_cookie, "soup_cookie_jar_delete_cookie"); #if defined __MINGW32__ /* windows hooking is a horror show, nothing to see here move along */ fixup_windows_hooks(); #endif if (cookies_enabled == 0) return; /* * the following code is intricate due to overriding several libsoup * functions. * do not alter order of these operations. */ /* rejected cookies */ if (save_rejected_cookies) snprintf(rc_fname, sizeof file, "%s" PS "%s", work_dir, XT_REJECT_FILE); /* persistent cookies */ snprintf(file, sizeof file, "%s" PS "%s", work_dir, XT_COOKIE_FILE); p_cookiejar = soup_cookie_jar_text_new(file, read_only_cookies); /* session cookies */ s_cookiejar = soup_cookie_jar_new(); g_object_set(G_OBJECT(s_cookiejar), SOUP_COOKIE_JAR_ACCEPT_POLICY, cookie_policy, (void *)NULL); transfer_cookies(); soup_session_add_feature(session, (SoupSessionFeature*)s_cookiejar); } xombrero-1.6.4/dragonfly004075500017500000000000000000001247066410500143035ustar00dhillwheelxombrero-1.6.4/dragonfly/Makefile010064400017500000000000000051141247066410500160200ustar00dhillwheelGTK_VERSION?= gtk3 .if ${GTK_VERSION} == "gtk2" LIBS= gtk+-2.0 webkit-1.0 .else LIBS= gtk+-3.0 webkitgtk-3.0 .endif LIBS+= libsoup-2.4 gnutls LDADD= -lutil -lX11 GTK_CFLAGS!= pkg-config --cflags $(LIBS) GTK_LDFLAGS!= pkg-config --libs $(LIBS) CFLAGS+= $(GTK_CFLAGS) -O2 -Wall -I. -I.. LDFLAGS+= $(GTK_LDFLAGS) PREFIX?= /usr/local BINDIR?= $(PREFIX)/bin MANDIR?= $(PREFIX)/man RESDIR?= $(PREFIX)/share/xombrero/ CFLAGS+= -DXT_DS_RESOURCE_DIR=\"$(RESDIR)\" CC= cc all: ../javascript.h ../tooltip.h xombrero ../javascript.h: ../js-merge-helper.pl ../hinting.js ../autoscroll.js perl ../js-merge-helper.pl ../hinting.js ../input-focus.js \ ../autoscroll.js > ../javascript.h ../tooltip.h: ../ascii2txt.pl ../txt2tooltip.pl ../xombrero.1 nroff -c -Tascii -mandoc ../xombrero.1 | \ perl ../ascii2txt.pl | \ perl ../txt2tooltip.pl > ../tooltip.h xombrero.o: ../xombrero.o unix.o: ../unix.o marco.o: ../marco.o whitelist.o: ../whitelist.o settings.o: ../settings.o about.o: ../about.o inspector.o: ../inspector.o cookie.o: ../cookie.o inputfocus.o: ../inputfocus.o history.o: ../history.o completion.o: ../completion.o externaleditor.o: ../externaleditor.o tldlist.o: ../tldlist.o ../xombrero.o: ../javascript.h ../tooltip.h xombrero: xombrero.o dragonfly.o marco.o about.o inspector.o whitelist.o settings.o \ cookie.o history.o completion.o inputfocus.o tldlist.o externaleditor.o \ unix.o $(CC) $(LDFLAGS) -o $@ *.o $+ $(LDADD) install: all install -m 755 -d $(DESTDIR)$(BINDIR) install -m 755 -d $(DESTDIR)$(MANDIR)/man1 install -m 755 -d $(DESTDIR)$(RESDIR) install -m 755 -d $(DESTDIR)$(PREFIX)/share/applications install -m 755 xombrero $(DESTDIR)$(BINDIR) install -m 644 ../xombrero.1 $(DESTDIR)$(MANDIR)/man1/xombrero.1 install -m 644 ../xombrero.css $(DESTDIR)$(RESDIR) install -m 644 ../xombrero.desktop $(DESTDIR)$(PREFIX)/share/applications install -m 644 ../xombreroicon16.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon32.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon48.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon64.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon128.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon256.png $(DESTDIR)$(RESDIR) install -m 644 ../favicon.ico $(DESTDIR)$(RESDIR) install -m 644 ../tld-rules $(DESTDIR)$(RESDIR) install -m 644 ../style.css $(DESTDIR)$(RESDIR) install -m 644 ../hsts-preload $(DESTDIR)$(RESDIR) install -m 644 ../torenabled.ico $(DESTDIR)$(RESDIR) install -m 644 ../tordisabled.ico $(DESTDIR)$(RESDIR) clean: rm -f xombrero *.o rm -f javascript.h rm -f tooltip.h .PHONY: all install clean xombrero-1.6.4/dragonfly/dragonfly.c010064400017500000000000000146611247066410500165200ustar00dhillwheel/* $OpenBSD: fmt_scaled.c,v 1.10 2009/06/20 15:00:04 martynas Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Ian F. Darwin. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * fmt_scaled: Format numbers scaled for human comprehension * scan_scaled: Scan numbers in this format. * * "Human-readable" output uses 4 digits max, and puts a unit suffix at * the end. Makes output compact and easy-to-read esp. on huge disks. * Formatting code was originally in OpenBSD "df", converted to library routine. * Scanning code written for OpenBSD libutil. */ #include #include #include #include #include #include #include "util.h" typedef enum { NONE = 0, KILO = 1, MEGA = 2, GIGA = 3, TERA = 4, PETA = 5, EXA = 6 } unit_type; /* These three arrays MUST be in sync! XXX make a struct */ static unit_type units[] = { NONE, KILO, MEGA, GIGA, TERA, PETA, EXA }; static char scale_chars[] = "BKMGTPE"; static long long scale_factors[] = { 1LL, 1024LL, 1024LL*1024, 1024LL*1024*1024, 1024LL*1024*1024*1024, 1024LL*1024*1024*1024*1024, 1024LL*1024*1024*1024*1024*1024, }; #define SCALE_LENGTH (sizeof(units)/sizeof(units[0])) #define MAX_DIGITS (SCALE_LENGTH * 3) /* XXX strlen(sprintf("%lld", -1)? */ /* Convert the given input string "scaled" into numeric in "result". * Return 0 on success, -1 and errno set on error. */ int scan_scaled(char *scaled, long long *result) { char *p = scaled; int sign = 0; unsigned int i, ndigits = 0, fract_digits = 0; long long scale_fact = 1, whole = 0, fpart = 0; /* Skip leading whitespace */ while (isascii(*p) && isspace(*p)) ++p; /* Then at most one leading + or - */ while (*p == '-' || *p == '+') { if (*p == '-') { if (sign) { errno = EINVAL; return -1; } sign = -1; ++p; } else if (*p == '+') { if (sign) { errno = EINVAL; return -1; } sign = +1; ++p; } } /* Main loop: Scan digits, find decimal point, if present. * We don't allow exponentials, so no scientific notation * (but note that E for Exa might look like e to some!). * Advance 'p' to end, to get scale factor. */ for (; isascii(*p) && (isdigit(*p) || *p=='.'); ++p) { if (*p == '.') { if (fract_digits > 0) { /* oops, more than one '.' */ errno = EINVAL; return -1; } fract_digits = 1; continue; } i = (*p) - '0'; /* whew! finally a digit we can use */ if (fract_digits > 0) { if (fract_digits >= MAX_DIGITS-1) /* ignore extra fractional digits */ continue; fract_digits++; /* for later scaling */ fpart *= 10; fpart += i; } else { /* normal digit */ if (++ndigits >= MAX_DIGITS) { errno = ERANGE; return -1; } whole *= 10; whole += i; } } if (sign) { whole *= sign; fpart *= sign; } /* If no scale factor given, we're done. fraction is discarded. */ if (!*p) { *result = whole; return 0; } /* Validate scale factor, and scale whole and fraction by it. */ for (i = 0; i < SCALE_LENGTH; i++) { /* Are we there yet? */ if (*p == scale_chars[i] || *p == tolower(scale_chars[i])) { /* If it ends with alphanumerics after the scale char, bad. */ if (isalnum(*(p+1))) { errno = EINVAL; return -1; } scale_fact = scale_factors[i]; /* scale whole part */ whole *= scale_fact; /* truncate fpart so it does't overflow. * then scale fractional part. */ while (fpart >= LLONG_MAX / scale_fact) { fpart /= 10; fract_digits--; } fpart *= scale_fact; if (fract_digits > 0) { for (i = 0; i < fract_digits -1; i++) fpart /= 10; } whole += fpart; *result = whole; return 0; } } errno = ERANGE; return -1; } /* Format the given "number" into human-readable form in "result". * Result must point to an allocated buffer of length FMT_SCALED_STRSIZE. * Return 0 on success, -1 and errno set if error. */ int fmt_scaled(long long number, char *result) { long long abval, fract = 0; unsigned int i; unit_type unit = NONE; abval = llabs(number); /* Not every negative long long has a positive representation. * Also check for numbers that are just too darned big to format */ if (abval < 0 || abval / 1024 >= scale_factors[SCALE_LENGTH-1]) { errno = ERANGE; return -1; } /* scale whole part; get unscaled fraction */ for (i = 0; i < SCALE_LENGTH; i++) { if (abval/1024 < scale_factors[i]) { unit = units[i]; fract = (i == 0) ? 0 : abval % scale_factors[i]; number /= scale_factors[i]; if (i > 0) fract /= scale_factors[i - 1]; break; } } fract = (10 * fract + 512) / 1024; /* if the result would be >= 10, round main number */ if (fract == 10) { if (number >= 0) number++; else number--; fract = 0; } if (number == 0) strlcpy(result, "0B", FMT_SCALED_STRSIZE); else if (unit == NONE || number >= 100 || number <= -100) { if (fract >= 5) { if (number >= 0) number++; else number--; } (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld%c", number, scale_chars[unit]); } else (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld.%1lld%c", number, fract, scale_chars[unit]); return 0; } xombrero-1.6.4/dragonfly/util.h010064400017500000000000000030611247066410500155050ustar00dhillwheel#define RB_FOREACH(x, name, head) \ for ((x) = RB_MIN(name, head); \ (x) != NULL; \ (x) = name##_RB_NEXT(x)) #define RB_FOREACH_SAFE(x, name, head, y) \ for ((x) = RB_MIN(name, head); \ ((x) != NULL) && ((y) = name##_RB_NEXT(x), 1); \ (x) = (y)) #define RB_FOREACH_REVERSE(x, name, head) \ for ((x) = RB_MAX(name, head); \ (x) != NULL; \ (x) = name##_RB_PREV(x)) #define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \ for ((x) = RB_MAX(name, head); \ ((x) != NULL) && ((y) = name##_RB_PREV(x), 1); \ (x) = (y)) #ifndef TAILQ_END #define TAILQ_END(head) NULL #endif #ifndef TAILQ_FOREACH_SAFE #define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = TAILQ_FIRST(head); \ (var) != TAILQ_END(head) && \ ((tvar) = TAILQ_NEXT(var, field), 1); \ (var) = (tvar)) #endif #define FMT_SCALED_STRSIZE 7 /* minus sign, 4 digits, suffix, null byte */ int fmt_scaled(long long number, char *result); xombrero-1.6.4/externaleditor.c010064400017500000000000000206241247066410500155730ustar00dhillwheel/* * Copyright (c) 2012 Elias Norberg * Copyright (c) 2012 Josh Rickmar * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include #if WEBKIT_CHECK_VERSION(1, 5, 0) /* we got the DOM API we need */ struct edit_src_cb_args { WebKitWebFrame *frame; WebKitWebDataSource *data_src; }; struct external_editor_args { GPid child_pid; char *path; time_t mtime; struct tab *tab; int (*callback)(const char *,gpointer); gpointer cb_data; }; int update_contents(struct external_editor_args *args) { struct stat st; int fd = -1; int rv, nb; GString *contents = NULL; char buf[XT_EE_BUFSZ]; rv = stat(args->path, &st); if (rv == -1 && errno == ENOENT) return (1); else if (rv == 0 && st.st_mtime > args->mtime) { DPRINTF("File %s has been modified\n", args->path); args->mtime = st.st_mtime; contents = g_string_sized_new(XT_EE_BUFSZ); fd = open(args->path, O_RDONLY); if (fd == -1) { DPRINTF("open_external_editor_cb, open error, %s\n", strerror(errno)); goto done; } for (;;) { nb = read(fd, buf, XT_EE_BUFSZ); if (nb < 0) { g_string_free(contents, TRUE); show_oops(args->tab, strerror(errno)); goto done; } buf[nb] = '\0'; contents = g_string_append(contents, buf); if (nb < XT_EE_BUFSZ) break; } close(fd); DPRINTF("external_editor_cb: contents updated\n"); if (args->callback) args->callback(contents->str, args->cb_data); g_string_free(contents, TRUE); return (0); } done: if (fd != -1) close(fd); return (0); } void external_editor_closed(GPid pid, gint status, gpointer data) { struct external_editor_args *args; struct tab *t; int found_tab = 0; args = (struct external_editor_args *)data; TAILQ_FOREACH(t, &tabs, entry) if (t == args->tab) { found_tab = 1; break; } /* Tab was deleted */ if (!found_tab) goto done; /* * unfortunately we can't check the exit status in glib < 2.34, * otherwise a check and warning would be nice here */ update_contents(args); done: unlink(args->path); g_spawn_close_pid(pid); } int open_external_editor_cb(gpointer data) { struct external_editor_args *args; struct tab *t; int found_tab = 0; args = (struct external_editor_args*)data; /* Check if tab is still open */ TAILQ_FOREACH(t, &tabs, entry) if (t == args->tab) { found_tab = 1; break; } /* Tab was deleted */ if (!found_tab) goto done; if (update_contents(args)) goto done; return (1); done: /* cleanup and remove from event loop */ g_free(args->path); g_free(args->cb_data); g_free(args); return (0); } int open_external_editor(struct tab *t, const char *contents, int (*callback)(const char *, gpointer), gpointer cb_data) { struct stat st; struct external_editor_args *a; GPid pid; char *cmdstr; char filename[PATH_MAX]; char **sv; int fd; int nb, rv; int cnt; if (external_editor == NULL) return (0); snprintf(filename, sizeof filename, "%s" PS "xombreroXXXXXX", temp_dir); /* Create a temporary file */ fd = g_mkstemp(filename); if (fd == -1) { show_oops(t, "Cannot create temporary file"); return (1); } nb = 0; while (contents && nb < strlen(contents)) { if (strlen(contents) - nb > XT_EE_BUFSZ) cnt = XT_EE_BUFSZ; else cnt = strlen(contents) - nb; rv = write(fd, contents+nb, cnt); if (rv < 0) { close(fd); show_oops(t,strerror(errno)); return (1); } nb += rv; } rv = fstat(fd, &st); if (rv == -1) { close(fd); show_oops(t,"Cannot stat file: %s\n", strerror(errno)); return (1); } close(fd); DPRINTF("edit_src: external_editor: %s\n", external_editor); sv = g_strsplit(external_editor, "", -1); cmdstr = g_strjoinv(filename, sv); g_strfreev(sv); sv = g_strsplit_set(cmdstr, " \t", -1); if (!g_spawn_async(NULL, sv, NULL, (G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD), NULL, NULL, &pid, NULL)) { show_oops(t, "%s: could not spawn process"); g_strfreev(sv); g_free(cmdstr); return (1); } g_strfreev(sv); g_free(cmdstr); a = g_malloc(sizeof(struct external_editor_args)); a->child_pid = pid; a->path = g_strdup(filename); a->tab = t; a->mtime = st.st_mtime; a->callback = callback; a->cb_data = cb_data; /* Check every 100 ms if file has changed */ g_timeout_add(100, (GSourceFunc)open_external_editor_cb, (gpointer)a); /* Stop loop child has terminated */ g_child_watch_add(pid, external_editor_closed, (gpointer)a); return (0); } int edit_src_cb(const char *contents, gpointer data) { struct edit_src_cb_args *args; args = (struct edit_src_cb_args *)data; webkit_web_frame_load_string(args->frame, contents, NULL, webkit_web_data_source_get_encoding(args->data_src), webkit_web_frame_get_uri(args->frame)); return (0); } int edit_src(struct tab *t, struct karg *args) { WebKitWebFrame *frame; WebKitWebDataSource *ds; GString *contents; struct edit_src_cb_args *ext_args; if (external_editor == NULL){ show_oops(t,"Setting external_editor not set"); return (1); } frame = webkit_web_view_get_focused_frame(t->wv); ds = webkit_web_frame_get_data_source(frame); if (webkit_web_data_source_is_loading(ds)) { show_oops(t,"Webpage is still loading."); return (1); } contents = webkit_web_data_source_get_data(ds); if (!contents) show_oops(t,"No contents - opening empty file"); ext_args = g_malloc(sizeof(struct edit_src_cb_args)); ext_args->frame = frame; ext_args->data_src = ds; /* Check every 100 ms if file has changed */ open_external_editor(t, contents ? contents->str : "", &edit_src_cb, ext_args); return (0); } struct edit_element_cb_args { WebKitDOMElement *active; struct tab *tab; }; int edit_element_cb(const char *contents, gpointer data) { struct edit_element_cb_args *args; WebKitDOMHTMLTextAreaElement *ta; WebKitDOMHTMLInputElement *el; args = (struct edit_element_cb_args*)data; if (!args || !args->active) return (0); el = (WebKitDOMHTMLInputElement*)args->active; ta = (WebKitDOMHTMLTextAreaElement*)args->active; if (WEBKIT_DOM_IS_HTML_INPUT_ELEMENT(el)) webkit_dom_html_input_element_set_value(el, contents); else if (WEBKIT_DOM_IS_HTML_TEXT_AREA_ELEMENT(ta)) webkit_dom_html_text_area_element_set_value(ta, contents); return (0); } int edit_element(struct tab *t, struct karg *a) { WebKitDOMHTMLDocument *doc; WebKitDOMElement *active_element; WebKitDOMHTMLTextAreaElement *ta; WebKitDOMHTMLInputElement *el; char *contents; struct edit_element_cb_args *args; if (external_editor == NULL){ show_oops(t,"Setting external_editor not set"); return (0); } doc = (WebKitDOMHTMLDocument*)webkit_web_view_get_dom_document(t->wv); active_element = webkit_dom_html_document_get_active_element(doc); el = (WebKitDOMHTMLInputElement*)active_element; ta = (WebKitDOMHTMLTextAreaElement*)active_element; if (doc == NULL || active_element == NULL || (WEBKIT_DOM_IS_HTML_INPUT_ELEMENT(el) == 0 && WEBKIT_DOM_IS_HTML_TEXT_AREA_ELEMENT(ta) == 0)) { show_oops(t, "No active text element!"); return (1); } contents = ""; if (WEBKIT_DOM_IS_HTML_INPUT_ELEMENT(el)) contents = webkit_dom_html_input_element_get_value(el); else if (WEBKIT_DOM_IS_HTML_TEXT_AREA_ELEMENT(ta)) contents = webkit_dom_html_text_area_element_get_value(ta); if ((args = g_malloc(sizeof(struct edit_element_cb_args))) == NULL) return (1); args->tab = t; args->active = active_element; open_external_editor(t, contents, &edit_element_cb, args); return (0); } #else /* Just to make things compile. */ int edit_element(struct tab *t, struct karg *a) { show_oops(t, "external editor feature requires webkit >= 1.5.0"); return (1); } int edit_src(struct tab *t, struct karg *args) { show_oops(t, "external editor feature requires webkit >= 1.5.0"); return (1); } #endif xombrero-1.6.4/favicon.ico010064400017500000000000000021761247066410500145210ustar00dhillwheelh(   @[W:D''mMM](XXXXXXXXXOO{ng(00:XXX;;}zݬ44mV^^Y3 ʔ??h u11`ssL[[YE+ [wwhXLLWsFF ~zzXZgyppp~ixx_XX iiiXXXȠ???xombrero-1.6.4/favorites010064400017500000000000000002471247066410500143220ustar00dhillwheel# # Each link uses 2 lines. Line 1 is the title and line 2 is the link # This file must therefore have an even number of lines # peereboom.us http://www.peereboom.us xombrero-1.6.4/freebsd004075500017500000000000000000001247066410500137305ustar00dhillwheelxombrero-1.6.4/freebsd/Makefile010064400017500000000000000050271247066410500154500ustar00dhillwheelGTK_VERSION?= gtk3 .if ${GTK_VERSION} == "gtk2" LIBS= gtk+-2.0 webkit-1.0 .else LIBS= gtk+-3.0 webkitgtk-3.0 .endif LIBS+= libsoup-2.4 gnutls LDADD= -lutil GTK_CFLAGS!= pkgconf --cflags $(LIBS) GTK_LDFLAGS!= pkgconf --libs $(LIBS) CFLAGS+= $(GTK_CFLAGS) -O2 -Wall -I. -I.. LDFLAGS+= $(GTK_LDFLAGS) PREFIX?= /usr/local BINDIR?= $(PREFIX)/bin MANDIR?= $(PREFIX)/man RESDIR?= $(PREFIX)/share/xombrero CFLAGS+= -DXT_DS_RESOURCE_DIR=\"$(RESDIR)\" CC?= cc all: ../javascript.h ../tooltip.h xombrero ../javascript.h: ../js-merge-helper.pl ../hinting.js ../autoscroll.js perl ../js-merge-helper.pl ../hinting.js ../input-focus.js \ ../autoscroll.js > ../javascript.h ../tooltip.h: ../ascii2txt.pl ../txt2tooltip.pl ../xombrero.1 nroff -c -Tascii -mandoc ../xombrero.1 | \ perl ../ascii2txt.pl | \ perl ../txt2tooltip.pl > ../tooltip.h xombrero.o: ../xombrero.o unix.o: ../unix.o marco.o: ../marco.o whitelist.o: ../whitelist.o settings.o: ../settings.o about.o: ../about.o inspector.o: ../inspector.o cookie.o: ../cookie.o inputfocus.o: ../inputfocus.o history.o: ../history.o completion.o: ../completion.o externaleditor.o: ../externaleditor.o tldlist.o: ../tldlist.o ../xombrero.o: ../javascript.h ../tooltip.h xombrero: xombrero.o freebsd.o marco.o about.o inspector.o whitelist.o settings.o \ cookie.o history.o completion.o inputfocus.o tldlist.o externaleditor.o \ unix.o $(CC) $(LDFLAGS) -o $@ *.o $+ $(LDADD) install: all install -m 755 -d $(DESTDIR)$(BINDIR) install -m 755 -d $(DESTDIR)$(MANDIR)/man1 install -m 755 -d $(DESTDIR)$(PREFIX)/share/applications install -m 755 xombrero $(DESTDIR)$(BINDIR) install -m 644 ../xombrero.1 $(DESTDIR)$(MANDIR)/man1/xombrero.1 install -m 644 ../xombrero.css $(DESTDIR)$(RESDIR) install -m 644 ../xombrero.desktop $(DESTDIR)$(PREFIX)/share/applications install -m 644 ../xombreroicon16.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon32.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon48.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon64.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon128.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon256.png $(DESTDIR)$(RESDIR) install -m 644 ../favicon.ico $(DESTDIR)$(RESDIR) install -m 644 ../tld-rules $(DESTDIR)$(RESDIR) install -m 644 ../style.css $(DESTDIR)$(RESDIR) install -m 644 ../hsts-preload $(DESTDIR)$(RESDIR) install -m 644 ../torenabled.ico $(DESTDIR)$(RESDIR) install -m 644 ../tordisabled.ico $(DESTDIR)$(RESDIR) clean: rm -f xombrero *.o rm -f javascript.h rm -f tooltip.h .PHONY: all install clean xombrero-1.6.4/freebsd/freebsd.c010064400017500000000000000146601247066410500155710ustar00dhillwheel/* $OpenBSD: fmt_scaled.c,v 1.10 2009/06/20 15:00:04 martynas Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Ian F. Darwin. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * fmt_scaled: Format numbers scaled for human comprehension * scan_scaled: Scan numbers in this format. * * "Human-readable" output uses 4 digits max, and puts a unit suffix at * the end. Makes output compact and easy-to-read esp. on huge disks. * Formatting code was originally in OpenBSD "df", converted to library routine. * Scanning code written for OpenBSD libutil. */ #include #include #include #include #include #include #include "util.h" typedef enum { NONE = 0, KILO = 1, MEGA = 2, GIGA = 3, TERA = 4, PETA = 5, EXA = 6 } unit_type; /* These three arrays MUST be in sync! XXX make a struct */ static unit_type units[] = { NONE, KILO, MEGA, GIGA, TERA, PETA, EXA }; static char scale_chars[] = "BKMGTPE"; static long long scale_factors[] = { 1LL, 1024LL, 1024LL*1024, 1024LL*1024*1024, 1024LL*1024*1024*1024, 1024LL*1024*1024*1024*1024, 1024LL*1024*1024*1024*1024*1024, }; #define SCALE_LENGTH (sizeof(units)/sizeof(units[0])) #define MAX_DIGITS (SCALE_LENGTH * 3) /* XXX strlen(sprintf("%lld", -1)? */ /* Convert the given input string "scaled" into numeric in "result". * Return 0 on success, -1 and errno set on error. */ int scan_scaled(char *scaled, long long *result) { char *p = scaled; int sign = 0; unsigned int i, ndigits = 0, fract_digits = 0; long long scale_fact = 1, whole = 0, fpart = 0; /* Skip leading whitespace */ while (isascii(*p) && isspace(*p)) ++p; /* Then at most one leading + or - */ while (*p == '-' || *p == '+') { if (*p == '-') { if (sign) { errno = EINVAL; return -1; } sign = -1; ++p; } else if (*p == '+') { if (sign) { errno = EINVAL; return -1; } sign = +1; ++p; } } /* Main loop: Scan digits, find decimal point, if present. * We don't allow exponentials, so no scientific notation * (but note that E for Exa might look like e to some!). * Advance 'p' to end, to get scale factor. */ for (; isascii(*p) && (isdigit(*p) || *p=='.'); ++p) { if (*p == '.') { if (fract_digits > 0) { /* oops, more than one '.' */ errno = EINVAL; return -1; } fract_digits = 1; continue; } i = (*p) - '0'; /* whew! finally a digit we can use */ if (fract_digits > 0) { if (fract_digits >= MAX_DIGITS-1) /* ignore extra fractional digits */ continue; fract_digits++; /* for later scaling */ fpart *= 10; fpart += i; } else { /* normal digit */ if (++ndigits >= MAX_DIGITS) { errno = ERANGE; return -1; } whole *= 10; whole += i; } } if (sign) { whole *= sign; fpart *= sign; } /* If no scale factor given, we're done. fraction is discarded. */ if (!*p) { *result = whole; return 0; } /* Validate scale factor, and scale whole and fraction by it. */ for (i = 0; i < SCALE_LENGTH; i++) { /* Are we there yet? */ if (*p == scale_chars[i] || *p == tolower(scale_chars[i])) { /* If it ends with alphanumerics after the scale char, bad. */ if (isalnum(*(p+1))) { errno = EINVAL; return -1; } scale_fact = scale_factors[i]; /* scale whole part */ whole *= scale_fact; /* truncate fpart so it does't overflow. * then scale fractional part. */ while (fpart >= LLONG_MAX / scale_fact) { fpart /= 10; fract_digits--; } fpart *= scale_fact; if (fract_digits > 0) { for (i = 0; i < fract_digits -1; i++) fpart /= 10; } whole += fpart; *result = whole; return 0; } } errno = ERANGE; return -1; } /* Format the given "number" into human-readable form in "result". * Result must point to an allocated buffer of length FMT_SCALED_STRSIZE. * Return 0 on success, -1 and errno set if error. */ int fmt_scaled(long long number, char *result) { long long abval, fract = 0; unsigned int i; unit_type unit = NONE; abval = llabs(number); /* Not every negative long long has a positive representation. * Also check for numbers that are just too darned big to format */ if (abval < 0 || abval / 1024 >= scale_factors[SCALE_LENGTH-1]) { errno = ERANGE; return -1; } /* scale whole part; get unscaled fraction */ for (i = 0; i < SCALE_LENGTH; i++) { if (abval/1024 < scale_factors[i]) { unit = units[i]; fract = (i == 0) ? 0 : abval % scale_factors[i]; number /= scale_factors[i]; if (i > 0) fract /= scale_factors[i - 1]; break; } } fract = (10 * fract + 512) / 1024; /* if the result would be >= 10, round main number */ if (fract == 10) { if (number >= 0) number++; else number--; fract = 0; } if (number == 0) strlcpy(result, "0B", FMT_SCALED_STRSIZE); else if (unit == NONE || number >= 100 || number <= -100) { if (fract >= 5) { if (number >= 0) number++; else number--; } (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld%c", number, scale_chars[unit]); } else (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld.%1lld%c", number, fract, scale_chars[unit]); return 0; } xombrero-1.6.4/freebsd/util.h010064400017500000000000000021101247066410500151240ustar00dhillwheel/* * Copyright (c) 2010 Marco Peereboom * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* * This file tries to make up for the difference between OpenBSD's * and FreeBSD's . */ /* * fmt_scaled(3) specific flags. (from OpenBSD util.h) */ #define FMT_SCALED_STRSIZE 7 /* minus sign, 4 digits, suffix, null byte */ int fmt_scaled(long long number, char *result); xombrero-1.6.4/hinting.js010064400017500000000000000401461247066410500143750ustar00dhillwheel/* Copyright (c) 2009 Leon Winter Copyright (c) 2009-2011 Hannes Schueller Copyright (c) 2009-2010 Matto Fransen Copyright (c) 2010-2011 Hans-Peter Deifel Copyright (c) 2010-2011 Thomas Adam Copyright (c) 2011 Albert Kim Copyright (c) 2011 Daniel Carl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ function Hints() { var config = { maxAllowedHints: 500, hintCss: "z-index:100000;font-family:monospace;font-size:10px;" + "font-weight:bold;color:white;background-color:red;" + "padding:0px 1px;position:absolute;", hintClass: "hinting_mode_hint", hintClassFocus: "hinting_mode_hint_focus", elemBackground: "#ff0", elemBackgroundFocus: "#8f0", elemColor: "#000" }; var hintContainer; var currentFocusNum = 1; var hints = []; var mode; this.createHints = function(inputText, hintMode) { if (hintMode) { mode = hintMode; } var topwin = window; var top_height = topwin.innerHeight; var top_width = topwin.innerWidth; var xpath_expr; var hintCount = 0; this.clearHints(); function helper (win, offsetX, offsetY) { var doc = win.document; var win_height = win.height; var win_width = win.width; /* Bounds */ var minX = offsetX < 0 ? -offsetX : 0; var minY = offsetY < 0 ? -offsetY : 0; var maxX = offsetX + win_width > top_width ? top_width - offsetX : top_width; var maxY = offsetY + win_height > top_height ? top_height - offsetY : top_height; var scrollX = win.scrollX; var scrollY = win.scrollY; hintContainer = doc.createElement("div"); hintContainer.id = "hint_container"; if (typeof(inputText) == "undefined" || inputText == "") { xpath_expr = "//*[@onclick or @onmouseover or @onmousedown or @onmouseup or @oncommand or @class='lk' or @role='link' or @href] | //input[not(@type='hidden')] | //a[href] | //area | //textarea | //button | //select"; } else { xpath_expr = _caseInsensitiveExpr("//*[(@onclick or @onmouseover or @onmousedown or @onmouseup or @oncommand or @class='lk' or @role='link' or @href) and contains(translate(., '$u', '$l'), '$l')] | //input[not(@type='hidden') and contains(translate(., '$u', '$l'), '$l')] | //a[@href and contains(translate(., '$u', '$l'), '$l')] | //area[contains(translate(., '$u', '$l'), '$l')] | //textarea[contains(translate(., '$u', '$l'), '$l')] | //button[contains(translate(@value, '$u', '$l'), '$l')] | //select[contains(translate(., '$u', '$l'), '$l')]", inputText); } var res = doc.evaluate(xpath_expr, doc, function (p) { return "http://www.w3.org/1999/xhtml"; }, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); /* generate basic hint element which will be cloned and updated later */ var hintSpan = doc.createElement("span"); hintSpan.setAttribute("class", config.hintClass); hintSpan.style.cssText = config.hintCss; /* due to the different XPath result type, we will need two counter variables */ var rect, elem, text, node, show_text; for (var i = 0; i < res.snapshotLength; i++) { if (hintCount >= config.maxAllowedHints) break; elem = res.snapshotItem(i); rect = elem.getBoundingClientRect(); if (!rect || rect.left > maxX || rect.right < minX || rect.top > maxY || rect.bottom < minY) continue; var style = topwin.getComputedStyle(elem, ""); if (style.display == "none" || style.visibility != "visible") continue; var leftpos = Math.max((rect.left + scrollX), scrollX); var toppos = Math.max((rect.top + scrollY), scrollY); /* check if we already created a hint for this URL */ var hintNumber = hintCount; if (elem.nodeName.toLowerCase() == "a") { for (var j = 0; j < hints.length; j++) { var h = hints[j]; if (h.elem.nodeName.toLowerCase() != "a") continue; if (h.elem.href.toLowerCase() == elem.href.toLowerCase()){ hintNumber = h.number - 1; break; } } } /* making this block DOM compliant */ var hint = hintSpan.cloneNode(false); hint.setAttribute("id", "vimprobablehint" + hintNumber); hint.style.left = leftpos + "px"; hint.style.top = toppos + "px"; text = doc.createTextNode(hintNumber + 1); hint.appendChild(text); hintContainer.appendChild(hint); if (hintNumber == hintCount) hintCount++; else hintNumber = -2; /* do not follow dupes */ hints.push({ elem: elem, number: hintNumber+1, span: hint, background: elem.style.background, foreground: elem.style.color} ); /* make the link black to ensure it's readable */ elem.style.color = config.elemColor; elem.style.background = config.elemBackground; } doc.documentElement.appendChild(hintContainer); /* recurse into any iframe or frame element */ var frameTags = ["frame","iframe"]; for (var f = 0; f < frameTags.length; ++f) { var frames = doc.getElementsByTagName(frameTags[f]); for (var i = 0, nframes = frames.length; i < nframes; ++i) { elem = frames[i]; rect = elem.getBoundingClientRect(); if (!elem.contentWindow || !rect || rect.left > maxX || rect.right < minX || rect.top > maxY || rect.bottom < minY) continue; helper(elem.contentWindow, offsetX + rect.left, offsetY + rect.top); } } } helper(topwin, 0, 0); this.clearFocus(); this.focusHint(1); if (hintCount == 1) { /* just one hinted element - might as well follow it */ return this.fire(1); } }; /* set focus on hint with given number */ this.focusHint = function(n) { /* reset previous focused hint */ var hint = _getHintByNumber(currentFocusNum); if (hint !== null) { hint.elem.className = hint.elem.className.replace(config.hintClassFocus, config.hintClass); hint.elem.style.background = config.elemBackground; } currentFocusNum = n; /* mark new hint as focused */ var hint = _getHintByNumber(currentFocusNum); if (hint !== null) { hint.elem.className = hint.elem.className.replace(config.hintClass, config.hintClassFocus); hint.elem.style.background = config.elemBackgroundFocus; } }; /* set focus to next avaiable hint */ this.focusNextHint = function() { var index = _getHintIdByNumber(currentFocusNum); if (typeof(hints[index + 1]) != "undefined") { this.focusHint(hints[index + 1].number); } else { this.focusHint(hints[0].number); } }; /* set focus to previous avaiable hint */ this.focusPreviousHint = function() { var index = _getHintIdByNumber(currentFocusNum); if (index != 0 && typeof(hints[index - 1].number) != "undefined") { this.focusHint(hints[index - 1].number); } else { this.focusHint(hints[hints.length - 1].number); } }; /* filters hints matching given number */ this.updateHints = function(n) { if (n == 0) { return this.createHints(); } /* remove none matching hints */ var remove = []; for (var i = 0; i < hints.length; ++i) { var hint = hints[i]; if (0 != hint.number.toString().indexOf(n.toString())) { remove.push(hint.number); } } for (var i = 0; i < remove.length; ++i) { _removeHint(remove[i]); } if (hints.length === 1) { return this.fire(hints[0].number); } else { return this.focusHint(n); } }; this.clearFocus = function() { if (document.activeElement && document.activeElement.blur) { document.activeElement.blur(); } }; /* remove all hints and set previous style to them */ this.clearHints = function() { if (hints.length == 0) { return; } for (var i = 0; i < hints.length; ++i) { var hint = hints[i]; if (typeof(hint.elem) != "undefined") { hint.elem.style.background = hint.background; hint.elem.style.color = hint.foreground; hint.span.parentNode.removeChild(hint.span); } } hints = []; hintContainer.parentNode.removeChild(hintContainer); window.onkeyup = null; }; /* fires the modeevent on hint with given number */ this.fire = function(n) { var doc, result; if (!n) { var n = currentFocusNum; } var hint = _getHintByNumber(n); if (typeof(hint.elem) == "undefined") return "done;"; var el = hint.elem; var tag = el.nodeName.toLowerCase(); this.clearHints(); if (tag == "iframe" || tag == "frame" || tag == "textarea" || tag == "input" && (el.type == "text" || el.type == "password" || el.type == "checkbox" || el.type == "radio") || tag == "select") { el.focus(); if (tag == "input" || tag == "textarea") { return "insert;" } return "done;"; } switch (mode) { case "f": result = _open(el); break; case "F": result = _openNewWindow(el); break; default: result = _getElemtSource(el); } return result; }; this.focusInput = function() { if (document.getElementsByTagName("body")[0] === null || typeof(document.getElementsByTagName("body")[0]) != "object") return; /* prefixing html: will result in namespace error */ var hinttags = "//input[@type='text'] | //input[@type='password'] | //textarea"; var r = document.evaluate(hinttags, document, function(p) { return "http://www.w3.org/1999/xhtml"; }, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); var i; var j = 0; var k = 0; var first = null; for (i = 0; i < r.snapshotLength; i++) { var elem = r.snapshotItem(i); if (k == 0) { if (elem.style.display != "none" && elem.style.visibility != "hidden") { first = elem; } else { k--; } } if (j == 1 && elem.style.display != "none" && elem.style.visibility != "hidden") { elem.focus(); var tag = elem.nodeName.toLowerCase(); if (tag == "textarea" || tag == "input") { return "insert;"; } break; } if (elem == document.activeElement) { j = 1; } k++; } /* no appropriate field found focused - focus the first one */ if (j == 0 && first !== null) { first.focus(); var tag = elem.nodeName.toLowerCase(); if (tag == "textarea" || tag == "input") { return "insert;"; } } }; /* retrieves text content fro given element */ function _getTextFromElement(el) { if (el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement) { text = el.value; } else if (el instanceof HTMLSelectElement) { if (el.selectedIndex >= 0) { text = el.item(el.selectedIndex).text; } else{ text = ""; } } else { text = el.textContent; } return text.toLowerCase();; } /* retrieves the hint for given hint number */ function _getHintByNumber(n) { var index = _getHintIdByNumber(n); if (index !== null) { return hints[index]; } return null; } /* retrieves the id of hint with given number */ function _getHintIdByNumber(n) { for (var i = 0; i < hints.length; ++i) { var hint = hints[i]; if (hint.number === n) { return i; } } return null; } /* removes hint with given number from hints array */ function _removeHint(n) { var index = _getHintIdByNumber(n); if (index === null) { return; } var hint = hints[index]; if (hint.number === n) { hint.elem.style.background = hint.background; hint.elem.style.color = hint.foreground; hint.span.parentNode.removeChild(hint.span); /* remove hints from all hints */ hints.splice(index, 1); } } /* opens given element */ function _open(elem) { if (elem.target == "_blank") { elem.removeAttribute("target"); } _clickElement(elem); return "done;"; } /* opens given element into new window */ function _openNewWindow(elem) { var oldTarget = elem.target; /* set target to open in new window */ elem.target = "_blank"; _clickElement(elem); elem.target = oldTarget; return "done;"; } /* fire moudedown and click event on given element */ function _clickElement(elem) { doc = elem.ownerDocument; view = elem.contentWindow; var evObj = doc.createEvent("MouseEvents"); evObj.initMouseEvent("mousedown", true, true, view, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, null); elem.dispatchEvent(evObj); var evObj = doc.createEvent("MouseEvents"); evObj.initMouseEvent("click", true, true, view, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, null); elem.dispatchEvent(evObj); } /* retrieves the url of given element */ function _getElemtSource(elem) { var url = elem.href || elem.src; return url; } /* returns a case-insensitive version of the XPath expression */ function _caseInsensitiveExpr(xpath, searchString) { return xpath.split("$u").join(searchString.toUpperCase()) .split("$l").join(searchString.toLowerCase()); } } hints = new Hints(); xombrero-1.6.4/history.c010064400017500000000000000132211247066410500142360ustar00dhillwheel/* * Copyright (c) 2010, 2011 Marco Peereboom * Copyright (c) 2011 Stevan Andjelkovic * Copyright (c) 2010, 2011 Edd Barrett * Copyright (c) 2011 Todd T. Fries * Copyright (c) 2011 Raphael Graf * Copyright (c) 2011 Michal Mazurek * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include #define XT_HISTORY_FILE ("history") #define XT_MAX_HL_PURGE_COUNT (1000) /* Purge the history for every * MAX_HL_PURGE_COUNT items inserted into * history and delete all items older * than MAX_HISTORY_AGE. */ #define XT_MAX_HISTORY_AGE (60.0 * 60.0 * 24 * 14) /* 14 days */ int purge_history(void) { struct history *h, *next; double age = 0.0; DNPRINTF(XT_D_HISTORY, "%s: hl_purge_count = %d (%d is max)\n", __func__, hl_purge_count, XT_MAX_HL_PURGE_COUNT); if (hl_purge_count == XT_MAX_HL_PURGE_COUNT) { hl_purge_count = 0; for (h = RB_MIN(history_list, &hl); h != NULL; h = next) { next = RB_NEXT(history_list, &hl, h); age = difftime(time(NULL), h->time); if (age > XT_MAX_HISTORY_AGE) { DNPRINTF(XT_D_HISTORY, "%s: removing %s (age %.1f)\n", __func__, h->uri, age); RB_REMOVE(history_list, &hl, h); g_free(h->uri); g_free(h->title); g_free(h); } else { DNPRINTF(XT_D_HISTORY, "%s: keeping %s (age %.1f)\n", __func__, h->uri, age); } } } return (0); } int insert_history_item(const gchar *uri, const gchar *title, time_t time) { struct history *h; if (!(uri && strlen(uri) && title && strlen(title))) return (1); h = g_malloc(sizeof(struct history)); h->uri = g_strdup(uri); h->title = g_strdup(title); h->time = time; DNPRINTF(XT_D_HISTORY, "%s: adding %s\n", __func__, h->uri); RB_INSERT(history_list, &hl, h); completion_add_uri(h->uri); hl_purge_count++; purge_history(); update_history_tabs(NULL); return (0); } int restore_global_history(void) { char file[PATH_MAX]; FILE *f; gchar *uri, *title = NULL, *stime = NULL, *err = NULL; time_t time; struct tm tm; const char delim[3] = {'\\', '\\', '\0'}; snprintf(file, sizeof file, "%s" PS "%s", work_dir, XT_HISTORY_FILE); if ((f = fopen(file, "r")) == NULL) { warnx("%s: fopen", __func__); return (1); } for (;;) { if ((uri = fparseln(f, NULL, NULL, delim, 0)) == NULL) if (feof(f) || ferror(f)) break; if ((title = fparseln(f, NULL, NULL, delim, 0)) == NULL) if (feof(f) || ferror(f)) { err = "broken history file (title)"; goto done; } if ((stime = fparseln(f, NULL, NULL, delim, 0)) == NULL) if (feof(f) || ferror(f)) { err = "broken history file (time)"; goto done; } if (strptime(stime, "%a %b %d %H:%M:%S %Y", &tm) == NULL) { err = "strptime failed to parse time"; goto done; } time = mktime(&tm); if (insert_history_item(uri, title, time)) { err = "failed to insert item"; goto done; } free(uri); free(title); free(stime); uri = NULL; title = NULL; stime = NULL; } done: if (err && strlen(err)) { warnx("%s: %s\n", __func__, err); free(uri); free(title); free(stime); return (1); } return (0); } int save_global_history_to_disk(struct tab *t) { char file[PATH_MAX]; FILE *f; struct history *h; snprintf(file, sizeof file, "%s" PS "%s", work_dir, XT_HISTORY_FILE); if ((f = fopen(file, "w")) == NULL) { show_oops(t, "%s: global history file: %s", __func__, strerror(errno)); return (1); } RB_FOREACH_REVERSE(h, history_list, &hl) { if (h->uri && h->title && h->time) fprintf(f, "%s\n%s\n%s", h->uri, h->title, ctime(&h->time)); } fclose(f); return (0); } /* * Marshall the internal record of visited URIs into a Javascript hash table in * string form. */ char * color_visited_helper(void) { char *d, *s = NULL, *t; struct history *h; RB_FOREACH_REVERSE(h, history_list, &hl) { if (s == NULL) s = g_strdup_printf("'%s':'dummy'", h->uri); else { d = g_strdup_printf("'%s':'dummy'", h->uri); t = g_strjoin(",", s, d, NULL); g_free(d); g_free(s); s = t; } } t = g_strdup_printf("{%s}", s); g_free(s); s = t; DNPRINTF(XT_D_VISITED, "%s: s = %s\n", __func__, s); return (s); } int color_visited(struct tab *t, char *visited) { char *s, *v; if (t == NULL || visited == NULL) { show_oops(NULL, "%s: invalid parameters", __func__); return (1); } /* * Create a string representing an annonymous Javascript function, which * takes a hash table of visited URIs as an argument, goes through the * links at the current web page and colors them if they indeed been * visited. */ v = g_strdup_printf("(%s);", visited), s = g_strconcat( "(function(visitedUris) {", " for (var i = 0; i < document.links.length; i++)", " if (visitedUris[document.links[i].href])", " document.links[i].style.color = 'purple';", "})", v, NULL); run_script(t, s); g_free(s); g_free(v); g_free(visited); return (0); } xombrero-1.6.4/hsts-preload010064400017500000000000000123441247066410500147260ustar00dhillwheelforce_https = bitbucket.org force_https = re:^(www\.)?bitrig\.org$ force_https = .conformalsys.org force_https = .defcon.org force_https = duck.co force_https = .eff.org force_https = github.com force_https = gist.github.com force_https = bugzilla.gnome.org force_https = lobste.rs force_https = .bugzilla.mozilla.org force_https = mtgox.com force_https = gitweb.torproject.org # # Sites from chromium's preloaded HSTS list: # http://src.chromium.org/viewvc/chrome/trunk/src/net/http/transport_security_state_static.json?view=markup # # Last synced with chromium revision 210837 # force_https = re:^(.*\.)*(health|checkout|chrome|docs|sites|spreadsheets|appengine|encrypted|accounts|profiles|mail|talkgadget|talk|hostedtalkgadget|plus|plus\.sandbox|script|history|security|code|dl)\.google\.com$ force_https = .market.android.com force_https = .developer.android.com force_https = .ssl.google-analytics.com force_https = .googleplex.com force_https = .chromiumcodereview.appspot.com force_https = .chrome-devtools-frontend.appspot.com force_https = .codereview.appspot.com force_https = .codereview.chromium.org force_https = re:^(www\.)?paypal\.com$ force_https = www.elanex.biz force_https = .jottit.com force_https = .sunshinepress.org force_https = www.noisebridge.net force_https = .neg9.org force_https = .riseup.net force_https = factor.cc force_https = re:^(members|support|id|lists)\.mayfirst\.org$ force_https = aladdinschools.appspot.com force_https = .ottospora.nl force_https = www.paycheckrecords.com force_https = re:^(www\.)?lastpass\.com$ force_https = .keyerror.com force_https = re:^(www\.)?entropia\.de$ force_https = .romab.com force_https = re:^(www\.)?logentries\.com$ force_https = .stripe.com force_https = .cloudsecurityalliance.org force_https = .login.sapo.pt force_https = .mattmccutchen.net force_https = .betnet.fr force_https = .uprotect.it force_https = squareup.com force_https = square.com force_https = .cert.se force_https = .crypto.is force_https = .simon.butcher.name force_https = .linx.net force_https = re:^(www\.)?dropcam\.com$ force_https = .ebanking.indovinabank.com.vn force_https = epoxate.com force_https = torproject.org force_https = .blog.torproject.org force_https = .check.torproject.org force_https = .www.torproject.org force_https = .dist.torproject.org force_https = .www.moneybookers.com force_https = re:^(www\.)?ledgerscope\.net$ force_https = re:^(.*\.)*(app|api)\.recurly\.com$ force_https = re:^(www\.)?greplin\.com$ force_https = .luneta.nearbuysystems.com force_https = .ubertt.org force_https = .pixi.me force_https = .grepular.com force_https = re:^(www\.)?(developer\.|sandbox\.)?mydigipass\.com$ force_https = .crypto.cat force_https = .bigshinylock.minazo.net force_https = .crate.io force_https = twitter.com force_https = .www.twitter.com force_https = .braintreegateway.com force_https = re:^(www\.)?braintreepayments\.com$ force_https = emailprivacytester.com force_https = .business.medbank.com.mt force_https = .arivo.com.br force_https = .www.apollo-auto.com force_https = .www.cueup.com force_https = re:^(www\.)?jitsi\.org$ force_https = download.jitsi.org force_https = .sol.io force_https = re:^(www\.)?irccloud\.com$ force_https = alpha.irccloud.com force_https = .passwd.io force_https = .browserid.org force_https = .login.persona.org force_https = re:^(www\.|shops\.)?neonisi\.com$ force_https = .piratenlogin.de force_https = .howrandom.org force_https = re:^((api|www)\.)?intercom\.io$ force_https = .fatzebra.com.au force_https = .csawctf.poly.edu force_https = re:^(www\.)?makeyourlaws\.org$ force_https = .iop.intuit.com force_https = re:^(www\.)?surfeasy\.com$ force_https = packagist.org force_https = re:^(www\.|dm\.)?(my)?lookout.com$ force_https = .itriskltd.com force_https = .stocktrade.de force_https = .openshift.redhat.com force_https = re:^(www\.)?therapynotes\.com$ force_https = .wiz.biz force_https = .my.onlime.ch force_https = .webmail.onlime.ch force_https = .crm.onlime.ch force_https = .www.gov.uk force_https = re:^(.*\.)*silentcircle\.(com|org)$ force_https = .serverdensity.io force_https = .my.alfresco.com force_https = .webmail.gigahost.dk force_https = re:^(.*\.)*paymill\.(com|de)$ force_https = .gocardless.com force_https = .espra.com force_https = .zoo24.de force_https = mega.co.nz force_https = .api.mega.co.nz force_https = .lockify.com force_https = writeapp.me force_https = .bugzilla.mozilla.org force_https = .members.nearlyfreespeech.net force_https = ssl.panoramio.com force_https = kiwiirc.com force_https = re:^(.*\.)*(pay|controlcenter)\.gigahost\.dk$ force_https = re:^(www\.|fj\.|api\.)?simple\.com$ force_https = .bank.simple.com force_https = .bassh.net force_https = .sah3.net force_https = re:^(www\.)?grc\.com$ force_https = re:^(www\.|manager\.|blog\.|library\.|forum\.|p\.|paste\.|pastebin\.)linode\.com$ force_https = .inertianetworks.com force_https = carezone.com force_https = .conformal.com force_https = .cyphertite.com force_https = .logotype.se force_https = .bccx.com force_https = .launchkey.com force_https = .carlolly.co.uk force_https = .www.cyveillance.com force_https = .blog.cyveillance.com force_https = .whonix.org force_https = .blueseed.co force_https = .forum.quantifiedself.com force_https = .shodan.io force_https = re:^(www\.)?gmail\.com$ force_https = re:^(www\.)?googlemail\.com$ xombrero-1.6.4/http-accept-headers010064400017500000000000000437221247066410500161520ustar00dhillwheelhttp_accept = */* http_accept = */*, dn/1683134290-eb652b95,text/vnd.wap.wml;q=0.6,ss/360x640,UC/50 http_accept = */*, dn/2147582100-352110e0,text/vnd.wap.wml;q=0.6,ss/240x262,UC/69 http_accept = */*, dn/2169016810-40682892,text/vnd.wap.wml;q=0.6,ss/360x306,UC/69 http_accept = */*, dn/2169016810-40682892,text/vnd.wap.wml;q=0.6,ss/360x332,UC/69 http_accept = - http_accept = application/atom+xml, application/rss+xml, application/rdf+xml, text/xml, text/plain, text/html, text/*, */* http_accept = application/javascript, */*;q=0.8 http_accept = application/rdf+xml, text/rdf+n3, application/turtle, application/rdf+n3 http_accept = application/rdf+xml; q=1.0, text/rdf+n3; q=0.9, application/rdf+turtle; q=0.5, application/x-turtle; q=0.6, application/turtle; q=0.5, text/turtle; q=0.7, application/xml; q=0.2, */*; q=0.1 http_accept = application/rss+xml, application/xml, application/rdf+xml, text/xmltext/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 http_accept = application/vnd.wap.xhtml+xml http_accept = application/vnd.wap.xhtml+xml,application/xml,text/vnd.wap.wml,text/html,application/xhtml+xml,image/jpeg;q=0.5,image/png;q=0.5,image/gif;q=0.5,image/*;q=0.6,video/*,audio/*,*/*;q=0.6,plugin/1,alipay/un http_accept = application/vnd.youtube,*/* http_accept = application/x-ms-application, image/gif, application/xaml+xml, application/x-ms-xbap, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-xpsdocument, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/vnd.xfdl; version=7.6.1.315, */* http_accept = application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, */* http_accept = application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */* http_accept = application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* http_accept = application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/vnd.xfdl; version=7.6.1.315, */* http_accept = application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/x-esobi, */* http_accept = application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, */* http_accept = application/x-shockwave-flash, image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */* http_accept = application/x-shockwave-flash, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* http_accept = application/x-shockwave-flash,text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1 http_accept = application/xml,application/vnd.wap.xhtml+xml,application/xhtml+xml;profile='http://www.wapforum.org/xhtml',text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 http_accept = application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 http_accept = image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, */* http_accept = image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */* http_accept = image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, */* http_accept = image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-shockwave-flash, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/msword, application/x-shockwave-flash, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-silverlight, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/xaml+xml, application/x-ms-xbap, application/x-ms-application, application/vnd.ms-xpsdocument, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.xfdl; version=7.6.1.123, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-silverlight, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/xaml+xml, application/x-ms-xbap, application/x-ms-application, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/vnd.ms-xpsdocument, */* http_accept = image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/x-shockwave-flash, */* http_accept = image/gif, image/x-bitmap, image/jpeg, image/pjpeg http_accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* http_accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, \x5C*/\x5C* http_accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */* http_accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/vnd.ms-powerpoint, application/msword, */* http_accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* http_accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */* http_accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */* http_accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword, */* http_accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/msword, */* http_accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.xfdl; version=\x226.5.0\x22, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */* http_accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* http_accept = image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, */* http_accept = image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, */* http_accept = image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* http_accept = image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */* http_accept = image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* http_accept = image/jpeg, image/gif, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, */* http_accept = image/jpeg, image/gif, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* http_accept = image/png, image/jpeg, video/x-mng, image/jp2, image/gif;q=0.5,*/*;q=0.1 http_accept = image/png, image/svg+xml, image/*;q=0.8, */*;q=0.5 http_accept = image/png,*/*;q=0.5 http_accept = image/png,image/* http_accept = image/png,image/*;q=0.8,*/*;q=0.5 http_accept = text/* http_accept = text/*, image/* http_accept = text/*,image/*,*/*;q=0.2 http_accept = text/css http_accept = text/css,*/*;q=0.1 http_accept = text/css,*/*;q=0.1, dn/1683134290-eb652b95,text/vnd.wap.wml;q=0.6,ss/360x640,UC/50 http_accept = text/css,*/*;q=0.1, dn/2147582100-352110e0,text/vnd.wap.wml;q=0.6,ss/240x262,UC/69 http_accept = text/css,*/*;q=0.1, dn/2169016810-40682892,text/vnd.wap.wml;q=0.6,ss/360x306,UC/69 http_accept = text/css,*/*;q=0.1, dn/2169016810-40682892,text/vnd.wap.wml;q=0.6,ss/360x332,UC/69 http_accept = text/css,application/vnd.youtube,*/*;q=0.1 http_accept = text/css,text/html,text/xml,application/xhtml+xml,application/xml,image/svg+xml,*/*;q=0.1 http_accept = text/html http_accept = text/html, */* http_accept = text/html, */*; q=0.01 http_accept = text/html, application/xhtml+xml, */* http_accept = text/html, application/xml, image/vnd.wap.wbmp, image/png, image/jpeg, image/gif, image/bmp, application/vnd.wap.xhtml+xml, application/xhtml+xml, application/vnd.wap.multipart.mixed, multipart/mixed, application/vnd.oma.dd+xml, text/vnd.sun.j2me.app-descriptor, application/java-archive, application/vnd.youtube, */* http_accept = text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 http_accept = text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 http_accept = text/html, application/xml;q=0.9, application/xhtml+xml, multipart/mixed, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 http_accept = text/html, html/xml, application/rdf+xml;q=0.9, text/rdf+n3;q=0.9, application/turtle;q=0.9, application/rdf+n3;q=0.9, */*;q=0.8 http_accept = text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 http_accept = text/html, image/jpeg, image/png, text/*, image/*, */* http_accept = text/html, image/jpeg;q=0.9, image/png;q=0.9, text/*;q=0.9, image/*;q=0.9, */*;q=0.8 http_accept = text/html, text/* http_accept = text/html, text/*, application/* http_accept = text/html, text/*;q=0.5, image/* http_accept = text/html, text/*;q=0.5, image/*, application/*, video/*, audio/*, zz-application/*, message/* http_accept = text/html, text/*;q=0.9, image/jpeg;q=0.9, image/png;q=0.9, image/*;q=0.9, */*;q=0.8 http_accept = text/html, text/plain, text/css, text/sgml, */*;q=0.01 http_accept = text/html,application/msword,application/rtf,application/pdf,application/vnd.ms-powerpoint,application/vnd.ms-excel,application/octet-stream http_accept = text/html,application/msword,application/rtf,application/pdf,application/vnd:ms-powerpoint,application/vnd:ms-excel http_accept = text/html,application/xhtml+xml,application/xml,*/*;q=0.5 http_accept = text/html,application/xhtml+xml,application/xml,application/json;q=0.9,*/*;q=0.8 http_accept = text/html,application/xhtml+xml,application/xml;q=0.9 http_accept = text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 http_accept = text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8, dn/1683134290-eb652b95,text/vnd.wap.wml;q=0.6,ss/360x640,UC/50 http_accept = text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8, dn/2147582100-352110e0,text/vnd.wap.wml;q=0.6,ss/240x262,UC/69 http_accept = text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8, dn/2169016810-40682892,text/vnd.wap.wml;q=0.6,ss/360x306,UC/69 http_accept = text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8, dn/2169016810-40682892,text/vnd.wap.wml;q=0.6,ss/360x332,UC/69 http_accept = text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,application/json http_accept = text/html,application/xhtml+xml;q=0.9,*/*;q=0.5 http_accept = text/html,application/xhtml+xml;q=0.9,*/*;q=0.8 http_accept = text/html,application/xml,*/* http_accept = text/html,application/xml,image/vnd.wap.wbmp,image/png,image/jpeg, image/gif,image/bmp,application/vnd.wap.xhtml+xml,application/xhtml+xml,application/vnd.wap.multipart.mixed, multipart/mixed, application/vnd.oma.dd+xml,text/vnd.sun.j2me.app-descriptor,application/java-archive,application/vnd.youtube,*/* http_accept = text/html,application/xml;q=0.9,*/*;q=0.7 http_accept = text/html,application/xml;q=0.9,*/*;q=0.8 http_accept = text/html,application/xml;q=0.9,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 http_accept = text/html,text/css,multipart/mixed,application/java-archive, application/java, application/x-java-archive, text/vnd.sun.j2me.app-descriptor, application/vnd.oma.drm.message, application/vnd.oma.drm.content, application/vnd.oma.dd+xml, application/vnd.oma.drm.rights+xml, application/vnd.oma.drm.rights+wbxml, application/x-nokia-widget, */* http_accept = text/html,text/xml,application/xml,application/rss+xml,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 http_accept = text/html,text/xml,application/xml,application/xhtml+xml;q=0.9,text/plain;q=0.8,*/*;q=0.5 http_accept = text/html;q=0.8, */*;q=0.5 http_accept = text/plain http_accept = text/plain, text/html, html/xml, */* http_accept = text/plain,text/html http_accept = text/xml, text/html, application/xhtml+xml, image/png, text/plain, */*;q=0.8 http_accept = text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 http_accept = text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1 xombrero-1.6.4/input-focus.js010064400017500000000000000040101247066410500151770ustar00dhillwheel/* Copyright (c) 2009 Leon Winter Copyright (c) 2009-2011 Hannes Schueller Copyright (c) 2009-2010 Matto Fransen Copyright (c) 2010-2011 Hans-Peter Deifel Copyright (c) 2010-2011 Thomas Adam Copyright (c) 2011 Albert Kim Copyright (c) 2011 Daniel Carl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ function vimprobable_v(e, y) { t = e.nodeName.toLowerCase(); if((t == 'input' && /^(text|password|checkbox|radio)$/.test(e.type)) || /^(select|textarea)$/.test(t) || e.contentEditable == 'true') console.log('insertmode_'+(y=='focus'?'on':'off')); } if(document.activeElement) vimprobable_v(document.activeElement,'focus'); vimprobable_m=['focus','blur']; if (document.getElementsByTagName("body")[0] !== null && typeof(document.getElementsByTagName("body")[0]) == "object") { for(i in vimprobable_m) document.getElementsByTagName('body')[0].addEventListener(vimprobable_m[i], function(x) { vimprobable_v(x.target,x.type); }, true); } self.onunload = function() { vimprobable_v(document.activeElement, ''); }; xombrero-1.6.4/inputfocus.c010064400017500000000000000263411247066410500147430ustar00dhillwheel/* * Copyright (c) 2011 Marco Peereboom * Copyright (c) 2012, 2013 Josh Rickmar * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include #if WEBKIT_CHECK_VERSION(1, 5, 0) /* we got the DOM API we need */ void focus_body(WebKitDOMDocument *doc) { WebKitDOMNodeList *body = NULL; WebKitDOMNode *n; int i; body = webkit_dom_document_get_elements_by_tag_name(doc, "body"); for (i = 0; i < webkit_dom_node_list_get_length(body); ++i) { n = webkit_dom_node_list_item(body, i); webkit_dom_element_focus((WebKitDOMElement *)n); #if WEBKIT_CHECK_VERSION(1, 8, 0) webkit_dom_html_element_click((WebKitDOMHTMLElement *)n); #endif break; } } int node_is_valid_entry(WebKitDOMNode *n) { if (n == NULL) return (FALSE); if (WEBKIT_DOM_IS_HTML_INPUT_ELEMENT(n) && webkit_dom_html_input_element_check_validity( (WebKitDOMHTMLInputElement *)n)) return (TRUE); if (WEBKIT_DOM_IS_HTML_TEXT_AREA_ELEMENT(n) && webkit_dom_html_text_area_element_check_validity( (WebKitDOMHTMLTextAreaElement *)n)) return (TRUE); return (FALSE); } int focus_input_document(struct tab *t, WebKitDOMDocument *doc) { WebKitDOMNodeList *input = NULL, *textarea = NULL; WebKitDOMNode *n; char *es; int i, rv = 0 /* not found */; WebKitDOMHTMLTextAreaElement *ta; WebKitDOMHTMLInputElement *in; /* we are deliberately ignoring tab index! */ /* try input first */ input = webkit_dom_document_get_elements_by_tag_name(doc, "input"); for (i = 0; i < webkit_dom_node_list_get_length(input); i++) { n = webkit_dom_node_list_item(input, i); in = (WebKitDOMHTMLInputElement*)n; g_object_get(G_OBJECT(in), "type", &es, (char *)NULL); if ((g_strcmp0("text", es) && g_strcmp0("password",es)) || webkit_dom_html_input_element_get_disabled(in)) { /* skip not text */ g_free(es); continue; } webkit_dom_element_focus((WebKitDOMElement*)in); #if WEBKIT_CHECK_VERSION(1, 8, 0) webkit_dom_html_element_click((WebKitDOMHTMLElement*)in); #endif g_free(es); rv = 1; /* found */ goto done; } /* now try textarea */ textarea = webkit_dom_document_get_elements_by_tag_name(doc, "textarea"); for (i = 0; i < webkit_dom_node_list_get_length(textarea); i++) { n = webkit_dom_node_list_item(textarea, i); ta = (WebKitDOMHTMLTextAreaElement*)n; if (webkit_dom_html_text_area_element_get_disabled(ta)) { /* it is hidden so skip */ continue; } webkit_dom_element_focus((WebKitDOMElement*)ta); #if WEBKIT_CHECK_VERSION(1, 8, 0) webkit_dom_html_element_click((WebKitDOMHTMLElement*)ta); #endif rv = 1; /* found */ goto done; } done: if (input) g_object_unref(input); if (textarea) g_object_unref(textarea); return (rv); } char * get_element_text(WebKitDOMNode *n) { if (WEBKIT_DOM_IS_HTML_INPUT_ELEMENT(n)) return (g_strdup(webkit_dom_html_input_element_get_value( (WebKitDOMHTMLInputElement *)n))); else if (WEBKIT_DOM_IS_HTML_TEXT_AREA_ELEMENT(n)) return (g_strdup(webkit_dom_html_text_area_element_get_value( (WebKitDOMHTMLTextAreaElement *)n))); return (NULL); } int focus_input(struct tab *t) { WebKitDOMDocument *doc; WebKitDOMNode *n; WebKitDOMNodeList *fl = NULL, *ifl = NULL; WebKitDOMElement *a; int i, fl_count, ifl_count, rv = 0; /* not found */ WebKitDOMHTMLFrameElement *frame; WebKitDOMHTMLIFrameElement *iframe; /* * Here is what we are doing: * * If a textbox is already focused, leave it alone. * * Try the tab's previous active entry, for example if it was set by * some javascript when the page loaded. * * See if we got frames or iframes * * if we do focus on input or textarea in frame or in iframe * * if we find nothing or there are no frames focus on first input or * text area */ doc = webkit_web_view_get_dom_document(t->wv); #if WEBKIT_CHECK_VERSION(2, 0, 0) /* This check is broken on old webkit */ if (!WEBKIT_DOM_IS_HTML_DOCUMENT(doc)) { show_oops(t, "%s: DOM node is not a valid HTML document", __func__); goto done; } #endif /* try current active element */ a = webkit_dom_html_document_get_active_element( (WebKitDOMHTMLDocument*)doc); if (node_is_valid_entry((WebKitDOMNode *)a)) { rv = 1; /* found */ goto done; } /* try previous active element */ if (node_is_valid_entry((WebKitDOMNode *)t->active)) { webkit_dom_element_focus((WebKitDOMElement*)t->active); #if WEBKIT_CHECK_VERSION(1, 8, 0) webkit_dom_html_element_click((WebKitDOMHTMLElement*)t->active); #endif rv = 1; /* found */ goto done; } else { if (t->active) g_object_unref(t->active); t->active = NULL; if (t->active_text) { g_free(t->active_text); t->active_text = NULL; } } /* get frames */ fl = webkit_dom_document_get_elements_by_tag_name(doc, "frame"); fl_count = webkit_dom_node_list_get_length(fl); /* get iframes */ ifl = webkit_dom_document_get_elements_by_tag_name(doc, "iframe"); ifl_count = webkit_dom_node_list_get_length(ifl); /* walk frames and look for a text input */ for (i = 0; i < fl_count; i++) { n = webkit_dom_node_list_item(fl, i); frame = (WebKitDOMHTMLFrameElement*)n; doc = webkit_dom_html_frame_element_get_content_document(frame); if (focus_input_document(t, doc)) { rv = 1; /* focus */ goto done; } } /* walk iframes and look for a text input */ for (i = 0; i < ifl_count; i++) { n = webkit_dom_node_list_item(ifl, i); iframe = (WebKitDOMHTMLIFrameElement*)n; doc = webkit_dom_html_iframe_element_get_content_document(iframe); if (focus_input_document(t, doc)) { rv = 1; /* found */ goto done; } } /* if we made it here nothing got focused so use normal heuristic */ if (focus_input_document(t, webkit_web_view_get_dom_document(t->wv))) rv = 1; /* found */ done: if (fl) g_object_unref(fl); if (ifl) g_object_unref(ifl); return (rv); } int dom_is_input(struct tab *t, char **text) { WebKitDOMDocument *doc; WebKitDOMElement *a; WebKitDOMHTMLElement *aa; WebKitDOMHTMLObjectElement *object; WebKitDOMHTMLFrameElement *frame; WebKitDOMHTMLIFrameElement *iframe; /* proof positive that OO is stupid */ doc = webkit_web_view_get_dom_document(t->wv); /* unwind frames and iframes until the cows come home */ for (;;) { #if WEBKIT_CHECK_VERSION(2, 0, 0) if (!WEBKIT_DOM_IS_HTML_DOCUMENT(doc)) return (0); #endif a = webkit_dom_html_document_get_active_element( (WebKitDOMHTMLDocument*)doc); if (a == NULL) return (0); frame = (WebKitDOMHTMLFrameElement *)a; if (WEBKIT_DOM_IS_HTML_FRAME_ELEMENT(frame)) { doc = webkit_dom_html_frame_element_get_content_document( frame); continue; } iframe = (WebKitDOMHTMLIFrameElement *)a; if (WEBKIT_DOM_IS_HTML_IFRAME_ELEMENT(iframe)) { doc = webkit_dom_html_iframe_element_get_content_document( iframe); continue; } object = (WebKitDOMHTMLObjectElement *)a; if (WEBKIT_DOM_IS_HTML_OBJECT_ELEMENT(object)) { doc = webkit_dom_html_object_element_get_content_document( object); continue; } /* * I think this is a total hack because this property isn't * set for textareas or input however, it is set for jquery * textareas that do rich text. Since this works around issues * in RT we'll simply keep it! * * This might break some other stuff but for now it helps. */ aa = (WebKitDOMHTMLElement*)a; if (WEBKIT_DOM_IS_HTML_ELEMENT(aa) && webkit_dom_html_element_get_is_content_editable(aa)) { if (t->active == NULL) { t->active = a; g_object_ref(t->active); } *text = get_element_text((WebKitDOMNode *)a); if (t->active_text == NULL) t->active_text = g_strdup(*text); return (1); } break; } if (a == NULL) return (0); if (node_is_valid_entry((WebKitDOMNode *)a)) { if (!node_is_valid_entry((WebKitDOMNode *)t->active)) { if (t->active) g_object_unref(t->active); t->active = NULL; if (t->active_text) { g_free(t->active_text); t->active_text = NULL; } } if (t->active == NULL) { t->active = a; g_object_ref(t->active); } *text = get_element_text((WebKitDOMNode *)a); if (t->active_text == NULL) t->active_text = g_strdup(*text); return (1); } return (0); } void * input_check_mode(struct tab *t) { char *text = NULL; if (dom_is_input(t, &text)) { t->mode = XT_MODE_INSERT; return (t->active); } else return (NULL); } int command_mode(struct tab *t, struct karg *args) { WebKitDOMDocument *doc; WebKitDOMElement *a; if (args->i == XT_MODE_COMMAND) { doc = webkit_web_view_get_dom_document(t->wv); #if WEBKIT_CHECK_VERSION(2, 0, 0) if (!WEBKIT_DOM_IS_HTML_DOCUMENT(doc)) { show_oops(t, "%s: DOM node is not a valid HTML " "document", __func__); return (XT_CB_HANDLED); } #endif a = webkit_dom_html_document_get_active_element( (WebKitDOMHTMLDocument *)doc); if (a) { webkit_dom_element_blur(a); focus_body(doc); } t->mode = XT_MODE_COMMAND; } else if (args->i == XT_MODE_INSERT && focus_input(t)) t->mode = XT_MODE_INSERT; else if (args->i == XT_MODE_HINT || args->i == XT_MODE_PASSTHROUGH) t->mode = args->i; if (!node_is_valid_entry((WebKitDOMNode *)t->active)) { if (t->active) g_object_unref(t->active); t->active = NULL; if (t->active_text) { g_free(t->active_text); t->active_text = NULL; } } return (XT_CB_HANDLED); } void input_autofocus(struct tab *t) { struct karg args = {0}; char *text = NULL; if (autofocus_onload && t->tab_id == gtk_notebook_get_current_page(notebook)) { if (focus_input(t)) t->mode = XT_MODE_INSERT; else t->mode = XT_MODE_COMMAND; } else { if (dom_is_input(t, &text)) { if (text != NULL && g_strcmp0(text, t->active_text)) args.i = XT_MODE_INSERT; else args.i = XT_MODE_COMMAND; } else args.i = XT_MODE_COMMAND; command_mode(t, &args); } if (text) g_free(text); } #else /* WEBKIT_CHECK_VERSION */ /* incomplete DOM API */ /* * XXX * note that we can't check the return value of run_script so we * have to assume that the command worked; this may leave you in * insertmode when in fact you shouldn't be */ void input_autofocus(struct tab *t) { if (autofocus_onload && t->tab_id == gtk_notebook_get_current_page(notebook)) { run_script(t, "hints.focusInput();"); t->mode = XT_MODE_INSERT; } else { run_script(t, "hints.clearFocus();"); t->mode = XT_MODE_COMMAND; } } void * input_check_mode(struct tab *t) { return (NULL); } int command_mode(struct tab *t, struct karg *args) { if (args->i == XT_MODE_COMMAND) { run_script(t, "hints.clearFocus();"); t->mode = XT_MODE_COMMAND; } else { run_script(t, "hints.focusInput();"); t->mode = XT_MODE_INSERT; } return (XT_CB_HANDLED); } #endif xombrero-1.6.4/osx004075500017500000000000000000001247066410500131275ustar00dhillwheelxombrero-1.6.4/osx/Makefile010064400017500000000000000066621247066410500146550ustar00dhillwheelLIBS= glib-2.0 GTK_VERSION ?= gtk3 ifeq ("${GTK_VERSION}", "gtk2") LIBS+= gtk+-2.0 LIBS+= webkit-1.0 else LIBS+= gtk+-3.0 LIBS+= webkitgtk-3.0 endif LIBS+= libsoup-2.4 gnutls CFLAGS+= -O2 -Wall -D_GNU_SOURCE -I. -I.. $(shell pkg-config --cflags $(LIBS)) $(JS_CF) LDADD+= $(shell pkg-config --libs $(LIBS)) $(JS_LD) -ldl -lX11 PREFIX?= /usr/local BINDIR?= $(PREFIX)/bin APPDIR?= $(PREFIX)/share/applications MANDIR?= $(PREFIX)/share/man RESDIR?= $(PREFIX)/share/xombrero CFLAGS+= -DXT_DS_RESOURCE_DIR=\"$(RESDIR)\" SRCS= $(shell ls ../*.c) SRCS+= osx.c OBJS= $(SRCS:.c=.o) DEPS= $(addsuffix .depend, $(OBJS)) CC?= gcc BUILDVERSION= $(shell sh $(CURDIR)/../buildver.sh) ifneq ("${BUILDVERSION}", "") CFLAGS+= -DXOMBRERO_BUILDSTR=\"$(BUILDVERSION)\" endif all: javascript.h tooltip.h xombrero javascript.h: ../js-merge-helper.pl ../hinting.js ../autoscroll.js perl ../js-merge-helper.pl ../hinting.js ../input-focus.js \ ../autoscroll.js > javascript.h tooltip.h: ../ascii2txt.pl ../txt2tooltip.pl ../xombrero.1 nroff -c -Tascii -mandoc ../xombrero.1 | \ perl ../ascii2txt.pl | \ perl ../txt2tooltip.pl > tooltip.h xombrero: $(OBJS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LDADD) %.o: %.c @echo "Generating $@.depend" @$(CC) -MM $(CPPFLAGS) $(CFLAGS) $< | \ sed 's,^.*\.o[ :]*,$@ $@.depend : ,g' > $@.depend $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $< install: all install -m 755 -d $(DESTDIR)$(BINDIR) install -m 755 -d $(DESTDIR)$(MANDIR)/man1 install -m 755 -d $(DESTDIR)$(RESDIR) install -m 755 -d $(DESTDIR)$(APPDIR) install -m 755 xombrero $(DESTDIR)$(BINDIR) install -m 644 ../xombrero.1 $(DESTDIR)$(MANDIR)/man1/xombrero.1 install -m 644 ../xombrero.css $(DESTDIR)$(RESDIR) install -m 644 ../xombrero.desktop $(DESTDIR)$(APPDIR) install -m 644 ../xombreroicon16.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon32.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon48.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon64.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon128.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon256.png $(DESTDIR)$(RESDIR) install -m 644 ../favicon.ico $(DESTDIR)$(RESDIR) install -m 644 ../tld-rules $(DESTDIR)$(RESDIR) install -m 644 ../style.css $(DESTDIR)$(RESDIR) install -m 644 ../hsts-preload $(DESTDIR)$(RESDIR) install -m 644 ../user-agent-headers ${DESTDIR}$(RESDIR) install -m 644 ../http-accept-headers ${DESTDIR}$(RESDIR) install -m 644 ../torenabled.ico $(DESTDIR)$(RESDIR) install -m 644 ../tordisabled.ico $(DESTDIR)$(RESDIR) uninstall: rm -f $(DESTDIR)$(BINDIR)/xombrero rm -f $(DESTDIR)$(MANDIR)/man1/xombrero.1 rm -f $(DESTDIR)$(APPDIR)/xombrero.desktop rm -f $(DESTDIR)$(RESDIR)/xombreroicon16.png rm -f $(DESTDIR)$(RESDIR)/xombreroicon32.png rm -f $(DESTDIR)$(RESDIR)/xombreroicon48.png rm -f $(DESTDIR)$(RESDIR)/xombreroicon64.png rm -f $(DESTDIR)$(RESDIR)/xombreroicon128.png rm -f $(DESTDIR)$(RESDIR)/xombreroicon256.png rm -f $(DESTDIR)$(RESDIR)/xombrero.css rm -f $(DESTDIR)$(RESDIR)/favicon.ico rm -f $(DESTDIR)$(RESDIR)/tordisabled.ico rm -f $(DESTDIR)$(RESDIR)/torenabled.ico rm -f $(DESTDIR)$(RESDIR)/tld-rules rm -f $(DESTDIR)$(RESDIR)/style.css rm -f $(DESTDIR)$(RESDIR)/hsts-preload rm -f ${DESTDIR}$(RESDIR)/user-agent-headers rm -f ${DESTDIR}$(RESDIR)/http-accept-headers if [ -d $(DESTDIR)$(RESDIR) ]; then rmdir $(DESTDIR)$(RESDIR); fi clean: rm -f xombrero $(OBJS) $(DEPS) rm -f javascript.h rm -f tooltip.h -include $(DEPS) .PHONY: all install clean xombrero-1.6.4/osx/osx.c010064400017500000000000000203051247066410500141600ustar00dhillwheel/* $OpenBSD: fmt_scaled.c,v 1.10 2009/06/20 15:00:04 martynas Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Ian F. Darwin. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * fmt_scaled: Format numbers scaled for human comprehension * scan_scaled: Scan numbers in this format. * * "Human-readable" output uses 4 digits max, and puts a unit suffix at * the end. Makes output compact and easy-to-read esp. on huge disks. * Formatting code was originally in OpenBSD "df", converted to library routine. * Scanning code written for OpenBSD libutil. */ #include #include #include #include #include #include #include #include "util.h" typedef enum { NONE = 0, KILO = 1, MEGA = 2, GIGA = 3, TERA = 4, PETA = 5, EXA = 6 } unit_type; /* These three arrays MUST be in sync! XXX make a struct */ static unit_type units[] = { NONE, KILO, MEGA, GIGA, TERA, PETA, EXA }; static char scale_chars[] = "BKMGTPE"; static long long scale_factors[] = { 1LL, 1024LL, 1024LL*1024, 1024LL*1024*1024, 1024LL*1024*1024*1024, 1024LL*1024*1024*1024*1024, 1024LL*1024*1024*1024*1024*1024, }; #define SCALE_LENGTH (sizeof(units)/sizeof(units[0])) #define MAX_DIGITS (SCALE_LENGTH * 3) /* XXX strlen(sprintf("%lld", -1)? */ /* Convert the given input string "scaled" into numeric in "result". * Return 0 on success, -1 and errno set on error. */ int scan_scaled(char *scaled, long long *result) { char *p = scaled; int sign = 0; unsigned int i, ndigits = 0, fract_digits = 0; long long scale_fact = 1, whole = 0, fpart = 0; /* Skip leading whitespace */ while (isascii(*p) && isspace(*p)) ++p; /* Then at most one leading + or - */ while (*p == '-' || *p == '+') { if (*p == '-') { if (sign) { errno = EINVAL; return -1; } sign = -1; ++p; } else if (*p == '+') { if (sign) { errno = EINVAL; return -1; } sign = +1; ++p; } } /* Main loop: Scan digits, find decimal point, if present. * We don't allow exponentials, so no scientific notation * (but note that E for Exa might look like e to some!). * Advance 'p' to end, to get scale factor. */ for (; isascii(*p) && (isdigit(*p) || *p=='.'); ++p) { if (*p == '.') { if (fract_digits > 0) { /* oops, more than one '.' */ errno = EINVAL; return -1; } fract_digits = 1; continue; } i = (*p) - '0'; /* whew! finally a digit we can use */ if (fract_digits > 0) { if (fract_digits >= MAX_DIGITS-1) /* ignore extra fractional digits */ continue; fract_digits++; /* for later scaling */ fpart *= 10; fpart += i; } else { /* normal digit */ if (++ndigits >= MAX_DIGITS) { errno = ERANGE; return -1; } whole *= 10; whole += i; } } if (sign) { whole *= sign; fpart *= sign; } /* If no scale factor given, we're done. fraction is discarded. */ if (!*p) { *result = whole; return 0; } /* Validate scale factor, and scale whole and fraction by it. */ for (i = 0; i < SCALE_LENGTH; i++) { /* Are we there yet? */ if (*p == scale_chars[i] || *p == tolower(scale_chars[i])) { /* If it ends with alphanumerics after the scale char, bad. */ if (isalnum(*(p+1))) { errno = EINVAL; return -1; } scale_fact = scale_factors[i]; /* scale whole part */ whole *= scale_fact; /* truncate fpart so it does't overflow. * then scale fractional part. */ while (fpart >= LLONG_MAX / scale_fact) { fpart /= 10; fract_digits--; } fpart *= scale_fact; if (fract_digits > 0) { for (i = 0; i < fract_digits -1; i++) fpart /= 10; } whole += fpart; *result = whole; return 0; } } errno = ERANGE; return -1; } /* Format the given "number" into human-readable form in "result". * Result must point to an allocated buffer of length FMT_SCALED_STRSIZE. * Return 0 on success, -1 and errno set if error. */ int fmt_scaled(long long number, char *result) { long long abval, fract = 0; unsigned int i; unit_type unit = NONE; abval = llabs(number); /* Not every negative long long has a positive representation. * Also check for numbers that are just too darned big to format */ if (abval < 0 || abval / 1024 >= scale_factors[SCALE_LENGTH-1]) { errno = ERANGE; return -1; } /* scale whole part; get unscaled fraction */ for (i = 0; i < SCALE_LENGTH; i++) { if (abval/1024 < scale_factors[i]) { unit = units[i]; fract = (i == 0) ? 0 : abval % scale_factors[i]; number /= scale_factors[i]; if (i > 0) fract /= scale_factors[i - 1]; break; } } fract = (10 * fract + 512) / 1024; /* if the result would be >= 10, round main number */ if (fract == 10) { if (number >= 0) number++; else number--; fract = 0; } if (number == 0) strlcpy(result, "0B", FMT_SCALED_STRSIZE); else if (unit == NONE || number >= 100 || number <= -100) { if (fract >= 5) { if (number >= 0) number++; else number--; } (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld%c", number, scale_chars[unit]); } else (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld.%1lld%c", number, fract, scale_chars[unit]); return 0; } /* --------------------------------------------------------------------------- */ /* $OpenBSD: strtonum.c,v 1.6 2004/08/03 19:38:01 millert Exp $ */ /* * Copyright (c) 2004 Ted Unangst and Todd Miller * All rights reserved. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #define INVALID 1 #define TOOSMALL 2 #define TOOLARGE 3 long long strtonum(const char *numstr, long long minval, long long maxval, const char **errstrp) { long long ll = 0; char *ep; int error = 0; struct errval { const char *errstr; int err; } ev[4] = { { NULL, 0 }, { "invalid", EINVAL }, { "too small", ERANGE }, { "too large", ERANGE }, }; ev[0].err = errno; errno = 0; if (minval > maxval) error = INVALID; else { ll = strtoll(numstr, &ep, 10); if (numstr == ep || *ep != '\0') error = INVALID; else if ((ll == LLONG_MIN && errno == ERANGE) || ll < minval) error = TOOSMALL; else if ((ll == LLONG_MAX && errno == ERANGE) || ll > maxval) error = TOOLARGE; } if (errstrp != NULL) *errstrp = ev[error].errstr; errno = ev[error].err; if (error) ll = 0; return (ll); } xombrero-1.6.4/osx/tree.h010064400017500000000000000610641247066410500143220ustar00dhillwheel/* $OpenBSD: tree.h,v 1.13 2011/07/09 00:19:45 pirofti Exp $ */ /* * Copyright 2002 Niels Provos * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _SYS_TREE_H_ #define _SYS_TREE_H_ /* * This file defines data structures for different types of trees: * splay trees and red-black trees. * * A splay tree is a self-organizing data structure. Every operation * on the tree causes a splay to happen. The splay moves the requested * node to the root of the tree and partly rebalances it. * * This has the benefit that request locality causes faster lookups as * the requested nodes move to the top of the tree. On the other hand, * every lookup causes memory writes. * * The Balance Theorem bounds the total access time for m operations * and n inserts on an initially empty tree as O((m + n)lg n). The * amortized cost for a sequence of m accesses to a splay tree is O(lg n); * * A red-black tree is a binary search tree with the node color as an * extra attribute. It fulfills a set of conditions: * - every search path from the root to a leaf consists of the * same number of black nodes, * - each red node (except for the root) has a black parent, * - each leaf node is black. * * Every operation on a red-black tree is bounded as O(lg n). * The maximum height of a red-black tree is 2lg (n+1). */ #define SPLAY_HEAD(name, type) \ struct name { \ struct type *sph_root; /* root of the tree */ \ } #define SPLAY_INITIALIZER(root) \ { NULL } #define SPLAY_INIT(root) do { \ (root)->sph_root = NULL; \ } while (0) #define SPLAY_ENTRY(type) \ struct { \ struct type *spe_left; /* left element */ \ struct type *spe_right; /* right element */ \ } #define SPLAY_LEFT(elm, field) (elm)->field.spe_left #define SPLAY_RIGHT(elm, field) (elm)->field.spe_right #define SPLAY_ROOT(head) (head)->sph_root #define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) /* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */ #define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \ SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ (head)->sph_root = tmp; \ } while (0) #define SPLAY_ROTATE_LEFT(head, tmp, field) do { \ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ SPLAY_LEFT(tmp, field) = (head)->sph_root; \ (head)->sph_root = tmp; \ } while (0) #define SPLAY_LINKLEFT(head, tmp, field) do { \ SPLAY_LEFT(tmp, field) = (head)->sph_root; \ tmp = (head)->sph_root; \ (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ } while (0) #define SPLAY_LINKRIGHT(head, tmp, field) do { \ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ tmp = (head)->sph_root; \ (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ } while (0) #define SPLAY_ASSEMBLE(head, node, left, right, field) do { \ SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \ SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\ SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \ } while (0) /* Generates prototypes and inline functions */ #define SPLAY_PROTOTYPE(name, type, field, cmp) \ void name##_SPLAY(struct name *, struct type *); \ void name##_SPLAY_MINMAX(struct name *, int); \ struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ \ /* Finds the node with the same key as elm */ \ static __inline struct type * \ name##_SPLAY_FIND(struct name *head, struct type *elm) \ { \ if (SPLAY_EMPTY(head)) \ return(NULL); \ name##_SPLAY(head, elm); \ if ((cmp)(elm, (head)->sph_root) == 0) \ return (head->sph_root); \ return (NULL); \ } \ \ static __inline struct type * \ name##_SPLAY_NEXT(struct name *head, struct type *elm) \ { \ name##_SPLAY(head, elm); \ if (SPLAY_RIGHT(elm, field) != NULL) { \ elm = SPLAY_RIGHT(elm, field); \ while (SPLAY_LEFT(elm, field) != NULL) { \ elm = SPLAY_LEFT(elm, field); \ } \ } else \ elm = NULL; \ return (elm); \ } \ \ static __inline struct type * \ name##_SPLAY_MIN_MAX(struct name *head, int val) \ { \ name##_SPLAY_MINMAX(head, val); \ return (SPLAY_ROOT(head)); \ } /* Main splay operation. * Moves node close to the key of elm to top */ #define SPLAY_GENERATE(name, type, field, cmp) \ struct type * \ name##_SPLAY_INSERT(struct name *head, struct type *elm) \ { \ if (SPLAY_EMPTY(head)) { \ SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \ } else { \ int __comp; \ name##_SPLAY(head, elm); \ __comp = (cmp)(elm, (head)->sph_root); \ if(__comp < 0) { \ SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\ SPLAY_RIGHT(elm, field) = (head)->sph_root; \ SPLAY_LEFT((head)->sph_root, field) = NULL; \ } else if (__comp > 0) { \ SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\ SPLAY_LEFT(elm, field) = (head)->sph_root; \ SPLAY_RIGHT((head)->sph_root, field) = NULL; \ } else \ return ((head)->sph_root); \ } \ (head)->sph_root = (elm); \ return (NULL); \ } \ \ struct type * \ name##_SPLAY_REMOVE(struct name *head, struct type *elm) \ { \ struct type *__tmp; \ if (SPLAY_EMPTY(head)) \ return (NULL); \ name##_SPLAY(head, elm); \ if ((cmp)(elm, (head)->sph_root) == 0) { \ if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \ (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\ } else { \ __tmp = SPLAY_RIGHT((head)->sph_root, field); \ (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\ name##_SPLAY(head, elm); \ SPLAY_RIGHT((head)->sph_root, field) = __tmp; \ } \ return (elm); \ } \ return (NULL); \ } \ \ void \ name##_SPLAY(struct name *head, struct type *elm) \ { \ struct type __node, *__left, *__right, *__tmp; \ int __comp; \ \ SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ __left = __right = &__node; \ \ while ((__comp = (cmp)(elm, (head)->sph_root))) { \ if (__comp < 0) { \ __tmp = SPLAY_LEFT((head)->sph_root, field); \ if (__tmp == NULL) \ break; \ if ((cmp)(elm, __tmp) < 0){ \ SPLAY_ROTATE_RIGHT(head, __tmp, field); \ if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ break; \ } \ SPLAY_LINKLEFT(head, __right, field); \ } else if (__comp > 0) { \ __tmp = SPLAY_RIGHT((head)->sph_root, field); \ if (__tmp == NULL) \ break; \ if ((cmp)(elm, __tmp) > 0){ \ SPLAY_ROTATE_LEFT(head, __tmp, field); \ if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ break; \ } \ SPLAY_LINKRIGHT(head, __left, field); \ } \ } \ SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ } \ \ /* Splay with either the minimum or the maximum element \ * Used to find minimum or maximum element in tree. \ */ \ void name##_SPLAY_MINMAX(struct name *head, int __comp) \ { \ struct type __node, *__left, *__right, *__tmp; \ \ SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ __left = __right = &__node; \ \ while (1) { \ if (__comp < 0) { \ __tmp = SPLAY_LEFT((head)->sph_root, field); \ if (__tmp == NULL) \ break; \ if (__comp < 0){ \ SPLAY_ROTATE_RIGHT(head, __tmp, field); \ if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ break; \ } \ SPLAY_LINKLEFT(head, __right, field); \ } else if (__comp > 0) { \ __tmp = SPLAY_RIGHT((head)->sph_root, field); \ if (__tmp == NULL) \ break; \ if (__comp > 0) { \ SPLAY_ROTATE_LEFT(head, __tmp, field); \ if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ break; \ } \ SPLAY_LINKRIGHT(head, __left, field); \ } \ } \ SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ } #define SPLAY_NEGINF -1 #define SPLAY_INF 1 #define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) #define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) #define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) #define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) #define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \ : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF)) #define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \ : name##_SPLAY_MIN_MAX(x, SPLAY_INF)) #define SPLAY_FOREACH(x, name, head) \ for ((x) = SPLAY_MIN(name, head); \ (x) != NULL; \ (x) = SPLAY_NEXT(name, head, x)) /* Macros that define a red-black tree */ #define RB_HEAD(name, type) \ struct name { \ struct type *rbh_root; /* root of the tree */ \ } #define RB_INITIALIZER(root) \ { NULL } #define RB_INIT(root) do { \ (root)->rbh_root = NULL; \ } while (0) #define RB_BLACK 0 #define RB_RED 1 #define RB_ENTRY(type) \ struct { \ struct type *rbe_left; /* left element */ \ struct type *rbe_right; /* right element */ \ struct type *rbe_parent; /* parent element */ \ int rbe_color; /* node color */ \ } #define RB_LEFT(elm, field) (elm)->field.rbe_left #define RB_RIGHT(elm, field) (elm)->field.rbe_right #define RB_PARENT(elm, field) (elm)->field.rbe_parent #define RB_COLOR(elm, field) (elm)->field.rbe_color #define RB_ROOT(head) (head)->rbh_root #define RB_EMPTY(head) (RB_ROOT(head) == NULL) #define RB_SET(elm, parent, field) do { \ RB_PARENT(elm, field) = parent; \ RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ RB_COLOR(elm, field) = RB_RED; \ } while (0) #define RB_SET_BLACKRED(black, red, field) do { \ RB_COLOR(black, field) = RB_BLACK; \ RB_COLOR(red, field) = RB_RED; \ } while (0) #ifndef RB_AUGMENT #define RB_AUGMENT(x) do {} while (0) #endif #define RB_ROTATE_LEFT(head, elm, tmp, field) do { \ (tmp) = RB_RIGHT(elm, field); \ if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field))) { \ RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ } \ RB_AUGMENT(elm); \ if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \ if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ else \ RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ } else \ (head)->rbh_root = (tmp); \ RB_LEFT(tmp, field) = (elm); \ RB_PARENT(elm, field) = (tmp); \ RB_AUGMENT(tmp); \ if ((RB_PARENT(tmp, field))) \ RB_AUGMENT(RB_PARENT(tmp, field)); \ } while (0) #define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \ (tmp) = RB_LEFT(elm, field); \ if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field))) { \ RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ } \ RB_AUGMENT(elm); \ if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \ if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ else \ RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ } else \ (head)->rbh_root = (tmp); \ RB_RIGHT(tmp, field) = (elm); \ RB_PARENT(elm, field) = (tmp); \ RB_AUGMENT(tmp); \ if ((RB_PARENT(tmp, field))) \ RB_AUGMENT(RB_PARENT(tmp, field)); \ } while (0) /* Generates prototypes and inline functions */ #define RB_PROTOTYPE(name, type, field, cmp) \ RB_PROTOTYPE_INTERNAL(name, type, field, cmp,) #define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __attribute__((__unused__)) static) #define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \ attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\ attr struct type *name##_RB_REMOVE(struct name *, struct type *); \ attr struct type *name##_RB_INSERT(struct name *, struct type *); \ attr struct type *name##_RB_FIND(struct name *, struct type *); \ attr struct type *name##_RB_NFIND(struct name *, struct type *); \ attr struct type *name##_RB_NEXT(struct type *); \ attr struct type *name##_RB_PREV(struct type *); \ attr struct type *name##_RB_MINMAX(struct name *, int); \ \ /* Main rb operation. * Moves node close to the key of elm to top */ #define RB_GENERATE(name, type, field, cmp) \ RB_GENERATE_INTERNAL(name, type, field, cmp,) #define RB_GENERATE_STATIC(name, type, field, cmp) \ RB_GENERATE_INTERNAL(name, type, field, cmp, __attribute__((__unused__)) static) #define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ attr void \ name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \ { \ struct type *parent, *gparent, *tmp; \ while ((parent = RB_PARENT(elm, field)) && \ RB_COLOR(parent, field) == RB_RED) { \ gparent = RB_PARENT(parent, field); \ if (parent == RB_LEFT(gparent, field)) { \ tmp = RB_RIGHT(gparent, field); \ if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ RB_COLOR(tmp, field) = RB_BLACK; \ RB_SET_BLACKRED(parent, gparent, field);\ elm = gparent; \ continue; \ } \ if (RB_RIGHT(parent, field) == elm) { \ RB_ROTATE_LEFT(head, parent, tmp, field);\ tmp = parent; \ parent = elm; \ elm = tmp; \ } \ RB_SET_BLACKRED(parent, gparent, field); \ RB_ROTATE_RIGHT(head, gparent, tmp, field); \ } else { \ tmp = RB_LEFT(gparent, field); \ if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ RB_COLOR(tmp, field) = RB_BLACK; \ RB_SET_BLACKRED(parent, gparent, field);\ elm = gparent; \ continue; \ } \ if (RB_LEFT(parent, field) == elm) { \ RB_ROTATE_RIGHT(head, parent, tmp, field);\ tmp = parent; \ parent = elm; \ elm = tmp; \ } \ RB_SET_BLACKRED(parent, gparent, field); \ RB_ROTATE_LEFT(head, gparent, tmp, field); \ } \ } \ RB_COLOR(head->rbh_root, field) = RB_BLACK; \ } \ \ attr void \ name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \ { \ struct type *tmp; \ while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \ elm != RB_ROOT(head)) { \ if (RB_LEFT(parent, field) == elm) { \ tmp = RB_RIGHT(parent, field); \ if (RB_COLOR(tmp, field) == RB_RED) { \ RB_SET_BLACKRED(tmp, parent, field); \ RB_ROTATE_LEFT(head, parent, tmp, field);\ tmp = RB_RIGHT(parent, field); \ } \ if ((RB_LEFT(tmp, field) == NULL || \ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ (RB_RIGHT(tmp, field) == NULL || \ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ RB_COLOR(tmp, field) = RB_RED; \ elm = parent; \ parent = RB_PARENT(elm, field); \ } else { \ if (RB_RIGHT(tmp, field) == NULL || \ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\ struct type *oleft; \ if ((oleft = RB_LEFT(tmp, field)))\ RB_COLOR(oleft, field) = RB_BLACK;\ RB_COLOR(tmp, field) = RB_RED; \ RB_ROTATE_RIGHT(head, tmp, oleft, field);\ tmp = RB_RIGHT(parent, field); \ } \ RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ RB_COLOR(parent, field) = RB_BLACK; \ if (RB_RIGHT(tmp, field)) \ RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\ RB_ROTATE_LEFT(head, parent, tmp, field);\ elm = RB_ROOT(head); \ break; \ } \ } else { \ tmp = RB_LEFT(parent, field); \ if (RB_COLOR(tmp, field) == RB_RED) { \ RB_SET_BLACKRED(tmp, parent, field); \ RB_ROTATE_RIGHT(head, parent, tmp, field);\ tmp = RB_LEFT(parent, field); \ } \ if ((RB_LEFT(tmp, field) == NULL || \ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ (RB_RIGHT(tmp, field) == NULL || \ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ RB_COLOR(tmp, field) = RB_RED; \ elm = parent; \ parent = RB_PARENT(elm, field); \ } else { \ if (RB_LEFT(tmp, field) == NULL || \ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\ struct type *oright; \ if ((oright = RB_RIGHT(tmp, field)))\ RB_COLOR(oright, field) = RB_BLACK;\ RB_COLOR(tmp, field) = RB_RED; \ RB_ROTATE_LEFT(head, tmp, oright, field);\ tmp = RB_LEFT(parent, field); \ } \ RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ RB_COLOR(parent, field) = RB_BLACK; \ if (RB_LEFT(tmp, field)) \ RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\ RB_ROTATE_RIGHT(head, parent, tmp, field);\ elm = RB_ROOT(head); \ break; \ } \ } \ } \ if (elm) \ RB_COLOR(elm, field) = RB_BLACK; \ } \ \ attr struct type * \ name##_RB_REMOVE(struct name *head, struct type *elm) \ { \ struct type *child, *parent, *old = elm; \ int color; \ if (RB_LEFT(elm, field) == NULL) \ child = RB_RIGHT(elm, field); \ else if (RB_RIGHT(elm, field) == NULL) \ child = RB_LEFT(elm, field); \ else { \ struct type *left; \ elm = RB_RIGHT(elm, field); \ while ((left = RB_LEFT(elm, field))) \ elm = left; \ child = RB_RIGHT(elm, field); \ parent = RB_PARENT(elm, field); \ color = RB_COLOR(elm, field); \ if (child) \ RB_PARENT(child, field) = parent; \ if (parent) { \ if (RB_LEFT(parent, field) == elm) \ RB_LEFT(parent, field) = child; \ else \ RB_RIGHT(parent, field) = child; \ RB_AUGMENT(parent); \ } else \ RB_ROOT(head) = child; \ if (RB_PARENT(elm, field) == old) \ parent = elm; \ (elm)->field = (old)->field; \ if (RB_PARENT(old, field)) { \ if (RB_LEFT(RB_PARENT(old, field), field) == old)\ RB_LEFT(RB_PARENT(old, field), field) = elm;\ else \ RB_RIGHT(RB_PARENT(old, field), field) = elm;\ RB_AUGMENT(RB_PARENT(old, field)); \ } else \ RB_ROOT(head) = elm; \ RB_PARENT(RB_LEFT(old, field), field) = elm; \ if (RB_RIGHT(old, field)) \ RB_PARENT(RB_RIGHT(old, field), field) = elm; \ if (parent) { \ left = parent; \ do { \ RB_AUGMENT(left); \ } while ((left = RB_PARENT(left, field))); \ } \ goto color; \ } \ parent = RB_PARENT(elm, field); \ color = RB_COLOR(elm, field); \ if (child) \ RB_PARENT(child, field) = parent; \ if (parent) { \ if (RB_LEFT(parent, field) == elm) \ RB_LEFT(parent, field) = child; \ else \ RB_RIGHT(parent, field) = child; \ RB_AUGMENT(parent); \ } else \ RB_ROOT(head) = child; \ color: \ if (color == RB_BLACK) \ name##_RB_REMOVE_COLOR(head, parent, child); \ return (old); \ } \ \ /* Inserts a node into the RB tree */ \ attr struct type * \ name##_RB_INSERT(struct name *head, struct type *elm) \ { \ struct type *tmp; \ struct type *parent = NULL; \ int comp = 0; \ tmp = RB_ROOT(head); \ while (tmp) { \ parent = tmp; \ comp = (cmp)(elm, parent); \ if (comp < 0) \ tmp = RB_LEFT(tmp, field); \ else if (comp > 0) \ tmp = RB_RIGHT(tmp, field); \ else \ return (tmp); \ } \ RB_SET(elm, parent, field); \ if (parent != NULL) { \ if (comp < 0) \ RB_LEFT(parent, field) = elm; \ else \ RB_RIGHT(parent, field) = elm; \ RB_AUGMENT(parent); \ } else \ RB_ROOT(head) = elm; \ name##_RB_INSERT_COLOR(head, elm); \ return (NULL); \ } \ \ /* Finds the node with the same key as elm */ \ attr struct type * \ name##_RB_FIND(struct name *head, struct type *elm) \ { \ struct type *tmp = RB_ROOT(head); \ int comp; \ while (tmp) { \ comp = cmp(elm, tmp); \ if (comp < 0) \ tmp = RB_LEFT(tmp, field); \ else if (comp > 0) \ tmp = RB_RIGHT(tmp, field); \ else \ return (tmp); \ } \ return (NULL); \ } \ \ /* Finds the first node greater than or equal to the search key */ \ attr struct type * \ name##_RB_NFIND(struct name *head, struct type *elm) \ { \ struct type *tmp = RB_ROOT(head); \ struct type *res = NULL; \ int comp; \ while (tmp) { \ comp = cmp(elm, tmp); \ if (comp < 0) { \ res = tmp; \ tmp = RB_LEFT(tmp, field); \ } \ else if (comp > 0) \ tmp = RB_RIGHT(tmp, field); \ else \ return (tmp); \ } \ return (res); \ } \ \ /* ARGSUSED */ \ attr struct type * \ name##_RB_NEXT(struct type *elm) \ { \ if (RB_RIGHT(elm, field)) { \ elm = RB_RIGHT(elm, field); \ while (RB_LEFT(elm, field)) \ elm = RB_LEFT(elm, field); \ } else { \ if (RB_PARENT(elm, field) && \ (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ elm = RB_PARENT(elm, field); \ else { \ while (RB_PARENT(elm, field) && \ (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\ elm = RB_PARENT(elm, field); \ elm = RB_PARENT(elm, field); \ } \ } \ return (elm); \ } \ \ /* ARGSUSED */ \ attr struct type * \ name##_RB_PREV(struct type *elm) \ { \ if (RB_LEFT(elm, field)) { \ elm = RB_LEFT(elm, field); \ while (RB_RIGHT(elm, field)) \ elm = RB_RIGHT(elm, field); \ } else { \ if (RB_PARENT(elm, field) && \ (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ elm = RB_PARENT(elm, field); \ else { \ while (RB_PARENT(elm, field) && \ (elm == RB_LEFT(RB_PARENT(elm, field), field)))\ elm = RB_PARENT(elm, field); \ elm = RB_PARENT(elm, field); \ } \ } \ return (elm); \ } \ \ attr struct type * \ name##_RB_MINMAX(struct name *head, int val) \ { \ struct type *tmp = RB_ROOT(head); \ struct type *parent = NULL; \ while (tmp) { \ parent = tmp; \ if (val < 0) \ tmp = RB_LEFT(tmp, field); \ else \ tmp = RB_RIGHT(tmp, field); \ } \ return (parent); \ } #define RB_NEGINF -1 #define RB_INF 1 #define RB_INSERT(name, x, y) name##_RB_INSERT(x, y) #define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y) #define RB_FIND(name, x, y) name##_RB_FIND(x, y) #define RB_NFIND(name, x, y) name##_RB_NFIND(x, y) #define RB_NEXT(name, x, y) name##_RB_NEXT(y) #define RB_PREV(name, x, y) name##_RB_PREV(y) #define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF) #define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF) #define RB_FOREACH(x, name, head) \ for ((x) = RB_MIN(name, head); \ (x) != NULL; \ (x) = name##_RB_NEXT(x)) #define RB_FOREACH_SAFE(x, name, head, y) \ for ((x) = RB_MIN(name, head); \ ((x) != NULL) && ((y) = name##_RB_NEXT(x), 1); \ (x) = (y)) #define RB_FOREACH_REVERSE(x, name, head) \ for ((x) = RB_MAX(name, head); \ (x) != NULL; \ (x) = name##_RB_PREV(x)) #define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \ for ((x) = RB_MAX(name, head); \ ((x) != NULL) && ((y) = name##_RB_PREV(x), 1); \ (x) = (y)) #endif /* _SYS_TREE_H_ */ xombrero-1.6.4/osx/util.h010064400017500000000000000037351247066410500143410ustar00dhillwheel/* * Copyright (c) 2010 Marco Peereboom * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #define FPARSELN_UNESCESC 0x01 #define FPARSELN_UNESCCONT 0x02 #define FPARSELN_UNESCCOMM 0x04 #define FPARSELN_UNESCREST 0x08 #define FPARSELN_UNESCALL 0x0f #if !__has_builtin(strlcpy) size_t strlcpy(char *, const char *, size_t); #endif #if !__has_builtin(strlcat) size_t strlcat(char *, const char *, size_t); #endif char *fgetln(FILE *, size_t *); char *fparseln(FILE *, size_t *, size_t *, const char [3], int); long long strtonum(const char *, long long, long long, const char **); int fmt_scaled(long long number, char *result); #ifndef WAIT_ANY #define WAIT_ANY (-1) #endif /* there is no limit to ulrich drepper's crap */ #ifndef TAILQ_END #define TAILQ_END(head) NULL #endif #ifndef TAILQ_FOREACH_SAFE #define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = TAILQ_FIRST(head); \ (var) != TAILQ_END(head) && \ ((tvar) = TAILQ_NEXT(var, field), 1); \ (var) = (tvar)) #endif /* * fmt_scaled(3) specific flags. (from OpenBSD util.h) */ #define FMT_SCALED_STRSIZE 7 /* minus sign, 4 digits, suffix, null byte */ int getpeereid(int s, uid_t *euid, gid_t *gid); xombrero-1.6.4/inspector.c010064400017500000000000000107271247066410500145530ustar00dhillwheel/* * Copyright (c) 2011 Conformal Systems LLC * Copyright (c) 2011 Marco Peereboom * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include gboolean inspector_attach_window(WebKitWebInspector *inspector, struct tab *t) { DNPRINTF(XT_D_INSPECTOR, "%s: tab %d\n", __func__, t->tab_id); return (FALSE); /* NOT handled */ } gboolean inspector_close_window(WebKitWebInspector *inspector, struct tab *t) { DNPRINTF(XT_D_INSPECTOR, "%s: tab %d\n", __func__, t->tab_id); if (t->inspector_window) { gtk_widget_hide(t->inspector_window); return (TRUE); /* handled */ } return (FALSE); /* NOT handled */ } gboolean inspector_detach_window(WebKitWebInspector *inspector, struct tab *t) { DNPRINTF(XT_D_INSPECTOR, "%s: tab %d\n", __func__, t->tab_id); return (FALSE); /* NOT handled */ } gboolean inspector_delete(GtkWidget *inspector_window, GdkEvent *e, struct tab *t) { inspector_close_window(t->inspector, t); return (TRUE); /* handled */ } WebKitWebView* inspector_inspect_web_view_cb(WebKitWebInspector *inspector, WebKitWebView* wv, struct tab *t) { DNPRINTF(XT_D_INSPECTOR, "%s: tab %d\n", __func__, t->tab_id); if (t->inspector_window) goto done; t->inspector_window = create_window("inspector"); t->inspector_view = webkit_web_view_new(); gtk_container_add(GTK_CONTAINER(t->inspector_window), t->inspector_view); g_signal_connect(t->inspector_window, "delete-event", G_CALLBACK(inspector_delete), t); done: return WEBKIT_WEB_VIEW(t->inspector_view); } gboolean inspector_show_window(WebKitWebInspector *inspector, struct tab *t) { DNPRINTF(XT_D_INSPECTOR, "%s: tab %d\n", __func__, t->tab_id); if (t->inspector_window) { g_signal_emit_by_name(inspector, "attach-window", t, NULL); gtk_widget_show_all(t->inspector_window); gtk_window_present(GTK_WINDOW(t->inspector_window)); return (TRUE); /* handled */ } return (FALSE); /* NOT handled */ } void inspector_finished(WebKitWebInspector *inspector, struct tab *t) { DNPRINTF(XT_D_INSPECTOR, "%s: tab %d\n", __func__, t->tab_id); if (t->inspector_window) { g_signal_handlers_disconnect_by_func( t->inspector, inspector_attach_window, t); g_signal_handlers_disconnect_by_func( t->inspector, inspector_close_window, t); g_signal_handlers_disconnect_by_func( t->inspector, inspector_detach_window, t); g_signal_handlers_disconnect_by_func( t->inspector, inspector_finished, t); g_signal_handlers_disconnect_by_func( t->inspector, inspector_inspect_web_view_cb, t); g_signal_handlers_disconnect_by_func( t->inspector, inspector_show_window, t); gtk_widget_hide(t->inspector_window); /* XXX it seems that the window is disposed automatically */ t->inspector_window = NULL; t->inspector_view = NULL; } } void setup_inspector(struct tab *t) { DNPRINTF(XT_D_INSPECTOR, "%s: tab %d\n", __func__, t->tab_id); t->inspector = webkit_web_view_get_inspector(WEBKIT_WEB_VIEW(t->wv)); g_object_connect(G_OBJECT(t->inspector), "signal::attach-window", G_CALLBACK(inspector_attach_window), t, "signal::close-window", G_CALLBACK(inspector_close_window), t, "signal::detach-window", G_CALLBACK(inspector_detach_window), t, "signal::finished", G_CALLBACK(inspector_finished), t, "signal::inspect-web-view", G_CALLBACK(inspector_inspect_web_view_cb), t, "signal::show-window", G_CALLBACK(inspector_show_window), t, (char *)NULL); } int inspector_cmd(struct tab *t, struct karg *args) { DNPRINTF(XT_D_INSPECTOR, "%s: tab %d\n", __func__, t->tab_id); if (t == NULL) return (1); if (args->i & XT_INS_SHOW) webkit_web_inspector_show(t->inspector); else if (args->i & XT_INS_HIDE) webkit_web_inspector_close(t->inspector); else if (args->i & XT_INS_CLOSE) inspector_finished(t->inspector, t); return (XT_CB_PASSTHROUGH); } xombrero-1.6.4/js-merge-helper.pl010064400017500000000000000041741247066410500157230ustar00dhillwheel#!/bin/env perl -w # Copyright (c) 2009 Leon Winter # Copyright (c) 2009, 2010 Hannes Schueller # Copyright (c) 2009, 2010 Matto Fransen # Copyright (c) 2010 Hans-Peter Deifel # Copyright (c) 2010 Thomas Adam # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. use strict; sub escape_c_string { shift; s/\t|\r|\n/ /g; # convert spacings to whitespaces s/[^\/]\/\*.*?\*\///g; # remove comments (careful: hinttags look like comment!) s/ {2,}/ /g; # strip whitespaces s/(^|\(|\)|;|,|:|\}|\{|=|\+|\-|\*|\&|\||\<|\>|!) +/$1/g; s/ +($|\(|\)|;|,|:|\}|\{|=|\+|\-|\*|\&|\||\<|\>|!)/$1/g; s/\\/\\\\/g; # escape backslashes s/\"/\\\"/g; # escape quotes return $_ } if (scalar @ARGV < 1) { print "usage: js-merge-helper.pl jsfile ... \n"; exit 1; } my ($jsfile, $define, $js); while (@ARGV) { $jsfile = shift @ARGV; my @fn = split /\//, $jsfile; my $fn = pop @fn; $fn =~ /^(.*)\.js$/; $define = "JS_".uc($1); $define =~ s/\-/_/; open(JSFILE, $jsfile) or die "Failed to open file: $!"; $_ = do { local $/; }; close(JSFILE); $js = escape_c_string($_); print "#define $define "; printf "\"%s\"\n", $js; } exit; xombrero-1.6.4/linux004075500017500000000000000000001247066410500134555ustar00dhillwheelxombrero-1.6.4/linux/GNUmakefile010064400017500000000000000075021247066410500156070ustar00dhillwheelGTK_VERSION?= gtk3 ifeq ("${GTK_VERSION}", "gtk2") JS_CF=$(shell pkg-config --silence-errors --cflags javascriptcoregtk-1.0) JS_LD=$(shell pkg-config --silence-errors --libs javascriptcoregtk-1.0) else JS_CF=$(shell pkg-config --silence-errors --cflags javascriptcoregtk-3.0) JS_LD=$(shell pkg-config --silence-errors --libs javascriptcoregtk-3.0) endif LIBS= glib-2.0 ifeq ("${GTK_VERSION}", "gtk2") LIBS+= gtk+-2.0 webkit-1.0 CFLAGS+=-I/usr/include/gtk-2.0 else LIBS+= gtk+-3.0 webkitgtk-3.0 CFLAGS+=-I/usr/include/gtk-3.0 endif LIBS+= libsoup-2.4 gnutls libbsd CFLAGS+= -O2 -Wall -ggdb3 -D_GNU_SOURCE -I. -I.. $(shell pkg-config --cflags $(LIBS)) $(JS_CF) LDADD+= $(shell pkg-config --libs $(LIBS)) $(JS_LD) -ldl -lX11 PREFIX?= /usr/local BINDIR?= $(PREFIX)/bin APPDIR?= $(PREFIX)/share/applications MANDIR?= $(PREFIX)/share/man RESDIR?= $(PREFIX)/share/xombrero CFLAGS+= -DXT_DS_RESOURCE_DIR=\"$(RESDIR)\" SRCS= $(shell ls ../*.c) SRCS+= linux.c OBJS= $(SRCS:.c=.o) DEPS= $(addsuffix .depend, $(OBJS)) CC?= gcc BUILDVERSION= $(shell sh $(CURDIR)/../buildver.sh) ifneq ("${BUILDVERSION}", "") CFLAGS+= -DXOMBRERO_BUILDSTR=\"$(BUILDVERSION)\" endif all: javascript.h tooltip.h xombrero javascript.h: ../js-merge-helper.pl ../hinting.js ../autoscroll.js perl ../js-merge-helper.pl ../hinting.js ../input-focus.js \ ../autoscroll.js > javascript.h tooltip.h: ../ascii2txt.pl ../txt2tooltip.pl ../xombrero.1 nroff -c -Tascii -mandoc ../xombrero.1 | \ perl ../ascii2txt.pl | \ perl ../txt2tooltip.pl > tooltip.h xombrero: $(OBJS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LDADD) %.o: %.c @echo "Generating $@.depend" @$(CC) -MM $(CPPFLAGS) $(CFLAGS) $< | \ sed 's,^.*\.o[ :]*,$@ $@.depend : ,g' > $@.depend $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $< install: all install -m 755 -d $(DESTDIR)$(BINDIR) install -m 755 -d $(DESTDIR)$(MANDIR)/man1 install -m 755 -d $(DESTDIR)$(RESDIR) install -m 755 -d $(DESTDIR)$(APPDIR) install -m 755 xombrero $(DESTDIR)$(BINDIR) install -m 644 ../xombrero.1 $(DESTDIR)$(MANDIR)/man1/xombrero.1 install -m 644 ../xombrero.css $(DESTDIR)$(RESDIR) install -m 644 ../xombrero.desktop $(DESTDIR)$(APPDIR) install -m 644 ../xombreroicon16.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon32.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon48.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon64.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon128.png $(DESTDIR)$(RESDIR) install -m 644 ../xombreroicon256.png $(DESTDIR)$(RESDIR) install -m 644 ../favicon.ico $(DESTDIR)$(RESDIR) install -m 644 ../tld-rules $(DESTDIR)$(RESDIR) install -m 644 ../style.css $(DESTDIR)$(RESDIR) install -m 644 ../hsts-preload $(DESTDIR)$(RESDIR) install -m 644 ../user-agent-headers ${DESTDIR}$(RESDIR) install -m 644 ../http-accept-headers ${DESTDIR}$(RESDIR) install -m 644 ../torenabled.ico $(DESTDIR)$(RESDIR) install -m 644 ../tordisabled.ico $(DESTDIR)$(RESDIR) uninstall: rm -f $(DESTDIR)$(BINDIR)/xombrero rm -f $(DESTDIR)$(MANDIR)/man1/xombrero.1 rm -f $(DESTDIR)$(APPDIR)/xombrero.desktop rm -f $(DESTDIR)$(RESDIR)/xombreroicon16.png rm -f $(DESTDIR)$(RESDIR)/xombreroicon32.png rm -f $(DESTDIR)$(RESDIR)/xombreroicon48.png rm -f $(DESTDIR)$(RESDIR)/xombreroicon64.png rm -f $(DESTDIR)$(RESDIR)/xombreroicon128.png rm -f $(DESTDIR)$(RESDIR)/xombreroicon256.png rm -f $(DESTDIR)$(RESDIR)/xombrero.css rm -f $(DESTDIR)$(RESDIR)/favicon.ico rm -f $(DESTDIR)$(RESDIR)/tordisabled.ico rm -f $(DESTDIR)$(RESDIR)/torenabled.ico rm -f $(DESTDIR)$(RESDIR)/tld-rules rm -f $(DESTDIR)$(RESDIR)/style.css rm -f $(DESTDIR)$(RESDIR)/hsts-preload rm -f ${DESTDIR}$(RESDIR)/user-agent-headers rm -f ${DESTDIR}$(RESDIR)/http-accept-headers if [ -d $(DESTDIR)$(RESDIR) ]; then rmdir $(DESTDIR)$(RESDIR); fi clean: rm -f xombrero $(OBJS) $(DEPS) rm -f javascript.h rm -f tooltip.h -include $(DEPS) .PHONY: all install clean xombrero-1.6.4/linux/Makefile010064400017500000000000000062041247066410500151730ustar00dhillwheelPREFIX?=/usr/local BINDIR=${PREFIX}/bin CFLAGS+=-DXT_DS_RESOURCE_DIR=\"$(PREFIX)/share/xombrero/\" PROG=xombrero MAN=xombrero.1 DEBUG= -g SRCS= cookie.c inspector.c marco.c about.c whitelist.c settings.c inputfocus.c SRCS+= history.c completion.c tldlist.c externaleditor.c unix.c xombrero.c SRCS+= linux.c .PATH: ${.CURDIR}/.. CFLAGS+= -O2 -Wall -Wno-format-extra-args -Wunused -Wextra -Wno-unused-parameter CFLAGS+= -Wno-missing-field-initializers -Wno-sign-compare CFLAGS+= -Wno-deprecated-declarations -Wfloat-equal ${DEBUG} CFLAGS+= -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE CFLAGS+= -DGDK_DISABLE_DEPRECATION_WARNINGS -DGLIB_DISABLE_DEPRECATION_WARNINGS CFLAGS+= -I. -I.. CFLAGS+= -D_GNU_SOURCE LDADD= -lutil -lbsd -ldl GTK_VERSION ?= gtk3 .if ${GTK_VERSION} == "gtk2" LIBS+= gtk+-2.0 LIBS+= webkit-1.0 .else LIBS+= gtk+-3.0 LIBS+= webkitgtk-3.0 .endif LIBS+= libsoup-2.4 LIBS+= gnutls GTK_CFLAGS!= pkg-config --cflags $(LIBS) GTK_LDFLAGS!= pkg-config --libs $(LIBS) CFLAGS+= $(GTK_CFLAGS) LDFLAGS+= $(GTK_LDFLAGS) BUILDVERSION != sh "${.CURDIR}/../buildver.sh" .if !${BUILDVERSION} == "" CPPFLAGS+= -DXOMBRERO_BUILDSTR=\"$(BUILDVERSION)\" .endif MANDIR= ${PREFIX}/share/man/ CLEANFILES += ${.CURDIR}/javascript.h javascript.h tooltip.h xombrero.cat1 xombrero.core JSFILES += ../hinting.js JSFILES += ../input-focus.js JSFILES += ../autoscroll.js .for _js in ${JSFILES} JSCURDIR += ${.CURDIR}/${_js} .endfor .NOPATH: javascript.h tooltip.h javascript.h: ${JSFILES} ../js-merge-helper.pl perl ${.CURDIR}/../js-merge-helper.pl \ ${JSCURDIR} > javascript.h tooltip.h: ${MAN} ../ascii2txt.pl ../txt2tooltip.pl mandoc -Tascii ${.CURDIR}/../${MAN} | \ perl ${.CURDIR}/../ascii2txt.pl | \ perl ${.CURDIR}/../txt2tooltip.pl > tooltip.h beforeinstall: install -m 755 -d ${PREFIX}/bin install -m 755 -d ${MANDIR}/man1/ install -m 755 -d ${PREFIX}/share/xombrero install -m 755 -d ${PREFIX}/share/applications install -m 644 ${.CURDIR}/../xombrero.css ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../xombrero.desktop ${PREFIX}/share/applications install -m 644 ${.CURDIR}/../xombreroicon16.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../xombreroicon32.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../xombreroicon48.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../xombreroicon64.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../xombreroicon128.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../xombreroicon256.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../favicon.ico ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../tld-rules ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../style.css ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../hsts-preload ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../user-agent-headers ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../http-accept-headers ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../torenabled.ico ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../tordisabled.ico ${PREFIX}/share/xombrero ${PROG} ${OBJS} beforedepend: javascript.h tooltip.h .include xombrero-1.6.4/linux/linux.c010064400017500000000000000510571247066410500150440ustar00dhillwheel#include #include #include #include #include #include #include #include #include #include "util.h" /* * All the workarounds for glibc stupidity are piled into this file... */ /* --------------------------------------------------------------------------- */ /* $OpenBSD: strlcpy.c,v 1.10 2005/08/08 08:05:37 espie Exp $ */ /* * Copyright (c) 1998 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). * Returns strlen(src); if retval >= siz, truncation occurred. */ size_t strlcpy(char *dst, const char *src, size_t siz) { char *d = dst; const char *s = src; size_t n = siz; /* Copy as many bytes as will fit */ if (n != 0 && --n != 0) { do { if ((*d++ = *s++) == 0) break; } while (--n != 0); } /* Not enough room in dst, add NUL and traverse rest of src */ if (n == 0) { if (siz != 0) *d = '\0'; /* NUL-terminate dst */ while (*s++) ; } return(s - src - 1); /* count does not include NUL */ } /* --------------------------------------------------------------------------- */ /* $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */ /* * Copyright (c) 1998 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* * Appends src to string dst of size siz (unlike strncat, siz is the * full size of dst, not space left). At most siz-1 characters * will be copied. Always NUL terminates (unless siz <= strlen(dst)). * Returns strlen(src) + MIN(siz, strlen(initial dst)). * If retval >= siz, truncation occurred. */ size_t strlcat(char *dst, const char *src, size_t siz) { char *d = dst; const char *s = src; size_t n = siz; size_t dlen; /* Find the end of dst and adjust bytes left but don't go past end */ while (n-- != 0 && *d != '\0') d++; dlen = d - dst; n = siz - dlen; if (n == 0) return(dlen + strlen(s)); while (*s != '\0') { if (n != 1) { *d++ = *s; n--; } s++; } *d = '\0'; return(dlen + (s - src)); /* count does not include NUL */ } /* --------------------------------------------------------------------------- */ /* $NetBSD: fgetln.c,v 1.3 2007/08/07 02:06:58 lukem Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Christos Zoulas. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ char * fgetln(fp, len) FILE *fp; size_t *len; { static char *buf = NULL; static size_t bufsiz = 0; char *ptr; if (buf == NULL) { bufsiz = BUFSIZ; if ((buf = malloc(bufsiz)) == NULL) return NULL; } if (fgets(buf, bufsiz, fp) == NULL) return NULL; *len = 0; while ((ptr = strchr(&buf[*len], '\n')) == NULL) { size_t nbufsiz = bufsiz + BUFSIZ; char *nbuf = realloc(buf, nbufsiz); if (nbuf == NULL) { int oerrno = errno; free(buf); errno = oerrno; buf = NULL; return NULL; } else buf = nbuf; *len = bufsiz; if (fgets(&buf[bufsiz], BUFSIZ, fp) == NULL) return buf; bufsiz = nbufsiz; } *len = (ptr - buf) + 1; return buf; } /* --------------------------------------------------------------------------- */ /* $OpenBSD: fparseln.c,v 1.6 2005/08/02 21:46:23 espie Exp $ */ /* $NetBSD: fparseln.c,v 1.7 1999/07/02 15:49:12 simonb Exp $ */ /* * Copyright (c) 1997 Christos Zoulas. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Christos Zoulas. * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define FPARSELN_UNESCESC 0x01 #define FPARSELN_UNESCCONT 0x02 #define FPARSELN_UNESCCOMM 0x04 #define FPARSELN_UNESCREST 0x08 #define FPARSELN_UNESCALL 0x0f static int isescaped(const char *, const char *, int); /* isescaped(): * Return true if the character in *p that belongs to a string * that starts in *sp, is escaped by the escape character esc. */ static int isescaped(const char *sp, const char *p, int esc) { const char *cp; size_t ne; /* No escape character */ if (esc == '\0') return 1; /* Count the number of escape characters that precede ours */ for (ne = 0, cp = p; --cp >= sp && *cp == esc; ne++) continue; /* Return true if odd number of escape characters */ return (ne & 1) != 0; } /* fparseln(): * Read a line from a file parsing continuations ending in \ * and eliminating trailing newlines, or comments starting with * the comment char. */ char * fparseln(FILE *fp, size_t *size, size_t *lineno, const char str[3], int flags) { static const char dstr[3] = { '\\', '\\', '#' }; char *buf = NULL, *ptr, *cp, esc, con, nl, com; size_t s, len = 0; int cnt = 1; if (str == NULL) str = dstr; esc = str[0]; con = str[1]; com = str[2]; /* * XXX: it would be cool to be able to specify the newline character, * but unfortunately, fgetln does not let us */ nl = '\n'; while (cnt) { cnt = 0; if (lineno) (*lineno)++; if ((ptr = fgetln(fp, &s)) == NULL) break; if (s && com) { /* Check and eliminate comments */ for (cp = ptr; cp < ptr + s; cp++) if (*cp == com && !isescaped(ptr, cp, esc)) { s = cp - ptr; cnt = s == 0 && buf == NULL; break; } } if (s && nl) { /* Check and eliminate newlines */ cp = &ptr[s - 1]; if (*cp == nl) s--; /* forget newline */ } if (s && con) { /* Check and eliminate continuations */ cp = &ptr[s - 1]; if (*cp == con && !isescaped(ptr, cp, esc)) { s--; /* forget escape */ cnt = 1; } } if (s == 0 && buf != NULL) continue; if ((cp = realloc(buf, len + s + 1)) == NULL) { free(buf); return NULL; } buf = cp; (void) memcpy(buf + len, ptr, s); len += s; buf[len] = '\0'; } if ((flags & FPARSELN_UNESCALL) != 0 && esc && buf != NULL && strchr(buf, esc) != NULL) { ptr = cp = buf; while (cp[0] != '\0') { int skipesc; while (cp[0] != '\0' && cp[0] != esc) *ptr++ = *cp++; if (cp[0] == '\0' || cp[1] == '\0') break; skipesc = 0; if (cp[1] == com) skipesc += (flags & FPARSELN_UNESCCOMM); if (cp[1] == con) skipesc += (flags & FPARSELN_UNESCCONT); if (cp[1] == esc) skipesc += (flags & FPARSELN_UNESCESC); if (cp[1] != com && cp[1] != con && cp[1] != esc) skipesc = (flags & FPARSELN_UNESCREST); if (skipesc) cp++; else *ptr++ = *cp++; *ptr++ = *cp++; } *ptr = '\0'; len = strlen(buf); } if (size) *size = len; return buf; } /* --------------------------------------------------------------------------- */ /* $OpenBSD: strtonum.c,v 1.6 2004/08/03 19:38:01 millert Exp $ */ /* * Copyright (c) 2004 Ted Unangst and Todd Miller * All rights reserved. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #define INVALID 1 #define TOOSMALL 2 #define TOOLARGE 3 long long strtonum(const char *numstr, long long minval, long long maxval, const char **errstrp) { long long ll = 0; char *ep; int error = 0; struct errval { const char *errstr; int err; } ev[4] = { { NULL, 0 }, { "invalid", EINVAL }, { "too small", ERANGE }, { "too large", ERANGE }, }; ev[0].err = errno; errno = 0; if (minval > maxval) error = INVALID; else { ll = strtoll(numstr, &ep, 10); if (numstr == ep || *ep != '\0') error = INVALID; else if ((ll == LLONG_MIN && errno == ERANGE) || ll < minval) error = TOOSMALL; else if ((ll == LLONG_MAX && errno == ERANGE) || ll > maxval) error = TOOLARGE; } if (errstrp != NULL) *errstrp = ev[error].errstr; errno = ev[error].err; if (error) ll = 0; return (ll); } /* $OpenBSD: fmt_scaled.c,v 1.10 2009/06/20 15:00:04 martynas Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Ian F. Darwin. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * fmt_scaled: Format numbers scaled for human comprehension * scan_scaled: Scan numbers in this format. * * "Human-readable" output uses 4 digits max, and puts a unit suffix at * the end. Makes output compact and easy-to-read esp. on huge disks. * Formatting code was originally in OpenBSD "df", converted to library routine. * Scanning code written for OpenBSD libutil. */ #include #include #include #include #include #include #include "util.h" typedef enum { NONE = 0, KILO = 1, MEGA = 2, GIGA = 3, TERA = 4, PETA = 5, EXA = 6 } unit_type; /* These three arrays MUST be in sync! XXX make a struct */ static unit_type units[] = { NONE, KILO, MEGA, GIGA, TERA, PETA, EXA }; static char scale_chars[] = "BKMGTPE"; static long long scale_factors[] = { 1LL, 1024LL, 1024LL*1024, 1024LL*1024*1024, 1024LL*1024*1024*1024, 1024LL*1024*1024*1024*1024, 1024LL*1024*1024*1024*1024*1024, }; #define SCALE_LENGTH (sizeof(units)/sizeof(units[0])) #define MAX_DIGITS (SCALE_LENGTH * 3) /* XXX strlen(sprintf("%lld", -1)? */ /* Convert the given input string "scaled" into numeric in "result". * Return 0 on success, -1 and errno set on error. */ int scan_scaled(char *scaled, long long *result) { char *p = scaled; int sign = 0; unsigned int i, ndigits = 0, fract_digits = 0; long long scale_fact = 1, whole = 0, fpart = 0; /* Skip leading whitespace */ while (isascii(*p) && isspace(*p)) ++p; /* Then at most one leading + or - */ while (*p == '-' || *p == '+') { if (*p == '-') { if (sign) { errno = EINVAL; return -1; } sign = -1; ++p; } else if (*p == '+') { if (sign) { errno = EINVAL; return -1; } sign = +1; ++p; } } /* Main loop: Scan digits, find decimal point, if present. * We don't allow exponentials, so no scientific notation * (but note that E for Exa might look like e to some!). * Advance 'p' to end, to get scale factor. */ for (; isascii(*p) && (isdigit(*p) || *p=='.'); ++p) { if (*p == '.') { if (fract_digits > 0) { /* oops, more than one '.' */ errno = EINVAL; return -1; } fract_digits = 1; continue; } i = (*p) - '0'; /* whew! finally a digit we can use */ if (fract_digits > 0) { if (fract_digits >= MAX_DIGITS-1) /* ignore extra fractional digits */ continue; fract_digits++; /* for later scaling */ fpart *= 10; fpart += i; } else { /* normal digit */ if (++ndigits >= MAX_DIGITS) { errno = ERANGE; return -1; } whole *= 10; whole += i; } } if (sign) { whole *= sign; fpart *= sign; } /* If no scale factor given, we're done. fraction is discarded. */ if (!*p) { *result = whole; return 0; } /* Validate scale factor, and scale whole and fraction by it. */ for (i = 0; i < SCALE_LENGTH; i++) { /* Are we there yet? */ if (*p == scale_chars[i] || *p == tolower(scale_chars[i])) { /* If it ends with alphanumerics after the scale char, bad. */ if (isalnum(*(p+1))) { errno = EINVAL; return -1; } scale_fact = scale_factors[i]; /* scale whole part */ whole *= scale_fact; /* truncate fpart so it does't overflow. * then scale fractional part. */ while (fpart >= LLONG_MAX / scale_fact) { fpart /= 10; fract_digits--; } fpart *= scale_fact; if (fract_digits > 0) { for (i = 0; i < fract_digits -1; i++) fpart /= 10; } whole += fpart; *result = whole; return 0; } } errno = ERANGE; return -1; } /* Format the given "number" into human-readable form in "result". * Result must point to an allocated buffer of length FMT_SCALED_STRSIZE. * Return 0 on success, -1 and errno set if error. */ int fmt_scaled(long long number, char *result) { long long abval, fract = 0; unsigned int i; unit_type unit = NONE; abval = llabs(number); /* Not every negative long long has a positive representation. * Also check for numbers that are just too darned big to format */ if (abval < 0 || abval / 1024 >= scale_factors[SCALE_LENGTH-1]) { errno = ERANGE; return -1; } /* scale whole part; get unscaled fraction */ for (i = 0; i < SCALE_LENGTH; i++) { if (abval/1024 < scale_factors[i]) { unit = units[i]; fract = (i == 0) ? 0 : abval % scale_factors[i]; number /= scale_factors[i]; if (i > 0) fract /= scale_factors[i - 1]; break; } } fract = (10 * fract + 512) / 1024; /* if the result would be >= 10, round main number */ if (fract == 10) { if (number >= 0) number++; else number--; fract = 0; } if (number == 0) strlcpy(result, "0B", FMT_SCALED_STRSIZE); else if (unit == NONE || number >= 100 || number <= -100) { if (fract >= 5) { if (number >= 0) number++; else number--; } (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld%c", number, scale_chars[unit]); } else (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld.%1lld%c", number, fract, scale_chars[unit]); return 0; } /* --------------------------------------------------------------------------- */ /* * Copyright (c) 2002,2004 Damien Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* Get effective user and group identification of locally-connected * peer. */ int getpeereid(int s, uid_t *euid, gid_t *gid) { struct ucred cred; socklen_t len = sizeof(cred); if (getsockopt(s, SOL_SOCKET, SO_PEERCRED, &cred, &len) < 0) return (-1); *euid = cred.uid; *gid = cred.gid; return (0); } #ifdef MAIN /* * This is the original version of the program in the man page. * Copy-and-paste whatever you need from it. */ int main(int argc, char **argv) { char *cinput = "1.5K", buf[FMT_SCALED_STRSIZE]; long long ninput = 10483892, result; if (scan_scaled(cinput, &result) == 0) printf("\"%s\" -> %lld\n", cinput, result); else perror(cinput); if (fmt_scaled(ninput, buf) == 0) printf("%lld -> \"%s\"\n", ninput, buf); else fprintf(stderr, "%lld invalid (%s)\n", ninput, strerror(errno)); return 0; } #endif xombrero-1.6.4/linux/tree.h010064400017500000000000000610641247066410500146500ustar00dhillwheel/* $OpenBSD: tree.h,v 1.13 2011/07/09 00:19:45 pirofti Exp $ */ /* * Copyright 2002 Niels Provos * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _SYS_TREE_H_ #define _SYS_TREE_H_ /* * This file defines data structures for different types of trees: * splay trees and red-black trees. * * A splay tree is a self-organizing data structure. Every operation * on the tree causes a splay to happen. The splay moves the requested * node to the root of the tree and partly rebalances it. * * This has the benefit that request locality causes faster lookups as * the requested nodes move to the top of the tree. On the other hand, * every lookup causes memory writes. * * The Balance Theorem bounds the total access time for m operations * and n inserts on an initially empty tree as O((m + n)lg n). The * amortized cost for a sequence of m accesses to a splay tree is O(lg n); * * A red-black tree is a binary search tree with the node color as an * extra attribute. It fulfills a set of conditions: * - every search path from the root to a leaf consists of the * same number of black nodes, * - each red node (except for the root) has a black parent, * - each leaf node is black. * * Every operation on a red-black tree is bounded as O(lg n). * The maximum height of a red-black tree is 2lg (n+1). */ #define SPLAY_HEAD(name, type) \ struct name { \ struct type *sph_root; /* root of the tree */ \ } #define SPLAY_INITIALIZER(root) \ { NULL } #define SPLAY_INIT(root) do { \ (root)->sph_root = NULL; \ } while (0) #define SPLAY_ENTRY(type) \ struct { \ struct type *spe_left; /* left element */ \ struct type *spe_right; /* right element */ \ } #define SPLAY_LEFT(elm, field) (elm)->field.spe_left #define SPLAY_RIGHT(elm, field) (elm)->field.spe_right #define SPLAY_ROOT(head) (head)->sph_root #define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) /* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */ #define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \ SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ (head)->sph_root = tmp; \ } while (0) #define SPLAY_ROTATE_LEFT(head, tmp, field) do { \ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ SPLAY_LEFT(tmp, field) = (head)->sph_root; \ (head)->sph_root = tmp; \ } while (0) #define SPLAY_LINKLEFT(head, tmp, field) do { \ SPLAY_LEFT(tmp, field) = (head)->sph_root; \ tmp = (head)->sph_root; \ (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ } while (0) #define SPLAY_LINKRIGHT(head, tmp, field) do { \ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ tmp = (head)->sph_root; \ (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ } while (0) #define SPLAY_ASSEMBLE(head, node, left, right, field) do { \ SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \ SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\ SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \ } while (0) /* Generates prototypes and inline functions */ #define SPLAY_PROTOTYPE(name, type, field, cmp) \ void name##_SPLAY(struct name *, struct type *); \ void name##_SPLAY_MINMAX(struct name *, int); \ struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ \ /* Finds the node with the same key as elm */ \ static __inline struct type * \ name##_SPLAY_FIND(struct name *head, struct type *elm) \ { \ if (SPLAY_EMPTY(head)) \ return(NULL); \ name##_SPLAY(head, elm); \ if ((cmp)(elm, (head)->sph_root) == 0) \ return (head->sph_root); \ return (NULL); \ } \ \ static __inline struct type * \ name##_SPLAY_NEXT(struct name *head, struct type *elm) \ { \ name##_SPLAY(head, elm); \ if (SPLAY_RIGHT(elm, field) != NULL) { \ elm = SPLAY_RIGHT(elm, field); \ while (SPLAY_LEFT(elm, field) != NULL) { \ elm = SPLAY_LEFT(elm, field); \ } \ } else \ elm = NULL; \ return (elm); \ } \ \ static __inline struct type * \ name##_SPLAY_MIN_MAX(struct name *head, int val) \ { \ name##_SPLAY_MINMAX(head, val); \ return (SPLAY_ROOT(head)); \ } /* Main splay operation. * Moves node close to the key of elm to top */ #define SPLAY_GENERATE(name, type, field, cmp) \ struct type * \ name##_SPLAY_INSERT(struct name *head, struct type *elm) \ { \ if (SPLAY_EMPTY(head)) { \ SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \ } else { \ int __comp; \ name##_SPLAY(head, elm); \ __comp = (cmp)(elm, (head)->sph_root); \ if(__comp < 0) { \ SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\ SPLAY_RIGHT(elm, field) = (head)->sph_root; \ SPLAY_LEFT((head)->sph_root, field) = NULL; \ } else if (__comp > 0) { \ SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\ SPLAY_LEFT(elm, field) = (head)->sph_root; \ SPLAY_RIGHT((head)->sph_root, field) = NULL; \ } else \ return ((head)->sph_root); \ } \ (head)->sph_root = (elm); \ return (NULL); \ } \ \ struct type * \ name##_SPLAY_REMOVE(struct name *head, struct type *elm) \ { \ struct type *__tmp; \ if (SPLAY_EMPTY(head)) \ return (NULL); \ name##_SPLAY(head, elm); \ if ((cmp)(elm, (head)->sph_root) == 0) { \ if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \ (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\ } else { \ __tmp = SPLAY_RIGHT((head)->sph_root, field); \ (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\ name##_SPLAY(head, elm); \ SPLAY_RIGHT((head)->sph_root, field) = __tmp; \ } \ return (elm); \ } \ return (NULL); \ } \ \ void \ name##_SPLAY(struct name *head, struct type *elm) \ { \ struct type __node, *__left, *__right, *__tmp; \ int __comp; \ \ SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ __left = __right = &__node; \ \ while ((__comp = (cmp)(elm, (head)->sph_root))) { \ if (__comp < 0) { \ __tmp = SPLAY_LEFT((head)->sph_root, field); \ if (__tmp == NULL) \ break; \ if ((cmp)(elm, __tmp) < 0){ \ SPLAY_ROTATE_RIGHT(head, __tmp, field); \ if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ break; \ } \ SPLAY_LINKLEFT(head, __right, field); \ } else if (__comp > 0) { \ __tmp = SPLAY_RIGHT((head)->sph_root, field); \ if (__tmp == NULL) \ break; \ if ((cmp)(elm, __tmp) > 0){ \ SPLAY_ROTATE_LEFT(head, __tmp, field); \ if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ break; \ } \ SPLAY_LINKRIGHT(head, __left, field); \ } \ } \ SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ } \ \ /* Splay with either the minimum or the maximum element \ * Used to find minimum or maximum element in tree. \ */ \ void name##_SPLAY_MINMAX(struct name *head, int __comp) \ { \ struct type __node, *__left, *__right, *__tmp; \ \ SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ __left = __right = &__node; \ \ while (1) { \ if (__comp < 0) { \ __tmp = SPLAY_LEFT((head)->sph_root, field); \ if (__tmp == NULL) \ break; \ if (__comp < 0){ \ SPLAY_ROTATE_RIGHT(head, __tmp, field); \ if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ break; \ } \ SPLAY_LINKLEFT(head, __right, field); \ } else if (__comp > 0) { \ __tmp = SPLAY_RIGHT((head)->sph_root, field); \ if (__tmp == NULL) \ break; \ if (__comp > 0) { \ SPLAY_ROTATE_LEFT(head, __tmp, field); \ if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ break; \ } \ SPLAY_LINKRIGHT(head, __left, field); \ } \ } \ SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ } #define SPLAY_NEGINF -1 #define SPLAY_INF 1 #define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) #define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) #define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) #define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) #define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \ : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF)) #define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \ : name##_SPLAY_MIN_MAX(x, SPLAY_INF)) #define SPLAY_FOREACH(x, name, head) \ for ((x) = SPLAY_MIN(name, head); \ (x) != NULL; \ (x) = SPLAY_NEXT(name, head, x)) /* Macros that define a red-black tree */ #define RB_HEAD(name, type) \ struct name { \ struct type *rbh_root; /* root of the tree */ \ } #define RB_INITIALIZER(root) \ { NULL } #define RB_INIT(root) do { \ (root)->rbh_root = NULL; \ } while (0) #define RB_BLACK 0 #define RB_RED 1 #define RB_ENTRY(type) \ struct { \ struct type *rbe_left; /* left element */ \ struct type *rbe_right; /* right element */ \ struct type *rbe_parent; /* parent element */ \ int rbe_color; /* node color */ \ } #define RB_LEFT(elm, field) (elm)->field.rbe_left #define RB_RIGHT(elm, field) (elm)->field.rbe_right #define RB_PARENT(elm, field) (elm)->field.rbe_parent #define RB_COLOR(elm, field) (elm)->field.rbe_color #define RB_ROOT(head) (head)->rbh_root #define RB_EMPTY(head) (RB_ROOT(head) == NULL) #define RB_SET(elm, parent, field) do { \ RB_PARENT(elm, field) = parent; \ RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ RB_COLOR(elm, field) = RB_RED; \ } while (0) #define RB_SET_BLACKRED(black, red, field) do { \ RB_COLOR(black, field) = RB_BLACK; \ RB_COLOR(red, field) = RB_RED; \ } while (0) #ifndef RB_AUGMENT #define RB_AUGMENT(x) do {} while (0) #endif #define RB_ROTATE_LEFT(head, elm, tmp, field) do { \ (tmp) = RB_RIGHT(elm, field); \ if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field))) { \ RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ } \ RB_AUGMENT(elm); \ if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \ if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ else \ RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ } else \ (head)->rbh_root = (tmp); \ RB_LEFT(tmp, field) = (elm); \ RB_PARENT(elm, field) = (tmp); \ RB_AUGMENT(tmp); \ if ((RB_PARENT(tmp, field))) \ RB_AUGMENT(RB_PARENT(tmp, field)); \ } while (0) #define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \ (tmp) = RB_LEFT(elm, field); \ if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field))) { \ RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ } \ RB_AUGMENT(elm); \ if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \ if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ else \ RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ } else \ (head)->rbh_root = (tmp); \ RB_RIGHT(tmp, field) = (elm); \ RB_PARENT(elm, field) = (tmp); \ RB_AUGMENT(tmp); \ if ((RB_PARENT(tmp, field))) \ RB_AUGMENT(RB_PARENT(tmp, field)); \ } while (0) /* Generates prototypes and inline functions */ #define RB_PROTOTYPE(name, type, field, cmp) \ RB_PROTOTYPE_INTERNAL(name, type, field, cmp,) #define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __attribute__((__unused__)) static) #define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \ attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\ attr struct type *name##_RB_REMOVE(struct name *, struct type *); \ attr struct type *name##_RB_INSERT(struct name *, struct type *); \ attr struct type *name##_RB_FIND(struct name *, struct type *); \ attr struct type *name##_RB_NFIND(struct name *, struct type *); \ attr struct type *name##_RB_NEXT(struct type *); \ attr struct type *name##_RB_PREV(struct type *); \ attr struct type *name##_RB_MINMAX(struct name *, int); \ \ /* Main rb operation. * Moves node close to the key of elm to top */ #define RB_GENERATE(name, type, field, cmp) \ RB_GENERATE_INTERNAL(name, type, field, cmp,) #define RB_GENERATE_STATIC(name, type, field, cmp) \ RB_GENERATE_INTERNAL(name, type, field, cmp, __attribute__((__unused__)) static) #define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ attr void \ name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \ { \ struct type *parent, *gparent, *tmp; \ while ((parent = RB_PARENT(elm, field)) && \ RB_COLOR(parent, field) == RB_RED) { \ gparent = RB_PARENT(parent, field); \ if (parent == RB_LEFT(gparent, field)) { \ tmp = RB_RIGHT(gparent, field); \ if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ RB_COLOR(tmp, field) = RB_BLACK; \ RB_SET_BLACKRED(parent, gparent, field);\ elm = gparent; \ continue; \ } \ if (RB_RIGHT(parent, field) == elm) { \ RB_ROTATE_LEFT(head, parent, tmp, field);\ tmp = parent; \ parent = elm; \ elm = tmp; \ } \ RB_SET_BLACKRED(parent, gparent, field); \ RB_ROTATE_RIGHT(head, gparent, tmp, field); \ } else { \ tmp = RB_LEFT(gparent, field); \ if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ RB_COLOR(tmp, field) = RB_BLACK; \ RB_SET_BLACKRED(parent, gparent, field);\ elm = gparent; \ continue; \ } \ if (RB_LEFT(parent, field) == elm) { \ RB_ROTATE_RIGHT(head, parent, tmp, field);\ tmp = parent; \ parent = elm; \ elm = tmp; \ } \ RB_SET_BLACKRED(parent, gparent, field); \ RB_ROTATE_LEFT(head, gparent, tmp, field); \ } \ } \ RB_COLOR(head->rbh_root, field) = RB_BLACK; \ } \ \ attr void \ name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \ { \ struct type *tmp; \ while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \ elm != RB_ROOT(head)) { \ if (RB_LEFT(parent, field) == elm) { \ tmp = RB_RIGHT(parent, field); \ if (RB_COLOR(tmp, field) == RB_RED) { \ RB_SET_BLACKRED(tmp, parent, field); \ RB_ROTATE_LEFT(head, parent, tmp, field);\ tmp = RB_RIGHT(parent, field); \ } \ if ((RB_LEFT(tmp, field) == NULL || \ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ (RB_RIGHT(tmp, field) == NULL || \ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ RB_COLOR(tmp, field) = RB_RED; \ elm = parent; \ parent = RB_PARENT(elm, field); \ } else { \ if (RB_RIGHT(tmp, field) == NULL || \ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\ struct type *oleft; \ if ((oleft = RB_LEFT(tmp, field)))\ RB_COLOR(oleft, field) = RB_BLACK;\ RB_COLOR(tmp, field) = RB_RED; \ RB_ROTATE_RIGHT(head, tmp, oleft, field);\ tmp = RB_RIGHT(parent, field); \ } \ RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ RB_COLOR(parent, field) = RB_BLACK; \ if (RB_RIGHT(tmp, field)) \ RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\ RB_ROTATE_LEFT(head, parent, tmp, field);\ elm = RB_ROOT(head); \ break; \ } \ } else { \ tmp = RB_LEFT(parent, field); \ if (RB_COLOR(tmp, field) == RB_RED) { \ RB_SET_BLACKRED(tmp, parent, field); \ RB_ROTATE_RIGHT(head, parent, tmp, field);\ tmp = RB_LEFT(parent, field); \ } \ if ((RB_LEFT(tmp, field) == NULL || \ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ (RB_RIGHT(tmp, field) == NULL || \ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ RB_COLOR(tmp, field) = RB_RED; \ elm = parent; \ parent = RB_PARENT(elm, field); \ } else { \ if (RB_LEFT(tmp, field) == NULL || \ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\ struct type *oright; \ if ((oright = RB_RIGHT(tmp, field)))\ RB_COLOR(oright, field) = RB_BLACK;\ RB_COLOR(tmp, field) = RB_RED; \ RB_ROTATE_LEFT(head, tmp, oright, field);\ tmp = RB_LEFT(parent, field); \ } \ RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ RB_COLOR(parent, field) = RB_BLACK; \ if (RB_LEFT(tmp, field)) \ RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\ RB_ROTATE_RIGHT(head, parent, tmp, field);\ elm = RB_ROOT(head); \ break; \ } \ } \ } \ if (elm) \ RB_COLOR(elm, field) = RB_BLACK; \ } \ \ attr struct type * \ name##_RB_REMOVE(struct name *head, struct type *elm) \ { \ struct type *child, *parent, *old = elm; \ int color; \ if (RB_LEFT(elm, field) == NULL) \ child = RB_RIGHT(elm, field); \ else if (RB_RIGHT(elm, field) == NULL) \ child = RB_LEFT(elm, field); \ else { \ struct type *left; \ elm = RB_RIGHT(elm, field); \ while ((left = RB_LEFT(elm, field))) \ elm = left; \ child = RB_RIGHT(elm, field); \ parent = RB_PARENT(elm, field); \ color = RB_COLOR(elm, field); \ if (child) \ RB_PARENT(child, field) = parent; \ if (parent) { \ if (RB_LEFT(parent, field) == elm) \ RB_LEFT(parent, field) = child; \ else \ RB_RIGHT(parent, field) = child; \ RB_AUGMENT(parent); \ } else \ RB_ROOT(head) = child; \ if (RB_PARENT(elm, field) == old) \ parent = elm; \ (elm)->field = (old)->field; \ if (RB_PARENT(old, field)) { \ if (RB_LEFT(RB_PARENT(old, field), field) == old)\ RB_LEFT(RB_PARENT(old, field), field) = elm;\ else \ RB_RIGHT(RB_PARENT(old, field), field) = elm;\ RB_AUGMENT(RB_PARENT(old, field)); \ } else \ RB_ROOT(head) = elm; \ RB_PARENT(RB_LEFT(old, field), field) = elm; \ if (RB_RIGHT(old, field)) \ RB_PARENT(RB_RIGHT(old, field), field) = elm; \ if (parent) { \ left = parent; \ do { \ RB_AUGMENT(left); \ } while ((left = RB_PARENT(left, field))); \ } \ goto color; \ } \ parent = RB_PARENT(elm, field); \ color = RB_COLOR(elm, field); \ if (child) \ RB_PARENT(child, field) = parent; \ if (parent) { \ if (RB_LEFT(parent, field) == elm) \ RB_LEFT(parent, field) = child; \ else \ RB_RIGHT(parent, field) = child; \ RB_AUGMENT(parent); \ } else \ RB_ROOT(head) = child; \ color: \ if (color == RB_BLACK) \ name##_RB_REMOVE_COLOR(head, parent, child); \ return (old); \ } \ \ /* Inserts a node into the RB tree */ \ attr struct type * \ name##_RB_INSERT(struct name *head, struct type *elm) \ { \ struct type *tmp; \ struct type *parent = NULL; \ int comp = 0; \ tmp = RB_ROOT(head); \ while (tmp) { \ parent = tmp; \ comp = (cmp)(elm, parent); \ if (comp < 0) \ tmp = RB_LEFT(tmp, field); \ else if (comp > 0) \ tmp = RB_RIGHT(tmp, field); \ else \ return (tmp); \ } \ RB_SET(elm, parent, field); \ if (parent != NULL) { \ if (comp < 0) \ RB_LEFT(parent, field) = elm; \ else \ RB_RIGHT(parent, field) = elm; \ RB_AUGMENT(parent); \ } else \ RB_ROOT(head) = elm; \ name##_RB_INSERT_COLOR(head, elm); \ return (NULL); \ } \ \ /* Finds the node with the same key as elm */ \ attr struct type * \ name##_RB_FIND(struct name *head, struct type *elm) \ { \ struct type *tmp = RB_ROOT(head); \ int comp; \ while (tmp) { \ comp = cmp(elm, tmp); \ if (comp < 0) \ tmp = RB_LEFT(tmp, field); \ else if (comp > 0) \ tmp = RB_RIGHT(tmp, field); \ else \ return (tmp); \ } \ return (NULL); \ } \ \ /* Finds the first node greater than or equal to the search key */ \ attr struct type * \ name##_RB_NFIND(struct name *head, struct type *elm) \ { \ struct type *tmp = RB_ROOT(head); \ struct type *res = NULL; \ int comp; \ while (tmp) { \ comp = cmp(elm, tmp); \ if (comp < 0) { \ res = tmp; \ tmp = RB_LEFT(tmp, field); \ } \ else if (comp > 0) \ tmp = RB_RIGHT(tmp, field); \ else \ return (tmp); \ } \ return (res); \ } \ \ /* ARGSUSED */ \ attr struct type * \ name##_RB_NEXT(struct type *elm) \ { \ if (RB_RIGHT(elm, field)) { \ elm = RB_RIGHT(elm, field); \ while (RB_LEFT(elm, field)) \ elm = RB_LEFT(elm, field); \ } else { \ if (RB_PARENT(elm, field) && \ (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ elm = RB_PARENT(elm, field); \ else { \ while (RB_PARENT(elm, field) && \ (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\ elm = RB_PARENT(elm, field); \ elm = RB_PARENT(elm, field); \ } \ } \ return (elm); \ } \ \ /* ARGSUSED */ \ attr struct type * \ name##_RB_PREV(struct type *elm) \ { \ if (RB_LEFT(elm, field)) { \ elm = RB_LEFT(elm, field); \ while (RB_RIGHT(elm, field)) \ elm = RB_RIGHT(elm, field); \ } else { \ if (RB_PARENT(elm, field) && \ (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ elm = RB_PARENT(elm, field); \ else { \ while (RB_PARENT(elm, field) && \ (elm == RB_LEFT(RB_PARENT(elm, field), field)))\ elm = RB_PARENT(elm, field); \ elm = RB_PARENT(elm, field); \ } \ } \ return (elm); \ } \ \ attr struct type * \ name##_RB_MINMAX(struct name *head, int val) \ { \ struct type *tmp = RB_ROOT(head); \ struct type *parent = NULL; \ while (tmp) { \ parent = tmp; \ if (val < 0) \ tmp = RB_LEFT(tmp, field); \ else \ tmp = RB_RIGHT(tmp, field); \ } \ return (parent); \ } #define RB_NEGINF -1 #define RB_INF 1 #define RB_INSERT(name, x, y) name##_RB_INSERT(x, y) #define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y) #define RB_FIND(name, x, y) name##_RB_FIND(x, y) #define RB_NFIND(name, x, y) name##_RB_NFIND(x, y) #define RB_NEXT(name, x, y) name##_RB_NEXT(y) #define RB_PREV(name, x, y) name##_RB_PREV(y) #define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF) #define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF) #define RB_FOREACH(x, name, head) \ for ((x) = RB_MIN(name, head); \ (x) != NULL; \ (x) = name##_RB_NEXT(x)) #define RB_FOREACH_SAFE(x, name, head, y) \ for ((x) = RB_MIN(name, head); \ ((x) != NULL) && ((y) = name##_RB_NEXT(x), 1); \ (x) = (y)) #define RB_FOREACH_REVERSE(x, name, head) \ for ((x) = RB_MAX(name, head); \ (x) != NULL; \ (x) = name##_RB_PREV(x)) #define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \ for ((x) = RB_MAX(name, head); \ ((x) != NULL) && ((y) = name##_RB_PREV(x), 1); \ (x) = (y)) #endif /* _SYS_TREE_H_ */ xombrero-1.6.4/linux/util.h010064400017500000000000000036271247066410500146670ustar00dhillwheel/* * Copyright (c) 2010 Marco Peereboom * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #define FPARSELN_UNESCESC 0x01 #define FPARSELN_UNESCCONT 0x02 #define FPARSELN_UNESCCOMM 0x04 #define FPARSELN_UNESCREST 0x08 #define FPARSELN_UNESCALL 0x0f size_t strlcpy(char *, const char *, size_t); size_t strlcat(char *, const char *, size_t); char *fgetln(FILE *, size_t *); char *fparseln(FILE *, size_t *, size_t *, const char [3], int); long long strtonum(const char *, long long, long long, const char **); int fmt_scaled(long long number, char *result); #ifndef WAIT_ANY #define WAIT_ANY (-1) #endif /* there is no limit to ulrich drepper's crap */ #ifndef TAILQ_END #define TAILQ_END(head) NULL #endif #ifndef TAILQ_FOREACH_SAFE #define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = TAILQ_FIRST(head); \ (var) != TAILQ_END(head) && \ ((tvar) = TAILQ_NEXT(var, field), 1); \ (var) = (tvar)) #endif /* * fmt_scaled(3) specific flags. (from OpenBSD util.h) */ #define FMT_SCALED_STRSIZE 7 /* minus sign, 4 digits, suffix, null byte */ int getpeereid(int s, uid_t *euid, gid_t *gid); xombrero-1.6.4/marco.c010064400017500000000000000046361247066410500136500ustar00dhillwheel/* * Copyright (c) 2011 Todd T. Fries * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include static const char *message[] = { "I fully support your right to put restrictions on how I can modify" " or distribute something you created. Calling these restrictions " "\"liberty,\" however, is just Orwellian doublespeak", "GET OFF MY INTERNET LAWN!!!!", "here is your list of restrictions -> freedom!!!!", "i am all for it being free; i am all for not allowing abuse", "webkit 1.4 is a huge step backwards", "i honestly dont get how people equate gpl with liberty or freedom", "I have no idea where you came up with the idea that you have to " "continuously patch OpenBSD. Last time I cared about that was when " "I was still dicking around with Linux.", "Problem with discussion is that it doesn't add any code to cvs.", "I can insult you some more but I am not sure you'd get it.", "the mouse is for copy/paste and the interwebs", "You could run openbsd and be done with it. Unlike linux is doesn't " "suck so that helps that decision.", "Twitter is the dumbest fucking thing that has ever happened to the Internet.", "[speaking of {open,libre}office] it is an obese crack whore with herpes boils " "that are about to explode" }; const char * marco_message(void) { const char *str; str = message[arc4random_uniform(sizeof(message)/sizeof(message[0]))]; return str; } int marco(struct tab *t, struct karg *args) { char *page, line[64 * 1024]; if (t == NULL) show_oops(NULL, "marco invalid parameters"); line[0] = '\0'; snprintf(line, sizeof line, "%s", marco_message()); page = get_html_page("Marco Sez...", line, "", 0); load_webkit_string(t, page, XT_URI_ABOUT_MARCO, 0); g_free(page); return (0); } xombrero-1.6.4/netbsd004075500017500000000000000000001247066410500135755ustar00dhillwheelxombrero-1.6.4/netbsd/Makefile010064400017500000000000000062201247066410500153110ustar00dhillwheelPREFIX?=/usr/local BINDIR=${PREFIX}/bin CFLAGS+=-DXT_DS_RESOURCE_DIR=\"$(PREFIX)/share/xombrero/\" PROG=xombrero MAN=xombrero.1 DEBUG= -g SRCS= cookie.c inspector.c marco.c about.c whitelist.c settings.c inputfocus.c SRCS+= history.c completion.c tldlist.c externaleditor.c unix.c xombrero.c SRCS+= netbsd.c .PATH: ${.CURDIR}/.. CFLAGS+= -O2 -Wall -Wno-format-extra-args -Wunused -Wextra -Wno-unused-parameter CFLAGS+= -Wno-missing-field-initializers -Wno-sign-compare CFLAGS+= -Wno-deprecated-declarations -Wfloat-equal ${DEBUG} CFLAGS+= -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE CFLAGS+= -DGDK_DISABLE_DEPRECATION_WARNINGS -DGLIB_DISABLE_DEPRECATION_WARNINGS CFLAGS+= -I. -I.. LDADD= -lutil GTK_VERSION ?= gtk3 .if ${GTK_VERSION} == "gtk2" LIBS+= gtk+-2.0 LIBS+= webkit-1.0 .else LIBS+= gtk+-3.0 LIBS+= webkitgtk-3.0 .endif LIBS+= libsoup-2.4 LIBS+= gnutls GTK_CFLAGS!= pkg-config --cflags $(LIBS) GTK_LDFLAGS!= pkg-config --libs $(LIBS) CFLAGS+= $(GTK_CFLAGS) LDFLAGS+= $(GTK_LDFLAGS) BUILDVERSION != sh "${.CURDIR}/../buildver.sh" .if !${BUILDVERSION} == "" CPPFLAGS+= -DXOMBRERO_BUILDSTR=\"$(BUILDVERSION)\" .endif MANDIR= ${PREFIX}/man/ CLEANFILES += ${.CURDIR}/javascript.h javascript.h tooltip.h xombrero.cat1 xombrero.core xombrero.html1 JSFILES += ../hinting.js JSFILES += ../input-focus.js JSFILES += ../autoscroll.js .for _js in ${JSFILES} JSCURDIR += ${.CURDIR}/${_js} .endfor .NOPATH: javascript.h tooltip.h javascript.h: ${JSFILES} ../js-merge-helper.pl perl ${.CURDIR}/../js-merge-helper.pl \ ${JSCURDIR} > javascript.h tooltip.h: ${MAN} ../ascii2txt.pl ../txt2tooltip.pl mandoc -Tascii ${.CURDIR}/../${MAN} | \ perl ${.CURDIR}/../ascii2txt.pl | \ perl ${.CURDIR}/../txt2tooltip.pl > tooltip.h beforeinstall: install -m 755 -d ${PREFIX}/bin install -m 755 -d ${MANDIR}/man1/ install -m 755 -d ${MANDIR}/html1/ install -m 755 -d ${PREFIX}/share/xombrero install -m 755 -d ${PREFIX}/share/applications install -m 644 ${.CURDIR}/../xombrero.css ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../xombrero.desktop ${PREFIX}/share/applications install -m 644 ${.CURDIR}/../xombreroicon16.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../xombreroicon32.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../xombreroicon48.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../xombreroicon64.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../xombreroicon128.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../xombreroicon256.png ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../favicon.ico ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../tld-rules ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../style.css ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../hsts-preload ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../user-agent-headers ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../http-accept-headers ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../torenabled.ico ${PREFIX}/share/xombrero install -m 644 ${.CURDIR}/../tordisabled.ico ${PREFIX}/share/xombrero ${PROG} ${OBJS} beforedepend: javascript.h tooltip.h .include xombrero-1.6.4/netbsd/netbsd.c010064400017500000000000000203761247066410500153040ustar00dhillwheel/* $OpenBSD: fmt_scaled.c,v 1.10 2009/06/20 15:00:04 martynas Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Ian F. Darwin. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * fmt_scaled: Format numbers scaled for human comprehension * scan_scaled: Scan numbers in this format. * * "Human-readable" output uses 4 digits max, and puts a unit suffix at * the end. Makes output compact and easy-to-read esp. on huge disks. * Formatting code was originally in OpenBSD "df", converted to library routine. * Scanning code written for OpenBSD libutil. */ #include #include #include #include #include #include #include "util.h" typedef enum { NONE = 0, KILO = 1, MEGA = 2, GIGA = 3, TERA = 4, PETA = 5, EXA = 6 } unit_type; /* These three arrays MUST be in sync! XXX make a struct */ static unit_type units[] = { NONE, KILO, MEGA, GIGA, TERA, PETA, EXA }; static char scale_chars[] = "BKMGTPE"; static long long scale_factors[] = { 1LL, 1024LL, 1024LL*1024, 1024LL*1024*1024, 1024LL*1024*1024*1024, 1024LL*1024*1024*1024*1024, 1024LL*1024*1024*1024*1024*1024, }; #define SCALE_LENGTH (sizeof(units)/sizeof(units[0])) #define MAX_DIGITS (SCALE_LENGTH * 3) /* XXX strlen(sprintf("%lld", -1)? */ /* Convert the given input string "scaled" into numeric in "result". * Return 0 on success, -1 and errno set on error. */ int scan_scaled(char *scaled, long long *result) { char *p = scaled; int sign = 0; unsigned int i, ndigits = 0, fract_digits = 0; long long scale_fact = 1, whole = 0, fpart = 0; /* Skip leading whitespace */ while (isascii((unsigned char)*p) && isspace((unsigned char)*p)) ++p; /* Then at most one leading + or - */ while (*p == '-' || *p == '+') { if (*p == '-') { if (sign) { errno = EINVAL; return -1; } sign = -1; ++p; } else if (*p == '+') { if (sign) { errno = EINVAL; return -1; } sign = +1; ++p; } } /* Main loop: Scan digits, find decimal point, if present. * We don't allow exponentials, so no scientific notation * (but note that E for Exa might look like e to some!). * Advance 'p' to end, to get scale factor. */ for (; isascii((unsigned char)*p) && (isdigit((unsigned char)*p) || *p=='.'); ++p) { if (*p == '.') { if (fract_digits > 0) { /* oops, more than one '.' */ errno = EINVAL; return -1; } fract_digits = 1; continue; } i = (*p) - '0'; /* whew! finally a digit we can use */ if (fract_digits > 0) { if (fract_digits >= MAX_DIGITS-1) /* ignore extra fractional digits */ continue; fract_digits++; /* for later scaling */ fpart *= 10; fpart += i; } else { /* normal digit */ if (++ndigits >= MAX_DIGITS) { errno = ERANGE; return -1; } whole *= 10; whole += i; } } if (sign) { whole *= sign; fpart *= sign; } /* If no scale factor given, we're done. fraction is discarded. */ if (!*p) { *result = whole; return 0; } /* Validate scale factor, and scale whole and fraction by it. */ for (i = 0; i < SCALE_LENGTH; i++) { /* Are we there yet? */ if (*p == scale_chars[i] || *p == tolower((unsigned char)scale_chars[i])) { /* If it ends with alphanumerics after the scale char, bad. */ if (isalnum((unsigned char)*(p+1))) { errno = EINVAL; return -1; } scale_fact = scale_factors[i]; /* scale whole part */ whole *= scale_fact; /* truncate fpart so it does't overflow. * then scale fractional part. */ while (fpart >= LLONG_MAX / scale_fact) { fpart /= 10; fract_digits--; } fpart *= scale_fact; if (fract_digits > 0) { for (i = 0; i < fract_digits -1; i++) fpart /= 10; } whole += fpart; *result = whole; return 0; } } errno = ERANGE; return -1; } /* Format the given "number" into human-readable form in "result". * Result must point to an allocated buffer of length FMT_SCALED_STRSIZE. * Return 0 on success, -1 and errno set if error. */ int fmt_scaled(long long number, char *result) { long long abval, fract = 0; unsigned int i; unit_type unit = NONE; abval = llabs(number); /* Not every negative long long has a positive representation. * Also check for numbers that are just too darned big to format */ if (abval < 0 || abval / 1024 >= scale_factors[SCALE_LENGTH-1]) { errno = ERANGE; return -1; } /* scale whole part; get unscaled fraction */ for (i = 0; i < SCALE_LENGTH; i++) { if (abval/1024 < scale_factors[i]) { unit = units[i]; fract = (i == 0) ? 0 : abval % scale_factors[i]; number /= scale_factors[i]; if (i > 0) fract /= scale_factors[i - 1]; break; } } fract = (10 * fract + 512) / 1024; /* if the result would be >= 10, round main number */ if (fract == 10) { if (number >= 0) number++; else number--; fract = 0; } if (number == 0) strlcpy(result, "0B", FMT_SCALED_STRSIZE); else if (unit == NONE || number >= 100 || number <= -100) { if (fract >= 5) { if (number >= 0) number++; else number--; } (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld%c", number, scale_chars[unit]); } else (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld.%1lld%c", number, fract, scale_chars[unit]); return 0; } /* $OpenBSD: strtonum.c,v 1.6 2004/08/03 19:38:01 millert Exp $ */ /* * Copyright (c) 2004 Ted Unangst and Todd Miller * All rights reserved. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include #include #include #define INVALID 1 #define TOOSMALL 2 #define TOOLARGE 3 long long strtonum(const char *numstr, long long minval, long long maxval, const char **errstrp) { long long ll = 0; char *ep; int error = 0; struct errval { const char *errstr; int err; } ev[4] = { { NULL, 0 }, { "invalid", EINVAL }, { "too small", ERANGE }, { "too large", ERANGE }, }; ev[0].err = errno; errno = 0; if (minval > maxval) error = INVALID; else { ll = strtoll(numstr, &ep, 10); if (numstr == ep || *ep != '\0') error = INVALID; else if ((ll == LLONG_MIN && errno == ERANGE) || ll < minval) error = TOOSMALL; else if ((ll == LLONG_MAX && errno == ERANGE) || ll > maxval) error = TOOLARGE; } if (errstrp != NULL) *errstrp = ev[error].errstr; errno = ev[error].err; if (error) ll = 0; return (ll); } xombrero-1.6.4/netbsd/util.h010064400017500000000000000031711247066410500150010ustar00dhillwheel#define RB_FOREACH(x, name, head) \ for ((x) = RB_MIN(name, head); \ (x) != NULL; \ (x) = name##_RB_NEXT(x)) #define RB_FOREACH_SAFE(x, name, head, y) \ for ((x) = RB_MIN(name, head); \ ((x) != NULL) && ((y) = name##_RB_NEXT(x), 1); \ (x) = (y)) #define RB_FOREACH_REVERSE(x, name, head) \ for ((x) = RB_MAX(name, head); \ (x) != NULL; \ (x) = name##_RB_PREV(x)) #define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \ for ((x) = RB_MAX(name, head); \ ((x) != NULL) && ((y) = name##_RB_PREV(x), 1); \ (x) = (y)) #ifndef TAILQ_END #define TAILQ_END(head) NULL #endif #ifndef TAILQ_FOREACH_SAFE #define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = TAILQ_FIRST(head); \ (var) != TAILQ_END(head) && \ ((tvar) = TAILQ_NEXT(var, field), 1); \ (var) = (tvar)) #endif #define FMT_SCALED_STRSIZE 7 /* minus sign, 4 digits, suffix, null byte */ int fmt_scaled(long long number, char *result); long long strtonum(const char *, long long, long long, const char **); xombrero-1.6.4/playflash.sh010064400017500000000000000010551247066410500147120ustar00dhillwheel#!/bin/sh # This is an example script for playing flash videos. It requires the # get_flash_video package to be installed on the system. You can copy this # file to ~/.xombrero/, and set # default_script = ~/.xombrero/playflash.sh # in ~/.xombrero.conf. Remember to make this file executable. # # You may wish to add the following line to ~/.get_flash_videosrc # to avoid accumulating files: # player = mplayer -loop 0 %s 2>/dev/null; rm -f %s cd /var/tmp && get_flash_videos --player="/usr/local/bin/mplayer -really-quiet %s 2> /dev/null" -q -p -y $1 xombrero-1.6.4/release.sh010075500017500000000000000067621247066410500143640ustar00dhillwheel#!/bin/sh # # Prepares a release: # - Bumps version according to specified level (major, minor, or patch) # - Updates all necessary headers with new version # - Commits the changes # - Tags the release # - Creates a release tarball PROJECT=xombrero PROJECT_UC=$(echo $PROJECT | tr '[:lower:]' '[:upper:]') SCRIPT=$(basename $0) HEADER=version.h # verify params if [ $# -lt 1 ]; then echo "usage: $SCRIPT {major | minor | patch}" exit 1 fi report_err() { echo "$SCRIPT: error: $1" 1>&2 exit 1 } cd "$(dirname $0)" # verify header exists if [ ! -f "$HEADER" ]; then report_err "$HEADER does not exist" fi # verify valid release type RTYPE="$1" if [ "$RTYPE" != "major" -a "$RTYPE" != "minor" -a "$RTYPE" != "patch" ]; then report_err "release type must be major, minor, or patch" fi # verify git is available if ! type git >/dev/null 2>&1; then report_err "unable to find 'git' in the system path" fi # verify the git repository is on the master branch BRANCH=$(git -c color.ui=no branch | grep '\*' | cut -c3-) if [ "$BRANCH" != "master" ]; then report_err "git repository must be on the master branch" fi # verify there are no uncommitted modifications prior to release modifications NUM_MODIFIED=$(git diff 2>/dev/null | wc -l | sed 's/^[ \t]*//') NUM_STAGED=$(git diff --cached 2>/dev/null | wc -l | sed 's/^[ \t]*//') if [ "$NUM_MODIFIED" != "0" -o "$NUM_STAGED" != "0" ]; then report_err "the working directory contains uncommitted modifications" fi # get version PAT_PREFIX="(^#define[[:space:]]+${PROJECT_UC}" PAT_SUFFIX='[[:space:]]+)[0-9]+$' MAJOR=$(egrep "${PAT_PREFIX}_MAJOR${PAT_SUFFIX}" $HEADER | awk '{print $3}') MINOR=$(egrep "${PAT_PREFIX}_MINOR${PAT_SUFFIX}" $HEADER | awk '{print $3}') PATCH=$(egrep "${PAT_PREFIX}_PATCH${PAT_SUFFIX}" $HEADER | awk '{print $3}') if [ -z "$MAJOR" -o -z "$MINOR" -o -z "$PATCH" ]; then report_err "unable to get version from $HEADER" fi # bump version according to level if [ "$RTYPE" = "major" ]; then MAJOR=$(expr $MAJOR + 1) MINOR=0 PATCH=0 elif [ "$RTYPE" = "minor" ]; then MINOR=$(expr $MINOR + 1) PATCH=0 elif [ "$RTYPE" = "patch" ]; then PATCH=$(expr $PATCH + 1) fi PROJ_VER="$MAJOR.$MINOR.$PATCH" # update header with new version sed -E " s/${PAT_PREFIX}_MAJOR${PAT_SUFFIX}/\1${MAJOR}/; s/${PAT_PREFIX}_MINOR${PAT_SUFFIX}/\1${MINOR}/; s/${PAT_PREFIX}_PATCH${PAT_SUFFIX}/\1${PATCH}/; " <"$HEADER" >"${HEADER}.tmp" # apply changes mv "${HEADER}.tmp" "$HEADER" # commit and tag TAG="${PROJECT_UC}_${MAJOR}_${MINOR}_${PATCH}" git commit -am "Prepare for release ${PROJ_VER}." || report_err "unable to commit changes" git tag -s -u release@conformal.com "$TAG" -m "Release ${PROJ_VER}" || report_err "unable to create tag" # create temp working space and copy repo over TD=$(mktemp -d /tmp/release.XXXXXXXXXX) if [ ! -d "$TD" ]; then report_err "unable to create temp directory" fi RELEASE_DIR="$PROJECT-$PROJ_VER" RELEASE_TAR="$PROJECT-$PROJ_VER.tgz" git clone . "$TD/$RELEASE_DIR" || report_err "unable to copy to $TD/$RELEASE_DIR" # cleanup repository files cd "$TD" if [ -d "$RELEASE_DIR" -a -d "$RELEASE_DIR/.git" ]; then rm -rf "$RELEASE_DIR/.git" fi if [ -d "$RELEASE_DIR" -a -f "$RELEASE_DIR/.gitignore" ]; then rm -f "$RELEASE_DIR/.gitignore" fi # make snap tar -zcf "$RELEASE_TAR" "$RELEASE_DIR" || report_err "unable to create $RELEASE_TAR" echo "Release tarball:" echo " $TD/$RELEASE_TAR" echo "" echo "If everything is accurate, use the following command to push the changes:" echo " git push --tags origin master" xombrero-1.6.4/settings.c010064400017500000000000003072771247066410500144160ustar00dhillwheel/* * Copyright (c) 2010, 2011 Marco Peereboom * Copyright (c) 2011 Stevan Andjelkovic * Copyright (c) 2010, 2011 Edd Barrett * Copyright (c) 2011 Todd T. Fries * Copyright (c) 2011 Raphael Graf * Copyright (c) 2011 Michal Mazurek * Copyright (c) 2012 Josh Rickmar * Copyright (c) 2013 David Hill * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include #include "tooltip.h" /* globals */ #if SOUP_CHECK_VERSION(2, 42, 2) GProxyResolver *proxy_uri = NULL; gchar *proxy_exclude[] = { "fc00::/7", "::1", "127.0.0.1", NULL }; #else SoupURI *proxy_uri = NULL; #endif PangoFontDescription *cmd_font; PangoFontDescription *oops_font; PangoFontDescription *statusbar_font; PangoFontDescription *tabbar_font; /* non-settings */ char search_file[PATH_MAX]; char command_file[PATH_MAX]; char runtime_settings[PATH_MAX]; /* override of settings */ /* settings that require restart */ int enable_socket = 0; int single_instance = 0; /* only allow one xombrero to run */ int fancy_bar = 1; /* fancy toolbar */ int browser_mode = XT_BM_NORMAL; int gui_mode = XT_GM_CLASSIC; char *statusbar_elems = NULL; int window_height = 768; int window_width = 1024; int window_maximize = 0; int icon_size = 2; /* 1 = smallest, 2+ = bigger */ char *resource_dir = NULL; char download_dir[PATH_MAX]; int allow_volatile_cookies = 0; int save_global_history = 0; /* save global history to disk */ int save_rejected_cookies = 0; gint max_connections = 25; gint max_host_connections = 5; int history_autosave = 0; int edit_mode = XT_EM_HYBRID; char *include_config = NULL; int anonymize_headers = 0; int tabless = 0; /* allow only 1 tab */ /* runtime settings */ int show_tabs = XT_DS_SHOW_TABS; /* show tabs on notebook */ int tab_style = XT_DS_TAB_STYLE; /* tab bar style */ int statusbar_style = XT_DS_STATUSBAR_STYLE; /* status bar style */ int show_url = XT_DS_SHOW_URL; /* show url toolbar on notebook */ int show_scrollbars = XT_DS_SHOW_SCROLLBARS; int show_statusbar = XT_DS_SHOW_STATUSBAR; /* vimperator style status bar */ int ctrl_click_focus = XT_DS_CTRL_CLICK_FOCUS; /* ctrl click gets focus */ int cookies_enabled = XT_DS_COOKIES_ENABLED; /* enable cookies */ int read_only_cookies = XT_DS_READ_ONLY_COOKIES; /* enable to not write cookies */ int enable_scripts = XT_DS_ENABLE_SCRIPTS; int enable_plugins = XT_DS_ENABLE_PLUGINS; double default_zoom_level = XT_DS_DEFAULT_ZOOM_LEVEL; char default_script[PATH_MAX]; /* special setting - is never g_free'd */ int refresh_interval = XT_DS_REFRESH_INTERVAL; /* download refresh interval */ int enable_plugin_whitelist = XT_DS_ENABLE_PLUGIN_WHITELIST; int enable_cookie_whitelist = XT_DS_ENABLE_COOKIE_WHITELIST; int enable_js_whitelist = XT_DS_ENABLE_JS_WHITELIST; int enable_localstorage = XT_DS_ENABLE_LOCALSTORAGE; int session_timeout = XT_DS_SESSION_TIMEOUT; /* cookie session timeout */ int cookie_policy = XT_DS_COOKIE_POLICY; char ssl_ca_file[PATH_MAX]; /* special setting - is never g_free'd */ gboolean ssl_strict_certs = XT_DS_SSL_STRICT_CERTS; gboolean enable_strict_transport = XT_DS_ENABLE_STRICT_TRANSPORT; int append_next = XT_DS_APPEND_NEXT; /* append tab after current tab */ char *home = NULL; /* allocated/set at startup */ char *search_string = NULL; /* allocated/set at startup */ char *http_proxy = NULL; int http_proxy_starts_enabled = 1; int download_mode = XT_DM_START; int color_visited_uris = XT_DS_COLOR_VISITED_URIS; int session_autosave = XT_DS_SESSION_AUTOSAVE; int guess_search = XT_DS_GUESS_SEARCH; gint enable_spell_checking = XT_DS_ENABLE_SPELL_CHECKING; char *spell_check_languages = NULL; /* allocated/set at startup */ char *url_regex = NULL; /* allocated/set at startup */ char *encoding = NULL; /* allocated/set at startup */ int autofocus_onload = XT_DS_AUTOFOCUS_ONLOAD; int enable_js_autorun = XT_DS_ENABLE_JS_AUTORUN; char *userstyle = NULL; /* allocated/set at startup */ int userstyle_global = XT_DS_USERSTYLE_GLOBAL; int auto_load_images = XT_DS_AUTO_LOAD_IMAGES; int enable_autoscroll = XT_DS_ENABLE_AUTOSCROLL; int enable_cache = 0; int enable_favicon_entry = XT_DS_ENABLE_FAVICON_ENTRY; int enable_favicon_tabs = XT_DS_ENABLE_FAVICON_TABS; char *external_editor = NULL; int referer_mode = XT_DS_REFERER_MODE; char *referer_custom = NULL; int download_notifications = XT_DS_DOWNLOAD_NOTIFICATIONS; int warn_cert_changes = 0; int allow_insecure_content = XT_DS_ALLOW_INSECURE_CONTENT; int allow_insecure_scripts = XT_DS_ALLOW_INSECURE_SCRIPTS; int do_not_track = XT_DS_DO_NOT_TRACK; int preload_strict_transport = XT_DS_PRELOAD_STRICT_TRANSPORT; char *gnutls_priority_string = XT_DS_GNUTLS_PRIORITY_STRING; int js_auto_open_windows = XT_DS_JS_AUTO_OPEN_WINDOWS; char *cmd_font_name = NULL; /* these are all set at startup */ char *oops_font_name = NULL; char *statusbar_font_name = NULL; char *tabbar_font_name = NULL; char *get_download_dir(struct settings *); char *get_default_script(struct settings *); char *get_runtime_dir(struct settings *); char *get_tab_style(struct settings *); char *get_statusbar_style(struct settings *); char *get_edit_mode(struct settings *); char *get_download_mode(struct settings *); char *get_work_dir(struct settings *); char *get_referer(struct settings *); char *get_ssl_ca_file(struct settings *); char *get_userstyle(struct settings *); char *get_gnutls_priority_string(struct settings *); int add_cookie_wl(struct settings *, char *); int add_js_wl(struct settings *, char *); int add_pl_wl(struct settings *, char *); int add_mime_type(struct settings *, char *); int add_alias(struct settings *, char *); int add_kb(struct settings *, char *); int add_ua(struct settings *, char *); int add_http_accept(struct settings *, char *); int add_cmd_alias(struct settings *, char *); int add_custom_uri(struct settings *, char *); int add_force_https(struct settings *, char *); int set_append_next(char *); int set_autofocus_onload(char *); int set_cmd_font(char *); int set_color_visited_uris(char *); int set_cookie_policy_rt(char *); int set_cookies_enabled(char *); int set_ctrl_click_focus(char *); int set_fancy_bar(char *); int set_home(char *); int set_download_dir(struct settings *, char *); int set_download_notifications(char *); int set_default_script(struct settings *, char *); int set_default_script_rt(char *); int set_default_zoom_level(char *); int set_enable_cookie_whitelist(char *); int set_enable_js_autorun(char *); int set_enable_js_whitelist(char *); int set_enable_localstorage(char *); int set_enable_plugins(char *); int set_enable_plugin_whitelist(char *); int set_enable_scripts(char *); int set_enable_spell_checking(char *); int set_enable_strict_transport(char *); int set_encoding_rt(char *); int set_runtime_dir(struct settings *, char *); int set_tabbar_font(char *value); int set_tab_style(struct settings *, char *); int set_tab_style_rt(char *); int set_statusbar_style(struct settings *, char *); int set_statusbar_style_rt(char *); int set_edit_mode(struct settings *, char *); int set_work_dir(struct settings *, char *); int set_auto_load_images(char *); int set_enable_autoscroll(char *); int set_enable_cache(char *); int set_enable_favicon_entry(char *); int set_enable_favicon_tabs(char *); int set_guess_search(char *); int set_download_mode(struct settings *, char *); int set_download_mode_rt(char *); int set_js_auto_open_windows(char *); int set_oops_font(char *); int set_read_only_cookies(char *); int set_referer(struct settings *, char *); int set_referer_rt(char *); int set_refresh_interval(char *); int set_search_string(char *s); int set_session_autosave(char *); int set_session_timeout(char *); int set_show_scrollbars(char *); int set_show_statusbar(char *); int set_show_tabs(char *); int set_show_url(char *); int set_spell_check_languages(char *); int set_ssl_ca_file_rt(char *); int set_ssl_strict_certs(char *); int set_statusbar_font(char *); int set_url_regex(char *); int set_userstyle(struct settings *, char *); int set_userstyle_rt(char *); int set_userstyle_global(char *); int set_external_editor(char *); int set_warn_cert_changes(char *); int set_allow_insecure_content(char *); int set_allow_insecure_scripts(char *); int set_http_proxy(char *); int set_do_not_track(char *); int set_gnutls_priority_string(struct settings *, char *); int check_allow_insecure_content(char **); int check_allow_insecure_scripts(char **); int check_allow_volatile_cookies(char **); int check_anonymize_headers(char **); int check_append_next(char **); int check_auto_load_images(char **); int check_autofocus_onload(char **); int check_browser_mode(char **); int check_cmd_font(char **); int check_color_visited_uris(char **); int check_cookie_policy(char **); int check_cookies_enabled(char **); int check_ctrl_click_focus(char **); int check_default_script(char **); int check_default_zoom_level(char **); int check_download_dir(char **); int check_download_mode(char **); int check_download_notifications(char **); int check_edit_mode(char **); int check_enable_autoscroll(char **); int check_enable_cache(char **); int check_enable_cookie_whitelist(char **); int check_enable_favicon_entry(char **); int check_enable_favicon_tabs(char **); int check_enable_js_autorun(char **); int check_enable_js_whitelist(char **); int check_enable_localstorage(char **); int check_enable_plugin_whitelist(char **); int check_enable_plugins(char **); int check_enable_scripts(char **); int check_enable_socket(char **); int check_enable_spell_checking(char **); int check_enable_strict_transport(char **); int check_encoding(char **); int check_external_editor(char **); int check_fancy_bar(char **); int check_gnutls_search_string(char **); int check_guess_search(char **); int check_gui_mode(char **); int check_history_autosave(char **); int check_home(char **); int check_http_proxy(char **); int check_http_proxy_scheme(const char *); int check_http_proxy_starts_enabled(char **); int check_icon_size(char **); int check_js_auto_open_windows(char **); int check_max_connections(char **); int check_max_host_connections(char **); int check_oops_font(char **); int check_read_only_cookies(char **); int check_referer(char **); int check_refresh_interval(char **); int check_resource_dir(char **); int check_save_global_history(char **); int check_save_rejected_cookies(char **); int check_search_string(char **); int check_session_autosave(char **); int check_session_timeout(char **); int check_show_scrollbars(char **); int check_show_statusbar(char **); int check_show_tabs(char **); int check_show_url(char **); int check_single_instance(char **); int check_spell_check_languages(char **); int check_ssl_ca_file(char **); int check_ssl_strict_certs(char **); int check_statusbar_elems(char **); int check_statusbar_font(char **); int check_statusbar_style(char **); int check_tab_style(char **); int check_tabless(char **); int check_tabbar_font(char **); int check_url_regex(char **); int check_userstyle(char **); int check_userstyle_global(char **); int check_warn_cert_changes(char **); int check_window_height(char **); int check_window_maximize(char **); int check_window_width(char **); int check_work_dir(char **); int check_do_not_track(char **); void walk_mime_type(struct settings *, void (*)(struct settings *, char *, void *), void *); void walk_alias(struct settings *, void (*)(struct settings *, char *, void *), void *); void walk_cookie_wl(struct settings *, void (*)(struct settings *, char *, void *), void *); void walk_js_wl(struct settings *, void (*)(struct settings *, char *, void *), void *); void walk_pl_wl(struct settings *, void (*)(struct settings *, char *, void *), void *); void walk_kb(struct settings *, void (*)(struct settings *, char *, void *), void *); void walk_ua(struct settings *, void (*)(struct settings *, char *, void *), void *); void walk_http_accept(struct settings *, void (*)(struct settings *, char *, void *), void *); void walk_cmd_alias(struct settings *, void (*)(struct settings *, char *, void *), void *); void walk_custom_uri(struct settings *, void (*)(struct settings *, char *, void *), void *); void walk_force_https(struct settings *, void (*)(struct settings *, char *, void *), void *); struct special s_browser_mode = { set_browser_mode, get_browser_mode, NULL, { "kiosk", "normal", "whitelist", NULL } }; struct special s_gui_mode = { set_gui_mode, get_gui_mode, NULL, { "classic", "minimal", NULL } }; struct special s_cookie = { set_cookie_policy, get_cookie_policy, NULL, { "accept", "no3rdparty", "reject", NULL } }; struct special s_alias = { add_alias, NULL, walk_alias, { NULL } }; struct special s_cmd_alias = { add_cmd_alias, NULL, walk_cmd_alias, { NULL } }; struct special s_mime = { add_mime_type, NULL, walk_mime_type, { NULL } }; struct special s_js = { add_js_wl, NULL, walk_js_wl, { NULL } }; struct special s_pl = { add_pl_wl, NULL, walk_pl_wl, { NULL } }; struct special s_kb = { add_kb, NULL, walk_kb, { NULL } }; struct special s_cookie_wl = { add_cookie_wl, NULL, walk_cookie_wl, { NULL } }; struct special s_uri = { add_custom_uri, NULL, walk_custom_uri, { NULL } }; struct special s_default_script = { set_default_script, get_default_script, NULL, { NULL } }; struct special s_ssl_ca_file = { set_ssl_ca_file, get_ssl_ca_file, NULL, { NULL } }; struct special s_download_dir = { set_download_dir, get_download_dir, NULL, { NULL } }; struct special s_work_dir = { set_work_dir, get_work_dir, NULL, { NULL } }; struct special s_tab_style = { set_tab_style, get_tab_style, NULL, { "compact", "normal", NULL } }; struct special s_statusbar_style = { set_statusbar_style, get_statusbar_style, NULL, { "title", "url", NULL } }; struct special s_edit_mode = { set_edit_mode, get_edit_mode, NULL, { "hybrid", "vi", NULL } }; struct special s_download_mode = { set_download_mode, get_download_mode, NULL, { "add", "ask", "start", NULL } }; struct special s_ua = { add_ua, NULL, walk_ua, { NULL } }; struct special s_http_accept = { add_http_accept, NULL, walk_http_accept, { NULL } }; struct special s_referer = { set_referer, get_referer, NULL, { "always", "never", "same-domain", "same-fqdn", NULL } }; struct special s_userstyle = { set_userstyle, get_userstyle, NULL, { NULL } }; struct special s_force_https = { add_force_https, NULL, walk_force_https, { NULL } }; struct special s_gnutls_priority_string = { set_gnutls_priority_string, get_gnutls_priority_string, NULL, { NULL } }; struct settings rs[] = { { "allow_insecure_content", XT_S_BOOL, 0, &allow_insecure_content, NULL, NULL, NULL, set_allow_insecure_content, check_allow_insecure_content, TT_ALLOW_INSECURE_CONTENT }, { "allow_insecure_scripts", XT_S_BOOL, 0, &allow_insecure_scripts, NULL, NULL, NULL, set_allow_insecure_scripts, check_allow_insecure_scripts, TT_ALLOW_INSECURE_SCRIPTS}, { "allow_volatile_cookies", XT_S_BOOL, 0, &allow_volatile_cookies, NULL, NULL, NULL, NULL, check_allow_volatile_cookies, TT_ALLOW_VOLATILE_COOKIES }, { "anonymize_headers", XT_S_BOOL, 0, &anonymize_headers, NULL, NULL, NULL, NULL, check_anonymize_headers, TT_ANONYMIZE_HEADERS }, { "append_next", XT_S_BOOL, 0, &append_next, NULL, NULL, NULL, set_append_next, check_append_next, TT_APPEND_NEXT }, { "auto_load_images", XT_S_BOOL, 0, &auto_load_images, NULL, NULL, NULL, set_auto_load_images, check_auto_load_images, TT_AUTO_LOAD_IMAGES }, { "autofocus_onload", XT_S_BOOL, 0, &autofocus_onload, NULL, NULL, NULL, set_autofocus_onload, check_autofocus_onload, TT_AUTOFOCUS_ONLOAD }, { "browser_mode", XT_S_STR, 0, NULL, NULL,&s_browser_mode, NULL, NULL, check_browser_mode, TT_BROWSER_MODE }, { "cmd_font", XT_S_STR, 0, NULL, &cmd_font_name, NULL, NULL, set_cmd_font, check_cmd_font, TT_CMD_FONT }, { "color_visited_uris", XT_S_BOOL, 0, &color_visited_uris , NULL, NULL, NULL, set_color_visited_uris, check_color_visited_uris, TT_COLOR_VISITED_URIS }, { "cookie_policy", XT_S_STR, 0, NULL, NULL,&s_cookie, NULL, set_cookie_policy_rt, check_cookie_policy, TT_COOKIE_POLICY }, { "cookies_enabled", XT_S_BOOL, 0, &cookies_enabled, NULL, NULL, NULL, set_cookies_enabled, check_cookies_enabled, TT_COOKIES_ENABLED }, { "ctrl_click_focus", XT_S_BOOL, 0, &ctrl_click_focus, NULL, NULL, NULL, set_ctrl_click_focus, check_ctrl_click_focus, TT_CTRL_CLICK_FOCUS }, { "default_script", XT_S_STR, 1, NULL, NULL,&s_default_script, NULL, set_default_script_rt, check_default_script, TT_DEFAULT_SCRIPT }, { "default_zoom_level", XT_S_DOUBLE, 0, NULL, NULL, NULL, &default_zoom_level, set_default_zoom_level, check_default_zoom_level, TT_DEFAULT_ZOOM_LEVEL }, { "do_not_track", XT_S_BOOL, 0, &do_not_track, NULL, NULL, NULL, set_do_not_track, check_do_not_track, TT_DO_NOT_TRACK }, { "download_dir", XT_S_STR, 0, NULL, NULL,&s_download_dir, NULL, NULL, check_download_dir, TT_DOWNLOAD_DIR }, { "download_mode", XT_S_STR, 0, NULL, NULL,&s_download_mode, NULL, set_download_mode_rt, check_download_mode, TT_DOWNLOAD_MODE }, { "download_notifications", XT_S_BOOL, 0, &download_notifications, NULL, NULL, NULL, set_download_notifications, check_download_notifications, TT_DOWNLOAD_NOTIFICATIONS }, { "edit_mode", XT_S_STR, 0, NULL, NULL,&s_edit_mode, NULL, NULL, check_edit_mode, NULL }, { "enable_autoscroll", XT_S_BOOL, 0, &enable_autoscroll, NULL, NULL, NULL, set_enable_autoscroll, check_enable_autoscroll, TT_ENABLE_AUTOSCROLL }, { "enable_cache", XT_S_BOOL, 0, &enable_cache, NULL, NULL, NULL, set_enable_cache, check_enable_cache, TT_ENABLE_CACHE }, { "enable_cookie_whitelist", XT_S_BOOL, 0, &enable_cookie_whitelist, NULL, NULL, NULL, set_enable_cookie_whitelist, check_enable_cookie_whitelist, TT_ENABLE_COOKIE_WHITELIST }, { "enable_favicon_entry", XT_S_BOOL, 0, &enable_favicon_entry, NULL, NULL, NULL, set_enable_favicon_entry, check_enable_favicon_entry, TT_ENABLE_FAVICON_ENTRY }, { "enable_favicon_tabs", XT_S_BOOL, 0, &enable_favicon_tabs, NULL, NULL, NULL, set_enable_favicon_tabs, check_enable_favicon_tabs, TT_ENABLE_FAVICON_TABS }, { "enable_js_autorun", XT_S_BOOL, 0, &enable_js_autorun, NULL, NULL, NULL, set_enable_js_autorun, check_enable_js_autorun, TT_ENABLE_JS_AUTORUN }, { "enable_js_whitelist", XT_S_BOOL, 0, &enable_js_whitelist, NULL, NULL, NULL, set_enable_js_whitelist, check_enable_js_whitelist, TT_ENABLE_JS_WHITELIST }, { "enable_localstorage", XT_S_BOOL, 0, &enable_localstorage, NULL, NULL, NULL, set_enable_localstorage, check_enable_localstorage, TT_ENABLE_LOCALSTORAGE }, { "enable_plugin_whitelist", XT_S_BOOL, 0, &enable_plugin_whitelist, NULL, NULL, NULL, set_enable_plugin_whitelist, check_enable_plugin_whitelist, TT_ENABLE_PLUGIN_WHITELIST }, { "enable_plugins", XT_S_BOOL, 0, &enable_plugins, NULL, NULL, NULL, set_enable_plugins, check_enable_plugins, TT_ENABLE_PLUGINS }, { "enable_scripts", XT_S_BOOL, 0, &enable_scripts, NULL, NULL, NULL, set_enable_scripts, check_enable_scripts, TT_ENABLE_SCRIPTS }, { "enable_socket", XT_S_BOOL,XT_SF_RESTART,&enable_socket, NULL, NULL, NULL, NULL, check_enable_socket, TT_ENABLE_SOCKET }, { "enable_spell_checking", XT_S_BOOL, 0, &enable_spell_checking, NULL, NULL, NULL, set_enable_spell_checking, check_enable_spell_checking, TT_ENABLE_SPELL_CHECKING }, { "enable_strict_transport", XT_S_BOOL, 0, &enable_strict_transport, NULL, NULL, NULL, set_enable_strict_transport, check_enable_strict_transport, TT_ENABLE_STRICT_TRANSPORT }, { "encoding", XT_S_STR, 0, NULL, &encoding, NULL, NULL, NULL, check_encoding, TT_ENCODING }, { "external_editor", XT_S_STR,0, NULL, &external_editor, NULL, NULL, set_external_editor, check_external_editor, TT_EXTERNAL_EDITOR }, { "fancy_bar", XT_S_BOOL,XT_SF_RESTART,&fancy_bar, NULL, NULL, NULL, set_fancy_bar, check_fancy_bar, TT_FANCY_BAR }, { "gnutls_priority_string", XT_S_STR, 0, NULL, NULL,&s_gnutls_priority_string, NULL, NULL, check_gnutls_search_string, TT_GNUTLS_PRIORITY_STRING }, { "guess_search", XT_S_BOOL, 0, &guess_search, NULL, NULL, NULL, set_guess_search, check_guess_search, TT_GUESS_SEARCH }, { "gui_mode", XT_S_STR, 0, NULL, NULL,&s_gui_mode, NULL, NULL, check_gui_mode, TT_GUI_MODE }, { "history_autosave", XT_S_BOOL, 0, &history_autosave, NULL, NULL, NULL, NULL, check_history_autosave, TT_HISTORY_AUTOSAVE }, { "home", XT_S_STR, 0, NULL, &home, NULL, NULL, set_home, check_home, TT_HOME }, { "http_proxy", XT_S_STR, 0, NULL, &http_proxy, NULL, NULL, set_http_proxy, check_http_proxy, TT_HTTP_PROXY }, { "http_proxy_starts_enabled", XT_S_BOOL, 0, &http_proxy_starts_enabled, NULL, NULL, NULL, NULL, check_http_proxy_starts_enabled, TT_HTTP_PROXY_STARTS_ENABLED }, { "icon_size", XT_S_INT, 0, &icon_size, NULL, NULL, NULL, NULL, check_icon_size, TT_ICON_SIZE }, { "include_config", XT_S_STR, XT_SF_INVISIBLE, NULL, &include_config, NULL, NULL, NULL, NULL }, { "js_auto_open_windows", XT_S_BOOL, 1, &js_auto_open_windows, NULL, NULL, NULL, set_js_auto_open_windows, check_js_auto_open_windows, TT_JS_AUTO_OPEN_WINDOWS }, { "max_connections", XT_S_INT, XT_SF_RESTART,&max_connections, NULL, NULL, NULL, NULL, check_max_connections, TT_MAX_CONNECTIONS }, { "max_host_connections", XT_S_INT, XT_SF_RESTART,&max_host_connections, NULL, NULL, NULL, NULL, check_max_host_connections, TT_MAX_HOST_CONNECTIONS }, { "oops_font", XT_S_STR, 0, NULL, &oops_font_name, NULL, NULL, set_oops_font, check_oops_font, TT_OOPS_FONT }, { "preload_strict_transport", XT_S_BOOL, 0, &preload_strict_transport, NULL, NULL, NULL, NULL, NULL, TT_PRELOAD_STRICT_TRANSPORT }, { "read_only_cookies", XT_S_BOOL, 0, &read_only_cookies, NULL, NULL, NULL, NULL, check_read_only_cookies, TT_READ_ONLY_COOKIES }, { "referer", XT_S_STR, 0, NULL, NULL,&s_referer, NULL, set_referer_rt, check_referer, TT_REFERER }, { "refresh_interval", XT_S_INT, 0, &refresh_interval, NULL, NULL, NULL, set_refresh_interval, check_refresh_interval, TT_REFRESH_INTERVAL }, { "resource_dir", XT_S_STR, 0, NULL, &resource_dir, NULL, NULL, NULL, check_resource_dir, TT_RESOURCE_DIR }, { "save_global_history", XT_S_BOOL,XT_SF_RESTART,&save_global_history, NULL, NULL, NULL, NULL, check_save_global_history, TT_SAVE_GLOBAL_HISTORY }, { "save_rejected_cookies", XT_S_BOOL,XT_SF_RESTART,&save_rejected_cookies, NULL, NULL, NULL, NULL, check_save_rejected_cookies, TT_SAVE_REJECTED_COOKIES }, { "search_string", XT_S_STR, 0, NULL, &search_string, NULL, NULL, set_search_string, check_search_string, TT_SEARCH_STRING }, { "session_autosave", XT_S_BOOL, 0, &session_autosave, NULL, NULL, NULL, set_session_autosave, check_session_autosave, TT_SESSION_AUTOSAVE }, { "session_timeout", XT_S_INT, 0, &session_timeout, NULL, NULL, NULL, set_session_timeout, check_session_timeout, TT_SESSION_TIMEOUT }, { "show_scrollbars", XT_S_BOOL, 0, &show_scrollbars, NULL, NULL, NULL, set_show_scrollbars, check_show_scrollbars, TT_SHOW_SCROLLBARS }, { "show_statusbar", XT_S_BOOL, 0, &show_statusbar, NULL, NULL, NULL, set_show_statusbar, check_show_statusbar, TT_SHOW_STATUSBAR }, { "show_tabs", XT_S_BOOL, 0, &show_tabs, NULL, NULL, NULL, set_show_tabs, check_show_tabs, TT_SHOW_TABS }, { "show_url", XT_S_BOOL, 0, &show_url, NULL, NULL, NULL, set_show_url, check_show_url, TT_SHOW_URL }, { "single_instance", XT_S_BOOL,XT_SF_RESTART,&single_instance, NULL, NULL, NULL, NULL, check_single_instance, TT_SINGLE_INSTANCE }, { "spell_check_languages", XT_S_STR, 0, NULL, &spell_check_languages, NULL, NULL, set_spell_check_languages, check_spell_check_languages, TT_SPELL_CHECK_LANGUAGES }, { "ssl_ca_file", XT_S_STR, 0, NULL, NULL,&s_ssl_ca_file, NULL, set_ssl_ca_file_rt, check_ssl_ca_file, TT_SSL_CA_FILE }, { "ssl_strict_certs", XT_S_BOOL, 0, &ssl_strict_certs, NULL, NULL, NULL, set_ssl_strict_certs, check_ssl_strict_certs, TT_SSL_STRICT_CERTS }, { "statusbar_elems", XT_S_STR, 0, NULL, &statusbar_elems, NULL, NULL, NULL, check_statusbar_elems, TT_STATUSBAR_ELEMS }, { "statusbar_font", XT_S_STR, 0, NULL, &statusbar_font_name, NULL, NULL, set_statusbar_font, check_statusbar_font, TT_STATUSBAR_FONT }, { "statusbar_style", XT_S_STR, 0, NULL, NULL,&s_statusbar_style, NULL, set_statusbar_style_rt, check_statusbar_style, TT_STATUSBAR_STYLE }, { "tab_style", XT_S_STR, 0, NULL, NULL,&s_tab_style, NULL, set_tab_style_rt, check_tab_style, TT_TAB_STYLE }, { "tabbar_font", XT_S_STR, 0, NULL, &tabbar_font_name, NULL, NULL, set_tabbar_font, check_tabbar_font, TT_TABBAR_FONT }, { "tabless", XT_S_BOOL, 0, &tabless, NULL, NULL, NULL, NULL, check_tabless, TT_TABLESS }, { "url_regex", XT_S_STR, 0, NULL, &url_regex, NULL, NULL, set_url_regex, check_url_regex, TT_URL_REGEX }, { "userstyle", XT_S_STR, 0, NULL, NULL,&s_userstyle, NULL, set_userstyle_rt, check_userstyle, TT_USERSTYLE }, { "userstyle_global", XT_S_BOOL, 0, &userstyle_global, NULL, NULL, NULL, set_userstyle_global, check_userstyle_global, TT_USERSTYLE_GLOBAL }, { "warn_cert_changes", XT_S_BOOL, 0, &warn_cert_changes, NULL, NULL, NULL, set_warn_cert_changes, check_warn_cert_changes, TT_WARN_CERT_CHANGES }, { "window_height", XT_S_INT, 0, &window_height, NULL, NULL, NULL, NULL, check_window_height, TT_WINDOW_HEIGHT }, { "window_maximize", XT_S_BOOL, 0, &window_maximize, NULL, NULL, NULL, NULL, check_window_maximize, TT_WINDOW_MAXIMIZE }, { "window_width", XT_S_INT, 0, &window_width, NULL, NULL, NULL, NULL, check_window_width, TT_WINDOW_WIDTH }, { "work_dir", XT_S_STR, 0, NULL, NULL,&s_work_dir, NULL, NULL, check_work_dir, TT_WORK_DIR }, /* special settings */ { "alias", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_alias, NULL, NULL }, { "cmd_alias", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_cmd_alias, NULL, NULL }, { "cookie_wl", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_cookie_wl, NULL, NULL }, { "custom_uri", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_uri, NULL, NULL }, { "force_https", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_force_https, NULL, NULL }, { "http_accept", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_http_accept, NULL, NULL }, { "js_wl", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_js, NULL, NULL }, { "keybinding", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_kb, NULL, NULL }, { "mime_type", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_mime, NULL, NULL }, { "pl_wl", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_pl, NULL, NULL }, { "user_agent", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_ua, NULL, NULL }, }; int set_http_proxy(char *proxy) { char *tmpproxy = proxy; /* see if we need to clear it */ if (proxy == NULL || strlen(proxy) == 0) tmpproxy = NULL; if (check_http_proxy_scheme(proxy) == 0) tmpproxy = NULL; return (setup_proxy(tmpproxy)); } int check_http_proxy(char **tt) { *tt = g_strdup("Default: (empty)"); return (g_strcmp0(http_proxy, NULL)); } int check_http_proxy_scheme(const char *uri) { int rv = 0; char *scheme; if (!uri) return (0); scheme = g_uri_parse_scheme(uri); if (!scheme) return (0); #if SOUP_CHECK_VERSION(2, 42, 2) if (strcmp(scheme, "socks5") == 0 || strcmp(scheme, "socks4a") == 0 || strcmp(scheme, "socks4") == 0 || strcmp(scheme, "socks") == 0 || strcmp(scheme, "http") == 0) { rv = 1; } #else if (strcmp(scheme, "http") == 0) { rv = 1; } #endif free(scheme); return (rv); } int check_http_proxy_starts_enabled(char **tt) { *tt = g_strdup("Default: Enabled"); return (http_proxy_starts_enabled != 1); } int check_icon_size(char **tt) { *tt = g_strdup_printf("Default: %d", 2); return (icon_size != 2); } int check_max_connections(char **tt) { *tt = g_strdup_printf("Default: %d", 25); return (max_connections != 25); } int check_max_host_connections(char **tt) { *tt = g_strdup_printf("Default: %d", 5); return (max_host_connections != 5); } int set_default_zoom_level(char *value) { struct karg args = {0}; struct tab *t; if (value == NULL || strlen(value) == 0) default_zoom_level = XT_DS_DEFAULT_ZOOM_LEVEL; else default_zoom_level = g_strtod(value, NULL); args.i = 100; /* adjust = 100 percent for no additional adjustment */ TAILQ_FOREACH(t, &tabs, entry) resizetab(t, &args); return (0); } int check_default_zoom_level(char **tt) { *tt = g_strdup_printf("Default: %f", XT_DS_DEFAULT_ZOOM_LEVEL); return (default_zoom_level < (XT_DS_DEFAULT_ZOOM_LEVEL - 0.0001) || default_zoom_level > (XT_DS_DEFAULT_ZOOM_LEVEL + 0.0001)); } int set_cookies_enabled(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) cookies_enabled = XT_DS_COOKIES_ENABLED; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); cookies_enabled = tmp; } return (0); } int check_cookies_enabled(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_COOKIES_ENABLED ? "Enabled" : "Disabled"); return (cookies_enabled != XT_DS_COOKIES_ENABLED); } int set_append_next(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) append_next = XT_DS_APPEND_NEXT; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); append_next = tmp; } return (0); } int check_append_next(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_APPEND_NEXT ? "Enabled" : "Disabled"); return (append_next != XT_DS_APPEND_NEXT); } int set_cmd_font(char *value) { struct tab *t; if (cmd_font_name) g_free(cmd_font_name); if (cmd_font) pango_font_description_free(cmd_font); if (value == NULL || strlen(value) == 0) cmd_font_name = g_strdup(XT_DS_CMD_FONT_NAME); else cmd_font_name = g_strdup(value); cmd_font = pango_font_description_from_string(cmd_font_name); TAILQ_FOREACH(t, &tabs, entry) modify_font(GTK_WIDGET(t->cmd), cmd_font); return (0); } int check_cmd_font(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_CMD_FONT_NAME); return (g_strcmp0(cmd_font_name, XT_DS_CMD_FONT_NAME)); } int set_oops_font(char *value) { struct tab *t; if (oops_font_name) g_free(oops_font_name); if (oops_font) pango_font_description_free(oops_font); if (value == NULL || strlen(value) == 0) cmd_font_name = g_strdup(XT_DS_OOPS_FONT_NAME); else oops_font_name = g_strdup(value); oops_font = pango_font_description_from_string(oops_font_name); TAILQ_FOREACH(t, &tabs, entry) modify_font(GTK_WIDGET(t->oops), oops_font); return (0); } int check_oops_font(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_OOPS_FONT_NAME); return (g_strcmp0(oops_font_name, XT_DS_OOPS_FONT_NAME)); } int check_read_only_cookies(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_READ_ONLY_COOKIES ? "Enabled" : "Disabled"); return (read_only_cookies != XT_DS_READ_ONLY_COOKIES); } int set_statusbar_font(char *value) { struct tab *t; if (statusbar_font_name) g_free(statusbar_font_name); if (statusbar_font) pango_font_description_free(statusbar_font); if (value == NULL || strlen(value) == 0) statusbar_font_name = g_strdup(XT_DS_STATUSBAR_FONT_NAME); else statusbar_font_name = g_strdup(value); statusbar_font = pango_font_description_from_string( statusbar_font_name); TAILQ_FOREACH(t, &tabs, entry) { modify_font(GTK_WIDGET(t->sbe.uri), statusbar_font); if (t->sbe.buffercmd != NULL) modify_font(GTK_WIDGET(t->sbe.buffercmd), statusbar_font); if (t->sbe.zoom != NULL) modify_font(GTK_WIDGET(t->sbe.zoom), statusbar_font); if (t->sbe.position != NULL) modify_font(GTK_WIDGET(t->sbe.position), statusbar_font); if (t->sbe.proxy != NULL) modify_font(GTK_WIDGET(t->sbe.proxy), statusbar_font); } return (0); } int check_statusbar_font(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_STATUSBAR_FONT_NAME); return (g_strcmp0(statusbar_font_name, XT_DS_STATUSBAR_FONT_NAME)); } int set_tabbar_font(char *value) { struct tab *t; if (tabbar_font_name) g_free(tabbar_font_name); if (tabbar_font) pango_font_description_free(tabbar_font); if (value == NULL || strlen(value) == 0) tabbar_font_name = g_strdup(XT_DS_TABBAR_FONT_NAME); else tabbar_font_name = g_strdup(value); tabbar_font = pango_font_description_from_string(tabbar_font_name); TAILQ_FOREACH(t, &tabs, entry) modify_font(GTK_WIDGET(t->tab_elems.label), tabbar_font); return (0); } int check_tabbar_font(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_TABBAR_FONT_NAME); return (g_strcmp0(tabbar_font_name, XT_DS_TABBAR_FONT_NAME)); } int check_tabless(char **tt) { *tt = g_strdup_printf("Default: Disabled\n"); return (tabless != 0); } int set_color_visited_uris(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) color_visited_uris = XT_DS_COLOR_VISITED_URIS; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); color_visited_uris = tmp; } return (0); } int check_color_visited_uris(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_COLOR_VISITED_URIS ? "Enabled" : "Disabled"); return (color_visited_uris != XT_DS_COLOR_VISITED_URIS); } int set_home(char *value) { if (home) g_free(home); if (value == NULL || strlen(value) == 0) home = g_strdup(XT_DS_HOME); else home = g_strdup(value); return (0); } int check_home(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_HOME); return (g_strcmp0(home, XT_DS_HOME)); } int set_search_string(char *value) { struct tab *t; if (search_string) g_free(search_string); if (value == NULL || strlen(value) == 0) { search_string = NULL; TAILQ_FOREACH(t, &tabs, entry) gtk_widget_hide(t->search_entry); } else { search_string = g_strdup(value); TAILQ_FOREACH(t, &tabs, entry) gtk_widget_show(t->search_entry); } return (0); } int check_search_string(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_SEARCH_STRING); return (g_strcmp0(search_string, XT_DS_SEARCH_STRING)); } size_t get_settings_size(void) { return (LENGTH(rs)); } char * get_setting_name(int i) { if (i > LENGTH(rs)) return (NULL); return (rs[i].name); } char * get_as_string(struct settings *s) { char *r = NULL; if (s == NULL) return (NULL); if (s->s && s->s->get) r = s->s->get(s); else if (s->type == XT_S_INT) r = g_strdup_printf("%d", *s->ival); else if (s->type == XT_S_STR) r = g_strdup(*s->sval); else if (s->type == XT_S_DOUBLE) r = g_strdup_printf("%lf", *s->dval); else if (s->type == XT_S_BOOL) r = g_strdup_printf("%d", *s->ival); else r = g_strdup_printf("INVALID TYPE"); return (r); } void settings_walk(void (*cb)(struct settings *, char *, void *), void *cb_args) { int i; char *s; for (i = 0; i < LENGTH(rs); i++) { if (rs[i].s && rs[i].s->walk) rs[i].s->walk(&rs[i], cb, cb_args); else { s = get_as_string(&rs[i]); cb(&rs[i], s, cb_args); g_free(s); } } } int check_allow_volatile_cookies(char **tt) { *tt = g_strdup("Default: Disabled"); return (allow_volatile_cookies != 0); } int check_anonymize_headers(char **tt) { *tt = g_strdup("Default: Disabled"); return (anonymize_headers != 0); } int set_browser_mode(struct settings *s, char *val) { if (!strcmp(val, "whitelist")) { browser_mode = XT_BM_WHITELIST; allow_volatile_cookies = 0; cookie_policy = SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY; cookies_enabled = 1; enable_cookie_whitelist = 1; enable_plugin_whitelist = 1; enable_plugins = 0; read_only_cookies = 0; save_rejected_cookies = 0; session_timeout = 3600; enable_scripts = 0; enable_js_whitelist = 1; enable_localstorage = 0; referer_mode = XT_REFERER_SAME_DOMAIN; allow_insecure_content = 0; allow_insecure_scripts = 0; do_not_track = 1; } else if (!strcmp(val, "normal")) { browser_mode = XT_BM_NORMAL; allow_volatile_cookies = 0; cookie_policy = SOUP_COOKIE_JAR_ACCEPT_ALWAYS; cookies_enabled = 1; enable_cookie_whitelist = 0; enable_plugin_whitelist = 0; enable_plugins = 1; read_only_cookies = 0; save_rejected_cookies = 0; session_timeout = 3600; enable_scripts = 1; enable_js_whitelist = 0; enable_localstorage = 1; referer_mode = XT_REFERER_ALWAYS; allow_insecure_content = 1; allow_insecure_scripts = 1; do_not_track = 0; } else if (!strcmp(val, "kiosk")) { browser_mode = XT_BM_KIOSK; allow_volatile_cookies = 0; cookie_policy = SOUP_COOKIE_JAR_ACCEPT_ALWAYS; cookies_enabled = 1; enable_cookie_whitelist = 0; enable_plugin_whitelist = 0; enable_plugins = 1; read_only_cookies = 0; save_rejected_cookies = 0; session_timeout = 3600; enable_scripts = 1; enable_js_whitelist = 0; enable_localstorage = 1; referer_mode = XT_REFERER_ALWAYS; allow_insecure_content = 1; allow_insecure_scripts = 1; do_not_track = 0; show_tabs = 0; tabless = 1; } else return (1); return (0); } char * get_browser_mode(struct settings *s) { char *r = NULL; if (browser_mode == XT_BM_WHITELIST) r = g_strdup("whitelist"); else if (browser_mode == XT_BM_NORMAL) r = g_strdup("normal"); else if (browser_mode == XT_BM_KIOSK) r = g_strdup("kiosk"); else return (NULL); return (r); } int check_browser_mode(char **tt) { *tt = g_strdup("Default: normal"); return (browser_mode != XT_BM_NORMAL); } int set_gui_mode(struct settings *s, char *val) { if (!strcmp(val, "classic")) { fancy_bar = 1; show_tabs = 1; tab_style = XT_TABS_NORMAL; show_url = 1; show_statusbar = 0; show_scrollbars = 1; } else if (!strcmp(val, "minimal")) { fancy_bar = 0; show_tabs = 1; tab_style = XT_TABS_COMPACT; show_url = 0; show_statusbar = 1; show_scrollbars = 0; } else return (1); return (0); } char * get_gui_mode(struct settings *s) { char *r = NULL; if (gui_mode == XT_GM_CLASSIC) r = g_strdup("classic"); else if (browser_mode == XT_GM_MINIMAL) r = g_strdup("minimal"); else return (NULL); return (r); } int check_gui_mode(char **tt) { *tt = g_strdup("Default: classic"); return (gui_mode != XT_GM_CLASSIC); } int check_history_autosave(char **tt) { *tt = g_strdup("Default: Disabled"); return (history_autosave != 0); } int set_cookie_policy(struct settings *s, char *val) { if (!strcmp(val, "no3rdparty")) cookie_policy = SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY; else if (!strcmp(val, "accept")) cookie_policy = SOUP_COOKIE_JAR_ACCEPT_ALWAYS; else if (!strcmp(val, "reject")) cookie_policy = SOUP_COOKIE_JAR_ACCEPT_NEVER; else return (1); return (0); } int set_cookie_policy_rt(char *value) { if (value == NULL || strlen(value) == 0) cookie_policy = XT_DS_COOKIE_POLICY; else if (set_cookie_policy(NULL, value)) return (-1); g_object_set(G_OBJECT(s_cookiejar), SOUP_COOKIE_JAR_ACCEPT_POLICY, cookie_policy, (void *)NULL); return (0); } int check_cookie_policy(char **tt) { *tt = g_strdup("Default (depends on browser_mode):\n" "\tnormal:\talways\n" "\twhitelist:\tno3rdparty\n" "\tkiosk:\talways"); if (browser_mode == XT_BM_WHITELIST && cookie_policy != SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY) return (1); if (browser_mode == XT_BM_NORMAL && cookie_policy != SOUP_COOKIE_JAR_ACCEPT_ALWAYS) return (1); if (browser_mode == XT_BM_KIOSK && cookie_policy != SOUP_COOKIE_JAR_ACCEPT_ALWAYS) return (1); return (0); } char * get_cookie_policy(struct settings *s) { char *r = NULL; if (cookie_policy == SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY) r = g_strdup("no3rdparty"); else if (cookie_policy == SOUP_COOKIE_JAR_ACCEPT_ALWAYS) r = g_strdup("accept"); else if (cookie_policy == SOUP_COOKIE_JAR_ACCEPT_NEVER) r = g_strdup("reject"); else return (NULL); return (r); } char * get_default_script(struct settings *s) { if (default_script[0] == '\0') return (0); return (g_strdup(default_script)); } int set_default_script(struct settings *s, char *val) { expand_tilde(default_script, sizeof default_script, val); return (0); } int check_default_script(char **tt) { *tt = g_strdup("Default: (empty)"); return (g_strcmp0(default_script, XT_DS_DEFAULT_SCRIPT)); } int set_default_script_rt(char *value) { if (value == NULL || strlen(value) == 0) return set_default_script(NULL, ""); return (set_default_script(NULL, value)); } int set_do_not_track(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) do_not_track = XT_DS_DO_NOT_TRACK; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); do_not_track = tmp; } return (0); } int check_do_not_track(char **tt) { *tt = g_strdup("Default (depends on browser_mode):\n" "\tnormal:\tDisabled\n" "\twhitelist:\tEnabled\n" "\tkiosk:\tDisabled"); if (browser_mode == XT_BM_WHITELIST && do_not_track != 1) return (1); if (browser_mode == XT_BM_NORMAL && do_not_track != 0) return (1); if (browser_mode == XT_BM_KIOSK && do_not_track != 0) return (1); return (0); } char * get_download_dir(struct settings *s) { if (download_dir[0] == '\0') return (0); return (g_strdup(download_dir)); } int set_download_dir(struct settings *s, char *val) { expand_tilde(download_dir, sizeof download_dir, val); return (0); } int check_download_dir(char **tt) { struct passwd *pwd; char buf[PATH_MAX] = {0}; /* XXX this might need some additonal magic on windows */ if ((pwd = getpwuid(getuid())) == NULL) return (-1); snprintf(buf, sizeof buf, "%s" PS "downloads", pwd->pw_dir); *tt = g_strdup_printf("Default: %s", buf); return (g_strcmp0(download_dir, buf)); } int add_alias(struct settings *s, char *line) { char *l, *alias; struct alias *a = NULL; if (s == NULL || line == NULL) { show_oops(NULL, "add_alias invalid parameters"); return (1); } l = line; a = g_malloc(sizeof(*a)); if ((alias = strsep(&l, " \t,")) == NULL || l == NULL) { show_oops(NULL, "add_alias: incomplete alias definition"); goto bad; } /* Remove additional leading whitespace */ l += (long)strspn(l, " \t"); if (strlen(alias) == 0 || strlen(l) == 0) { show_oops(NULL, "add_alias: invalid alias definition"); goto bad; } a->a_name = g_strdup(alias); a->a_uri = g_strdup(l); DNPRINTF(XT_D_CONFIG, "add_alias: %s for %s\n", a->a_name, a->a_uri); TAILQ_INSERT_TAIL(&aliases, a, entry); return (0); bad: if (a) g_free(a); return (1); } void walk_alias(struct settings *s, void (*cb)(struct settings *, char *, void *), void *cb_args) { struct alias *a; char *str; if (s == NULL || cb == NULL) { show_oops(NULL, "walk_alias invalid parameters"); return; } TAILQ_FOREACH(a, &aliases, entry) { str = g_strdup_printf("%s --> %s", a->a_name, a->a_uri); cb(s, str, cb_args); g_free(str); } } int add_mime_type(struct settings *s, char *line) { char *mime_type; char *l; struct mime_type *m = NULL; int downloadfirst = 0; /* XXX this could be smarter */ if (line == NULL || strlen(line) == 0) { show_oops(NULL, "add_mime_type invalid parameters"); return (1); } l = line; if (*l == '@') { downloadfirst = 1; l++; } m = g_malloc(sizeof(*m)); if ((mime_type = strsep(&l, " \t,")) == NULL || l == NULL) { show_oops(NULL, "add_mime_type: invalid mime_type"); goto bad; } if (mime_type[strlen(mime_type) - 1] == '*') { mime_type[strlen(mime_type) - 1] = '\0'; m->mt_default = 1; } else m->mt_default = 0; if (strlen(mime_type) == 0 || strlen(l) == 0) { show_oops(NULL, "add_mime_type: invalid mime_type"); goto bad; } m->mt_type = g_strdup(mime_type); m->mt_action = g_strdup(l); m->mt_download = downloadfirst; DNPRINTF(XT_D_CONFIG, "add_mime_type: type %s action %s default %d\n", m->mt_type, m->mt_action, m->mt_default); TAILQ_INSERT_TAIL(&mtl, m, entry); return (0); bad: if (m) g_free(m); return (1); } void walk_mime_type(struct settings *s, void (*cb)(struct settings *, char *, void *), void *cb_args) { struct mime_type *m; char *str; if (s == NULL || cb == NULL) { show_oops(NULL, "walk_mime_type invalid parameters"); return; } TAILQ_FOREACH(m, &mtl, entry) { str = g_strdup_printf("%s%s --> %s", m->mt_type, m->mt_default ? "*" : "", m->mt_action); cb(s, str, cb_args); g_free(str); } } /* inherent to GTK not all keys will be caught at all times */ /* XXX sort key bindings */ struct key_binding keys[] = { { "command_mode", 0, 1, GDK_Escape }, { "insert_mode", 0, 0, GDK_i }, { "cookiejar", MOD1, 1, GDK_j }, { "downloadmgr", MOD1, 1, GDK_d }, { "history", MOD1, 1, GDK_h }, { "print", CTRL, 1, GDK_p }, { "search", 0, 0, GDK_slash }, { "searchb", 0, 0, GDK_question }, { "statustoggle", CTRL, 1, GDK_n }, { "command", 0, 0, GDK_colon }, { "qa", CTRL, 1, GDK_q }, { "restart", MOD1, 1, GDK_q }, { "js toggle", CTRL, 1, GDK_j }, { "plugin toggle", MOD1, 1, GDK_p }, { "cookie toggle", MOD1, 1, GDK_c }, { "togglesrc", CTRL, 1, GDK_s }, { "yankuri", 0, 0, GDK_y }, { "pasteuricur", 0, 0, GDK_p }, { "pasteurinew", 0, 0, GDK_P }, { "toplevel toggle", 0, 1, GDK_F4 }, { "help", 0, 1, GDK_F1 }, { "run_script", MOD1, 1, GDK_r }, { "proxy toggle", 0, 1, GDK_F2 }, { "editelement", CTRL, 1, GDK_i }, { "passthrough", CTRL, 1, GDK_z }, { "modurl", CTRL, 1, GDK_Return }, { "modsearchentry", CTRL, 1, GDK_Return }, { "urlmod plus", MOD1, 1, GDK_a }, { "urlmod min", MOD1, 1, GDK_A }, /* search */ { "searchnext", 0, 0, GDK_n }, { "searchprevious", 0, 0, GDK_N }, /* focus */ { "focusaddress", 0, 1, GDK_F6 }, { "focussearch", 0, 1, GDK_F7 }, /* hinting */ { "hinting", 0, 0, GDK_f }, { "hinting", 0, 0, GDK_period }, { "hinting_newtab", SHFT, 0, GDK_F }, { "hinting_newtab", 0, 0, GDK_comma }, /* custom stylesheet */ { "userstyle", 0, 0, GDK_s }, { "userstyle_global", SHFT, 0, GDK_S }, /* navigation */ { "goback", 0, 0, GDK_BackSpace }, { "goback", MOD1, 1, GDK_Left }, { "goforward", SHFT, 1, GDK_BackSpace }, { "goforward", MOD1, 1, GDK_Right }, { "reload", 0, 1, GDK_F5 }, { "reload", CTRL, 1, GDK_r }, { "reload", CTRL, 1, GDK_l }, { "favorites", MOD1, 1, GDK_f }, /* vertical movement */ { "scrolldown", 0, 0, GDK_j }, { "scrolldown", 0, 0, GDK_Down }, { "scrollup", 0, 0, GDK_Up }, { "scrollup", 0, 0, GDK_k }, { "scrollbottom", 0, 0, GDK_G }, { "scrollbottom", 0, 0, GDK_End }, { "scrolltop", 0, 0, GDK_Home }, { "scrollpagedown", 0, 0, GDK_space }, { "scrollpagedown", CTRL, 1, GDK_f }, { "scrollhalfdown", CTRL, 1, GDK_d }, { "scrollpagedown", 0, 0, GDK_Page_Down }, { "scrollpageup", 0, 0, GDK_Page_Up }, { "scrollpageup", CTRL, 1, GDK_b }, { "scrollhalfup", CTRL, 1, GDK_u }, /* horizontal movement */ { "scrollright", 0, 0, GDK_l }, { "scrollright", 0, 0, GDK_Right }, { "scrollleft", 0, 0, GDK_Left }, { "scrollleft", 0, 0, GDK_h }, { "scrollfarright", 0, 0, GDK_dollar }, { "scrollfarleft", 0, 0, GDK_0 }, /* tabs */ { "tabnew", CTRL, 1, GDK_t }, { "999tabnew", CTRL, 1, GDK_T }, { "tabclose", CTRL, 1, GDK_w }, { "tabundoclose", 0, 0, GDK_U }, { "tabnext 1", CTRL, 1, GDK_1 }, { "tabnext 2", CTRL, 1, GDK_2 }, { "tabnext 3", CTRL, 1, GDK_3 }, { "tabnext 4", CTRL, 1, GDK_4 }, { "tabnext 5", CTRL, 1, GDK_5 }, { "tabnext 6", CTRL, 1, GDK_6 }, { "tabnext 7", CTRL, 1, GDK_7 }, { "tabnext 8", CTRL, 1, GDK_8 }, { "tabnext 9", CTRL, 1, GDK_9 }, { "tabfirst", CTRL, 1, GDK_less }, { "tablast", CTRL, 1, GDK_greater }, { "tabprevious", CTRL, 1, GDK_Left }, { "tabnext", CTRL, 1, GDK_Right }, { "focusout", CTRL, 1, GDK_minus }, { "focusin", CTRL, 1, GDK_plus }, { "focusin", CTRL, 1, GDK_equal }, { "focusreset", CTRL, 1, GDK_0 }, /* command aliases (handy when -S flag is used) */ { ":open ", 0, 1, GDK_F9 }, { ":open ", 0, 1, GDK_F10 }, { ":tabnew ", 0, 1, GDK_F11 }, { ":tabnew ", 0, 1, GDK_F12 }, }; void walk_kb(struct settings *s, void (*cb)(struct settings *, char *, void *), void *cb_args) { struct key_binding *k; char str[1024]; if (s == NULL || cb == NULL) { show_oops(NULL, "walk_kb invalid parameters"); return; } TAILQ_FOREACH(k, &kbl, entry) { if (k->cmd == NULL) continue; str[0] = '\0'; /* sanity */ if (gdk_keyval_name(k->key) == NULL) continue; strlcat(str, k->cmd, sizeof str); strlcat(str, ",", sizeof str); if (k->mask & GDK_SHIFT_MASK) strlcat(str, "S-", sizeof str); if (k->mask & GDK_CONTROL_MASK) strlcat(str, "C-", sizeof str); if (k->mask & GDK_MOD1_MASK) strlcat(str, "M1-", sizeof str); if (k->mask & GDK_MOD2_MASK) strlcat(str, "M2-", sizeof str); if (k->mask & GDK_MOD3_MASK) strlcat(str, "M3-", sizeof str); if (k->mask & GDK_MOD4_MASK) strlcat(str, "M4-", sizeof str); if (k->mask & GDK_MOD5_MASK) strlcat(str, "M5-", sizeof str); strlcat(str, gdk_keyval_name(k->key), sizeof str); cb(s, str, cb_args); } } void init_keybindings(void) { int i; struct key_binding *k; for (i = 0; i < LENGTH(keys); i++) { k = g_malloc0(sizeof *k); k->cmd = keys[i].cmd; k->mask = keys[i].mask; k->use_in_entry = keys[i].use_in_entry; k->key = keys[i].key; TAILQ_INSERT_HEAD(&kbl, k, entry); DNPRINTF(XT_D_KEYBINDING, "init_keybindings: added: %s\n", k->cmd ? k->cmd : "unnamed key"); } } void keybinding_clearall(void) { struct key_binding *k, *next; for (k = TAILQ_FIRST(&kbl); k; k = next) { next = TAILQ_NEXT(k, entry); if (k->cmd == NULL) continue; DNPRINTF(XT_D_KEYBINDING, "keybinding_clearall: %s\n", k->cmd ? k->cmd : "unnamed key"); TAILQ_REMOVE(&kbl, k, entry); g_free(k); } } int keybinding_set(char *cmd, char *key, int use_in_entry) { struct key_binding *k; guint keyval, mask = 0; int i; DNPRINTF(XT_D_KEYBINDING, "keybinding_set: %s %s\n", cmd, key); /* Keys which are to be used in entry have been prefixed with an * exclamation mark. */ if (use_in_entry) key++; /* find modifier keys */ if (strstr(key, "S-")) mask |= GDK_SHIFT_MASK; if (strstr(key, "C-")) mask |= GDK_CONTROL_MASK; if (strstr(key, "M1-")) mask |= GDK_MOD1_MASK; if (strstr(key, "M2-")) mask |= GDK_MOD2_MASK; if (strstr(key, "M3-")) mask |= GDK_MOD3_MASK; if (strstr(key, "M4-")) mask |= GDK_MOD4_MASK; if (strstr(key, "M5-")) mask |= GDK_MOD5_MASK; /* find keyname */ for (i = strlen(key) - 1; i > 0; i--) if (key[i] == '-') key = &key[i + 1]; /* validate keyname */ keyval = gdk_keyval_from_name(key); if (keyval == GDK_VoidSymbol) { warnx("invalid keybinding name %s", key); return (1); } /* must run this test too, gtk+ doesn't handle 10 for example */ if (gdk_keyval_name(keyval) == NULL) { warnx("invalid keybinding name %s", key); return (1); } /* Remove eventual dupes. */ TAILQ_FOREACH(k, &kbl, entry) if (k->key == keyval && k->mask == mask) { TAILQ_REMOVE(&kbl, k, entry); g_free(k); break; } if (strcmp(cmd, "unbind") == 0) { DNPRINTF(XT_D_KEYBINDING, "keybinding_set: just unbinding: %s\n", gdk_keyval_name(keyval)); printf("keybinding_set: just unbinding: %s\n", gdk_keyval_name(keyval)); return (0); } /* add keyname */ k = g_malloc0(sizeof *k); k->cmd = g_strdup(cmd); k->mask = mask; k->use_in_entry = use_in_entry; k->key = keyval; DNPRINTF(XT_D_KEYBINDING, "keybinding_set: %s 0x%x %d 0x%x\n", k->cmd, k->mask, k->use_in_entry, k->key); DNPRINTF(XT_D_KEYBINDING, "keybinding_set: adding: %s %s\n", k->cmd, gdk_keyval_name(keyval)); TAILQ_INSERT_HEAD(&kbl, k, entry); return (0); } int cmd_alias_add(char *alias, char *cmd) { struct cmd_alias *c; /* XXX */ TAILQ_FOREACH(c, &cal, entry) if (!strcmp((alias), c->alias)) { TAILQ_REMOVE(&cal, c, entry); g_free(c); } c = g_malloc(sizeof (struct cmd_alias)); c->alias = g_strchug(g_strdup(alias)); c->cmd = g_strchug(g_strdup(cmd)); DNPRINTF(XT_D_CUSTOM_URI, "cmd_alias_add: %s %s\n", c->alias, c->cmd); TAILQ_INSERT_HEAD(&cal, c, entry); return (0); } int custom_uri_add(char *uri, char *cmd) { struct custom_uri *u; TAILQ_FOREACH(u, &cul, entry) if (!strcmp((uri), u->uri) && !strcmp(cmd, u->cmd)) { TAILQ_REMOVE(&cul, u, entry); g_free(u); } u = g_malloc(sizeof (struct custom_uri)); u->uri = g_strdup(uri); expand_tilde(u->cmd, sizeof u->cmd, cmd); DNPRINTF(XT_D_CUSTOM_URI, "custom_uri_add: %s %s\n", u->uri, u->cmd); /* don't check here if the script is valid, wait until running it */ TAILQ_INSERT_HEAD(&cul, u, entry); return (0); } int add_kb(struct settings *s, char *entry) { char *kb, *key; DNPRINTF(XT_D_KEYBINDING, "add_kb: %s\n", entry); /* clearall is special */ if (!strcmp(entry, "clearall")) { keybinding_clearall(); return (0); } kb = strstr(entry, ","); if (kb == NULL) return (1); *kb = '\0'; key = kb + 1; return (keybinding_set(entry, key, key[0] == '!')); } int add_custom_uri(struct settings *s, char *entry) { char *uri, *cmd; DNPRINTF(XT_D_CUSTOM_URI, "add_custom_uri: %s\n", entry); uri = strstr(entry, ","); if (uri == NULL) return (1); *uri = '\0'; cmd = uri + 1; return (custom_uri_add(entry, cmd)); } void walk_custom_uri(struct settings *s, void (*cb)(struct settings *, char *, void *), void *cb_args) { struct custom_uri *u; char buf[1024]; if (s == NULL || cb == NULL) { show_oops(NULL, "walk_custom_uri invalid parameters"); return; } TAILQ_FOREACH(u, &cul, entry) { snprintf(buf, sizeof buf, "%s,%s", u->uri, u->cmd); cb(s, buf, cb_args); } } int add_ua(struct settings *s, char *value) { struct user_agent *ua; static int ua_count = 0; ua = g_malloc(sizeof *ua); ua->id = ua_count++; ua->value = g_strdup(value); RB_INSERT(user_agent_list, &ua_list, ua); return (0); } void walk_ua(struct settings *s, void (*cb)(struct settings *, char *, void *), void *cb_args) { struct user_agent *ua; if (s == NULL || cb == NULL) { show_oops(NULL, "walk_ua invalid parameters"); return; } RB_FOREACH(ua, user_agent_list, &ua_list) cb(s, ua->value, cb_args); } int add_force_https(struct settings *s, char *value) { if (g_str_has_prefix(value, "re:")) { value = &value[3]; wl_add(value, &force_https, XT_WL_PERSISTENT | XT_WL_REGEX); } else wl_add(value, &force_https, XT_WL_PERSISTENT); return (0); } int add_http_accept(struct settings *s, char *value) { struct http_accept *ha; static int ha_count = 0; ha = g_malloc(sizeof *ha); ha->id = ha_count++; ha->value = g_strdup(value); RB_INSERT(http_accept_list, &ha_list, ha); return (0); } void walk_http_accept(struct settings *s, void (*cb)(struct settings *, char *, void *), void *cb_args) { struct http_accept *ha; if (s == NULL || cb == NULL) { show_oops(NULL, "%s: invalid parameters", __func__); return; } RB_FOREACH(ha, http_accept_list, &ha_list) cb(s, ha->value, cb_args); } int add_cmd_alias(struct settings *s, char *entry) { char *alias, *cmd; DNPRINTF(XT_D_CMD_ALIAS, "add_cmd_alias: %s\n", entry); alias = strstr(entry, ","); if (alias == NULL) return (1); *alias = '\0'; cmd = alias + 1; return (cmd_alias_add(entry, cmd)); } void walk_cmd_alias(struct settings *s, void (*cb)(struct settings *, char *, void *), void *cb_args) { struct cmd_alias *c; char buf[1024]; if (s == NULL || cb == NULL) { show_oops(NULL, "walk_cmd_alias invalid parameters"); return; } TAILQ_FOREACH(c, &cal, entry) { snprintf(buf, sizeof buf, "%s --> %s", c->alias, c->cmd); cb(s, buf, cb_args); } } int set_allow_insecure_content(char *value) { struct tab *t; int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) allow_insecure_content = XT_DS_ALLOW_INSECURE_CONTENT; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); allow_insecure_content = tmp; } TAILQ_FOREACH(t, &tabs, entry) if (is_g_object_setting(G_OBJECT(t->settings), "enable-display-of-insecure-content")) { g_object_set(G_OBJECT(t->settings), "enable-display-of-insecure-content", allow_insecure_content, (char *)NULL); webkit_web_view_set_settings(t->wv, t->settings); } return (0); } int check_allow_insecure_content(char **tt) { *tt = g_strdup("Default (depends on browser_mode):\n" "\tnormal:\tEnabled\n" "\twhitelist:\tDisabled\n" "\tkiosk:\tEnabled"); if (browser_mode == XT_BM_NORMAL && allow_insecure_content != 1) return (1); if (browser_mode == XT_BM_WHITELIST && allow_insecure_content != 0) return (1); if (browser_mode == XT_BM_KIOSK && allow_insecure_content != 1) return (1); return (0); } int set_allow_insecure_scripts(char *value) { struct tab *t; int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) allow_insecure_scripts = XT_DS_ALLOW_INSECURE_SCRIPTS; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); allow_insecure_scripts = tmp; } TAILQ_FOREACH(t, &tabs, entry) if (is_g_object_setting(G_OBJECT(t->settings), "enable-running-of-insecure-content")) { g_object_set(G_OBJECT(t->settings), "enable-running-of-insecure-content", allow_insecure_scripts, (char *)NULL); webkit_web_view_set_settings(t->wv, t->settings); } return (0); } int check_allow_insecure_scripts(char **tt) { *tt = g_strdup("Default (depends on browser_mode):\n" "\tnormal:\tEnabled\n" "\twhitelist:\tDisabled\n" "\tkiosk:\tEnabled"); if (browser_mode == XT_BM_NORMAL && allow_insecure_scripts != 1) return (1); if (browser_mode == XT_BM_WHITELIST && allow_insecure_scripts != 0) return (1); if (browser_mode == XT_BM_KIOSK && allow_insecure_scripts != 1) return (1); return (0); } int set_auto_load_images(char *value) { struct tab *t; int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) auto_load_images = XT_DS_AUTO_LOAD_IMAGES; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); auto_load_images = tmp; } TAILQ_FOREACH(t, &tabs, entry) { g_object_set(G_OBJECT(t->settings), "auto-load-images", auto_load_images, (char *)NULL); webkit_web_view_set_settings(t->wv, t->settings); } return (0); } int check_auto_load_images(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_AUTO_LOAD_IMAGES ? "Enabled" : "Disabled"); return (auto_load_images != XT_DS_AUTO_LOAD_IMAGES); } int set_autofocus_onload(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) autofocus_onload = XT_DS_AUTOFOCUS_ONLOAD; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); autofocus_onload = tmp; } return (0); } int check_autofocus_onload(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_AUTOFOCUS_ONLOAD ? "Enabled" : "Disabled"); return (autofocus_onload != XT_DS_AUTOFOCUS_ONLOAD); } int set_ctrl_click_focus(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) ctrl_click_focus = XT_DS_CTRL_CLICK_FOCUS; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); ctrl_click_focus = tmp; } return (0); } int check_ctrl_click_focus(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_CTRL_CLICK_FOCUS ? "Enabled" : "Disabled"); return (ctrl_click_focus != XT_DS_CTRL_CLICK_FOCUS); } int set_download_notifications(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) download_notifications = XT_DS_DOWNLOAD_NOTIFICATIONS; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); download_notifications = tmp; } return (0); } int check_download_notifications(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_DOWNLOAD_NOTIFICATIONS ? "Enabled" : "Disabled"); return (download_notifications != XT_DS_DOWNLOAD_NOTIFICATIONS); } int set_enable_autoscroll(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) enable_autoscroll = XT_DS_ENABLE_AUTOSCROLL; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); enable_autoscroll = tmp; } return (0); } int check_enable_autoscroll(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_ENABLE_AUTOSCROLL ? "Enabled" : "Disabled"); return (enable_autoscroll != XT_DS_ENABLE_AUTOSCROLL); } int set_enable_cache(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) enable_cache = 1; else { tmp = (int)strtonum(value, 0, 1, &errstr); if (errstr) return (-1); enable_cache = tmp; } if (enable_cache) webkit_set_cache_model(WEBKIT_CACHE_MODEL_WEB_BROWSER); else webkit_set_cache_model(WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER); return (0); } int check_enable_cache(char **tt) { *tt = g_strdup_printf("Default: Disabled"); return (enable_cache); } int set_enable_cookie_whitelist(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) enable_cookie_whitelist = XT_DS_ENABLE_COOKIE_WHITELIST; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); enable_cookie_whitelist = tmp; } return (0); } int check_enable_cookie_whitelist(char **tt) { *tt = g_strdup("Default (depends on browser_mode):\n" "\tnormal:\tDisabled\n" "\twhitelist:\tEnabled\n" "\tkiosk:\tDisabled"); if (browser_mode == XT_BM_WHITELIST && enable_cookie_whitelist != 1) return (1); if (browser_mode == XT_BM_NORMAL && enable_cookie_whitelist != 0) return (1); if (browser_mode == XT_BM_KIOSK && enable_cookie_whitelist != 0) return (1); return (0); } int set_enable_js_autorun(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) enable_js_autorun = XT_DS_ENABLE_JS_AUTORUN; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); enable_js_autorun = tmp; } return (0); } int check_enable_js_autorun(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_ENABLE_JS_AUTORUN ? "Enabled" : "Disabled"); return (enable_js_autorun != XT_DS_ENABLE_JS_AUTORUN); } int set_enable_js_whitelist(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) enable_js_whitelist = XT_DS_ENABLE_JS_WHITELIST; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); enable_js_whitelist = tmp; } return (0); } int check_enable_js_whitelist(char **tt) { *tt = g_strdup("Default (depends on browser_mode):\n" "\tnormal:\tDisabled\n" "\twhitelist:\tEnabled\n" "\tkiosk:\tDisabled"); if (browser_mode == XT_BM_WHITELIST && enable_js_whitelist != 1) return (1); if (browser_mode == XT_BM_NORMAL && enable_js_whitelist != 0) return (1); if (browser_mode == XT_BM_KIOSK && enable_js_whitelist != 0) return (1); return (0); } int set_enable_favicon_entry(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) enable_favicon_entry = XT_DS_ENABLE_FAVICON_ENTRY; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); enable_favicon_entry = tmp; } return (0); } int check_enable_favicon_entry(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_ENABLE_FAVICON_ENTRY ? "Enabled" : "Disabled"); return (enable_favicon_entry != XT_DS_ENABLE_FAVICON_ENTRY); } int set_enable_favicon_tabs(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) enable_favicon_tabs = XT_DS_ENABLE_FAVICON_TABS; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); enable_favicon_tabs = tmp; } return (0); } int check_enable_favicon_tabs(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_ENABLE_FAVICON_TABS ? "Enabled" : "Disabled"); return (enable_favicon_tabs != XT_DS_ENABLE_FAVICON_TABS); } int set_enable_localstorage(char *value) { struct tab *t; int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) enable_localstorage = XT_DS_ENABLE_LOCALSTORAGE; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); enable_localstorage = tmp; } TAILQ_FOREACH(t, &tabs, entry) g_object_set(G_OBJECT(t->settings), "enable-html5-local-storage", enable_localstorage, (char *)NULL); return (0); } int check_enable_localstorage(char **tt) { *tt = g_strdup("Default (depends on browser_mode):\n" "\tnormal:\tEnabled\n" "\twhitelist:\tDisabled\n" "\tkiosk:\tEnabled"); if (browser_mode == XT_BM_WHITELIST && enable_localstorage != 0) return (1); if (browser_mode == XT_BM_NORMAL && enable_localstorage != 1) return (1); if (browser_mode == XT_BM_KIOSK && enable_localstorage != 1) return (1); return (0); } int set_enable_plugins(char *value) { struct tab *t; int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) enable_plugins = XT_DS_ENABLE_PLUGINS; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); enable_plugins = tmp; } TAILQ_FOREACH(t, &tabs, entry) g_object_set(G_OBJECT(t->settings), "enable-plugins", enable_plugins, (char *)NULL); return (0); } int check_enable_plugins(char **tt) { *tt = g_strdup("Default (depends on browser_mode):\n" "\tnormal:\tEnabled\n" "\twhitelist:\tDisabled\n" "\tkiosk:\tEnabled"); if (browser_mode == XT_BM_WHITELIST && enable_plugins != 0) return (1); if (browser_mode == XT_BM_NORMAL && enable_plugins != 1) return (1); if (browser_mode == XT_BM_KIOSK && enable_plugins != 1) return (1); return (0); } int set_enable_plugin_whitelist(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) enable_plugin_whitelist = XT_DS_ENABLE_PLUGIN_WHITELIST; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); enable_plugin_whitelist = tmp; } return (0); } int check_enable_plugin_whitelist(char **tt) { *tt = g_strdup("Default (depends on browser_mode):\n" "\tnormal:\tDisabled\n" "\twhitelist:\tEnabled\n" "\tkiosk:\tDisabled"); if (browser_mode == XT_BM_WHITELIST && enable_plugin_whitelist != 1) return (1); if (browser_mode == XT_BM_NORMAL && enable_plugin_whitelist != 0) return (1); if (browser_mode == XT_BM_KIOSK && enable_plugin_whitelist != 0) return (1); return (0); } int set_enable_scripts(char *value) { struct tab *t; int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) enable_scripts = XT_DS_ENABLE_SCRIPTS; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); enable_scripts = tmp; } TAILQ_FOREACH(t, &tabs, entry) g_object_set(G_OBJECT(t->settings), "enable-scripts", enable_scripts, (char *)NULL); return (0); } int check_enable_scripts(char **tt) { *tt = g_strdup("Default (depends on browser_mode):\n" "\tnormal:\tEnabled\n" "\twhitelist:\tDisabled\n" "\tkiosk:\tEnabled"); if (browser_mode == XT_BM_WHITELIST && enable_scripts != 0) return (1); if (browser_mode == XT_BM_NORMAL && enable_scripts != 1) return (1); if (browser_mode == XT_BM_KIOSK && enable_scripts != 1) return (1); return (0); } int check_enable_socket(char **tt) { *tt = g_strdup("Default: Disabled"); return (enable_socket != 0); } int set_enable_spell_checking(char *value) { struct tab *t; int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) enable_spell_checking = XT_DS_ENABLE_SPELL_CHECKING; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); enable_spell_checking = tmp; } TAILQ_FOREACH(t, &tabs, entry) g_object_set(G_OBJECT(t->settings), "enable_spell_checking", enable_spell_checking, (char *)NULL); return (0); } int check_enable_spell_checking(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_ENABLE_SPELL_CHECKING ? "Enabled" : "Disabled"); return (enable_spell_checking != XT_DS_ENABLE_SPELL_CHECKING); } int set_enable_strict_transport(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) enable_strict_transport = XT_DS_ENABLE_STRICT_TRANSPORT; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); enable_strict_transport = tmp; } return (0); } int check_enable_strict_transport(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_ENABLE_STRICT_TRANSPORT ? "Enabled" : "Disabled"); return (enable_strict_transport != XT_DS_ENABLE_STRICT_TRANSPORT); } #if 0 /* * XXX: this is currently broken. Need to figure out what to do with * this. Problemm is set_encoding will refresh the tab it's run on, so * we can either put a big fat warning in the manpage and refresh every * single open tab with the new encoding or scrap it as a runtime * setting. */ int set_encoding_rt(char *value) { struct karg args = {0}; if (value == NULL || strlen(value) == 0) return (-1); if (encoding) g_free(encoding); encoding = g_strdup(value); args.s = encoding; set_encoding(get_current_tab(), &args); return (0); } #endif int check_encoding(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_ENCODING); return (g_strcmp0(encoding, XT_DS_ENCODING)); } int check_gnutls_search_string(char **tt) { *tt = g_strdup("Default: (empty)"); return (g_strcmp0(gnutls_priority_string, XT_DS_GNUTLS_PRIORITY_STRING)); } int set_gnutls_priority_string(struct settings *s, char *value) { return (!g_setenv("G_TLS_GNUTLS_PRIORITY", value, FALSE)); } char * get_gnutls_priority_string(struct settings *s) { return (g_strdup(g_getenv("G_TLS_GNUTLS_PRIORITY"))); } int set_guess_search(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) guess_search = XT_DS_GUESS_SEARCH; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); guess_search = tmp; } return (0); } int check_guess_search(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_GUESS_SEARCH ? "Enabled" : "Disabled"); return (guess_search != XT_DS_GUESS_SEARCH); } int set_js_auto_open_windows(char *value) { int tmp; const char *errstr; struct tab *t; if (value == NULL || strlen(value) == 0) js_auto_open_windows = XT_DS_JS_AUTO_OPEN_WINDOWS; else { tmp = (int)strtonum(value, 0, 1, &errstr); if (errstr) return (-1); js_auto_open_windows = tmp; } TAILQ_FOREACH(t, &tabs, entry) g_object_set(G_OBJECT(t->settings), "javascript-can-open-windows-automatically", js_auto_open_windows, NULL); return (0); } int check_js_auto_open_windows(char **tt) { *tt = g_strdup("Default: Enabled"); return (js_auto_open_windows != XT_DS_JS_AUTO_OPEN_WINDOWS); } char * get_referer(struct settings *s) { if (referer_mode == XT_REFERER_ALWAYS) return (g_strdup("always")); if (referer_mode == XT_REFERER_NEVER) return (g_strdup("never")); if (referer_mode == XT_REFERER_SAME_DOMAIN) return (g_strdup("same-domain")); if (referer_mode == XT_REFERER_SAME_FQDN) return (g_strdup("same-fqdn")); if (referer_mode == XT_REFERER_CUSTOM) return (g_strdup(referer_custom)); return (NULL); } int set_referer(struct settings *s, char *value) { if (referer_custom) { g_free(referer_custom); referer_custom = NULL; } if (!strcmp(value, "always")) referer_mode = XT_REFERER_ALWAYS; else if (!strcmp(value, "never")) referer_mode = XT_REFERER_NEVER; else if (!strcmp(value, "same-domain")) referer_mode = XT_REFERER_SAME_DOMAIN; else if (!strcmp(value, "same-fqdn")) referer_mode = XT_REFERER_SAME_FQDN; else if (!valid_url_type(value)) { referer_mode = XT_REFERER_CUSTOM; referer_custom = g_strdup(value); } else { /* we've already free'd the custom referer */ if (referer_mode == XT_REFERER_CUSTOM) referer_mode = XT_REFERER_NEVER; return (1); } return (0); } int set_referer_rt(char *value) { if (value == NULL || strlen(value) == 0) { if (referer_custom) g_free(referer_custom); referer_custom = g_strdup(XT_DS_REFERER_CUSTOM); referer_mode = XT_DS_REFERER_MODE; return (0); } return (set_referer(NULL, value)); } int check_referer(char **tt) { *tt = g_strdup("Default (depends on browser_mode):\n" "\tnormal:\talways\n" "\twhitelist:\tsame-domain\n" "\tkiosk:\talways"); if (browser_mode == XT_BM_WHITELIST && referer_mode != XT_REFERER_SAME_DOMAIN) return (1); if (browser_mode == XT_BM_NORMAL && referer_mode != XT_REFERER_ALWAYS) return (1); if (browser_mode == XT_BM_KIOSK && referer_mode != XT_REFERER_ALWAYS) return (1); return (0); } char * get_ssl_ca_file(struct settings *s) { if (strlen(ssl_ca_file) == 0) return (NULL); return (g_strdup(ssl_ca_file)); } int set_refresh_interval(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) refresh_interval = XT_DS_REFRESH_INTERVAL; else { tmp = strtonum(value, 0, INT_MAX, &errstr); if (errstr) return (-1); refresh_interval = tmp; } return (0); } int check_resource_dir(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_RESOURCE_DIR); return (g_strcmp0(resource_dir, XT_DS_RESOURCE_DIR)); } int check_save_global_history(char **tt) { *tt = g_strdup("Default: Disabled"); return (save_global_history != 0); } int check_save_rejected_cookies(char **tt) { *tt = g_strdup("Default: Disabled"); return (save_rejected_cookies != 0); } int check_refresh_interval(char **tt) { *tt = g_strdup_printf("Default: %d", XT_DS_REFRESH_INTERVAL); return (refresh_interval != XT_DS_REFRESH_INTERVAL); } int set_session_autosave(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) session_autosave = XT_DS_SESSION_AUTOSAVE; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); session_autosave = tmp; } return (0); } int check_session_autosave(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_SESSION_AUTOSAVE ? "Enabled" : "Disabled"); return (session_autosave != XT_DS_SESSION_AUTOSAVE); } int set_session_timeout(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) session_timeout = XT_DS_SESSION_TIMEOUT; else { tmp = strtonum(value, 0, INT_MAX, &errstr); if (errstr) return (-1); session_timeout = tmp; } return (0); } int check_session_timeout(char **tt) { *tt = g_strdup_printf("Default: %d", XT_DS_SESSION_TIMEOUT); return (session_timeout != XT_DS_SESSION_TIMEOUT); } int set_show_scrollbars(char *value) { struct tab *t; int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) tmp = XT_DS_SHOW_SCROLLBARS; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); } show_scrollbars = tmp; TAILQ_FOREACH(t, &tabs, entry) if (set_scrollbar_visibility(t, show_scrollbars)) return (-1); return (0); } int check_show_scrollbars(char **tt) { *tt = g_strdup("Default (depends on gui_mode):\n" "\tclassic:\tEnabled\n" "\tminimal:\tDisabled"); if (gui_mode == XT_GM_CLASSIC && show_scrollbars != 1) return (1); if (gui_mode == XT_GM_MINIMAL && show_scrollbars != 0) return (1); return (0); } int set_show_statusbar(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) tmp = XT_DS_SHOW_STATUSBAR; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); } show_statusbar = tmp; statusbar_set_visibility(); return (0); } int check_show_statusbar(char **tt) { *tt = g_strdup("Default (depends on gui_mode):\n" "\tclassic:\tDisabled\n" "\tminimal:\tEnabled"); if (gui_mode == XT_GM_CLASSIC && show_statusbar != 0) return (1); if (gui_mode == XT_GM_MINIMAL && show_statusbar != 1) return (1); return (0); } int set_show_tabs(char *value) { struct karg args = {0}; int val; const char *errstr; if (value == NULL || strlen(value) == 0) val = XT_DS_SHOW_TABS; else { val = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); } args.i = val ? XT_TAB_SHOW : XT_TAB_HIDE; tabaction(get_current_tab(), &args); return (0); } int check_show_tabs(char **tt) { *tt = g_strdup("Default (depends on gui_mode):\n" "\tclassic:\tEnabled\n" "\tminimal:\tDisabled"); if (gui_mode == XT_GM_CLASSIC && show_tabs != 1) return (1); if (gui_mode == XT_GM_MINIMAL && show_tabs != 0) return (1); return (0); } int set_show_url(char *value) { struct karg args = {0}; int val; const char *errstr; if (value == NULL || strlen(value) == 0) val = XT_DS_SHOW_URL; else { val = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); } args.i = val ? XT_URL_SHOW : XT_URL_HIDE; urlaction(get_current_tab(), &args); return (0); } int check_show_url(char **tt) { *tt = g_strdup("Default (depends on gui_mode):\n" "\tclassic:\tEnabled\n" "\tminimal:\tDisabled"); if (gui_mode == XT_GM_CLASSIC && show_url != 1) return (1); if (gui_mode == XT_GM_MINIMAL && show_url != 0) return (1); return (0); } int check_single_instance(char **tt) { *tt = g_strdup("Default: Disabled"); return (single_instance != 0); } int set_spell_check_languages(char *value) { struct tab *t; if (spell_check_languages) g_free(spell_check_languages); if (value == NULL || strlen(value) == 0) spell_check_languages = g_strdup(XT_DS_SPELL_CHECK_LANGUAGES); else spell_check_languages = g_strdup(value); TAILQ_FOREACH(t, &tabs, entry) g_object_set(G_OBJECT(t->settings), "spell_checking_languages", spell_check_languages, (char *)NULL); return (0); } int check_spell_check_languages(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_SPELL_CHECK_LANGUAGES); return (g_strcmp0(spell_check_languages, XT_DS_SPELL_CHECK_LANGUAGES)); } int check_valid_file(char *name) { struct stat sb; if (name == NULL || stat(name, &sb)) return (-1); return (0); } int set_ssl_ca_file_rt(char *value) { if (value == NULL || strlen(value) == 0) { strlcpy(ssl_ca_file, XT_DS_SSL_CA_FILE, sizeof ssl_ca_file); g_object_set(session, SOUP_SESSION_SSL_CA_FILE, "", NULL); return (0); } else return (set_ssl_ca_file(NULL, value)); } int check_ssl_ca_file(char **tt) { *tt = g_strdup("Default: (empty)"); return (g_strcmp0(ssl_ca_file, XT_DS_SSL_CA_FILE)); } int set_ssl_strict_certs(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) ssl_strict_certs = XT_DS_SSL_STRICT_CERTS; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); ssl_strict_certs = tmp; } g_object_set(session, SOUP_SESSION_SSL_STRICT, ssl_strict_certs, NULL); return (0); } int check_ssl_strict_certs(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_SSL_STRICT_CERTS ? "Enabled" : "Disabled"); return (ssl_strict_certs != XT_DS_SSL_STRICT_CERTS); } int check_statusbar_elems(char **tt) { *tt = g_strdup("Default: BP"); return (g_strcmp0(statusbar_elems, "BP")); } int set_external_editor(char *editor) { if (external_editor) g_free(external_editor); if (editor == NULL || strlen(editor) == 0) external_editor = NULL; else external_editor = g_strdup(editor); return (0); } int check_external_editor(char **tt) { *tt = g_strdup("Default: (empty)"); return (g_strcmp0(external_editor, NULL)); } int set_fancy_bar(char *value) { struct tab *t; int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) fancy_bar = 1; /* XXX */ else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); fancy_bar = tmp; } TAILQ_FOREACH(t, &tabs, entry) if (fancy_bar) { gtk_widget_show(t->backward); gtk_widget_show(t->forward); gtk_widget_show(t->stop); gtk_widget_show(t->js_toggle); if (search_string && strlen(search_string)) gtk_widget_show(t->search_entry); } else { gtk_widget_hide(t->backward); gtk_widget_hide(t->forward); gtk_widget_hide(t->stop); gtk_widget_hide(t->js_toggle); gtk_widget_hide(t->search_entry); } return (0); } int check_fancy_bar(char **tt) { *tt = g_strdup("Default (depends on gui_mode):\n" "\tclassic:\tEnabled\n" "\tminimal:\tDisabled"); if (gui_mode == XT_GM_CLASSIC && fancy_bar != 1) return (1); if (gui_mode == XT_GM_MINIMAL && fancy_bar != 0) return (1); return (0); } int setup_proxy(const char *uri) { struct tab *t; if (proxy_uri) { #if SOUP_CHECK_VERSION(2, 42, 2) g_object_set(session, "proxy-resolver", NULL, (char *)NULL); g_object_unref(proxy_uri); #else g_object_set(session, "proxy-uri", NULL, (char *)NULL); soup_uri_free(proxy_uri); #endif proxy_uri = NULL; TAILQ_FOREACH(t, &tabs, entry) if (t->sbe.proxy != NULL) gtk_label_set_text(GTK_LABEL(t->sbe.proxy), ""); } if (http_proxy) { if (http_proxy != uri) { g_free(http_proxy); http_proxy = NULL; } } if (uri && check_http_proxy_scheme(uri) != 1) return (1); if (uri) { http_proxy = g_strdup(uri); DNPRINTF(XT_D_CONFIG, "setup_proxy: %s\n", uri); #if SOUP_CHECK_VERSION(2, 42, 2) proxy_uri = g_simple_proxy_resolver_new(http_proxy, proxy_exclude); if (proxy_uri != NULL) { g_object_set(session, "proxy-resolver", proxy_uri, (char *)NULL); #else proxy_uri = soup_uri_new(http_proxy); if (proxy_uri != NULL && SOUP_URI_VALID_FOR_HTTP(proxy_uri)) { g_object_set(session, "proxy-uri", proxy_uri, (char *)NULL); #endif TAILQ_FOREACH(t, &tabs, entry) { if (t->sbe.proxy != NULL) { gtk_label_set_text( GTK_LABEL(t->sbe.proxy), "proxy"); } gtk_widget_show(t->proxy_toggle); button_set_file(t->proxy_toggle, "torenabled.ico"); } } } else { TAILQ_FOREACH(t, &tabs, entry) button_set_file(t->proxy_toggle, "tordisabled.ico"); } return (0); } char * get_tab_style(struct settings *s) { if (tab_style == XT_TABS_NORMAL) return (g_strdup("normal")); else return (g_strdup("compact")); } int set_tab_style(struct settings *s, char *val) { if (!strcmp(val, "normal")) tab_style = XT_TABS_NORMAL; else if (!strcmp(val, "compact")) tab_style = XT_TABS_COMPACT; else return (1); return (0); } int check_tab_style(char **tt) { *tt = g_strdup("Default (depends on gui_mode):\n" "\tclassic:\tnormal\n" "\tminimal:\tcompact"); if (gui_mode == XT_GM_CLASSIC && tab_style != XT_TABS_NORMAL) return (1); if (gui_mode == XT_GM_MINIMAL && tab_style != XT_TABS_COMPACT) return (1); return (0); } int set_tab_style_rt(char *value) { struct karg args = {0}; int old_tab_style; if (value == NULL || strlen(value) == 0) { if (tab_style == XT_DS_TAB_STYLE) return (0); tab_style = XT_TABS_COMPACT; args.i = XT_TAB_NEXTSTYLE; } else { old_tab_style = tab_style; if (set_tab_style(NULL, value)) return (-1); if (old_tab_style != tab_style) { tab_style = old_tab_style; args.i = XT_TAB_NEXTSTYLE; } } tabaction(get_current_tab(), &args); return (0); } char * get_statusbar_style(struct settings *s) { if (statusbar_style == XT_STATUSBAR_URL) return (g_strdup("url")); else return (g_strdup("title")); } int set_statusbar_style(struct settings *s, char *val) { if (!strcmp(val, "url")) statusbar_style = XT_STATUSBAR_URL; else if (!strcmp(val, "title")) statusbar_style = XT_STATUSBAR_TITLE; else return (1); return (0); } int set_statusbar_style_rt(char *value) { struct tab *t; const gchar *page_uri; if (value == NULL || strlen(value) == 0) { if (statusbar_style == XT_DS_STATUSBAR_STYLE) return (0); statusbar_style = XT_DS_STATUSBAR_STYLE; } else { if (!strcmp(value, "url")) statusbar_style = XT_STATUSBAR_URL; else if (!strcmp(value, "title")) statusbar_style = XT_STATUSBAR_TITLE; } /* apply changes */ TAILQ_FOREACH(t, &tabs, entry) { if (statusbar_style == XT_STATUSBAR_TITLE) set_status(t, "%s", get_title(t, FALSE)); else if ((page_uri = get_uri(t)) != NULL) set_status(t, "%s", page_uri); } return (0); } int check_statusbar_style(char **tt) { *tt = g_strdup("Default: url"); return (statusbar_style != XT_DS_STATUSBAR_STYLE); } int set_url_regex(char *value) { if (value == NULL || strlen(value) == 0) { if (url_regex) g_free(url_regex); url_regex = g_strdup(XT_DS_URL_REGEX); } else { if (regcomp(&url_re, value, REG_EXTENDED | REG_NOSUB)) return (-1); if (url_regex) g_free(url_regex); url_regex = g_strdup(value); } return (0); } int check_url_regex(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_URL_REGEX); return (g_strcmp0(url_regex, XT_DS_URL_REGEX)); } int set_userstyle(struct settings *s, char *value) { int rv = 0; char script[PATH_MAX] = {'\0'}; char *tmp; if (value == NULL || strlen(value) == 0) { snprintf(script, sizeof script, "%s" PS "style.css", resource_dir); tmp = g_filename_to_uri(script, NULL, NULL); if (tmp == NULL) rv = -1; else { if (userstyle) g_free(userstyle); userstyle = tmp; } } else { expand_tilde(script, sizeof script, value); tmp = g_filename_to_uri(script, NULL, NULL); if (tmp == NULL) rv = -1; else { if (userstyle) g_free(userstyle); userstyle = tmp; } } if (stylesheet) g_free(stylesheet); stylesheet = g_strdup(userstyle); return (rv); } char * get_userstyle(struct settings *s) { if (userstyle) return (g_filename_from_uri(userstyle, NULL, NULL)); return (NULL); } int set_userstyle_rt(char *value) { return (set_userstyle(NULL, value)); } int check_userstyle(char **tt) { int rv = 0; char buf[PATH_MAX]; char *file = NULL; snprintf(buf, sizeof buf, "%s" PS "%s", resource_dir, "style.css"); *tt = g_strdup_printf("Default: %s", buf); file = g_filename_from_uri(userstyle, NULL, NULL); rv = g_strcmp0(file, buf); if (file) g_free(file); return (rv); } int set_userstyle_global(char *value) { struct karg args = {0}; int tmp, old_style; const char *errstr; if (value == NULL || strlen(value) == 0) { if (userstyle_global == XT_DS_USERSTYLE_GLOBAL) return (0); userstyle_global = 1; args.i = XT_STYLE_GLOBAL; userstyle_cmd(get_current_tab(), &args); } else { old_style = userstyle_global; tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); if (tmp != old_style) { args.i = XT_STYLE_GLOBAL; userstyle_cmd(get_current_tab(), &args); } } return (0); } int check_userstyle_global(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_USERSTYLE_GLOBAL ? "Enabled" : "Disabled"); return (userstyle_global != XT_DS_USERSTYLE_GLOBAL); } int set_warn_cert_changes(char *value) { int tmp; const char *errstr; if (value == NULL || strlen(value) == 0) warn_cert_changes = XT_DS_WARN_CERT_CHANGES; else { tmp = strtonum(value, 0, 1, &errstr); if (errstr) return (-1); warn_cert_changes = tmp; } return (0); } int check_warn_cert_changes(char **tt) { *tt = g_strdup_printf("Default: %s", XT_DS_WARN_CERT_CHANGES ? "Enabled" : "Disabled"); return (warn_cert_changes != XT_DS_WARN_CERT_CHANGES); } int check_window_height(char **tt) { *tt = g_strdup_printf("Default: %d", 768); return (window_height != 768); } int check_window_maximize(char **tt) { *tt = g_strdup("Default: Disabled"); return (window_maximize != 0); } int check_window_width(char **tt) { *tt = g_strdup_printf("Default: %d", 768); return (window_width != 1024); } int check_work_dir(char **tt) { struct passwd *pwd; char buf[PATH_MAX]; if ((pwd = getpwuid(getuid())) == NULL) return (-1); snprintf(buf, sizeof buf, "%s" PS ".xombrero", pwd->pw_dir); *tt = g_strdup_printf("Default: %s", buf); return (g_strcmp0(work_dir, buf)); } char * get_edit_mode(struct settings *s) { if (edit_mode == XT_EM_HYBRID) return (g_strdup("hybrid")); else return (g_strdup("vi")); } int set_edit_mode(struct settings *s, char *val) { if (!strcmp(val, "hybrid")) edit_mode = XT_EM_HYBRID; else if (!strcmp(val, "vi")) edit_mode = XT_EM_VI; else return (1); return (0); } int check_edit_mode(char **tt) { *tt = g_strdup("Default: hybrid"); return (edit_mode != XT_EM_HYBRID); } char * get_download_mode(struct settings *s) { switch (download_mode) { case XT_DM_START: return (g_strdup("start")); break; case XT_DM_ASK: return (g_strdup("ask")); break; case XT_DM_ADD: return (g_strdup("add")); break; } return (g_strdup("unknown")); } int set_download_mode(struct settings *s, char *val) { if (val == NULL || strlen(val) == 0 || !strcmp(val, "start")) download_mode = XT_DM_START; else if (!strcmp(val, "ask")) download_mode = XT_DM_ASK; else if (!strcmp(val, "add")) download_mode = XT_DM_ADD; else return (1); return (0); } int set_download_mode_rt(char *val) { return (set_download_mode(NULL, val)); } int check_download_mode(char **tt) { *tt = g_strdup("Default: start"); return (download_mode != XT_DM_START); } char * get_work_dir(struct settings *s) { if (work_dir[0] == '\0') return (0); return (g_strdup(work_dir)); } int set_work_dir(struct settings *s, char *val) { expand_tilde(work_dir, sizeof work_dir, val); return (0); } void walk_cookie_wl(struct settings *s, void (*cb)(struct settings *, char *, void *), void *cb_args) { struct wl_entry *w; if (s == NULL || cb == NULL) { show_oops(NULL, "walk_cookie_wl invalid parameters"); return; } TAILQ_FOREACH_REVERSE(w, &c_wl, wl_list, entry) cb(s, w->pat, cb_args); } void walk_js_wl(struct settings *s, void (*cb)(struct settings *, char *, void *), void *cb_args) { struct wl_entry *w; if (s == NULL || cb == NULL) { show_oops(NULL, "walk_js_wl invalid parameters"); return; } TAILQ_FOREACH_REVERSE(w, &js_wl, wl_list, entry) cb(s, w->pat, cb_args); } void walk_pl_wl(struct settings *s, void (*cb)(struct settings *, char *, void *), void *cb_args) { struct wl_entry *w; if (s == NULL || cb == NULL) { show_oops(NULL, "walk_pl_wl invalid parameters"); return; } TAILQ_FOREACH_REVERSE(w, &pl_wl, wl_list, entry) cb(s, w->pat, cb_args); } void walk_force_https(struct settings *s, void (*cb)(struct settings *, char *, void *), void *cb_args) { struct wl_entry *w; if (s == NULL || cb == NULL) { show_oops(NULL, "walk_force_https invalid parameters"); return; } TAILQ_FOREACH_REVERSE(w, &force_https, wl_list, entry) cb(s, w->pat, cb_args); } int settings_add(char *var, char *val) { int i, rv, *p; int tmp; double *d; char c[PATH_MAX], **s; const char *errstr; /* get settings */ for (i = 0, rv = 0; i < LENGTH(rs); i++) { errstr = NULL; if (strcmp(var, rs[i].name)) continue; if (!strcmp(var, "include_config")) { expand_tilde(c, sizeof c, val); config_parse(c, 0); rv = 1; break; } if (rs[i].s) { if (rs[i].s->set(&rs[i], val)) startpage_add("invalid value for %s: %s", var, val); rv = 1; break; } else switch (rs[i].type) { case XT_S_INT: /* FALLTHROUGH */ case XT_S_BOOL: p = rs[i].ival; tmp = strtonum(val, INT_MIN, INT_MAX, &errstr); if (errstr) break; *p = tmp; rv = 1; break; case XT_S_STR: s = rs[i].sval; if (s == NULL) errx(1, "invalid sval for %s", rs[i].name); if (*s) g_free(*s); *s = g_strdup(val); rv = 1; break; case XT_S_DOUBLE: d = rs[i].dval; *d = g_ascii_strtod(val, NULL); rv = 1; break; case XT_S_INVALID: default: errx(1, "invalid type for %s", var); } break; } return (rv); } #define WS "\n= \t" void config_parse(char *filename, int runtime) { FILE *config, *f; char *line, *cp, *var, *val; size_t len, lineno = 0; int handled; char file[PATH_MAX]; struct stat sb; DNPRINTF(XT_D_CONFIG, "config_parse: filename %s\n", filename); if (filename == NULL) return; if (runtime && runtime_settings[0] != '\0') { snprintf(file, sizeof file, "%s" PS "%s", work_dir, runtime_settings); if (stat(file, &sb)) { warnx("runtime file doesn't exist, creating it"); if ((f = fopen(file, "w")) == NULL) err(1, "runtime"); fprintf(f, "# AUTO GENERATED, DO NOT EDIT\n"); fclose(f); } } else strlcpy(file, filename, sizeof file); if ((config = fopen(file, "r")) == NULL) { warn("config_parse: cannot open %s", filename); return; } for (;;) { if ((line = fparseln(config, &len, &lineno, NULL, 0)) == NULL) if (feof(config) || ferror(config)) break; cp = line; cp += (long)strspn(cp, WS); if (cp[0] == '\0') { /* empty line */ free(line); continue; } if ((var = strsep(&cp, WS)) == NULL || cp == NULL) startpage_add("invalid configuration file entry: %s", line); else { cp += (long)strspn(cp, WS); if ((val = strsep(&cp, "\0")) == NULL) break; DNPRINTF(XT_D_CONFIG, "config_parse: %s=%s\n", var, val); g_strstrip(val); handled = settings_add(var, val); if (handled == 0) startpage_add("invalid configuration file entry" ": %s=%s", var, val); } free(line); } fclose(config); } struct settings_args { char **body; int i; }; void print_setting(struct settings *s, char *val, void *cb_args) { char *color; gchar *tmp, *enc_val; struct settings_args *sa = cb_args; if (sa == NULL || s->flags & XT_SF_INVISIBLE) return; if (s->flags & XT_SF_RUNTIME) color = "#22cc22"; else color = "#cccccc"; enc_val = html_escape(val); tmp = *sa->body; *sa->body = g_strdup_printf( "%s\n" "%s" "%s", *sa->body, color, s->name, color, enc_val == NULL ? "" : enc_val ); g_free(tmp); if (enc_val) g_free(enc_val); sa->i++; } void print_runtime_setting(struct settings *s, char *val, void *cb_args) { char *tmp, *tt = NULL; struct settings_args *sa = cb_args; int modified = 0; int i; if (sa == NULL) return; if (s == NULL || s->flags & XT_SF_INVISIBLE || s->activate == NULL) return; tmp = *sa->body; if (s->ismodified) modified = s->ismodified(&tt); *sa->body = g_strdup_printf( "%s\n" "
%s
" "
", *sa->body, modified ? "id='modified'" : "", s->tt ? s->tt : "", s->name, tt); g_free(tmp); g_free(tt); tmp = *sa->body; if (s->type == XT_S_STR && s->s && s->s->valid_options[0]) { *sa->body = g_strdup_printf("%s" "
", *sa->body, s->name, val ? val : ""); else if (s->type == XT_S_INT) *sa->body = g_strdup_printf( "%s" "", *sa->body, s->name, val); else if (s->type == XT_S_DOUBLE) *sa->body = g_strdup_printf( "%s" "", *sa->body, s->name, val); else if (s->type == XT_S_BOOL) *sa->body = g_strdup_printf( "%s" "" "", *sa->body, s->name, s->name, atoi(val) ? " checked='checked'" : ""); else { *sa->body = g_strdup(*sa->body); warnx("Did not print setting %s", s->name); } g_free(tmp); sa->i++; } char * print_set_rejects(void) { struct set_reject *sr, *st; char *body = NULL, *tmp; if (TAILQ_EMPTY(&srl)) return (NULL); body = g_strdup_printf("The following settings were invalid and could " "not be set:
" "" ""); TAILQ_FOREACH_SAFE(sr, &srl, entry, st) { tmp = body; body = g_strdup_printf("%s\n" "" "", body, sr->name, sr->value); g_free(tmp); TAILQ_REMOVE(&srl, sr, entry); g_free(sr->name); g_free(sr->value); g_free(sr); } tmp = body; body = g_strdup_printf("%s
SettingValue
%s
%s

", body); g_free(tmp); return (body); } int xtp_page_set(struct tab *t, struct karg *args) { char *body, *page, *tmp; int i = 1; struct settings_args sa; bzero(&sa, sizeof sa); sa.body = &body; /* body */ body = g_strdup_printf("
" "" "\n"); settings_walk(print_setting, &sa); i = sa.i; /* small message if there are none */ if (i == 1) { tmp = body; body = g_strdup_printf("%s\n\n", body); g_free(tmp); } tmp = body; body = g_strdup_printf("%s
SettingValue
No settings
", body); g_free(tmp); page = get_html_page("Settings", body, "", 0); g_free(body); load_webkit_string(t, page, XT_URI_ABOUT_SET, 0); g_free(page); return (XT_CB_PASSTHROUGH); } int xtp_page_rt(struct tab *t, struct karg *args) { char *body = NULL, *page, *tmp; int i = 1; struct settings_args sa; generate_xtp_session_key(&t->session_key); bzero(&sa, sizeof sa); sa.body = &body; /* body */ body = print_set_rejects(); tmp = body; body = g_strdup_printf("%s
" "
" "" "" "" "\n", body ? body : "", XT_XTP_STR, XT_XTP_RT, t->session_key, XT_XTP_RT_SAVE); g_free(tmp); settings_walk(print_runtime_setting, &sa); i = sa.i; /* small message if there are none */ if (i == 1) { tmp = body; body = g_strdup_printf("%s\n\n", body); g_free(tmp); } tmp = body; body = g_strdup_printf("%s
SettingValue
No settings
" "
", body); g_free(tmp); page = get_html_page("Runtime Settings", body, "", 1); g_free(body); load_webkit_string(t, page, XT_URI_ABOUT_RUNTIME, 0); g_free(page); return (XT_CB_PASSTHROUGH); } int set(struct tab *t, struct karg *args) { char *p, *val; int i; if (args == NULL || args->s == NULL) return (xtp_page_set(t, args)); /* strip spaces */ p = g_strstrip(args->s); if (strlen(p) == 0) return (xtp_page_set(t, args)); /* we got some sort of string */ val = g_strstr_len(p, strlen(p), "="); if (val) { *val++ = '\0'; val = g_strstrip(val); p = g_strchomp(p); for (i = 0; i < get_settings_size(); i++) { if (strcmp(rs[i].name, p)) continue; if (rs[i].activate) { if (rs[i].activate(val)) show_oops(t, "%s invalid value %s", p, val); else show_oops(t, ":set %s = %s", p, val); goto done; } else { show_oops(t, "not a runtime option: %s", p); goto done; } } show_oops(t, "unknown option: %s", p); } else { p = g_strchomp(p); for (i = 0; i < get_settings_size(); i++) { if (strcmp(rs[i].name, p)) continue; /* XXX this could use some cleanup */ switch (rs[i].type) { case XT_S_INT: /* FALLTHROUGH */ case XT_S_BOOL: if (rs[i].ival) show_oops(t, "%s = %d", rs[i].name, *rs[i].ival); else if (rs[i].s && rs[i].s->get) show_oops(t, "%s = %s", rs[i].name, rs[i].s->get(&rs[i])); else if (rs[i].s && rs[i].s->get == NULL) show_oops(t, "%s = ...", rs[i].name); else show_oops(t, "%s = ", rs[i].name); break; case XT_S_DOUBLE: if (rs[i].dval) show_oops(t, "%s = %f", rs[i].name, *rs[i].dval); else if (rs[i].s && rs[i].s->get) show_oops(t, "%s = %s", rs[i].name, rs[i].s->get(&rs[i])); else if (rs[i].s && rs[i].s->get == NULL) show_oops(t, "%s = ...", rs[i].name); else show_oops(t, "%s = ", rs[i].name); break; case XT_S_STR: if (rs[i].sval && *rs[i].sval) show_oops(t, "%s = %s", rs[i].name, *rs[i].sval); else if (rs[i].s && rs[i].s->get) show_oops(t, "%s = %s", rs[i].name, rs[i].s->get(&rs[i])); else if (rs[i].s && rs[i].s->get == NULL) show_oops(t, "%s = ...", rs[i].name); else show_oops(t, "%s = ", rs[i].name); break; default: show_oops(t, "unknown type for %s", rs[i].name); goto done; } goto done; } show_oops(t, "unknown option: %s", p); } done: return (XT_CB_PASSTHROUGH); } xombrero-1.6.4/style.css010064400017500000000000000064261247066410500142540ustar00dhillwheel/* * NIGHTSHIFT - eye care: * A darkening style for all websites. * by vetinari - 2009 * contact: vetinari.userstyles@inode.at */ body,html { min-height: 100%!important; } html, body { background-color:#111!important } body>*:not(:empty){ background-color:#222!important } body>*>*:not(:empty){ background-color:#222!important } body>*>*>*:not(:empty){ background-color:#282828!important } body>*>*>*>*:not(:empty){ background-color:#282828!important } body>*>*>*>*>*:not(:empty){ background-color:#383838!important } body>*>*>*>*>* *{ background-color:#383838!important } body table[border="0"] td{ background-color:#111!important } body table table[border="0"] td{ background-color:#333!important } body table table table[border="0"] td{ background-color:#222!important } body table table table table[border="0"] td{ background-color:#444!important } body *:empty{ background-color: #252525!important } body p:not(:empty), body p *, body h1, body h1 *, body h2, body h2 *, body h3, body h3 *, body h4, body h4 *, body h5, body h5 *, body strong>*, body b>*, body em>*, body i>*, body span>*:not(img) { background:transparent none!important } body h1, body h1 *, body h2, body h2 *, p>strong:only-of-type, p>b:only-of-type { color: #a98!important } body h3, body h3 *, body h4, body h4 *{ color: #aaa!important } *:not([onclick]):not(input):not(a):not(img):not([class^="UI"]), body a:not(:empty), div:not([onclick]) { background-image:none!important; text-indent:0!important } *[onclick] { color:#79a!important } *[onclick]:hover { color:#99a8aa!important } body hr { background: #666 none!important; color: #666!important; border:1px solid #666!important; height: 1px!important; overflow:hidden!important; display: block!important } * { color: #c0c0c0!important; border-color:#666!important; } * body a, body a * { color: #B6AA7B!important; } body a:hover, body a:hover * { color: #D9C077!important; text-decoration: underline!important } body img,a[href] img, a[href] button, input[type="image"],*[onclick]:empty, body a:empty { opacity:.5!important } body img:hover,a[href]:hover img, a[href]:hover button, *[onclick]:empty:hover, body a:empty:hover { opacity:1!important } body input[type], body textarea[name], body input[name], body input[id], body select[name]{ -moz-appearance:none!important; color: #bbb!important; -moz-border-radius:4px !important; border-width: 1px!important; border-color: #778!important; border-style:solid!important; background:#555 none !important } body select[name] { -moz-appearance:none!important; color: #bbb!important; -moz-border-radius:4px !important; border-width: 1px!important; border-color: #778!important; border-style:solid!important; background-color:#555!important } body input>*, body textarea>* { background:transparent none !important; color: #bbb!important; border-style:solid!important; border-width: 0px!important; } body select * { background-color:transparent !important; color: #bbb!important; border-style:solid!important; border-width: 0px!important; } pre:not(:empty), code:not(:empty) , cite:not(:empty), pre:not(:empty) *, code:not(:empty) *, cite:not(:empty) * { background-image:url(data:image/gif;base64,R0lGODlhBAAEAIAAABERESIiIiH5BAAAAAAALAAAAAAEAAQAAAIGTACXaHkFADs=)!important; color: #bcc8dc!important;} xombrero-1.6.4/tld-rules010064400017500000000000002131031247066410500142300ustar00dhillwheel// ***** BEGIN LICENSE BLOCK ***** // Version: MPL 1.1/GPL 2.0/LGPL 2.1 // // The contents of this file are subject to the Mozilla Public License Version // 1.1 (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // http://www.mozilla.org/MPL/ // // Software distributed under the License is distributed on an "AS IS" basis, // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License // for the specific language governing rights and limitations under the // License. // // The Original Code is the Public Suffix List. // // The Initial Developer of the Original Code is // Jo Hermans . // Portions created by the Initial Developer are Copyright (C) 2007 // the Initial Developer. All Rights Reserved. // // Contributor(s): // Ruben Arakelyan // Gervase Markham // Pamela Greene // David Triendl // Jothan Frakes // The kind representatives of many TLD registries // // Alternatively, the contents of this file may be used under the terms of // either the GNU General Public License Version 2 or later (the "GPL"), or // the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), // in which case the provisions of the GPL or the LGPL are applicable instead // of those above. If you wish to allow use of your version of this file only // under the terms of either the GPL or the LGPL, and not to allow others to // use your version of this file under the terms of the MPL, indicate your // decision by deleting the provisions above and replace them with the notice // and other provisions required by the GPL or the LGPL. If you do not delete // the provisions above, a recipient may use your version of this file under // the terms of any one of the MPL, the GPL or the LGPL. // // ***** END LICENSE BLOCK ***** // ac : http://en.wikipedia.org/wiki/.ac ac com.ac edu.ac gov.ac net.ac mil.ac org.ac // ad : http://en.wikipedia.org/wiki/.ad ad nom.ad // ae : http://en.wikipedia.org/wiki/.ae // see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php ae co.ae net.ae org.ae sch.ae ac.ae gov.ae mil.ae // aero : see http://www.information.aero/index.php?id=66 aero accident-investigation.aero accident-prevention.aero aerobatic.aero aeroclub.aero aerodrome.aero agents.aero aircraft.aero airline.aero airport.aero air-surveillance.aero airtraffic.aero air-traffic-control.aero ambulance.aero amusement.aero association.aero author.aero ballooning.aero broker.aero caa.aero cargo.aero catering.aero certification.aero championship.aero charter.aero civilaviation.aero club.aero conference.aero consultant.aero consulting.aero control.aero council.aero crew.aero design.aero dgca.aero educator.aero emergency.aero engine.aero engineer.aero entertainment.aero equipment.aero exchange.aero express.aero federation.aero flight.aero freight.aero fuel.aero gliding.aero government.aero groundhandling.aero group.aero hanggliding.aero homebuilt.aero insurance.aero journal.aero journalist.aero leasing.aero logistics.aero magazine.aero maintenance.aero marketplace.aero media.aero microlight.aero modelling.aero navigation.aero parachuting.aero paragliding.aero passenger-association.aero pilot.aero press.aero production.aero recreation.aero repbody.aero res.aero research.aero rotorcraft.aero safety.aero scientist.aero services.aero show.aero skydiving.aero software.aero student.aero taxi.aero trader.aero trading.aero trainer.aero union.aero workinggroup.aero works.aero // af : http://www.nic.af/help.jsp af gov.af com.af org.af net.af edu.af // ag : http://www.nic.ag/prices.htm ag com.ag org.ag net.ag co.ag nom.ag // ai : http://nic.com.ai/ ai off.ai com.ai net.ai org.ai // al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31 al com.al edu.al gov.al mil.al net.al org.al // am : http://en.wikipedia.org/wiki/.am am // an : http://www.una.an/an_domreg/default.asp an com.an net.an org.an edu.an // ao : http://en.wikipedia.org/wiki/.ao // http://www.dns.ao/REGISTR.DOC ao ed.ao gv.ao og.ao co.ao pb.ao it.ao // aq : http://en.wikipedia.org/wiki/.aq aq // ar : http://en.wikipedia.org/wiki/.ar *.ar !congresodelalengua3.ar !educ.ar !gobiernoelectronico.ar !mecon.ar !nacion.ar !nic.ar !promocion.ar !retina.ar !uba.ar // arpa : http://en.wikipedia.org/wiki/.arpa // Confirmed by registry 2008-06-18 e164.arpa in-addr.arpa ip6.arpa iris.arpa uri.arpa urn.arpa // as : http://en.wikipedia.org/wiki/.as as gov.as // asia : http://en.wikipedia.org/wiki/.asia asia // at : http://en.wikipedia.org/wiki/.at // Confirmed by registry 2008-06-17 at ac.at co.at gv.at or.at // http://www.info.at/ biz.at info.at // priv.at : http://www.nic.priv.at/ // Submitted by registry 2008-06-09 priv.at // au : http://en.wikipedia.org/wiki/.au // http://www.auda.org.au/ // 2LDs com.au net.au org.au edu.au gov.au csiro.au asn.au id.au // Historic 2LDs (closed to new registration, but sites still exist) info.au conf.au oz.au // CGDNs - http://www.cgdn.org.au/ act.au nsw.au nt.au qld.au sa.au tas.au vic.au wa.au // 3LDs act.edu.au nsw.edu.au nt.edu.au qld.edu.au sa.edu.au tas.edu.au vic.edu.au wa.edu.au act.gov.au // Removed at request of Shae.Donelan@services.nsw.gov.au, 2010-03-04 // nsw.gov.au nt.gov.au qld.gov.au sa.gov.au tas.gov.au vic.gov.au wa.gov.au // aw : http://en.wikipedia.org/wiki/.aw aw com.aw // ax : http://en.wikipedia.org/wiki/.ax ax // az : http://en.wikipedia.org/wiki/.az az com.az net.az int.az gov.az org.az edu.az info.az pp.az mil.az name.az pro.az biz.az // ba : http://en.wikipedia.org/wiki/.ba ba org.ba net.ba edu.ba gov.ba mil.ba unsa.ba unbi.ba co.ba com.ba rs.ba // bb : http://en.wikipedia.org/wiki/.bb bb biz.bb com.bb edu.bb gov.bb info.bb net.bb org.bb store.bb // bd : http://en.wikipedia.org/wiki/.bd *.bd // be : http://en.wikipedia.org/wiki/.be // Confirmed by registry 2008-06-08 be ac.be // bf : http://en.wikipedia.org/wiki/.bf bf gov.bf // bg : http://en.wikipedia.org/wiki/.bg // https://www.register.bg/user/static/rules/en/index.html bg a.bg b.bg c.bg d.bg e.bg f.bg g.bg h.bg i.bg j.bg k.bg l.bg m.bg n.bg o.bg p.bg q.bg r.bg s.bg t.bg u.bg v.bg w.bg x.bg y.bg z.bg 0.bg 1.bg 2.bg 3.bg 4.bg 5.bg 6.bg 7.bg 8.bg 9.bg // bh : http://en.wikipedia.org/wiki/.bh bh com.bh edu.bh net.bh org.bh gov.bh // bi : http://en.wikipedia.org/wiki/.bi // http://whois.nic.bi/ bi co.bi com.bi edu.bi or.bi org.bi // biz : http://en.wikipedia.org/wiki/.biz biz // bj : http://en.wikipedia.org/wiki/.bj bj asso.bj barreau.bj gouv.bj // bm : http://www.bermudanic.bm/dnr-text.txt bm com.bm edu.bm gov.bm net.bm org.bm // bn : http://en.wikipedia.org/wiki/.bn *.bn // bo : http://www.nic.bo/ bo com.bo edu.bo gov.bo gob.bo int.bo org.bo net.bo mil.bo tv.bo // br : http://registro.br/dominio/dpn.html // Updated by registry 2011-03-01 br adm.br adv.br agr.br am.br arq.br art.br ato.br b.br bio.br blog.br bmd.br can.br cim.br cng.br cnt.br com.br coop.br ecn.br edu.br emp.br eng.br esp.br etc.br eti.br far.br flog.br fm.br fnd.br fot.br fst.br g12.br ggf.br gov.br imb.br ind.br inf.br jor.br jus.br lel.br mat.br med.br mil.br mus.br net.br nom.br not.br ntr.br odo.br org.br ppg.br pro.br psc.br psi.br qsl.br radio.br rec.br slg.br srv.br taxi.br teo.br tmp.br trd.br tur.br tv.br vet.br vlog.br wiki.br zlg.br // bs : http://www.nic.bs/rules.html bs com.bs net.bs org.bs edu.bs gov.bs // bt : http://en.wikipedia.org/wiki/.bt bt com.bt edu.bt gov.bt net.bt org.bt // bv : No registrations at this time. // Submitted by registry 2006-06-16 // bw : http://en.wikipedia.org/wiki/.bw // http://www.gobin.info/domainname/bw.doc // list of other 2nd level tlds ? bw co.bw org.bw // by : http://en.wikipedia.org/wiki/.by // http://tld.by/rules_2006_en.html // list of other 2nd level tlds ? by gov.by mil.by // Official information does not indicate that com.by is a reserved // second-level domain, but it's being used as one (see www.google.com.by and // www.yahoo.com.by, for example), so we list it here for safety's sake. com.by // http://hoster.by/ of.by // bz : http://en.wikipedia.org/wiki/.bz // http://www.belizenic.bz/ bz com.bz net.bz org.bz edu.bz gov.bz // ca : http://en.wikipedia.org/wiki/.ca ca // ca geographical names ab.ca bc.ca mb.ca nb.ca nf.ca nl.ca ns.ca nt.ca nu.ca on.ca pe.ca qc.ca sk.ca yk.ca // gc.ca: http://en.wikipedia.org/wiki/.gc.ca // see also: http://registry.gc.ca/en/SubdomainFAQ gc.ca // co.ca: http://registry.co.ca co.ca // cat : http://en.wikipedia.org/wiki/.cat cat // cc : http://en.wikipedia.org/wiki/.cc cc // cd : http://en.wikipedia.org/wiki/.cd // see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1 cd gov.cd // cf : http://en.wikipedia.org/wiki/.cf cf // cg : http://en.wikipedia.org/wiki/.cg cg // ch : http://en.wikipedia.org/wiki/.ch ch // ci : http://en.wikipedia.org/wiki/.ci // http://www.nic.ci/index.php?page=charte ci org.ci or.ci com.ci co.ci edu.ci ed.ci ac.ci net.ci go.ci asso.ci aéroport.ci int.ci presse.ci md.ci gouv.ci // ck : http://en.wikipedia.org/wiki/.ck *.ck !www.ck // cl : http://en.wikipedia.org/wiki/.cl cl gov.cl gob.cl co.cl mil.cl // cm : http://en.wikipedia.org/wiki/.cm cm gov.cm // cn : http://en.wikipedia.org/wiki/.cn // Submitted by registry 2008-06-11 cn ac.cn com.cn edu.cn gov.cn net.cn org.cn mil.cn 公司.cn 网络.cn 網絡.cn // cn geographic names ah.cn bj.cn cq.cn fj.cn gd.cn gs.cn gz.cn gx.cn ha.cn hb.cn he.cn hi.cn hl.cn hn.cn jl.cn js.cn jx.cn ln.cn nm.cn nx.cn qh.cn sc.cn sd.cn sh.cn sn.cn sx.cn tj.cn xj.cn xz.cn yn.cn zj.cn hk.cn mo.cn tw.cn // co : http://en.wikipedia.org/wiki/.co // Submitted by registry 2008-06-11 co arts.co com.co edu.co firm.co gov.co info.co int.co mil.co net.co nom.co org.co rec.co web.co // com : http://en.wikipedia.org/wiki/.com com // CentralNic names : http://www.centralnic.com/names/domains // Confirmed by registry 2008-06-09 // Updated by registry 2011-05-27 ar.com br.com cn.com de.com eu.com gb.com gr.com hu.com jpn.com kr.com no.com qc.com ru.com sa.com se.com uk.com us.com uy.com za.com // Requested by Yngve Pettersen 2009-11-26 operaunite.com // Requested by Eduardo Vela 2010-09-06 appspot.com // coop : http://en.wikipedia.org/wiki/.coop coop // cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do cr ac.cr co.cr ed.cr fi.cr go.cr or.cr sa.cr // cu : http://en.wikipedia.org/wiki/.cu cu com.cu edu.cu org.cu net.cu gov.cu inf.cu // cv : http://en.wikipedia.org/wiki/.cv cv // cx : http://en.wikipedia.org/wiki/.cx // list of other 2nd level tlds ? cx gov.cx // cy : http://en.wikipedia.org/wiki/.cy *.cy // cz : http://en.wikipedia.org/wiki/.cz cz // de : http://en.wikipedia.org/wiki/.de // Confirmed by registry (with technical // reservations) 2008-07-01 de // CentralNic names : http://www.centralnic.com/names/domains // Submitted by registry 2011-05-27 com.de // dj : http://en.wikipedia.org/wiki/.dj dj // dk : http://en.wikipedia.org/wiki/.dk // Confirmed by registry 2008-06-17 dk // dm : http://en.wikipedia.org/wiki/.dm dm com.dm net.dm org.dm edu.dm gov.dm // do : http://en.wikipedia.org/wiki/.do do art.do com.do edu.do gob.do gov.do mil.do net.do org.do sld.do web.do // dz : http://en.wikipedia.org/wiki/.dz dz com.dz org.dz net.dz gov.dz edu.dz asso.dz pol.dz art.dz // ec : http://www.nic.ec/reg/paso1.asp // Submitted by registry 2008-07-04 ec com.ec info.ec net.ec fin.ec k12.ec med.ec pro.ec org.ec edu.ec gov.ec gob.ec mil.ec // edu : http://en.wikipedia.org/wiki/.edu edu // ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B ee edu.ee gov.ee riik.ee lib.ee med.ee com.ee pri.ee aip.ee org.ee fie.ee // eg : http://en.wikipedia.org/wiki/.eg eg com.eg edu.eg eun.eg gov.eg mil.eg name.eg net.eg org.eg sci.eg // er : http://en.wikipedia.org/wiki/.er *.er // es : https://www.nic.es/site_ingles/ingles/dominios/index.html es com.es nom.es org.es gob.es edu.es // et : http://en.wikipedia.org/wiki/.et *.et // eu : http://en.wikipedia.org/wiki/.eu eu // fi : http://en.wikipedia.org/wiki/.fi fi // aland.fi : http://en.wikipedia.org/wiki/.ax // This domain is being phased out in favor of .ax. As there are still many // domains under aland.fi, we still keep it on the list until aland.fi is // completely removed. // TODO: Check for updates (expected to be phased out around Q1/2009) aland.fi // iki.fi : Submitted by Hannu Aronsson 2009-11-05 iki.fi // fj : http://en.wikipedia.org/wiki/.fj *.fj // fk : http://en.wikipedia.org/wiki/.fk *.fk // fm : http://en.wikipedia.org/wiki/.fm fm // fo : http://en.wikipedia.org/wiki/.fo fo // fr : http://www.afnic.fr/ // domaines descriptifs : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-descriptifs fr com.fr asso.fr nom.fr prd.fr presse.fr tm.fr // domaines sectoriels : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-sectoriels aeroport.fr assedic.fr avocat.fr avoues.fr cci.fr chambagri.fr chirurgiens-dentistes.fr experts-comptables.fr geometre-expert.fr gouv.fr greta.fr huissier-justice.fr medecin.fr notaires.fr pharmacien.fr port.fr veterinaire.fr // ga : http://en.wikipedia.org/wiki/.ga ga // gb : This registry is effectively dormant // Submitted by registry 2008-06-12 // gd : http://en.wikipedia.org/wiki/.gd gd // ge : http://www.nic.net.ge/policy_en.pdf ge com.ge edu.ge gov.ge org.ge mil.ge net.ge pvt.ge // gf : http://en.wikipedia.org/wiki/.gf gf // gg : http://www.channelisles.net/applic/avextn.shtml gg co.gg org.gg net.gg sch.gg gov.gg // gh : http://en.wikipedia.org/wiki/.gh // see also: http://www.nic.gh/reg_now.php // Although domains directly at second level are not possible at the moment, // they have been possible for some time and may come back. gh com.gh edu.gh gov.gh org.gh mil.gh // gi : http://www.nic.gi/rules.html gi com.gi ltd.gi gov.gi mod.gi edu.gi org.gi // gl : http://en.wikipedia.org/wiki/.gl // http://nic.gl gl // gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm gm // gn : http://psg.com/dns/gn/gn.txt // Submitted by registry 2008-06-17 ac.gn com.gn edu.gn gov.gn org.gn net.gn // gov : http://en.wikipedia.org/wiki/.gov gov // gp : http://www.nic.gp/index.php?lang=en gp com.gp net.gp mobi.gp edu.gp org.gp asso.gp // gq : http://en.wikipedia.org/wiki/.gq gq // gr : https://grweb.ics.forth.gr/english/1617-B-2005.html // Submitted by registry 2008-06-09 gr com.gr edu.gr net.gr org.gr gov.gr // gs : http://en.wikipedia.org/wiki/.gs gs // gt : http://www.gt/politicas.html *.gt !www.gt // gu : http://gadao.gov.gu/registration.txt *.gu // gw : http://en.wikipedia.org/wiki/.gw gw // gy : http://en.wikipedia.org/wiki/.gy // http://registry.gy/ gy co.gy com.gy net.gy // hk : https://www.hkdnr.hk // Submitted by registry 2008-06-11 hk com.hk edu.hk gov.hk idv.hk net.hk org.hk 公司.hk 教育.hk 敎育.hk 政府.hk 個人.hk 个人.hk 箇人.hk 網络.hk 网络.hk 组織.hk 網絡.hk 网絡.hk 组织.hk 組織.hk 組织.hk // hm : http://en.wikipedia.org/wiki/.hm hm // hn : http://www.nic.hn/politicas/ps02,,05.html hn com.hn edu.hn org.hn net.hn mil.hn gob.hn // hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf hr iz.hr from.hr name.hr com.hr // ht : http://www.nic.ht/info/charte.cfm ht com.ht shop.ht firm.ht info.ht adult.ht net.ht pro.ht org.ht med.ht art.ht coop.ht pol.ht asso.ht edu.ht rel.ht gouv.ht perso.ht // hu : http://www.domain.hu/domain/English/sld.html // Confirmed by registry 2008-06-12 hu co.hu info.hu org.hu priv.hu sport.hu tm.hu 2000.hu agrar.hu bolt.hu casino.hu city.hu erotica.hu erotika.hu film.hu forum.hu games.hu hotel.hu ingatlan.hu jogasz.hu konyvelo.hu lakas.hu media.hu news.hu reklam.hu sex.hu shop.hu suli.hu szex.hu tozsde.hu utazas.hu video.hu // id : http://en.wikipedia.org/wiki/.id // see also: https://register.pandi.or.id/ id ac.id co.id go.id mil.id net.id or.id sch.id web.id // ie : http://en.wikipedia.org/wiki/.ie ie gov.ie // il : http://en.wikipedia.org/wiki/.il *.il // im : https://www.nic.im/pdfs/imfaqs.pdf im co.im ltd.co.im plc.co.im net.im gov.im org.im nic.im ac.im // in : http://en.wikipedia.org/wiki/.in // see also: http://www.inregistry.in/policies/ // Please note, that nic.in is not an offical eTLD, but used by most // government institutions. in co.in firm.in net.in org.in gen.in ind.in nic.in ac.in edu.in res.in gov.in mil.in // info : http://en.wikipedia.org/wiki/.info info // int : http://en.wikipedia.org/wiki/.int // Confirmed by registry 2008-06-18 int eu.int // io : http://www.nic.io/rules.html // list of other 2nd level tlds ? io com.io // iq : http://www.cmc.iq/english/iq/iqregister1.htm iq gov.iq edu.iq mil.iq com.iq org.iq net.iq // ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules // Also see http://www.nic.ir/Internationalized_Domain_Names // Two .ir entries added at request of , 2010-04-16 ir ac.ir co.ir gov.ir id.ir net.ir org.ir sch.ir // xn--mgba3a4f16a.ir (.ir, Persian YEH) ایران.ir // xn--mgba3a4fra.ir (.ir, Arabic YEH) ايران.ir // is : http://www.isnic.is/domain/rules.php // Confirmed by registry 2008-12-06 is net.is com.is edu.is gov.is org.is int.is // it : http://en.wikipedia.org/wiki/.it it gov.it edu.it // list of reserved geo-names : // http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf // (There is also a list of reserved geo-names corresponding to Italian // municipalities : http://www.nic.it/documenti/appendice-c.pdf , but it is // not included here.) agrigento.it ag.it alessandria.it al.it ancona.it an.it aosta.it aoste.it ao.it arezzo.it ar.it ascoli-piceno.it ascolipiceno.it ap.it asti.it at.it avellino.it av.it bari.it ba.it andria-barletta-trani.it andriabarlettatrani.it trani-barletta-andria.it tranibarlettaandria.it barletta-trani-andria.it barlettatraniandria.it andria-trani-barletta.it andriatranibarletta.it trani-andria-barletta.it traniandriabarletta.it bt.it belluno.it bl.it benevento.it bn.it bergamo.it bg.it biella.it bi.it bologna.it bo.it bolzano.it bozen.it balsan.it alto-adige.it altoadige.it suedtirol.it bz.it brescia.it bs.it brindisi.it br.it cagliari.it ca.it caltanissetta.it cl.it campobasso.it cb.it carboniaiglesias.it carbonia-iglesias.it iglesias-carbonia.it iglesiascarbonia.it ci.it caserta.it ce.it catania.it ct.it catanzaro.it cz.it chieti.it ch.it como.it co.it cosenza.it cs.it cremona.it cr.it crotone.it kr.it cuneo.it cn.it dell-ogliastra.it dellogliastra.it ogliastra.it og.it enna.it en.it ferrara.it fe.it fermo.it fm.it firenze.it florence.it fi.it foggia.it fg.it forli-cesena.it forlicesena.it cesena-forli.it cesenaforli.it fc.it frosinone.it fr.it genova.it genoa.it ge.it gorizia.it go.it grosseto.it gr.it imperia.it im.it isernia.it is.it laquila.it aquila.it aq.it la-spezia.it laspezia.it sp.it latina.it lt.it lecce.it le.it lecco.it lc.it livorno.it li.it lodi.it lo.it lucca.it lu.it macerata.it mc.it mantova.it mn.it massa-carrara.it massacarrara.it carrara-massa.it carraramassa.it ms.it matera.it mt.it medio-campidano.it mediocampidano.it campidano-medio.it campidanomedio.it vs.it messina.it me.it milano.it milan.it mi.it modena.it mo.it monza.it monza-brianza.it monzabrianza.it monzaebrianza.it monzaedellabrianza.it monza-e-della-brianza.it mb.it napoli.it naples.it na.it novara.it no.it nuoro.it nu.it oristano.it or.it padova.it padua.it pd.it palermo.it pa.it parma.it pr.it pavia.it pv.it perugia.it pg.it pescara.it pe.it pesaro-urbino.it pesarourbino.it urbino-pesaro.it urbinopesaro.it pu.it piacenza.it pc.it pisa.it pi.it pistoia.it pt.it pordenone.it pn.it potenza.it pz.it prato.it po.it ragusa.it rg.it ravenna.it ra.it reggio-calabria.it reggiocalabria.it rc.it reggio-emilia.it reggioemilia.it re.it rieti.it ri.it rimini.it rn.it roma.it rome.it rm.it rovigo.it ro.it salerno.it sa.it sassari.it ss.it savona.it sv.it siena.it si.it siracusa.it sr.it sondrio.it so.it taranto.it ta.it tempio-olbia.it tempioolbia.it olbia-tempio.it olbiatempio.it ot.it teramo.it te.it terni.it tr.it torino.it turin.it to.it trapani.it tp.it trento.it trentino.it tn.it treviso.it tv.it trieste.it ts.it udine.it ud.it varese.it va.it venezia.it venice.it ve.it verbania.it vb.it vercelli.it vc.it verona.it vr.it vibo-valentia.it vibovalentia.it vv.it vicenza.it vi.it viterbo.it vt.it // je : http://www.channelisles.net/applic/avextn.shtml je co.je org.je net.je sch.je gov.je // jm : http://www.com.jm/register.html *.jm // jo : http://www.dns.jo/Registration_policy.aspx jo com.jo org.jo net.jo edu.jo sch.jo gov.jo mil.jo name.jo // jobs : http://en.wikipedia.org/wiki/.jobs jobs // jp : http://en.wikipedia.org/wiki/.jp // http://jprs.co.jp/en/jpdomain.html // Submitted by registry 2008-06-11 // Updated by registry 2008-12-04 jp // jp organizational type names ac.jp ad.jp co.jp ed.jp go.jp gr.jp lg.jp ne.jp or.jp // jp geographic type names // http://jprs.jp/doc/rule/saisoku-1.html *.aichi.jp *.akita.jp *.aomori.jp *.chiba.jp *.ehime.jp *.fukui.jp *.fukuoka.jp *.fukushima.jp *.gifu.jp *.gunma.jp *.hiroshima.jp *.hokkaido.jp *.hyogo.jp *.ibaraki.jp *.ishikawa.jp *.iwate.jp *.kagawa.jp *.kagoshima.jp *.kanagawa.jp *.kawasaki.jp *.kitakyushu.jp *.kobe.jp *.kochi.jp *.kumamoto.jp *.kyoto.jp *.mie.jp *.miyagi.jp *.miyazaki.jp *.nagano.jp *.nagasaki.jp *.nagoya.jp *.nara.jp *.niigata.jp *.oita.jp *.okayama.jp *.okinawa.jp *.osaka.jp *.saga.jp *.saitama.jp *.sapporo.jp *.sendai.jp *.shiga.jp *.shimane.jp *.shizuoka.jp *.tochigi.jp *.tokushima.jp *.tokyo.jp *.tottori.jp *.toyama.jp *.wakayama.jp *.yamagata.jp *.yamaguchi.jp *.yamanashi.jp *.yokohama.jp !metro.tokyo.jp !pref.aichi.jp !pref.akita.jp !pref.aomori.jp !pref.chiba.jp !pref.ehime.jp !pref.fukui.jp !pref.fukuoka.jp !pref.fukushima.jp !pref.gifu.jp !pref.gunma.jp !pref.hiroshima.jp !pref.hokkaido.jp !pref.hyogo.jp !pref.ibaraki.jp !pref.ishikawa.jp !pref.iwate.jp !pref.kagawa.jp !pref.kagoshima.jp !pref.kanagawa.jp !pref.kochi.jp !pref.kumamoto.jp !pref.kyoto.jp !pref.mie.jp !pref.miyagi.jp !pref.miyazaki.jp !pref.nagano.jp !pref.nagasaki.jp !pref.nara.jp !pref.niigata.jp !pref.oita.jp !pref.okayama.jp !pref.okinawa.jp !pref.osaka.jp !pref.saga.jp !pref.saitama.jp !pref.shiga.jp !pref.shimane.jp !pref.shizuoka.jp !pref.tochigi.jp !pref.tokushima.jp !pref.tottori.jp !pref.toyama.jp !pref.wakayama.jp !pref.yamagata.jp !pref.yamaguchi.jp !pref.yamanashi.jp !city.chiba.jp !city.fukuoka.jp !city.hiroshima.jp !city.kawasaki.jp !city.kitakyushu.jp !city.kobe.jp !city.kyoto.jp !city.nagoya.jp !city.niigata.jp !city.okayama.jp !city.osaka.jp !city.saitama.jp !city.sapporo.jp !city.sendai.jp !city.shizuoka.jp !city.yokohama.jp // ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145 *.ke // kg : http://www.domain.kg/dmn_n.html kg org.kg net.kg com.kg edu.kg gov.kg mil.kg // kh : http://www.mptc.gov.kh/dns_registration.htm *.kh // ki : http://www.ki/dns/index.html ki edu.ki biz.ki net.ki org.ki gov.ki info.ki com.ki // km : http://en.wikipedia.org/wiki/.km // http://www.domaine.km/documents/charte.doc km org.km nom.km gov.km prd.km tm.km edu.km mil.km ass.km com.km // These are only mentioned as proposed suggestions at domaine.km, but // http://en.wikipedia.org/wiki/.km says they're available for registration: coop.km asso.km presse.km medecin.km notaires.km pharmaciens.km veterinaire.km gouv.km // kn : http://en.wikipedia.org/wiki/.kn // http://www.dot.kn/domainRules.html kn net.kn org.kn edu.kn gov.kn // kp : http://www.kcce.kp/en_index.php com.kp edu.kp gov.kp org.kp rep.kp tra.kp // kr : http://en.wikipedia.org/wiki/.kr // see also: http://domain.nida.or.kr/eng/registration.jsp kr ac.kr co.kr es.kr go.kr hs.kr kg.kr mil.kr ms.kr ne.kr or.kr pe.kr re.kr sc.kr // kr geographical names busan.kr chungbuk.kr chungnam.kr daegu.kr daejeon.kr gangwon.kr gwangju.kr gyeongbuk.kr gyeonggi.kr gyeongnam.kr incheon.kr jeju.kr jeonbuk.kr jeonnam.kr seoul.kr ulsan.kr // kw : http://en.wikipedia.org/wiki/.kw *.kw // ky : http://www.icta.ky/da_ky_reg_dom.php // Confirmed by registry 2008-06-17 ky edu.ky gov.ky com.ky org.ky net.ky // kz : http://en.wikipedia.org/wiki/.kz // see also: http://www.nic.kz/rules/index.jsp kz org.kz edu.kz net.kz gov.kz mil.kz com.kz // la : http://en.wikipedia.org/wiki/.la // Submitted by registry 2008-06-10 la int.la net.la info.la edu.la gov.la per.la com.la org.la // see http://www.c.la/ c.la // lb : http://en.wikipedia.org/wiki/.lb // Submitted by registry 2008-06-17 com.lb edu.lb gov.lb net.lb org.lb // lc : http://en.wikipedia.org/wiki/.lc // see also: http://www.nic.lc/rules.htm lc com.lc net.lc co.lc org.lc edu.lc gov.lc // li : http://en.wikipedia.org/wiki/.li li // lk : http://www.nic.lk/seclevpr.html lk gov.lk sch.lk net.lk int.lk com.lk org.lk edu.lk ngo.lk soc.lk web.lk ltd.lk assn.lk grp.lk hotel.lk // lr : http://psg.com/dns/lr/lr.txt // Submitted by registry 2008-06-17 com.lr edu.lr gov.lr org.lr net.lr // ls : http://en.wikipedia.org/wiki/.ls ls co.ls org.ls // lt : http://en.wikipedia.org/wiki/.lt lt // gov.lt : http://www.gov.lt/index_en.php gov.lt // lu : http://www.dns.lu/en/ lu // lv : http://www.nic.lv/DNS/En/generic.php lv com.lv edu.lv gov.lv org.lv mil.lv id.lv net.lv asn.lv conf.lv // ly : http://www.nic.ly/regulations.php ly com.ly net.ly gov.ly plc.ly edu.ly sch.ly med.ly org.ly id.ly // ma : http://en.wikipedia.org/wiki/.ma // http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf ma co.ma net.ma gov.ma org.ma ac.ma press.ma // mc : http://www.nic.mc/ mc tm.mc asso.mc // md : http://en.wikipedia.org/wiki/.md md // me : http://en.wikipedia.org/wiki/.me me co.me net.me org.me edu.me ac.me gov.me its.me priv.me // mg : http://www.nic.mg/tarif.htm mg org.mg nom.mg gov.mg prd.mg tm.mg edu.mg mil.mg com.mg // mh : http://en.wikipedia.org/wiki/.mh mh // mil : http://en.wikipedia.org/wiki/.mil mil // mk : http://en.wikipedia.org/wiki/.mk // see also: http://dns.marnet.net.mk/postapka.php mk com.mk org.mk net.mk edu.mk gov.mk inf.mk name.mk // ml : http://www.gobin.info/domainname/ml-template.doc // see also: http://en.wikipedia.org/wiki/.ml ml com.ml edu.ml gouv.ml gov.ml net.ml org.ml presse.ml // mm : http://en.wikipedia.org/wiki/.mm *.mm // mn : http://en.wikipedia.org/wiki/.mn mn gov.mn edu.mn org.mn // mo : http://www.monic.net.mo/ mo com.mo net.mo org.mo edu.mo gov.mo // mobi : http://en.wikipedia.org/wiki/.mobi mobi // mp : http://www.dot.mp/ // Confirmed by registry 2008-06-17 mp // mq : http://en.wikipedia.org/wiki/.mq mq // mr : http://en.wikipedia.org/wiki/.mr mr gov.mr // ms : http://en.wikipedia.org/wiki/.ms ms // mt : https://www.nic.org.mt/dotmt/ *.mt // mu : http://en.wikipedia.org/wiki/.mu mu com.mu net.mu org.mu gov.mu ac.mu co.mu or.mu // museum : http://about.museum/naming/ // http://index.museum/ museum academy.museum agriculture.museum air.museum airguard.museum alabama.museum alaska.museum amber.museum ambulance.museum american.museum americana.museum americanantiques.museum americanart.museum amsterdam.museum and.museum annefrank.museum anthro.museum anthropology.museum antiques.museum aquarium.museum arboretum.museum archaeological.museum archaeology.museum architecture.museum art.museum artanddesign.museum artcenter.museum artdeco.museum arteducation.museum artgallery.museum arts.museum artsandcrafts.museum asmatart.museum assassination.museum assisi.museum association.museum astronomy.museum atlanta.museum austin.museum australia.museum automotive.museum aviation.museum axis.museum badajoz.museum baghdad.museum bahn.museum bale.museum baltimore.museum barcelona.museum baseball.museum basel.museum baths.museum bauern.museum beauxarts.museum beeldengeluid.museum bellevue.museum bergbau.museum berkeley.museum berlin.museum bern.museum bible.museum bilbao.museum bill.museum birdart.museum birthplace.museum bonn.museum boston.museum botanical.museum botanicalgarden.museum botanicgarden.museum botany.museum brandywinevalley.museum brasil.museum bristol.museum british.museum britishcolumbia.museum broadcast.museum brunel.museum brussel.museum brussels.museum bruxelles.museum building.museum burghof.museum bus.museum bushey.museum cadaques.museum california.museum cambridge.museum can.museum canada.museum capebreton.museum carrier.museum cartoonart.museum casadelamoneda.museum castle.museum castres.museum celtic.museum center.museum chattanooga.museum cheltenham.museum chesapeakebay.museum chicago.museum children.museum childrens.museum childrensgarden.museum chiropractic.museum chocolate.museum christiansburg.museum cincinnati.museum cinema.museum circus.museum civilisation.museum civilization.museum civilwar.museum clinton.museum clock.museum coal.museum coastaldefence.museum cody.museum coldwar.museum collection.museum colonialwilliamsburg.museum coloradoplateau.museum columbia.museum columbus.museum communication.museum communications.museum community.museum computer.museum computerhistory.museum comunicações.museum contemporary.museum contemporaryart.museum convent.museum copenhagen.museum corporation.museum correios-e-telecomunicações.museum corvette.museum costume.museum countryestate.museum county.museum crafts.museum cranbrook.museum creation.museum cultural.museum culturalcenter.museum culture.museum cyber.museum cymru.museum dali.museum dallas.museum database.museum ddr.museum decorativearts.museum delaware.museum delmenhorst.museum denmark.museum depot.museum design.museum detroit.museum dinosaur.museum discovery.museum dolls.museum donostia.museum durham.museum eastafrica.museum eastcoast.museum education.museum educational.museum egyptian.museum eisenbahn.museum elburg.museum elvendrell.museum embroidery.museum encyclopedic.museum england.museum entomology.museum environment.museum environmentalconservation.museum epilepsy.museum essex.museum estate.museum ethnology.museum exeter.museum exhibition.museum family.museum farm.museum farmequipment.museum farmers.museum farmstead.museum field.museum figueres.museum filatelia.museum film.museum fineart.museum finearts.museum finland.museum flanders.museum florida.museum force.museum fortmissoula.museum fortworth.museum foundation.museum francaise.museum frankfurt.museum franziskaner.museum freemasonry.museum freiburg.museum fribourg.museum frog.museum fundacio.museum furniture.museum gallery.museum garden.museum gateway.museum geelvinck.museum gemological.museum geology.museum georgia.museum giessen.museum glas.museum glass.museum gorge.museum grandrapids.museum graz.museum guernsey.museum halloffame.museum hamburg.museum handson.museum harvestcelebration.museum hawaii.museum health.museum heimatunduhren.museum hellas.museum helsinki.museum hembygdsforbund.museum heritage.museum histoire.museum historical.museum historicalsociety.museum historichouses.museum historisch.museum historisches.museum history.museum historyofscience.museum horology.museum house.museum humanities.museum illustration.museum imageandsound.museum indian.museum indiana.museum indianapolis.museum indianmarket.museum intelligence.museum interactive.museum iraq.museum iron.museum isleofman.museum jamison.museum jefferson.museum jerusalem.museum jewelry.museum jewish.museum jewishart.museum jfk.museum journalism.museum judaica.museum judygarland.museum juedisches.museum juif.museum karate.museum karikatur.museum kids.museum koebenhavn.museum koeln.museum kunst.museum kunstsammlung.museum kunstunddesign.museum labor.museum labour.museum lajolla.museum lancashire.museum landes.museum lans.museum läns.museum larsson.museum lewismiller.museum lincoln.museum linz.museum living.museum livinghistory.museum localhistory.museum london.museum losangeles.museum louvre.museum loyalist.museum lucerne.museum luxembourg.museum luzern.museum mad.museum madrid.museum mallorca.museum manchester.museum mansion.museum mansions.museum manx.museum marburg.museum maritime.museum maritimo.museum maryland.museum marylhurst.museum media.museum medical.museum medizinhistorisches.museum meeres.museum memorial.museum mesaverde.museum michigan.museum midatlantic.museum military.museum mill.museum miners.museum mining.museum minnesota.museum missile.museum missoula.museum modern.museum moma.museum money.museum monmouth.museum monticello.museum montreal.museum moscow.museum motorcycle.museum muenchen.museum muenster.museum mulhouse.museum muncie.museum museet.museum museumcenter.museum museumvereniging.museum music.museum national.museum nationalfirearms.museum nationalheritage.museum nativeamerican.museum naturalhistory.museum naturalhistorymuseum.museum naturalsciences.museum nature.museum naturhistorisches.museum natuurwetenschappen.museum naumburg.museum naval.museum nebraska.museum neues.museum newhampshire.museum newjersey.museum newmexico.museum newport.museum newspaper.museum newyork.museum niepce.museum norfolk.museum north.museum nrw.museum nuernberg.museum nuremberg.museum nyc.museum nyny.museum oceanographic.museum oceanographique.museum omaha.museum online.museum ontario.museum openair.museum oregon.museum oregontrail.museum otago.museum oxford.museum pacific.museum paderborn.museum palace.museum paleo.museum palmsprings.museum panama.museum paris.museum pasadena.museum pharmacy.museum philadelphia.museum philadelphiaarea.museum philately.museum phoenix.museum photography.museum pilots.museum pittsburgh.museum planetarium.museum plantation.museum plants.museum plaza.museum portal.museum portland.museum portlligat.museum posts-and-telecommunications.museum preservation.museum presidio.museum press.museum project.museum public.museum pubol.museum quebec.museum railroad.museum railway.museum research.museum resistance.museum riodejaneiro.museum rochester.museum rockart.museum roma.museum russia.museum saintlouis.museum salem.museum salvadordali.museum salzburg.museum sandiego.museum sanfrancisco.museum santabarbara.museum santacruz.museum santafe.museum saskatchewan.museum satx.museum savannahga.museum schlesisches.museum schoenbrunn.museum schokoladen.museum school.museum schweiz.museum science.museum scienceandhistory.museum scienceandindustry.museum sciencecenter.museum sciencecenters.museum science-fiction.museum sciencehistory.museum sciences.museum sciencesnaturelles.museum scotland.museum seaport.museum settlement.museum settlers.museum shell.museum sherbrooke.museum sibenik.museum silk.museum ski.museum skole.museum society.museum sologne.museum soundandvision.museum southcarolina.museum southwest.museum space.museum spy.museum square.museum stadt.museum stalbans.museum starnberg.museum state.museum stateofdelaware.museum station.museum steam.museum steiermark.museum stjohn.museum stockholm.museum stpetersburg.museum stuttgart.museum suisse.museum surgeonshall.museum surrey.museum svizzera.museum sweden.museum sydney.museum tank.museum tcm.museum technology.museum telekommunikation.museum television.museum texas.museum textile.museum theater.museum time.museum timekeeping.museum topology.museum torino.museum touch.museum town.museum transport.museum tree.museum trolley.museum trust.museum trustee.museum uhren.museum ulm.museum undersea.museum university.museum usa.museum usantiques.museum usarts.museum uscountryestate.museum usculture.museum usdecorativearts.museum usgarden.museum ushistory.museum ushuaia.museum uslivinghistory.museum utah.museum uvic.museum valley.museum vantaa.museum versailles.museum viking.museum village.museum virginia.museum virtual.museum virtuel.museum vlaanderen.museum volkenkunde.museum wales.museum wallonie.museum war.museum washingtondc.museum watchandclock.museum watch-and-clock.museum western.museum westfalen.museum whaling.museum wildlife.museum williamsburg.museum windmill.museum workshop.museum york.museum yorkshire.museum yosemite.museum youth.museum zoological.museum zoology.museum ירושלים.museum иком.museum // mv : http://en.wikipedia.org/wiki/.mv // "mv" included because, contra Wikipedia, google.mv exists. mv aero.mv biz.mv com.mv coop.mv edu.mv gov.mv info.mv int.mv mil.mv museum.mv name.mv net.mv org.mv pro.mv // mw : http://www.registrar.mw/ mw ac.mw biz.mw co.mw com.mw coop.mw edu.mw gov.mw int.mw museum.mw net.mw org.mw // mx : http://www.nic.mx/ // Submitted by registry 2008-06-19 mx com.mx org.mx gob.mx edu.mx net.mx // my : http://www.mynic.net.my/ my com.my net.my org.my gov.my edu.my mil.my name.my // mz : http://www.gobin.info/domainname/mz-template.doc *.mz // na : http://www.na-nic.com.na/ // http://www.info.na/domain/ na info.na pro.na name.na school.na or.na dr.na us.na mx.na ca.na in.na cc.na tv.na ws.na mobi.na co.na com.na org.na // name : has 2nd-level tlds, but there's no list of them name // nc : http://www.cctld.nc/ nc asso.nc // ne : http://en.wikipedia.org/wiki/.ne ne // net : http://en.wikipedia.org/wiki/.net net // CentralNic names : http://www.centralnic.com/names/domains // Submitted by registry 2008-06-17 gb.net jp.net se.net uk.net // ZaNiC names : http://www.za.net/ // Confirmed by registry 2009-10-03 za.net // nf : http://en.wikipedia.org/wiki/.nf nf com.nf net.nf per.nf rec.nf web.nf arts.nf firm.nf info.nf other.nf store.nf // ng : http://psg.com/dns/ng/ // Submitted by registry 2008-06-17 ac.ng com.ng edu.ng gov.ng net.ng org.ng // ni : http://www.nic.ni/dominios.htm *.ni // nl : http://www.domain-registry.nl/ace.php/c,728,122,,,,Home.html // Confirmed by registry (with technical // reservations) 2008-06-08 nl // BV.nl will be a registry for dutch BV's (besloten vennootschap) bv.nl // the co.nl domain is managed by CoDNS B.V. Added 2010-05-23. co.nl // no : http://www.norid.no/regelverk/index.en.html // The Norwegian registry has declined to notify us of updates. The web pages // referenced below are the official source of the data. There is also an // announce mailing list: // https://postlister.uninett.no/sympa/info/norid-diskusjon no // Norid generic domains : http://www.norid.no/regelverk/vedlegg-c.en.html fhs.no vgs.no fylkesbibl.no folkebibl.no museum.no idrett.no priv.no // Non-Norid generic domains : http://www.norid.no/regelverk/vedlegg-d.en.html mil.no stat.no dep.no kommune.no herad.no // no geographical names : http://www.norid.no/regelverk/vedlegg-b.en.html // counties aa.no ah.no bu.no fm.no hl.no hm.no jan-mayen.no mr.no nl.no nt.no of.no ol.no oslo.no rl.no sf.no st.no svalbard.no tm.no tr.no va.no vf.no // primary and lower secondary schools per county gs.aa.no gs.ah.no gs.bu.no gs.fm.no gs.hl.no gs.hm.no gs.jan-mayen.no gs.mr.no gs.nl.no gs.nt.no gs.of.no gs.ol.no gs.oslo.no gs.rl.no gs.sf.no gs.st.no gs.svalbard.no gs.tm.no gs.tr.no gs.va.no gs.vf.no // cities akrehamn.no åkrehamn.no algard.no ålgård.no arna.no brumunddal.no bryne.no bronnoysund.no brønnøysund.no drobak.no drøbak.no egersund.no fetsund.no floro.no florø.no fredrikstad.no hokksund.no honefoss.no hønefoss.no jessheim.no jorpeland.no jørpeland.no kirkenes.no kopervik.no krokstadelva.no langevag.no langevåg.no leirvik.no mjondalen.no mjøndalen.no mo-i-rana.no mosjoen.no mosjøen.no nesoddtangen.no orkanger.no osoyro.no osøyro.no raholt.no råholt.no sandnessjoen.no sandnessjøen.no skedsmokorset.no slattum.no spjelkavik.no stathelle.no stavern.no stjordalshalsen.no stjørdalshalsen.no tananger.no tranby.no vossevangen.no // communities afjord.no åfjord.no agdenes.no al.no ål.no alesund.no ålesund.no alstahaug.no alta.no áltá.no alaheadju.no álaheadju.no alvdal.no amli.no åmli.no amot.no åmot.no andebu.no andoy.no andøy.no andasuolo.no ardal.no årdal.no aremark.no arendal.no ås.no aseral.no åseral.no asker.no askim.no askvoll.no askoy.no askøy.no asnes.no åsnes.no audnedaln.no aukra.no aure.no aurland.no aurskog-holand.no aurskog-høland.no austevoll.no austrheim.no averoy.no averøy.no balestrand.no ballangen.no balat.no bálát.no balsfjord.no bahccavuotna.no báhccavuotna.no bamble.no bardu.no beardu.no beiarn.no bajddar.no bájddar.no baidar.no báidár.no berg.no bergen.no berlevag.no berlevåg.no bearalvahki.no bearalváhki.no bindal.no birkenes.no bjarkoy.no bjarkøy.no bjerkreim.no bjugn.no bodo.no bodø.no badaddja.no bådåddjå.no budejju.no bokn.no bremanger.no bronnoy.no brønnøy.no bygland.no bykle.no barum.no bærum.no bo.telemark.no bø.telemark.no bo.nordland.no bø.nordland.no bievat.no bievát.no bomlo.no bømlo.no batsfjord.no båtsfjord.no bahcavuotna.no báhcavuotna.no dovre.no drammen.no drangedal.no dyroy.no dyrøy.no donna.no dønna.no eid.no eidfjord.no eidsberg.no eidskog.no eidsvoll.no eigersund.no elverum.no enebakk.no engerdal.no etne.no etnedal.no evenes.no evenassi.no evenášši.no evje-og-hornnes.no farsund.no fauske.no fuossko.no fuoisku.no fedje.no fet.no finnoy.no finnøy.no fitjar.no fjaler.no fjell.no flakstad.no flatanger.no flekkefjord.no flesberg.no flora.no fla.no flå.no folldal.no forsand.no fosnes.no frei.no frogn.no froland.no frosta.no frana.no fræna.no froya.no frøya.no fusa.no fyresdal.no forde.no førde.no gamvik.no gangaviika.no gáŋgaviika.no gaular.no gausdal.no gildeskal.no gildeskål.no giske.no gjemnes.no gjerdrum.no gjerstad.no gjesdal.no gjovik.no gjøvik.no gloppen.no gol.no gran.no grane.no granvin.no gratangen.no grimstad.no grong.no kraanghke.no kråanghke.no grue.no gulen.no hadsel.no halden.no halsa.no hamar.no hamaroy.no habmer.no hábmer.no hapmir.no hápmir.no hammerfest.no hammarfeasta.no hámmárfeasta.no haram.no hareid.no harstad.no hasvik.no aknoluokta.no ákŋoluokta.no hattfjelldal.no aarborte.no haugesund.no hemne.no hemnes.no hemsedal.no heroy.more-og-romsdal.no herøy.møre-og-romsdal.no heroy.nordland.no herøy.nordland.no hitra.no hjartdal.no hjelmeland.no hobol.no hobøl.no hof.no hol.no hole.no holmestrand.no holtalen.no holtålen.no hornindal.no horten.no hurdal.no hurum.no hvaler.no hyllestad.no hagebostad.no hægebostad.no hoyanger.no høyanger.no hoylandet.no høylandet.no ha.no hå.no ibestad.no inderoy.no inderøy.no iveland.no jevnaker.no jondal.no jolster.no jølster.no karasjok.no karasjohka.no kárášjohka.no karlsoy.no galsa.no gálsá.no karmoy.no karmøy.no kautokeino.no guovdageaidnu.no klepp.no klabu.no klæbu.no kongsberg.no kongsvinger.no kragero.no kragerø.no kristiansand.no kristiansund.no krodsherad.no krødsherad.no kvalsund.no rahkkeravju.no ráhkkerávju.no kvam.no kvinesdal.no kvinnherad.no kviteseid.no kvitsoy.no kvitsøy.no kvafjord.no kvæfjord.no giehtavuoatna.no kvanangen.no kvænangen.no navuotna.no návuotna.no kafjord.no kåfjord.no gaivuotna.no gáivuotna.no larvik.no lavangen.no lavagis.no loabat.no loabát.no lebesby.no davvesiida.no leikanger.no leirfjord.no leka.no leksvik.no lenvik.no leangaviika.no leaŋgaviika.no lesja.no levanger.no lier.no lierne.no lillehammer.no lillesand.no lindesnes.no lindas.no lindås.no lom.no loppa.no lahppi.no láhppi.no lund.no lunner.no luroy.no lurøy.no luster.no lyngdal.no lyngen.no ivgu.no lardal.no lerdal.no lærdal.no lodingen.no lødingen.no lorenskog.no lørenskog.no loten.no løten.no malvik.no masoy.no måsøy.no muosat.no muosát.no mandal.no marker.no marnardal.no masfjorden.no meland.no meldal.no melhus.no meloy.no meløy.no meraker.no meråker.no moareke.no moåreke.no midsund.no midtre-gauldal.no modalen.no modum.no molde.no moskenes.no moss.no mosvik.no malselv.no målselv.no malatvuopmi.no málatvuopmi.no namdalseid.no aejrie.no namsos.no namsskogan.no naamesjevuemie.no nååmesjevuemie.no laakesvuemie.no nannestad.no narvik.no narviika.no naustdal.no nedre-eiker.no nes.akershus.no nes.buskerud.no nesna.no nesodden.no nesseby.no unjarga.no unjárga.no nesset.no nissedal.no nittedal.no nord-aurdal.no nord-fron.no nord-odal.no norddal.no nordkapp.no davvenjarga.no davvenjárga.no nordre-land.no nordreisa.no raisa.no ráisa.no nore-og-uvdal.no notodden.no naroy.no nærøy.no notteroy.no nøtterøy.no odda.no oksnes.no øksnes.no oppdal.no oppegard.no oppegård.no orkdal.no orland.no ørland.no orskog.no ørskog.no orsta.no ørsta.no os.hedmark.no os.hordaland.no osen.no osteroy.no osterøy.no ostre-toten.no østre-toten.no overhalla.no ovre-eiker.no øvre-eiker.no oyer.no øyer.no oygarden.no øygarden.no oystre-slidre.no øystre-slidre.no porsanger.no porsangu.no porsáŋgu.no porsgrunn.no radoy.no radøy.no rakkestad.no rana.no ruovat.no randaberg.no rauma.no rendalen.no rennebu.no rennesoy.no rennesøy.no rindal.no ringebu.no ringerike.no ringsaker.no rissa.no risor.no risør.no roan.no rollag.no rygge.no ralingen.no rælingen.no rodoy.no rødøy.no romskog.no rømskog.no roros.no røros.no rost.no røst.no royken.no røyken.no royrvik.no røyrvik.no rade.no råde.no salangen.no siellak.no saltdal.no salat.no sálát.no sálat.no samnanger.no sande.more-og-romsdal.no sande.møre-og-romsdal.no sande.vestfold.no sandefjord.no sandnes.no sandoy.no sandøy.no sarpsborg.no sauda.no sauherad.no sel.no selbu.no selje.no seljord.no sigdal.no siljan.no sirdal.no skaun.no skedsmo.no ski.no skien.no skiptvet.no skjervoy.no skjervøy.no skierva.no skiervá.no skjak.no skjåk.no skodje.no skanland.no skånland.no skanit.no skánit.no smola.no smøla.no snillfjord.no snasa.no snåsa.no snoasa.no snaase.no snåase.no sogndal.no sokndal.no sola.no solund.no songdalen.no sortland.no spydeberg.no stange.no stavanger.no steigen.no steinkjer.no stjordal.no stjørdal.no stokke.no stor-elvdal.no stord.no stordal.no storfjord.no omasvuotna.no strand.no stranda.no stryn.no sula.no suldal.no sund.no sunndal.no surnadal.no sveio.no svelvik.no sykkylven.no sogne.no søgne.no somna.no sømna.no sondre-land.no søndre-land.no sor-aurdal.no sør-aurdal.no sor-fron.no sør-fron.no sor-odal.no sør-odal.no sor-varanger.no sør-varanger.no matta-varjjat.no mátta-várjjat.no sorfold.no sørfold.no sorreisa.no sørreisa.no sorum.no sørum.no tana.no deatnu.no time.no tingvoll.no tinn.no tjeldsund.no dielddanuorri.no tjome.no tjøme.no tokke.no tolga.no torsken.no tranoy.no tranøy.no tromso.no tromsø.no tromsa.no romsa.no trondheim.no troandin.no trysil.no trana.no træna.no trogstad.no trøgstad.no tvedestrand.no tydal.no tynset.no tysfjord.no divtasvuodna.no divttasvuotna.no tysnes.no tysvar.no tysvær.no tonsberg.no tønsberg.no ullensaker.no ullensvang.no ulvik.no utsira.no vadso.no vadsø.no cahcesuolo.no čáhcesuolo.no vaksdal.no valle.no vang.no vanylven.no vardo.no vardø.no varggat.no várggát.no vefsn.no vaapste.no vega.no vegarshei.no vegårshei.no vennesla.no verdal.no verran.no vestby.no vestnes.no vestre-slidre.no vestre-toten.no vestvagoy.no vestvågøy.no vevelstad.no vik.no vikna.no vindafjord.no volda.no voss.no varoy.no værøy.no vagan.no vågan.no voagat.no vagsoy.no vågsøy.no vaga.no vågå.no valer.ostfold.no våler.østfold.no valer.hedmark.no våler.hedmark.no // the co.no domain is managed by CoDNS B.V. Added 2010-05-23. co.no // np : http://www.mos.com.np/register.html *.np // nr : http://cenpac.net.nr/dns/index.html // Confirmed by registry 2008-06-17 nr biz.nr info.nr gov.nr edu.nr org.nr net.nr com.nr // nu : http://en.wikipedia.org/wiki/.nu nu // nz : http://en.wikipedia.org/wiki/.nz *.nz // om : http://en.wikipedia.org/wiki/.om *.om !mediaphone.om !nawrastelecom.om !nawras.om !omanmobile.om !omanpost.om !omantel.om !rakpetroleum.om !siemens.om !songfest.om !statecouncil.om // org : http://en.wikipedia.org/wiki/.org org // CentralNic names : http://www.centralnic.com/names/domains // Submitted by registry 2008-06-17 // Updated by registry 2011-05-27 ae.org us.org // ZaNiC names : http://www.za.net/ // Confirmed by registry 2009-10-03 za.org // pa : http://www.nic.pa/ // Some additional second level "domains" resolve directly as hostnames, such as // pannet.pa, so we add a rule for "pa". pa ac.pa gob.pa com.pa org.pa sld.pa edu.pa net.pa ing.pa abo.pa med.pa nom.pa // pe : https://www.nic.pe/InformeFinalComision.pdf pe edu.pe gob.pe nom.pe mil.pe org.pe com.pe net.pe // pf : http://www.gobin.info/domainname/formulaire-pf.pdf pf com.pf org.pf edu.pf // pg : http://en.wikipedia.org/wiki/.pg *.pg // ph : http://www.domains.ph/FAQ2.asp // Submitted by registry 2008-06-13 ph com.ph net.ph org.ph gov.ph edu.ph ngo.ph mil.ph i.ph // pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK pk com.pk net.pk edu.pk org.pk fam.pk biz.pk web.pk gov.pk gob.pk gok.pk gon.pk gop.pk gos.pk info.pk // pl : http://www.dns.pl/english/ pl // NASK functional domains (nask.pl / dns.pl) : http://www.dns.pl/english/dns-funk.html aid.pl agro.pl atm.pl auto.pl biz.pl com.pl edu.pl gmina.pl gsm.pl info.pl mail.pl miasta.pl media.pl mil.pl net.pl nieruchomosci.pl nom.pl org.pl pc.pl powiat.pl priv.pl realestate.pl rel.pl sex.pl shop.pl sklep.pl sos.pl szkola.pl targi.pl tm.pl tourism.pl travel.pl turystyka.pl // ICM functional domains (icm.edu.pl) 6bone.pl art.pl mbone.pl // Government domains (administred by ippt.gov.pl) gov.pl uw.gov.pl um.gov.pl ug.gov.pl upow.gov.pl starostwo.gov.pl so.gov.pl sr.gov.pl po.gov.pl pa.gov.pl // other functional domains ngo.pl irc.pl usenet.pl // NASK geographical domains : http://www.dns.pl/english/dns-regiony.html augustow.pl babia-gora.pl bedzin.pl beskidy.pl bialowieza.pl bialystok.pl bielawa.pl bieszczady.pl boleslawiec.pl bydgoszcz.pl bytom.pl cieszyn.pl czeladz.pl czest.pl dlugoleka.pl elblag.pl elk.pl glogow.pl gniezno.pl gorlice.pl grajewo.pl ilawa.pl jaworzno.pl jelenia-gora.pl jgora.pl kalisz.pl kazimierz-dolny.pl karpacz.pl kartuzy.pl kaszuby.pl katowice.pl kepno.pl ketrzyn.pl klodzko.pl kobierzyce.pl kolobrzeg.pl konin.pl konskowola.pl kutno.pl lapy.pl lebork.pl legnica.pl lezajsk.pl limanowa.pl lomza.pl lowicz.pl lubin.pl lukow.pl malbork.pl malopolska.pl mazowsze.pl mazury.pl mielec.pl mielno.pl mragowo.pl naklo.pl nowaruda.pl nysa.pl olawa.pl olecko.pl olkusz.pl olsztyn.pl opoczno.pl opole.pl ostroda.pl ostroleka.pl ostrowiec.pl ostrowwlkp.pl pila.pl pisz.pl podhale.pl podlasie.pl polkowice.pl pomorze.pl pomorskie.pl prochowice.pl pruszkow.pl przeworsk.pl pulawy.pl radom.pl rawa-maz.pl rybnik.pl rzeszow.pl sanok.pl sejny.pl siedlce.pl slask.pl slupsk.pl sosnowiec.pl stalowa-wola.pl skoczow.pl starachowice.pl stargard.pl suwalki.pl swidnica.pl swiebodzin.pl swinoujscie.pl szczecin.pl szczytno.pl tarnobrzeg.pl tgory.pl turek.pl tychy.pl ustka.pl walbrzych.pl warmia.pl warszawa.pl waw.pl wegrow.pl wielun.pl wlocl.pl wloclawek.pl wodzislaw.pl wolomin.pl wroclaw.pl zachpomor.pl zagan.pl zarow.pl zgora.pl zgorzelec.pl // TASK geographical domains (www.task.gda.pl/uslugi/dns) gda.pl gdansk.pl gdynia.pl med.pl sopot.pl // other geographical domains gliwice.pl krakow.pl poznan.pl wroc.pl zakopane.pl // co.pl : Mainseek Sp. z o.o. http://www.co.pl co.pl // pn : http://www.government.pn/PnRegistry/policies.htm pn gov.pn co.pn org.pn edu.pn net.pn // pr : http://www.nic.pr/index.asp?f=1 pr com.pr net.pr org.pr gov.pr edu.pr isla.pr pro.pr biz.pr info.pr name.pr // these aren't mentioned on nic.pr, but on http://en.wikipedia.org/wiki/.pr est.pr prof.pr ac.pr // pro : http://www.nic.pro/support_faq.htm pro aca.pro bar.pro cpa.pro jur.pro law.pro med.pro eng.pro // ps : http://en.wikipedia.org/wiki/.ps // http://www.nic.ps/registration/policy.html#reg ps edu.ps gov.ps sec.ps plo.ps com.ps org.ps net.ps // pt : http://online.dns.pt/dns/start_dns pt net.pt gov.pt org.pt edu.pt int.pt publ.pt com.pt nome.pt // pw : http://en.wikipedia.org/wiki/.pw pw co.pw ne.pw or.pw ed.pw go.pw belau.pw // py : http://www.nic.py/faq_a.html#faq_b *.py // qa : http://domains.qa/en/ qa com.qa edu.qa gov.qa mil.qa name.qa net.qa org.qa sch.qa // re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs re com.re asso.re nom.re // ro : http://www.rotld.ro/ ro com.ro org.ro tm.ro nt.ro nom.ro info.ro rec.ro arts.ro firm.ro store.ro www.ro // rs : http://en.wikipedia.org/wiki/.rs rs co.rs org.rs edu.rs ac.rs gov.rs in.rs // ru : http://www.cctld.ru/ru/docs/aktiv_8.php // Industry domains ru ac.ru com.ru edu.ru int.ru net.ru org.ru pp.ru // Geographical domains adygeya.ru altai.ru amur.ru arkhangelsk.ru astrakhan.ru bashkiria.ru belgorod.ru bir.ru bryansk.ru buryatia.ru cbg.ru chel.ru chelyabinsk.ru chita.ru chukotka.ru chuvashia.ru dagestan.ru dudinka.ru e-burg.ru grozny.ru irkutsk.ru ivanovo.ru izhevsk.ru jar.ru joshkar-ola.ru kalmykia.ru kaluga.ru kamchatka.ru karelia.ru kazan.ru kchr.ru kemerovo.ru khabarovsk.ru khakassia.ru khv.ru kirov.ru koenig.ru komi.ru kostroma.ru krasnoyarsk.ru kuban.ru kurgan.ru kursk.ru lipetsk.ru magadan.ru mari.ru mari-el.ru marine.ru mordovia.ru mosreg.ru msk.ru murmansk.ru nalchik.ru nnov.ru nov.ru novosibirsk.ru nsk.ru omsk.ru orenburg.ru oryol.ru palana.ru penza.ru perm.ru pskov.ru ptz.ru rnd.ru ryazan.ru sakhalin.ru samara.ru saratov.ru simbirsk.ru smolensk.ru spb.ru stavropol.ru stv.ru surgut.ru tambov.ru tatarstan.ru tom.ru tomsk.ru tsaritsyn.ru tsk.ru tula.ru tuva.ru tver.ru tyumen.ru udm.ru udmurtia.ru ulan-ude.ru vladikavkaz.ru vladimir.ru vladivostok.ru volgograd.ru vologda.ru voronezh.ru vrn.ru vyatka.ru yakutia.ru yamal.ru yaroslavl.ru yekaterinburg.ru yuzhno-sakhalinsk.ru // More geographical domains amursk.ru baikal.ru cmw.ru fareast.ru jamal.ru kms.ru k-uralsk.ru kustanai.ru kuzbass.ru magnitka.ru mytis.ru nakhodka.ru nkz.ru norilsk.ru oskol.ru pyatigorsk.ru rubtsovsk.ru snz.ru syzran.ru vdonsk.ru zgrad.ru // State domains gov.ru mil.ru // Technical domains test.ru // rw : http://www.nic.rw/cgi-bin/policy.pl rw gov.rw net.rw edu.rw ac.rw com.rw co.rw int.rw mil.rw gouv.rw // sa : http://www.nic.net.sa/ sa com.sa net.sa org.sa gov.sa med.sa pub.sa edu.sa sch.sa // sb : http://www.sbnic.net.sb/ // Submitted by registry 2008-06-08 sb com.sb edu.sb gov.sb net.sb org.sb // sc : http://www.nic.sc/ sc com.sc gov.sc net.sc org.sc edu.sc // sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm // Submitted by registry 2008-06-17 sd com.sd net.sd org.sd edu.sd med.sd gov.sd info.sd // se : http://en.wikipedia.org/wiki/.se // Submitted by registry 2008-06-24 se a.se ac.se b.se bd.se brand.se c.se d.se e.se f.se fh.se fhsk.se fhv.se g.se h.se i.se k.se komforb.se kommunalforbund.se komvux.se l.se lanbib.se m.se n.se naturbruksgymn.se o.se org.se p.se parti.se pp.se press.se r.se s.se sshn.se t.se tm.se u.se w.se x.se y.se z.se // sg : http://www.nic.net.sg/sub_policies_agreement/2ld.html sg com.sg net.sg org.sg gov.sg edu.sg per.sg // sh : http://www.nic.sh/rules.html // list of 2nd level domains ? sh // si : http://en.wikipedia.org/wiki/.si si // sj : No registrations at this time. // Submitted by registry 2008-06-16 // sk : http://en.wikipedia.org/wiki/.sk // list of 2nd level domains ? sk // sl : http://www.nic.sl // Submitted by registry 2008-06-12 sl com.sl net.sl edu.sl gov.sl org.sl // sm : http://en.wikipedia.org/wiki/.sm sm // sn : http://en.wikipedia.org/wiki/.sn sn art.sn com.sn edu.sn gouv.sn org.sn perso.sn univ.sn // so : http://www.soregistry.com/ so com.so net.so org.so // sr : http://en.wikipedia.org/wiki/.sr sr // st : http://www.nic.st/html/policyrules/ st co.st com.st consulado.st edu.st embaixada.st gov.st mil.st net.st org.st principe.st saotome.st store.st // su : http://en.wikipedia.org/wiki/.su su // sv : http://www.svnet.org.sv/svpolicy.html *.sv // sy : http://en.wikipedia.org/wiki/.sy // see also: http://www.gobin.info/domainname/sy.doc sy edu.sy gov.sy net.sy mil.sy com.sy org.sy // sz : http://en.wikipedia.org/wiki/.sz // http://www.sispa.org.sz/ sz co.sz ac.sz org.sz // tc : http://en.wikipedia.org/wiki/.tc tc // td : http://en.wikipedia.org/wiki/.td td // tel: http://en.wikipedia.org/wiki/.tel // http://www.telnic.org/ tel // tf : http://en.wikipedia.org/wiki/.tf tf // tg : http://en.wikipedia.org/wiki/.tg // http://www.nic.tg/nictg/index.php implies no reserved 2nd-level domains, // although this contradicts wikipedia. tg // th : http://en.wikipedia.org/wiki/.th // Submitted by registry 2008-06-17 th ac.th co.th go.th in.th mi.th net.th or.th // tj : http://www.nic.tj/policy.htm tj ac.tj biz.tj co.tj com.tj edu.tj go.tj gov.tj int.tj mil.tj name.tj net.tj nic.tj org.tj test.tj web.tj // tk : http://en.wikipedia.org/wiki/.tk tk // tl : http://en.wikipedia.org/wiki/.tl tl gov.tl // tm : http://www.nic.tm/rules.html // list of 2nd level tlds ? tm // tn : http://en.wikipedia.org/wiki/.tn // http://whois.ati.tn/ tn com.tn ens.tn fin.tn gov.tn ind.tn intl.tn nat.tn net.tn org.tn info.tn perso.tn tourism.tn edunet.tn rnrt.tn rns.tn rnu.tn mincom.tn agrinet.tn defense.tn turen.tn // to : http://en.wikipedia.org/wiki/.to // Submitted by registry 2008-06-17 to com.to gov.to net.to org.to edu.to mil.to // tr : http://en.wikipedia.org/wiki/.tr *.tr !nic.tr // Used by government in the TRNC // http://en.wikipedia.org/wiki/.nc.tr gov.nc.tr // travel : http://en.wikipedia.org/wiki/.travel travel // tt : http://www.nic.tt/ tt co.tt com.tt org.tt net.tt biz.tt info.tt pro.tt int.tt coop.tt jobs.tt mobi.tt travel.tt museum.tt aero.tt name.tt gov.tt edu.tt // tv : http://en.wikipedia.org/wiki/.tv // Not listing any 2LDs as reserved since none seem to exist in practice, // Wikipedia notwithstanding. tv // tw : http://en.wikipedia.org/wiki/.tw tw edu.tw gov.tw mil.tw com.tw net.tw org.tw idv.tw game.tw ebiz.tw club.tw 網路.tw 組織.tw 商業.tw // tz : http://en.wikipedia.org/wiki/.tz // Submitted by registry 2008-06-17 // Updated from http://www.tznic.or.tz/index.php/domains.html 2010-10-25 ac.tz co.tz go.tz mil.tz ne.tz or.tz sc.tz // ua : http://www.nic.net.ua/ ua com.ua edu.ua gov.ua in.ua net.ua org.ua // ua geo-names cherkassy.ua chernigov.ua chernovtsy.ua ck.ua cn.ua crimea.ua cv.ua dn.ua dnepropetrovsk.ua donetsk.ua dp.ua if.ua ivano-frankivsk.ua kh.ua kharkov.ua kherson.ua khmelnitskiy.ua kiev.ua kirovograd.ua km.ua kr.ua ks.ua kv.ua lg.ua lugansk.ua lutsk.ua lviv.ua mk.ua nikolaev.ua od.ua odessa.ua pl.ua poltava.ua rovno.ua rv.ua sebastopol.ua sumy.ua te.ua ternopil.ua uzhgorod.ua vinnica.ua vn.ua zaporizhzhe.ua zp.ua zhitomir.ua zt.ua // Private registries in .ua co.ua pp.ua // ug : http://www.registry.co.ug/ ug co.ug ac.ug sc.ug go.ug ne.ug or.ug // uk : http://en.wikipedia.org/wiki/.uk *.uk *.sch.uk !bl.uk !british-library.uk !icnet.uk !jet.uk !mod.uk !nel.uk !nhs.uk !nic.uk !nls.uk !national-library-scotland.uk !parliament.uk !police.uk // us : http://en.wikipedia.org/wiki/.us us dni.us fed.us isa.us kids.us nsn.us // us geographic names ak.us al.us ar.us as.us az.us ca.us co.us ct.us dc.us de.us fl.us ga.us gu.us hi.us ia.us id.us il.us in.us ks.us ky.us la.us ma.us md.us me.us mi.us mn.us mo.us ms.us mt.us nc.us nd.us ne.us nh.us nj.us nm.us nv.us ny.us oh.us ok.us or.us pa.us pr.us ri.us sc.us sd.us tn.us tx.us ut.us vi.us vt.us va.us wa.us wi.us wv.us wy.us // The registrar notes several more specific domains available in each state, // such as state.*.us, dst.*.us, etc., but resolution of these is somewhat // haphazard; in some states these domains resolve as addresses, while in others // only subdomains are available, or even nothing at all. We include the // most common ones where it's clear that different sites are different // entities. k12.ak.us k12.al.us k12.ar.us k12.as.us k12.az.us k12.ca.us k12.co.us k12.ct.us k12.dc.us k12.de.us k12.fl.us k12.ga.us k12.gu.us // k12.hi.us Hawaii has a state-wide DOE login: bug 614565 k12.ia.us k12.id.us k12.il.us k12.in.us k12.ks.us k12.ky.us k12.la.us k12.ma.us k12.md.us k12.me.us k12.mi.us k12.mn.us k12.mo.us k12.ms.us k12.mt.us k12.nc.us k12.nd.us k12.ne.us k12.nh.us k12.nj.us k12.nm.us k12.nv.us k12.ny.us k12.oh.us k12.ok.us k12.or.us k12.pa.us k12.pr.us k12.ri.us k12.sc.us k12.sd.us k12.tn.us k12.tx.us k12.ut.us k12.vi.us k12.vt.us k12.va.us k12.wa.us k12.wi.us k12.wv.us k12.wy.us cc.ak.us cc.al.us cc.ar.us cc.as.us cc.az.us cc.ca.us cc.co.us cc.ct.us cc.dc.us cc.de.us cc.fl.us cc.ga.us cc.gu.us cc.hi.us cc.ia.us cc.id.us cc.il.us cc.in.us cc.ks.us cc.ky.us cc.la.us cc.ma.us cc.md.us cc.me.us cc.mi.us cc.mn.us cc.mo.us cc.ms.us cc.mt.us cc.nc.us cc.nd.us cc.ne.us cc.nh.us cc.nj.us cc.nm.us cc.nv.us cc.ny.us cc.oh.us cc.ok.us cc.or.us cc.pa.us cc.pr.us cc.ri.us cc.sc.us cc.sd.us cc.tn.us cc.tx.us cc.ut.us cc.vi.us cc.vt.us cc.va.us cc.wa.us cc.wi.us cc.wv.us cc.wy.us lib.ak.us lib.al.us lib.ar.us lib.as.us lib.az.us lib.ca.us lib.co.us lib.ct.us lib.dc.us lib.de.us lib.fl.us lib.ga.us lib.gu.us lib.hi.us lib.ia.us lib.id.us lib.il.us lib.in.us lib.ks.us lib.ky.us lib.la.us lib.ma.us lib.md.us lib.me.us lib.mi.us lib.mn.us lib.mo.us lib.ms.us lib.mt.us lib.nc.us lib.nd.us lib.ne.us lib.nh.us lib.nj.us lib.nm.us lib.nv.us lib.ny.us lib.oh.us lib.ok.us lib.or.us lib.pa.us lib.pr.us lib.ri.us lib.sc.us lib.sd.us lib.tn.us lib.tx.us lib.ut.us lib.vi.us lib.vt.us lib.va.us lib.wa.us lib.wi.us lib.wv.us lib.wy.us // k12.ma.us contains school districts in Massachusetts. The 4LDs are // managed indepedently except for private (PVT), charter (CHTR) and // parochial (PAROCH) schools. Those are delegated dorectly to the // 5LD operators. pvt.k12.ma.us chtr.k12.ma.us paroch.k12.ma.us // uy : http://www.antel.com.uy/ *.uy // uz : http://www.reg.uz/registerr.html // are there other 2nd level tlds ? uz com.uz co.uz // va : http://en.wikipedia.org/wiki/.va va // vc : http://en.wikipedia.org/wiki/.vc // Submitted by registry 2008-06-13 vc com.vc net.vc org.vc gov.vc mil.vc edu.vc // ve : http://registro.nic.ve/nicve/registro/index.html *.ve // vg : http://en.wikipedia.org/wiki/.vg vg // vi : http://www.nic.vi/newdomainform.htm // http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other // TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they // are available for registration (which they do not seem to be). vi co.vi com.vi k12.vi net.vi org.vi // vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp vn com.vn net.vn org.vn edu.vn gov.vn int.vn ac.vn biz.vn info.vn name.vn pro.vn health.vn // vu : http://en.wikipedia.org/wiki/.vu // list of 2nd level tlds ? vu // ws : http://en.wikipedia.org/wiki/.ws // http://samoanic.ws/index.dhtml ws com.ws net.ws org.ws gov.ws edu.ws // IDN ccTLDs // Please sort by ISO 3166 ccTLD, then punicode string // when submitting patches and follow this format: // ("" ) : // [optional sponsoring org] // // xn--mgbaam7a8h ("Emerat" Arabic) : AE //http://nic.ae/english/arabicdomain/rules.jsp امارات // xn--54b7fta0cc ("Bangla" Bangla) : BD বাংলা // xn--fiqs8s ("China" Chinese-Han-Simplified <.Zhonggou>) : CN // CNNIC // http://cnnic.cn/html/Dir/2005/10/11/3218.htm 中国 // xn--fiqz9s ("China" Chinese-Han-Traditional <.Zhonggou>) : CN // CNNIC // http://cnnic.cn/html/Dir/2005/10/11/3218.htm 中國 // xn--lgbbat1ad8j ("Algeria / Al Jazair" Arabic) : DZ الجزائر // xn--wgbh1c ("Egypt" Arabic .masr) : EG // http://www.dotmasr.eg/ مصر // xn--node ("ge" Georgian (Mkhedruli)) : GE გე // xn--j6w193g ("Hong Kong" Chinese-Han) : HK // https://www2.hkirc.hk/register/rules.jsp 香港 // xn--h2brj9c ("Bharat" Devanagari) : IN // India भारत // xn--mgbbh1a71e ("Bharat" Arabic) : IN // India بھارت // xn--fpcrj9c3d ("Bharat" Telugu) : IN // India భారత్ // xn--gecrj9c ("Bharat" Gujarati) : IN // India ભારત // xn--s9brj9c ("Bharat" Gurmukhi) : IN // India ਭਾਰਤ // xn--45brj9c ("Bharat" Bengali) : IN // India ভারত // xn--xkc2dl3a5ee0h ("India" Tamil) : IN // India இந்தியா // xn--mgba3a4f16a ("Iran" Persian) : IR ایران // xn--mgba3a4fra ("Iran" Arabic) : IR ايران //xn--mgbayh7gpa ("al-Ordon" Arabic) JO //National Information Technology Center (NITC) //Royal Scientific Society, Al-Jubeiha الاردن // xn--3e0b707e ("Republic of Korea" Hangul) : KR 한국 // xn--fzc2c9e2c ("Lanka" Sinhalese-Sinhala) : LK // http://nic.lk ලංකා // xn--xkc2al3hye2a ("Ilangai" Tamil) : LK // http://nic.lk இலங்கை // xn--mgbc0a9azcg ("Morocco / al-Maghrib" Arabic) : MA المغرب // xn--mgb9awbf ("Oman" Arabic) : OM عمان // xn--ygbi2ammx ("Falasteen" Arabic) : PS // The Palestinian National Internet Naming Authority (PNINA) // http://www.pnina.ps فلسطين // xn--90a3ac ("srb" Cyrillic) : RS срб // xn--p1ai ("rf" Russian-Cyrillic) : RU // http://www.cctld.ru/en/docs/rulesrf.php рф // xn--wgbl6a ("Qatar" Arabic) : QA // http://www.ict.gov.qa/ قطر // xn--mgberp4a5d4ar ("AlSaudiah" Arabic) : SA // http://www.nic.net.sa/ السعودية // xn--mgberp4a5d4a87g ("AlSaudiah" Arabic) variant : SA السعودیة // xn--mgbqly7c0a67fbc ("AlSaudiah" Arabic) variant : SA السعودیۃ // xn--mgbqly7cvafr ("AlSaudiah" Arabic) variant : SA السعوديه // xn--ogbpf8fl ("Syria" Arabic) : SY سورية // xn--mgbtf8fl ("Syria" Arabic) variant : SY سوريا // xn--yfro4i67o Singapore ("Singapore" Chinese-Han) : SG 新加坡 // xn--clchc0ea0b2g2a9gcd ("Singapore" Tamil) : SG சிங்கப்பூர் // xn--o3cw4h ("Thai" Thai) : TH // http://www.thnic.co.th ไทย // xn--pgbs0dh ("Tunis") : TN // http://nic.tn تونس // xn--kpry57d ("Taiwan" Chinese-Han-Traditional) : TW // http://www.twnic.net/english/dn/dn_07a.htm 台灣 // xn--kprw13d ("Taiwan" Chinese-Han-Simplified) : TW // http://www.twnic.net/english/dn/dn_07a.htm 台湾 // xn--nnx388a ("Taiwan") variant : TW 臺灣 // xn--j1amh ("ukr" Cyrillic) : UA укр // xn--mgb2ddes ("AlYemen" Arabic) : YE اليمن // xxx : http://icmregistry.com xxx // ye : http://www.y.net.ye/services/domain_name.htm *.ye // za : http://www.zadna.org.za/slds.html *.za // zm : http://en.wikipedia.org/wiki/.zm *.zm // zw : http://en.wikipedia.org/wiki/.zw *.zw // DynDNS.com Dynamic DNS zones : http://www.dyndns.com/services/dns/dyndns/ dyndns-at-home.com dyndns-at-work.com dyndns-blog.com dyndns-free.com dyndns-home.com dyndns-ip.com dyndns-mail.com dyndns-office.com dyndns-pics.com dyndns-remote.com dyndns-server.com dyndns-web.com dyndns-wiki.com dyndns-work.com dyndns.biz dyndns.info dyndns.org dyndns.tv at-band-camp.net ath.cx barrel-of-knowledge.info barrell-of-knowledge.info better-than.tv blogdns.com blogdns.net blogdns.org blogsite.org boldlygoingnowhere.org broke-it.net buyshouses.net cechire.com dnsalias.com dnsalias.net dnsalias.org dnsdojo.com dnsdojo.net dnsdojo.org does-it.net doesntexist.com doesntexist.org dontexist.com dontexist.net dontexist.org doomdns.com doomdns.org dvrdns.org dyn-o-saur.com dynalias.com dynalias.net dynalias.org dynathome.net dyndns.ws endofinternet.net endofinternet.org endoftheinternet.org est-a-la-maison.com est-a-la-masion.com est-le-patron.com est-mon-blogueur.com for-better.biz for-more.biz for-our.info for-some.biz for-the.biz forgot.her.name forgot.his.name from-ak.com from-al.com from-ar.com from-az.net from-ca.com from-co.net from-ct.com from-dc.com from-de.com from-fl.com from-ga.com from-hi.com from-ia.com from-id.com from-il.com from-in.com from-ks.com from-ky.com from-la.net from-ma.com from-md.com from-me.org from-mi.com from-mn.com from-mo.com from-ms.com from-mt.com from-nc.com from-nd.com from-ne.com from-nh.com from-nj.com from-nm.com from-nv.com from-ny.net from-oh.com from-ok.com from-or.com from-pa.com from-pr.com from-ri.com from-sc.com from-sd.com from-tn.com from-tx.com from-ut.com from-va.com from-vt.com from-wa.com from-wi.com from-wv.com from-wy.com ftpaccess.cc fuettertdasnetz.de game-host.org game-server.cc getmyip.com gets-it.net go.dyndns.org gotdns.com gotdns.org groks-the.info groks-this.info ham-radio-op.net here-for-more.info hobby-site.com hobby-site.org home.dyndns.org homedns.org homeftp.net homeftp.org homeip.net homelinux.com homelinux.net homelinux.org homeunix.com homeunix.net homeunix.org iamallama.com in-the-band.net is-a-anarchist.com is-a-blogger.com is-a-bookkeeper.com is-a-bruinsfan.org is-a-bulls-fan.com is-a-candidate.org is-a-caterer.com is-a-celticsfan.org is-a-chef.com is-a-chef.net is-a-chef.org is-a-conservative.com is-a-cpa.com is-a-cubicle-slave.com is-a-democrat.com is-a-designer.com is-a-doctor.com is-a-financialadvisor.com is-a-geek.com is-a-geek.net is-a-geek.org is-a-green.com is-a-guru.com is-a-hard-worker.com is-a-hunter.com is-a-knight.org is-a-landscaper.com is-a-lawyer.com is-a-liberal.com is-a-libertarian.com is-a-linux-user.org is-a-llama.com is-a-musician.com is-a-nascarfan.com is-a-nurse.com is-a-painter.com is-a-patsfan.org is-a-personaltrainer.com is-a-photographer.com is-a-player.com is-a-republican.com is-a-rockstar.com is-a-socialist.com is-a-soxfan.org is-a-student.com is-a-teacher.com is-a-techie.com is-a-therapist.com is-an-accountant.com is-an-actor.com is-an-actress.com is-an-anarchist.com is-an-artist.com is-an-engineer.com is-an-entertainer.com is-by.us is-certified.com is-found.org is-gone.com is-into-anime.com is-into-cars.com is-into-cartoons.com is-into-games.com is-leet.com is-lost.org is-not-certified.com is-saved.org is-slick.com is-uberleet.com is-very-bad.org is-very-evil.org is-very-good.org is-very-nice.org is-very-sweet.org is-with-theband.com isa-geek.com isa-geek.net isa-geek.org isa-hockeynut.com issmarterthanyou.com isteingeek.de istmein.de kicks-ass.net kicks-ass.org knowsitall.info land-4-sale.us lebtimnetz.de leitungsen.de likes-pie.com likescandy.com merseine.nu mine.nu misconfused.org mypets.ws myphotos.cc neat-url.com office-on-the.net on-the-web.tv podzone.net podzone.org readmyblog.org saves-the-whales.com scrapper-site.net scrapping.cc selfip.biz selfip.com selfip.info selfip.net selfip.org sells-for-less.com sells-for-u.com sells-it.net sellsyourhome.org servebbs.com servebbs.net servebbs.org serveftp.net serveftp.org servegame.org shacknet.nu simple-url.com space-to-rent.com stuff-4-sale.org stuff-4-sale.us teaches-yoga.com thruhere.net traeumtgerade.de webhop.biz webhop.info webhop.net webhop.org worse-than.tv writesthisblog.com xombrero-1.6.4/tldlist.c010064400017500000000000000206171247066410500142230ustar00dhillwheel/* * Copyright (c) 2012 Elias Norberg * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include #define TLD_TREE_END_NODE 1 #define TLD_TREE_EXCEPTION 2 struct tld_tree_node { struct tld_tree_node *next; struct tld_tree_node *child; const char *lbl; char flags; }; struct tld_tree_node tld_tree_root = { NULL, NULL, "" }; #define TREE_INSERT_CHILD(n, data) \ n->child = g_malloc(sizeof *n); \ n->child->next = NULL; \ n->child->child = NULL; \ n->child->flags = 0; \ n->child->lbl = data; #define TREE_INSERT_NEXT(n, data) \ n->next = g_malloc(sizeof *n); \ n->next->next = NULL; \ n->next->child = NULL; \ n->next->flags = 0; \ n->next->lbl = data; #define P_BASE (36) #define P_TMIN (1) #define P_TMAX (26) #define P_SKEW (38) #define P_DAMP (700) #define INITIAL_BIAS (72) #define INITIAL_N (128) int adapt(int delta, int numpoints, int firsttime) { int k; if (firsttime) delta = delta / P_DAMP; else delta = delta / 2; delta += (delta / numpoints); k = 0; while (delta > (((P_BASE - P_TMIN) * P_TMAX) / 2)) { delta = delta / (P_BASE - P_TMIN); k += P_BASE; } k += (((P_BASE - P_TMIN + 1) * delta) / (delta + P_SKEW)); return (k); } int get_minimum_char(char *str, int n) { gunichar ch = 0; gunichar min = 0xffffff; for(; *str; str = g_utf8_next_char(str)) { ch = g_utf8_get_char(str); if (ch >= n && ch < min) min = ch; } return (min); } char encode_digit(int n) { if (n < 26) return n + 'a'; return (n - 26) + '0'; } char * punycode_encode(char *str) { char output[1024]; char *s; gunichar c; int need_coding = 0; int l, len, i; int n = INITIAL_N; int delta = 0; int bias = INITIAL_BIAS; int h, b, m, k, t, q; l = 0; for (s=str; *s; s = g_utf8_next_char(s)) { c = g_utf8_get_char(s); if (c < 128) output[l++] = *s; else need_coding = 1; } output[l] = '\0'; if (!need_coding) return g_strdup(output); h = b = strlen(output); if (l > 0) output[l++] = '-'; output[l] = '\0'; len = g_utf8_strlen(str, -1); while (h < len) { m = get_minimum_char(str, n); delta += (m - n) * (h + 1); n = m; for (s=str; *s; s = g_utf8_next_char(s)) { c = g_utf8_get_char(s); if (c < n) delta ++; if (c == n) { q = delta; for (k=P_BASE;; k+=P_BASE) { if (k <= bias) t = P_TMIN; else if(k >= bias + P_TMAX) t = P_TMAX; else t = k - bias; if (q < t) break; output[l++] = encode_digit(t+((q-t)%(P_BASE-t))); q = (q - t) / (P_BASE - t); } output[l++] = encode_digit(q); bias = adapt(delta, h + 1, h == b); delta = 0; h ++; } } delta ++; n ++; } output[l] = '\0'; for (i=l+4;i>=4;i--) output[i] = output[i-4]; l += 4; output[0] = 'x'; output[1] = 'n'; output[2] = '-'; output[3] = '-'; output[l] = '\0'; return g_strdup(output); } /* * strrchr2(str, saveptr, ch) * * Walk backwards through str, jumping to next 'ch' * On first call, *saveptr should be set to NULL. * On following calls, supply the same saveptr. * * Returns NULL when the whole string 'str' has been * looped through. Otherwise returns the position * before the next 'ch'. */ const char * strrchr2(const char *str, const char **saveptr, int ch) { const char *ptr; if (str != NULL && *saveptr == NULL) { *saveptr = str + strlen(str); } else if (str == *saveptr) { return (NULL); } for (ptr= *saveptr - 1; ptr != str && *ptr != ch; ptr--) ; *saveptr = ptr; if (ptr != str) return (ptr+1); return (ptr); } /* * tld_tree_add(rule) * * Adds a tld-rule to the tree */ void tld_tree_add(const char *rule) { struct tld_tree_node *n; const char *lbl; const char *saveptr; saveptr = NULL; lbl = strrchr2(rule, &saveptr, '.'); for (n = &tld_tree_root; lbl != NULL;) { if (strcmp(n->lbl, lbl) == 0) { lbl = strrchr2(rule, &saveptr, '.'); if (!n->child) break; n = n->child; continue; } if (n->next == NULL) { TREE_INSERT_NEXT(n, lbl); n = n->next; lbl = strrchr2(rule, &saveptr, '.'); break; } n = n->next; } while (lbl) { TREE_INSERT_CHILD(n, lbl); lbl = strrchr2(rule, &saveptr, '.'); n = n->child; } n->flags |= TLD_TREE_END_NODE; if (n->lbl[0] == '!') { n->flags |= TLD_TREE_EXCEPTION; n->lbl ++; } } void tld_tree_init() { FILE *fd; char buf[1024]; char file[PATH_MAX]; char *ptr, *next_lbl; char *enc_lbl; char *rule, *rp; char extra_ch; snprintf(file, sizeof file, "%s" PS "tld-rules", resource_dir); fd = fopen(file, "r"); if (fd == NULL) { /* a poor replacement for the real list - but it's * better than nothing. */ tld_tree_add("*"); startpage_add("Could not open %s: this file is required " "to handle TLD whitelisting properly", file); return; } for (;;) { ptr = fgets(buf, sizeof buf, fd); if (ptr == NULL || feof(fd)) break; /* skip comments */ if ((ptr = strstr(buf, "//")) != NULL) *ptr = '\0'; /* skip anything after space or tab */ for (ptr = buf; *ptr; ptr++) if (*ptr == ' ' || *ptr == '\t' || *ptr == '\n' || *ptr == '\r') break; *ptr = '\0'; if (!strlen(buf)) continue; extra_ch = 0; ptr = buf; if (buf[0] == '!' && buf[0] == '*') { extra_ch = buf[0]; ptr ++; } rule = NULL; /* split into labels, and convert them one by one */ for (;;) { if ((next_lbl = strchr(ptr, '.'))) *next_lbl = '\0'; enc_lbl = punycode_encode(ptr); if (rule) { rp = rule; rule = g_strdup_printf("%s%s%s", rp, enc_lbl, next_lbl ? "." : ""); g_free(rp); g_free(enc_lbl); } else { rule = g_strdup_printf("%.1s%s%s", extra_ch ? buf:"", enc_lbl, next_lbl ? ".":""); g_free(enc_lbl); } if (!next_lbl) break; ptr = next_lbl + 1; } tld_tree_add(rule); } fclose(fd); } /* * tld_get_suffix(domain) * * Find the public suffix for domain. * * Returns a pointer to the suffix position * in domain, or NULL if no public suffix * was found. */ char * tld_get_suffix(const char *domain) { struct tld_tree_node *n; const char *suffix; const char *lbl, *saveptr; const char *tmp_saveptr, *tmp_lbl; if (domain == NULL) return (NULL); if (domain[0] == '.') return (NULL); saveptr = NULL; suffix = NULL; lbl = strrchr2(domain, &saveptr, '.'); for (n = &tld_tree_root; n != NULL && lbl != NULL;) { if (!strlen(n->lbl)) { n = n->next; continue; } if (n->lbl[0] == '*') { if (n->flags & TLD_TREE_END_NODE) { tmp_saveptr = saveptr; tmp_lbl = lbl; lbl = strrchr2(domain, &saveptr, '.'); /* Save possible public suffix */ suffix = lbl; saveptr = tmp_saveptr; lbl = tmp_lbl; } n = n->next; continue; } if (strcmp(n->lbl, lbl) == 0) { if (n->flags & TLD_TREE_EXCEPTION) { /* We're done looking */ suffix = lbl; break; } lbl = strrchr2(domain, &saveptr, '.'); /* Possible public suffix - other rules might * still apply */ if (n->flags & TLD_TREE_END_NODE) suffix = lbl; /* Domain too short */ if (lbl == NULL) { /* Check if we have a child that is '*' */ for (n = n->child; n; n = n->next) if (n->lbl[0] == '*') suffix = NULL; break; } if (n->child == NULL) break; n = n->child; continue; } if (n->next == NULL) break; n = n->next; } /* If we can't find a matching suffix, it can mean that either * a) the user is surfing a local prefix * b) the list is not properly updated * * In any case - in order not to break stuff while surfing * new TLD's, we return the public suffix as the top 2 labels * * www.abc.xyz therefore has public suffix 'abc.xyz' */ if (!suffix) { saveptr = NULL; strrchr2(domain, &saveptr, '.'); lbl = strrchr2(domain, &saveptr, '.'); suffix = lbl; } return ((char*)suffix); } xombrero-1.6.4/tordisabled.ico010064400017500000000000000021761247066410500153700ustar00dhillwheel h(    5} b 6 7j}2ݞk\d=4:NDI)!'$"((*B-¤FF3Q|ry]>]  -)[ 45:(l?^P7M% c=kD4 #, ')ŷ`5RA(A.%,gEu$T6 w*"f-LG`&()(sRxF>W0#+s/W{1]- $9U qv**)(ygSUm;(3Aj^)HO/=9  *+"_oG/=U}> / ({F he~!& U8^V:GXBHU*@=X  r13#3 \LSO;Y .>!VRY9nXq+fBw ^:Qx&]~Ml"$bs_:ի/ Dޭ]J  0 8 xombrero-1.6.4/torenabled.ico010064400017500000000000000021761247066410500152130ustar00dhillwheel h(  ; $d # (d # k\d=4:NDI)!'$"((*B- ) L8A|ry]>]  -)[ 45:(( &/%+l?^P7M% c=kD4 O.8n00HDI`5RA(A.%,gEu$T6 & X7 SMR}YzxF>W0#+s/W{1]- &6U {pSUm;(3Aj^)HO/=9  hyG/=U}> / (F qnrIHR]=PV:GXBHU*FCIB2;WBH)33 \LSV@J> )>!VRY9nXndq fBw ^:Ql]~Mbq$ӄvhl{6ٗ6Ń# ?xombrero-1.6.4/txt2tooltip.pl010064400017500000000000000040321247066410500152420ustar00dhillwheel#!/bin/perl # Copyright (c) 2012 Todd T. Fries # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # read in 'ascii2txt.pl' formatted man pages, spit out #defines for tooltips use strict; use warnings; our $verbose = 0; my $line; my @lines; my @states = ("prekewords", "keywords", "postkeywords"); my $state = 0; my $tipname; my @tipinfo; my $tiplines; while() { chomp($line = $_); if ($state == 0) { if ($line =~ /following keywords:$/) { $state++; } next; } if ($state == 1) { if ($line =~ /^$/) { next; } if ($line =~ /^[A-Z]/) { showtip($tipname,@tipinfo); $state++; next; } if ($line =~ /^ {11,11}([a-z_]+)[ ]*(.*)$/) { showtip($tipname,@tipinfo); $tiplines = 1; $tipname = $1; @tipinfo = ($2); next; } if ($line =~ /^ {39,39}(.*)$/) { push @tipinfo, $1; } } } sub showtip { my ($tip,@info) = @_; my $text; my $count = 1; if (!defined($tip) || length($tip) < 1) { return; } my $fmt; for my $line (@info) { $line =~ s/&/&/g; $line =~ s//>/g; $line =~ s/"/"/g; $line =~ s/^ {6,6}/\\t/g; $line =~ s/\\t {6,6}/\\t\\t/g; $line =~ s/\\t {6,6}/\\t\\t/g; if ($count > $#info) { $fmt = " \"%s\"\n"; } else { $fmt = " \"%s\\n\" \\\n"; } $text .= sprintf $fmt,$line; $count++; } $tip = uc($tip); printf "#define TT_%s%s",$tip,$text; } exit(0); xombrero-1.6.4/unix.c010064400017500000000000000016441247066410500135260ustar00dhillwheel/* * Copyright (c) 2010, 2011 Marco Peereboom * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include void init_unix(void) { resource_dir = g_strdup(XT_DS_RESOURCE_DIR); } void (*os_init)(void) = init_unix; xombrero-1.6.4/user-agent-headers010064400017500000000000005767671247066410500160340ustar00dhillwheeluser_agent = user_agent = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)' user_agent = 'artviper(tm) user_agent = - user_agent = 1 2 3 Submit PRO user_agent = 360se user_agent = Aghaven/Nutch-1.2 (www.aghaven.com) user_agent = Apache-HttpClient/4.1 (java 1.5) user_agent = Apache-HttpClient/UNAVAILABLE (java 1.4) user_agent = AppEngine-Google; (+http://code.google.com/appengine; appid: cracksites) user_agent = AppEngine-Google; (+http://code.google.com/appengine; appid: downforeveryoneorjustme) user_agent = AppEngine-Google; (+http://code.google.com/appengine; appid: gasandboxx) user_agent = AppEngine-Google; (+http://code.google.com/appengine; appid: lamb-da) user_agent = AppEngine-Google; (+http://code.google.com/appengine; appid: mobhook) user_agent = AppEngine-Google; (+http://code.google.com/appengine; appid: recomiendar) user_agent = AppEngine-Google; (+http://code.google.com/appengine; appid: showsiteinf) user_agent = AppEngine-Google; (+http://code.google.com/appengine; appid: s~getfavicon27) user_agent = AppEngine-Google; (+http://code.google.com/appengine; appid: s~showsiteinfor) user_agent = Apple-PubSub/65.28 user_agent = AppleWebKit/534.26+ Version/5.0 user_agent = AtomicBrowser/6.0.1 CFNetwork/548.1.4 Darwin/11.0.0 user_agent = BlackBerry9000/4.6.0.167 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/102 ips-agent user_agent = CRAWL-E/0.6.4 user_agent = CSE HTML Validator Online (http://www.OnlineWebCheck.com) via 80.82.68.115 user_agent = CSE HTML Validator Online (http://www.OnlineWebCheck.com) via 80.82.68.250 user_agent = CSE HTML Validator Online (http://www.OnlineWebCheck.com) via 89.245.41.103 user_agent = CSE HTML Validator Online (http://www.OnlineWebCheck.com) via 93.174.95.149 user_agent = CSE HTML Validator Online (http://www.OnlineWebCheck.com) via 94.46.8.183 user_agent = CheckSite Verification Agent (+http://www.checksite.us) user_agent = Chordie.com: (PHP) user_agent = ColdFusion user_agent = Crowsnest/0.5 (+http://www.crowsnest.tv/) user_agent = Cynthia 1.0 user_agent = Dillo/0.8.6-i18n-misc user_agent = Dillo/3.0.2 user_agent = DoCoMo/1.0/N505i/c20/TB/W24H12 user_agent = DoCoMo/2.0 D903i(c100;TB;W28H20) (compatible; Hatena-Mobile-Gateway/1.2; +http://mgw.hatena.ne.jp/help) user_agent = DoCoMo/2.0 N905i(c100;TB;W24H16) (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html) user_agent = DoCoMo/2.0 P900i(c100;TB;W24H11) (compatible; ichiro/mobile goo; +http://search.goo.ne.jp/option/use/sub4/sub4-1/) user_agent = ELinks (0.11.7; Linux 3.3.8-gentoo x86_64; 128x47) user_agent = ELinks/0.11.7 (textmode; OpenBSD 5.1 amd64; 273x70-2) user_agent = ELinks/0.11.7 (textmode; OpenBSD 5.2 amd64; 263x67-2) user_agent = ELinks/0.12pre5 (textmode; OpenBSD 5.1 i386; 170x55-3) user_agent = ELinks/0.12~pre5-2ubuntu1 (textmode; Ubuntu; Linux 2.6.32-41-generic i686; 125x38-2) user_agent = Echofon%20Lite/210 CFNetwork/520.4.3 Darwin/11.4.0 (x86_64) (MacBookPro8%2C1) user_agent = Echofon/210 CFNetwork/454.11.12 Darwin/10.0.0 (i386) (iMac9%2C1) user_agent = Echofon/210 CFNetwork/520.4.3 Darwin/11.4.0 (x86_64) (MacBookPro6%2C1) user_agent = EventMachine HttpClient user_agent = FeedBlitz/1.0 user_agent = FeedBucket/1.0 \x5C(+http://www.feedbucket.com\x5C) user_agent = FeedDemon/4.1 (http://www.feeddemon.com/; Microsoft Windows) user_agent = FeedForAll rss2html.php v2 user_agent = FeedValidator/1.3 user_agent = Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 4 subscribers; feed-id=4855095103798700911) user_agent = Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 5 subscribers; feed-id=4855095103798700911) user_agent = Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; feed-id=11839596849616509716) user_agent = Froute Mobile Gateway/1.0 (http://labs.froute.jp/pc2m/help.html) user_agent = Go http package user_agent = Googlebot-Image/1.0 user_agent = Googlebot/2.1 (+http://www.google.com/bot.html) user_agent = Googlebot/2.1 (http://www.googlebot.com/bot.html) user_agent = GreenBrowser user_agent = HTTP Fetcher/1.1.0 user_agent = HTTP_Request2/2.1.1 (http://pear.php.net/package/http_request2) PHP/5.3.2-1ubuntu4.15 user_agent = Hatena Star UserAgent/2 user_agent = Hatena::Bookmark/2.00 user_agent = HideMe.mobi Browser Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60 user_agent = IKI Prevodilac translating on user's request user_agent = Jakarta Commons-HttpClient/3.0 user_agent = Java/1.6.0_07 user_agent = Java/1.6.0_22 user_agent = Java/1.6.0_24 user_agent = Jigsaw/2.2.5 W3C_CSS_Validator_JFouffa/2.0 user_agent = Kimengi/nineconnections.com user_agent = LWP::Simple/5.64 user_agent = Liferea/1.8.6 (Linux; en_US.UTF-8; http://liferea.sf.net/) user_agent = LinkedInBot/1.0 (compatible; Mozilla/5.0; Jakarta Commons-HttpClient/3.1 +http://www.linkedin.com) user_agent = Links (2.3pre1; Linux 2.6.32-5-686 i686; 80x24) user_agent = Links (2.4; NetBSD 4.0 i386; text) user_agent = Links (2.6; DragonFly 3.1-DEVELOPMENT i386; GNU C 4.4.7; x) user_agent = Links (2.6; OpenBSD 5.1 i386; GNU C 4.2.1; x) user_agent = LinksCrawler 0.1beta user_agent = LongURL API user_agent = Lynx/2.8.6rel.5 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.8k user_agent = Lynx/2.8.6rel.5 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.0.0-fips user_agent = Lynx/2.8.7rel.2 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.0.0f user_agent = Lynx/2.8.7rel.2 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.0.1c user_agent = Lynx/2.8.8dev.12 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.0.0j user_agent = Lynx/2.8.8dev.5 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.8.6 user_agent = MLBot (www.metadatalabs.com/mlbot) user_agent = MagpieRSS/0.72 (+http://magpierss.sf.net) user_agent = MagpieRSS/0.72 \x5C(+http://magpierss.sf.net\x5C) user_agent = Maven/2.0 CFNetwork/548.1.4 Darwin/11.0.0 user_agent = Mediapartners-Google user_agent = Meme/1.0 (X11; U; Unix; hr-HR) AppleWebKit/531.2+ Compatible (Safari) user_agent = MetaHeadersBot (+http://www.metaheaders.com/bot.html) user_agent = MetaURI API/2.0 +metauri.com user_agent = Mozilla/1.22 (compatible; MSIE 2.0; Windows 95) user_agent = Mozilla/4.0 user_agent = Mozilla/4.0 (compatible; Bitty Browser; http://www.bitty.com) user_agent = Mozilla/4.0 (compatible; MSIE 4.01; Digital AlphaServer 1000A 4/233; Windows NT; Powered By 64-Bit Alpha Processor) user_agent = Mozilla/4.0 (compatible; MSIE 5.00; Windows 98) user_agent = Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) user_agent = Mozilla/4.0 (compatible; MSIE 5.01; Windows NT) user_agent = Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.0 [en] user_agent = Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 6.01 [en] user_agent = Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.1) user_agent = Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; .NET CLR 1.0.2914) user_agent = Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) user_agent = Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; .NET CLR 1.1.4322) user_agent = Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; mowser; http://www.mowser.com) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows 98) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; America Online Browser 1.1; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 3.1) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.0) Opera 7.02 Bork-edition [en] user_agent = Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.01 [en] user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Creative) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) (larbin2.6.3@unspecified.mail) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) larbin2.6.3@unspecified.mail user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; KTXN) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; UrlCheck) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [en] user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; Alexa Toolbar; (R1 1.5)) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Deepnet Explorer 1.5.0; .NET CLR 1.0.3705) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MathPlayer 2.0; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; Chinarank Toolbar; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Netcraft SSL Server Survey - contact info@netcraft.com) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Babya Discoverer 8.0: user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; TencentTraveler) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; MAXTHON 2.0) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; .NET CLR 1.1.4322; PeoplePal 6.2) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; MRA 4.6 (build 01425); .NET CLR 1.1.4322; .NET CLR 2.0.50727) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.2; BRI/1; AskTbIJBME/5.9.1.14019) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MRA 4.6 (build 01425); MRSPUTNIK 1, 5, 0, 19 SW) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MRA 5.8 (build 4157); .NET CLR 2.0.50727; AskTbPTV/5.11.3.15590) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Sicent; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Media Center PC 6.0) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TheFreeDictionary.com; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.00 user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; http://ismyblogbroken.com/) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ru) Opera 8.50 user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Win64; AMD64) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2;) user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT) ::ELNSB50::000061100320025802a00111000000000507000900000000 user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Trident 4.0; Windows 98; Maxthon) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Trident 4.0; Windows NT 5.1; Dealio Toolbar 8.2.40) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SLCC1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SLCC1; .NET CLR 1.1.4325; .NET CLR 2.0.40607; .NET CLR 3.0.30729) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SLCC1; .NET CLR 1.1.4325; .NET CLR 2.0.40607; .NET CLR 3.0.30729; .NET CLR 3.5.30707) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 1.1.4325; .NET CLR 2.0.40607; .NET CLR 3.0.30729) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) yolinkBot user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; .NET4.0C; InfoPath.3) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; CIBA) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30;) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; Arcor 5.005; .NET CLR 1.0.3705; .NET CLR 1.1.4322) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB6.4; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; QS 4.2.4.0; QS 5.3.0.4; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; .NET4.0C; QS 4.2.4.0; QS 5.3.0.4) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; YPC 3.0.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; ru) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; SLCC1; .NET CLR 1.1.4322) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; SLCC1; .NET CLR 1.1.4322; .NET CLR 2.0.40607) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; SLCC1; .NET CLR 1.1.4322; .NET CLR 2.0.40607; .NET CLR 3.0.30729; .NET CLR 3.5.30729; InfoPath.2) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; SLCC1; .NET CLR 1.1.4325; .NET CLR 2.0.40607; .NET CLR 3.0.30729; .NET CLR 3.5.30707; MS-RTC LM 8) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607; .NET CLR 3.0.04506.648) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; SV1; .NET CLR 1.1.4325; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; SV1; .NET CLR 1.1.4325; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; InfoPath.2) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; Trident/4.0; Data Center; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 1.1.4322; .NET CLR 3.5.30729; InfoPath.1; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30618; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET4.0C; BRI/2) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30618) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/5.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; BRI/2; Maxthon 2.0) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/5.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/5.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; .NET CLR 3.0.30729) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/5.0; SLCC1; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; Trident/5.0; InfoPath.1; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; BOIE9;ENUSMSCOM) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; .NET CLR 3.0.30618; InfoPath.2; SLCC1) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; InfoPath.2; Tablet PC 2.0) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; BOIE9;ENUSMSCOM) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; OfficeLiveConnector.1.5; OfficeLivePatch.1.3; .NET4.0C) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; ShopperReports 3.0.517.0; SRS_IT_E8790472B1765B533FA193; MATM; Windows Live Messenger 14.0.8117.0416) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MS-RTC LM 8; .NET4.0C; InfoPath.3) user_agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729) user_agent = Mozilla/4.0 (compatible; MSIE 7.0;Windows NT 5.1;.NET CLR 1.1.4322;.NET CLR 2.0.50727;.NET CLR 3.0.04506.30) Lightspeedsystems user_agent = Mozilla/4.0 (compatible; MSIE 7.0b; Win32) user_agent = Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1) user_agent = Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0 ; .NET CLR 2.0.50215; SL Commerce Client v1.0; Tablet PC 2.0 user_agent = Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Trident 4.0; Windows NT 4.1; IEMB3; Zune 4.5.10) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Trident 4.0; Windows NT 6.0; IEMB3; Avant Browser; Zune 9.7.82) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; .NET CLR 1.0.3705; .NET4.0C) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; InfoPath.1) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; Tablet PC 1.7; .NET CLR 1.0.3705; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; InfoPath.3; .NET CLR 2.0.50727) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.40607; .NET CLR 1.1.4322; playbrytetoolbar_Playbryte; BOIE8;ENUSMSCOM) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.2; .NET CLR 1.1.4322) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; SRS_IT_E8790570B676595B34A996; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; 360SE) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; 360SE; 360SE) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; 360SE) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; 360SE; 360SE) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; BTRS122063; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; AskTbGLSV5/5.11.3.15590; Avant Browser) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.4) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.5; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.0.3705; InfoPath.3) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB7.0; InfoPath.1) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB7.3; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; NCLIENT50_AAP6ACD5EBDB10; msn OptimizedIE8;KOKR) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB7.3; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; FDM; MEGAUPLOAD 1.0; MEGAUPLOAD 2.0; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 2.0.50727) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; QS 4.2.4.0; QS 5.3.0.4; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; .NET4.0C; QS 4.2.4.0; QS 5.3.0.4) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://bsalsa.com) ; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.30729; .NET CLR 3.0.04506.30; .NET4.0C; .NET4.0E; GreenBrowser) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; xs-PayC2aJ9lmI; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; xs-PayC2aJ9lmI) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; en;) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; WOW64; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Avant Browser; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; .NET CLR 3.5.21022; InfoPath.2) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 3.5.30729) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.30729; .NET CLR 3.5.30729) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.4; OfficeLivePatch.1.3) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; SLCC1; InfoPath.3) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.2; MS-RTC LM 8) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; .NET CLR 1.1.4322) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; .NET CLR 3.0.30618; InfoPath.2; SLCC1) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MS-RTC LM 8; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Tablet PC 2.0; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB7.2; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; eSobiSubscriber 2.0.4.16; MAAR; .NET4.0C; .NET4.0E; .NET CLR 1.1.4322) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 1.1.4322; InfoPath.3) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.2) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; Media Center PC 6.0; BRI/2; InfoPath.3) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MAEM; .NET4.0C; .NET CLR 1.1.4322) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDC) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3) user_agent = Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0) user_agent = Mozilla/4.0 (compatible; MSIE 9.0; Trident 5.0; Windows 98; Zango 2.0.29) user_agent = Mozilla/4.0 (compatible; MSIE 9.0; Trident 5.0; Windows NT 5.0; Zango 5.3.02) user_agent = Mozilla/4.0 (compatible; MSIE 9.0; Trident 5.0; Windows NT 5.1; InfoPath.2; Crazy Browser 9.7.60; FDM) user_agent = Mozilla/4.0 (compatible; MSIE 9.0; Trident 5.0; Windows NT 5.2; MSN Optimized; Maxthon) user_agent = Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; .NET CLR 2.0.50727;) user_agent = Mozilla/4.0 (compatible; Netcraft Web Server Survey) user_agent = Mozilla/4.0 (compatible; Powermarks/3.5; Windows 95/98/2000/NT) user_agent = Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5) user_agent = Mozilla/4.0 (compatible;) user_agent = Mozilla/5.0 user_agent = Mozilla/5.0 () user_agent = Mozilla/5.0 (Android; Mobile; rv:14.0) Gecko/14.0 Firefox/14.0 user_agent = Mozilla/5.0 (Android; Mobile; rv:14.0) Gecko/14.0 Firefox/14.0.1 user_agent = Mozilla/5.0 (Android; Mobile; rv:15.0) Gecko/15.0 Firefox/15.0 user_agent = Mozilla/5.0 (BlackBerry; U; BlackBerry 9360; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.336 Mobile Safari/534.11+ user_agent = Mozilla/5.0 (BlackBerry; U; BlackBerry 9790; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.528 Mobile Safari/534.11+ user_agent = Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; fr) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.296 Mobile Safari/534.11+ user_agent = Mozilla/5.0 (FHScan Core 1.1) user_agent = Mozilla/5.0 (Java; U; kau; nokia5800d-1) UCBrowser8.2.1.144/69/444/UCWEB Mobile UNTRUSTED/1.0 user_agent = Mozilla/5.0 (Linux i686) AppleWebKit/535.22+ (KHTML, like Gecko) WebKitGTK+/1.8.1 luakit/2012.03.25 user_agent = Mozilla/5.0 (Linux x86_64) AppleWebKit/535.4+ (KHTML, like Gecko) WebKitGTK+/1.6.3 luakit/2f6f69 user_agent = Mozilla/5.0 (Linux) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1 (QupZilla 1.2.0) user_agent = Mozilla/5.0 (Linux) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7 user_agent = Mozilla/5.0 (Linux) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7 (QupZilla 1.2.0) user_agent = Mozilla/5.0 (Linux) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7 (QupZilla 1.3.0) user_agent = Mozilla/5.0 (Linux; Android 4.0.3; GT-I9100 Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19 user_agent = Mozilla/5.0 (Linux; Android 4.0.3; GT-N7000 Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19 user_agent = Mozilla/5.0 (Linux; Android 4.0.3; Transformer Prime TF201 Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19 user_agent = Mozilla/5.0 (Linux; Android 4.0.3; Transformer TF101 Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19 user_agent = Mozilla/5.0 (Linux; Android 4.0.3; cm_tenderloin Build/GWK74) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19 user_agent = Mozilla/5.0 (Linux; Android 4.0.4; GT-I9100 Build/IMM76D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19 user_agent = Mozilla/5.0 (Linux; Android 4.0.4; NookTablet Build/IMM76L) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19 user_agent = Mozilla/5.0 (Linux; Android 4.0.4; SAMSUNG-SGH-I727 Build/IMM76D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19 user_agent = Mozilla/5.0 (Linux; Android 4.0.4; cm_tenderloin Build/IMM76L) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19 user_agent = Mozilla/5.0 (Linux; Android 4.1.1; Galaxy Nexus Build/JRO03C) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19 user_agent = Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19 user_agent = Mozilla/5.0 (Linux; Android 4.1.1; Nexus S Build/JRO03E) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19 user_agent = Mozilla/5.0 (Linux; U; Android 1.6; en-us; xpndr_ihome Build/DRD35) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile user_agent = Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; VM670 Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.2.2; en-gb; HTC Desire Build/FRG83G) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.2.2; nl-nl; HTC Desire Build/FRG83G) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.2; en-nl; HTC Legend 3.14.161.1 Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.2; fr-fr; Desire_A8181 Build/FRF91) App3leWebKit/53.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.2; fr-fr; TSB_CLOUD_COMPANION;FOLIO_AND_A) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.2; ja-jp; SC-02B Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.3; en-us; DROID2 GLOBAL Build/4.5.1_57_D2G-38) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.3; en-us; GT-I9100 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.3; en-us; HTC Desire Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; BNTV250 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; DROID X2 Build/4.5.1A-DTN-150-30) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; GT-I9100 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; LG-VM701 Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; NOOK BNTV250 Build/GINGERBREAD 1.4.3) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Silk/1.0.22.79_10013310) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 Silk-Accelerated=true user_agent = Mozilla/5.0 (Linux; U; Android 2.3.4; fi-fi; SonyEricssonMK16i Build/4.0.2.A.0.62) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.5; de-de; HTC_DesireHD_A9191 Build/GRJ90) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.5; en-no; HTC_DesireS_S510e Build/GRJ90) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.5; en-ru; HTC_DesireS_S510e Build/GRJ90) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; SCH-I405 4G Build/EI2) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; SCH-I800 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; SGH-T679 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; tmn smart a7 Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.5; pt-br; GT-S5360B Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.6; de-de; GT-I9100G Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.6; en-gb; MB526 Build/4.5.1-134_DFP-231) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.6; en-gb; Nexus One Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; DROID RAZR 4G Build/6.5.1-167_DHD-14_M3-8) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; GT-I9000 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.6; es-es; GT-P1010 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.6; hu-hu; U8815 Build/HuaweiU8815C02B885) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.6; ja-jp; N-06D Build/A1100541) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.6; ja-jp; SC-02B Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.7; en-gb; HTC Desire Build/GWK74) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.7; en-us; DROID2 Build/VZW; liquid.droid2.20111118.135247) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.7; en-us; Desire HD Build/GRI40; CyanogenMod-7.2.0) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 2.3.7; en-us; Optimus 2X Build/FRG83G; LG-P990 Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 user_agent = Mozilla/5.0 (Linux; U; Android 3.2.1; en-us; K1 Build/HTK75C) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13 user_agent = Mozilla/5.0 (Linux; U; Android 3.2; de-de; GT-P7500 Build/HTJ85B) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13 user_agent = Mozilla/5.0 (Linux; U; Android 3.2; de-de; HUAWEI MediaPad Build/HuaweiMediaPad) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.3; de-de; GT-I9100 Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.3; de-de; Sensation Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.3; en-au; SGH-I897 Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.3; en-gb; SonyEricssonST18i Build/4.1.A.0.562) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; ASUS Transformer Pad TF300TG Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; GT-I9100 Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; Sprint APX515CKT Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; Transformer TF101 Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.3; fr-fr; GT-I9100 Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.3; hu-hu; HTC_One_X Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.3; ja-jp; SC-02C Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.3; pl-pl; EVO3D_X515m Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.3; sv-se; GT-I9100 Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.4; de-de; Galaxy Nexus Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.4; en-gb; Galaxy Nexus Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.4; en-gb; Nexus S 4G Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.4; en-gb; SonyEricssonMK16i Build/4.1.B.0.431) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; Blade Build/IMM76I; CyanogenMod-9) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; DROID RAZR 4G Build/6.7.2-180_DHD-16_M4-31) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; DROIDX Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; GT-I9100 Build/IMM76L; CyanogenMod-9.0.0) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; Nexus S Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; Xoom Build/IMM76) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.4; fr-fr; GT-N7000 Build/IMM76L; CyanogenMod-9.0.0) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.4; fr-fr; Nexus S Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.4; ja-jp; MB860 Build/IMM76I; CyanogenMod-9.0.0) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.0.4; sv-se; Galaxy Nexus Build/IMM76K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; U; Android 4.1.1; de-de; Galaxy Nexus Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 user_agent = Mozilla/5.0 (Linux; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 user_agent = Mozilla/5.0 (Linux; webOS/2.2.4; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) webOSBrowser/221.56 Safari/534.6 Pre/3.0 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.5) Gecko/20100101 Firefox/10.0.5 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.6) Gecko/20100101 Firefox/10.0.6 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20120715 Firefox/14.0.1 SeaMonkey/2.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20100101 Firefox/15.0 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20100101 Firefox/11.0) user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20100101 Firefox/14.0 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20120629 Firefox/15.0a2 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Firefox/17.0 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:15.0) Gecko/20100101 Firefox/15.0 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_4) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_6) AppleWebKit/534.24 (KHTML, like Gecko) user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.5 Safari/534.30 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Instapaper/4.0 (+http://www.instapaper.com/) user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.5 Safari/534.55.3 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.43 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1171.0 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.15 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.41 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.49 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.57 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1189.0 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1200.0 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1201.0 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1215.0 Safari/537.2 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.3 (KHTML, like Gecko) Chrome/22.0.1221.0 Safari/537.3 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.12 Safari/537.4 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.6 Safari/537.4 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.8 Safari/537.4 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.215 Safari/535.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebkit/535.1 (KHTML, like Gecko) Chrome/13.0.782.215 Safari/535.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.53.11 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.54.16 (KHTML, like Gecko) Version/5.1.4 Safari/534.54.16 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.5 Safari/534.55.3 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.34 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.54 Safari/536.5 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.15 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.57 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.56.5 (KHTML, like Gecko) Version/5.1 Safari/7534.51.22 Sleipnir/3.5.0.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.56.5 (KHTML, like Gecko) Version/5.1.6 Safari/534.56.5 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.6 Safari/534.56.5 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/534.57.5 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.4 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/535.1 (KHTML, like Gecko) Iron/14.0.850.0 Chrome/14.0.850.0 Safari/535.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/535.18.5 (KHTML, like Gecko) Version/5.2 Safari/535.18.5 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.43 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.15 (KHTML, like Gecko) Version/6.0 Safari/536.16 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.25 (KHTML, like Gecko) user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.25 (KHTML, like Gecko) Version/6.0 Safari/536.25 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.54 Safari/536.5 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.15 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.41 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.49 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.57 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.77 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1201.0 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1203.0 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1205.0 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.0 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1208.0 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1209.0 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1215.0 Safari/537.2 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.3 (KHTML, like Gecko) Chrome/22.0.1222.0 Safari/537.3 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.3 (KHTML, like Gecko) Chrome/22.0.1225.0 Safari/537.3 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.6 (KHTML, like Gecko) Chrome/23.0.1232.0 Safari/537.6 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.6 (KHTML, like Gecko) Chrome/23.0.1236.0 Safari/537.6 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.6 (KHTML, like Gecko) Chrome/23.0.1237.0 Safari/537.6 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8) AppleWebKit/535.18.5 (KHTML, like Gecko) Version/5.2 Safari/535.18.5 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8) AppleWebKit/536.10.3 (KHTML, like Gecko) Version/5.2 Safari/536.10.3 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8) AppleWebKit/536.19 (KHTML, like Gecko) Version/6.0 Safari/536.19 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8) AppleWebKit/536.22 (KHTML, like Gecko) Version/6.0 Safari/536.22 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8) AppleWebKit/536.25 (KHTML, like Gecko) Version/6.0 Safari/536.25 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.43 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1150.1 Iron/20.0.1150.1 Safari/536.11 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.15 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.57 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.77 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.82 Safari/537.1 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1212.0 Safari/537.2 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1215.0 Safari/537.2 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.6 (KHTML, like Gecko) Chrome/23.0.1234.0 Safari/537.6 user_agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_1) AppleWebKit/536.25 (KHTML, like Gecko) Version/6.0 Safari/536.25 user_agent = Mozilla/5.0 (Macintosh; PPC Mac OS X 10.5; rv:2.0) Gecko/20110319 Firefox/4.0 user_agent = Mozilla/5.0 (Macintosh; PPC Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3 user_agent = Mozilla/5.0 (Macintosh; PPC Mac OS X 10_6_7) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.790.0 Safari/535.1 user_agent = Mozilla/5.0 (Macintosh; PPC) TenFourFox/7450 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.7) Gecko/2009021906 Firefox/3.0.7 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (FlipboardProxy/0.0.5; +http://flipboard.com/browserproxy) user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (FlipboardProxy/1.1; +http://flipboard.com/browserproxy) user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/3.6.28 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en; rv:1.9.2.28) Gecko/20120308 Camino/2.1.2 (MultiLang) (like Firefox/3.6.28) user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; en-US; rv:1.9.2.23) Gecko/20110920 Firefox/3.6.23 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; ja; rv:1.9.2.28) Gecko/20120308 Camino/2.1.2 (MultiLang) (like Firefox/3.6.28) user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; rv:1.9.0.12) Gecko/2009070609 Firefox/3.0.12 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/4.1.3 Safari/533.19.4 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/5 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/531.21.11 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/534.16+ (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; ja-jp) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-gb) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X; c) AppleWebKit/535+ (KHTML, like Gecko) Version/5.0 Safari/535.22+ Midori/0.4 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit (KHTML, like Gecko) user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-gb) AppleWebKit/534+ (KHTML, like Gecko) Version/5.0 Safari/534.26+ Midori/0.4 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-gb) AppleWebKit/535+ (KHTML, like Gecko) Version/5.0 Safari/535.22+ Midori/0.4 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-us) AppleWebKit/535+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ Midori/0.4 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X; pl-pl) AppleWebKit/535+ (KHTML, like Gecko) Version/5.0 Safari/535.20+ Midori/0.4 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X; ru-ru) AppleWebKit/535+ (KHTML, like Gecko) Version/5.0 Safari/535.20+ Midori/0.4 user_agent = Mozilla/5.0 (Macintosh; U; Intel Mac OS X; zh-cn) AppleWebKit/535+ (KHTML, like Gecko) Version/5.0 Sabayon Safari/535.7+ Midori/0.4 user_agent = Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en; rv:1.9.2.28) Gecko/20120308 Camino/2.1.2 (like Firefox/3.6.28) user_agent = Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en; rv:1.9.2.28) Gecko/20120314 Camino/2.1.2 (like Firefox/3.6.28) user_agent = Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.1 Safari/525.18 user_agent = Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; fr) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/4.1.3 Safari/533.19.4 user_agent = Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.2.1) Gecko/20021130 user_agent = Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13 user_agent = Mozilla/5.0 (OpenBSD; hr-HR) AppleWebKit/531.2+ (KHTML, like Gecko) user_agent = Mozilla/5.0 (PlayStation Vita 1.69) AppleWebKit/531.22.8 (KHTML, like Gecko) Silk/3.2 user_agent = Mozilla/5.0 (S60V5; U; en-us; NokiaC7-00)/UC Browser8.4.0.159/50/405/UCWEB Mobile user_agent = Mozilla/5.0 (SAMSUNG; SAMSUNG-GT-S8500/S8500XXLA1; U; Bada/2.0; en-us) AppleWebKit/534.20 (KHTML, like Gecko) Dolfin/3.0 Mobile WVGA SMM-MMS/1.2.0 OPN-B user_agent = Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaE63-1/501.21.001; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413 user_agent = Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaE71-1/500.21.009; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413 user_agent = Mozilla/5.0 (U; Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0 user_agent = Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:8.0) Gecko/20100101 Firefox/8.0 user_agent = Mozilla/5.0 (Ubuntu; X11; Linux x86_64; rv:12.0a1) Gecko/20120101 Firefox/12.0a1 user_agent = Mozilla/5.0 (Ultimate Edition; X11; Linux x86; rv:8.0) Gecko/20100101 Ultimate Edition / 3.2 Firefox/10.0 user_agent = Mozilla/5.0 (Windows NT 5.0; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0 user_agent = Mozilla/5.0 (Windows NT 5.0; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 CoolNovo/2.0.2.26 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.78 Safari/535.11 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.84 Safari/535.11 LBBROWSER user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.15 (KHTML, like Gecko) Chrome/18.0.997.0 Safari/535.15 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.142 Safari/535.19 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19 QIHU 360EE user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.43 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 Comodo_Dragon/20.1.1.0 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 QIHU 360EE user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1150.1 Iron/20.0.1150.1 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1068.1 Safari/536.3 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.5 (KHTML, like Gecko) Iron/19.0.1100.0 Chrome/19.0.1100.0 Safari/536.5 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1096.1 Safari/536.6 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.9 (KHTML, like Gecko) Chrome/20.0.1112.0 Safari/536.9 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1163.0 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.60 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.77 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.83 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.3 (KHTML, like Gecko) Chrome/22.0.1221.0 Safari/537.3 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.3 (KHTML, like Gecko) Chrome/22.0.1223.0 Safari/537.3 user_agent = Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.8 Safari/537.4 user_agent = Mozilla/5.0 (Windows NT 5.1; U; en) Opera 8.01 user_agent = Mozilla/5.0 (Windows NT 5.1; U; rv:5.0) Gecko/20100101 Firefox/5.0 user_agent = Mozilla/5.0 (Windows NT 5.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (Windows NT 5.1; en-US; rv:8.0) Gecko/20100101 Firefox/8.0 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:10.0) Gecko/20100101 Firefox/10.0 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:10.0.4) Gecko/20100101 Firefox/10.0.4 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:10.0.5) Gecko/20100101 Firefox/10.0.5 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:10.0.6) Gecko/20100101 Firefox/10.0.6 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0 CometBird/11.0 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20120325 Firefox/11.0.1 PaleMoon/11.0.1 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:12.2) Gecko/20120605 Firefox/12.2 PaleMoon/12.2 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:12.2.1) Gecko/20120616 Firefox/12.2.1 PaleMoon/12.2.1 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:12.3) Gecko/20120717 Firefox/12.3 PaleMoon/12.3 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:12.3) Gecko/20120717 Firefox/12.3 PaleMoon/12.3 FirePHP/0.7.1 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0.1 AppEngine-Google; (+http://code.google.com/appengine; appid: s~lanjun6626) user_agent = Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20120615 Firefox/13.0.1 SeaMonkey/2.10.1 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20100101 Firefox/15.0 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120618 Firefox/15.0a2 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120629 Firefox/15.0a2 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120702 Firefox/15.0a2 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120711 Firefox/15.0a2 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/16.0 Firefox/16.0 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Firefox/17.0 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:5.0.1) Gecko/20100101 Firefox/5.0.1 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 user_agent = Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 user_agent = Mozilla/5.0 (Windows NT 5.2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 CoolNovo/2.0.2.26 user_agent = Mozilla/5.0 (Windows NT 5.2) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2 user_agent = Mozilla/5.0 (Windows NT 5.2) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 5.2; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 5.2; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 5.2; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (Windows NT 5.2; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 5.2; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (Windows NT 5.2; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (Windows NT 5.2; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 user_agent = Mozilla/5.0 (Windows NT 5.2; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (Windows NT 5.2; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (Windows NT 6.0) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24 user_agent = Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1 user_agent = Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.60 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.77 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.83 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.60 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.0; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (Windows NT 6.0; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (Windows NT 6.0; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 user_agent = Mozilla/5.0 (Windows NT 6.0; rv:11.0) Gecko/20100101 Firefox/11.0 user_agent = Mozilla/5.0 (Windows NT 6.0; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (Windows NT 6.0; rv:12.3) Gecko/20120717 Firefox/12.3 PaleMoon/12.3 user_agent = Mozilla/5.0 (Windows NT 6.0; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (Windows NT 6.0; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.12 (KHTML, like Gecko) Maxthon/3.3.7.2000 Chrome/18.0.966.0 Safari/535.12 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.12 (KHTML, like Gecko) Maxthon/3.4.1.1000 Chrome/18.0.966.0 Safari/535.12 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.12 (KHTML, like Gecko) Maxthon/3.4.2.3000 Chrome/18.0.966.0 Safari/535.12 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.152 Safari/535.19 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.164 Safari/535.19 YE user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.851.0 Safari/535.2 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.5 (KHTML, like Gecko) Chrome/16.0.896.0 Safari/535.5 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.43 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1165.0 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.60 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.77 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.83 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1183.0 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1201.0 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) BingPreview/1.0b user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.811.0 Safari/535.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 CoolNovo/2.0.2.26 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.84 Safari/535.11 LBBROWSER user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.1634 Safari/535.19 YE user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.164 Safari/535.19 YE user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.851.0 Safari/535.2 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.0.0+ user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.1.0+ user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.0+ user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.2+ user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) RockMelt/0.16.91.483 Chrome/16.0.912.77 Safari/535.7 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.42 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.43 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 Comodo_Dragon/20.0.1.0 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 Comodo_Dragon/20.1.1.0 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1150.1 Iron/20.0.1150.1 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 Comodo_Dragon/19.2.0.0 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Iron/19.0.1100.0 Chrome/19.0.1100.0 Safari/536.5 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1091.0 Safari/536.6 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.9 (KHTML, like Gecko) Chrome/20.0.1112.0 Safari/536.9 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1143.0 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.11 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.15 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.60 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.77 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.83 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1200.0 Iron/21.0.1200.0 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1199.0 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1201.0 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.3 (KHTML, like Gecko) Chrome/22.0.1221.0 Safari/537.3 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.0 Safari/537.4 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.4) Gecko/20100101 Firefox/10.0.4 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.5) Gecko/20100101 Firefox/10.0.5 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko Firefox/11.0 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0 CometBird/11.0 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.1) Gecko/20120516 Firefox/12.1 PaleMoon/12.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.2.1) Gecko/20120616 Firefox/12.2.1 PaleMoon/12.2.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120615 Firefox/13.0.1 SeaMonkey/2.10.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1 AlexaToolbar/alxf-2.15 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120427 Firefox/15.0a1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120625 Firefox/15.0a2 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120704 Firefox/15.0a2 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120713 Firefox/15.0a2 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120714 Firefox/15.0a2 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120721 SeaMonkey/2.12 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/16.0 Firefox/16.0 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\x5Cr\x5CnAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\x5Cr\x5CnAccept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7Connection: close\x5Cr\x5Cn user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a2) Gecko/20110613 Firefox/6.0a2 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:10.0.4) Gecko/20120503 Firefox/10.0.4 user_agent = Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:11.0) Gecko/20120313 Firefox/11.0 user_agent = Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:12.0) Gecko/20120427 Firefox/12.0 user_agent = Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:12.2.1) Gecko/20120616 Firefox/12.2.1-x64 PaleMoon/12.2.1-x64 user_agent = Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:12.3) Gecko/20120714 Firefox/12.3-x64 PaleMoon/12.3-x64 user_agent = Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:13.0) Gecko/20120606 Firefox/13.0 user_agent = Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:13.0) Gecko/20120617 Firefox/13.0.1 SeaMonkey/2.10.1 user_agent = Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:14.0) Gecko/20120722 Firefox/14.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:16.0) Gecko/16.0 Firefox/16.0 user_agent = Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:17.0) Gecko/17.0 Firefox/17.0 user_agent = Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:9.0) Gecko/20111220 Firefox/9.0 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/10.0 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:10.0.3) Gecko/20120423 Firefox/10.0.3 Epic/10.0.3 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:10.0.5) Gecko/20100101 Firefox/10.0.5 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120403211507 Firefox/12.0 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:12.2.1) Gecko/20120616 Firefox/12.2.1 PaleMoon/12.2.1 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:12.3) Gecko/20120717 Firefox/12.3 PaleMoon/12.3 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:13.0) Gecko/20100101 Firefox/13.0 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20100101 Firefox/15.0 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/16.0 Firefox/16.0 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/17.0 Firefox/17.0 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:2.0) Gecko/20100101 Firefox/4.0 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:2.0b7pre) Gecko/20100921 Firefox/4.0b7pre user_agent = Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.02 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20110814 Firefox/6.0 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 user_agent = Mozilla/5.0 (Windows NT 6.1; rv:8.0.1) Gecko/20100101 Firefox/8.0.1 user_agent = Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.60 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 user_agent = Mozilla/5.0 (Windows NT 6.2; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (Windows NT 6.2; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (Windows NT 6.2; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0 user_agent = Mozilla/5.0 (Windows NT 6.2; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (Windows NT 6.2; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0 user_agent = Mozilla/5.0 (Windows NT 6.2; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0 user_agent = Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:14.0) Gecko/20120722 Firefox/14.0.1 user_agent = Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:15.0) Gecko/15.0 Firefox/15.0a1 user_agent = Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:16.0) Gecko/16.0 Firefox/16.0 user_agent = Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:17.0) Gecko/17.0 Firefox/17.0 user_agent = Mozilla/5.0 (Windows NT x.y; Win64; x64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 user_agent = Mozilla/5.0 (Windows; U; ; en-NZ) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.8.0 user_agent = Mozilla/5.0 (Windows; U; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727) user_agent = Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US) user_agent = Mozilla/5.0 (Windows; U; Windows 95; rv:1.9.2.9) Gecko/20100913 Firefox/3.6.9 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9) Gecko/2008052906 Firefox/3.0 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.27 Safari/532.0 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.627.0 Safari/534.16 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.9 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 StumbleUpon/1.995 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/3.5 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15; user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14 (.NET CLR 3.5.30729) user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.17pre) Gecko K-Meleon/1.6.0 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 Firefox/3.5.19 GTB7.1 ( .NET CLR 3.5.30729) user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 GTB5 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 (.NET CLR 3.5.30729) user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/3.6.28 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 ( .NET CLR 3.5.30729) user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100721 Firefox/3.6.8 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2b4) Gecko/20091124 Firefox/3.6b4 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.9.0.13) Gecko/2009073022 Firefox/3.5.2 (.NET CLR 3.5.30729) SurveyBot/2.3 (DomainTools) user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 ( .NET CLR 3.5.30729; .NET4.0E) user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP) Naver Transcoder, AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.9.2.25) Gecko/20111212 Firefox/3.6.25 ( .NET CLR 3.5.30729; .NET4.0E) user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.0.18) Gecko/2010020220 Firefox/3.0.18 (.NET CLR 3.5.30729) user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9) Gecko/2008052906 Firefox/3.0 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 (.NET CLR 3.5.30729) user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.8.1.11; http://bg.domaingoat.com) Gecko/20071127 Firefox/3.11 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.8.1.11; http://cz.domaingoat.com) Gecko/20071127 Firefox/3.11 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729; .NET4.0E) user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11; 360Spider user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.18) Gecko/20110614 Firefox/3.6.18 ( .NET CLR 3.5.30729; .NET4.0E) user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9 user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.2; en; rv:1.9.2.23) Gecko/20110920 Firefox/3.6.23 GTB7.1 ( .NET CLR 3.5.30729; .NET4.0C) GTBA user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.2; zh-CN; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4 (.NET CLR 3.5.30729) user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.0; da; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.27 Safari/532.0 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729) user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19 (.NET CLR 3.5.30729) user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729) FirePHP/0.3 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.1b1) Gecko/20081007 Firefox/3.1b1 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.20) Gecko/20110803 Firefox/3.6.20 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13 BuiltWith/1.2 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB5 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729) user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 MSIE 7.0 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.21) Gecko/20110830 AlexaToolbar/alxf-2.14 AlexaToolbar/pXVUnvuf-1.2 Firefox/3.6.21 AppEngine-Google; (+http://code.google.com/appengine; appid: showsiteinf) user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 ( .NET CLR 3.5.30729; .NET4.0C) user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.23) Gecko/20110920 Firefox/3.6.23 SearchToolbar/1.2 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/3.6.28 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; es-ES; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 GTB7.1 GTBA user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.24) Gecko/20111103 Firefox/3.6.24 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; he; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.8.1.8pre) Gecko/20071012 lolifox/0.3.6 Firefox/2.0.0.7 compatible user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/4.0 (.NET CLR 3.5.30729) user_agent = Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17 user_agent = Mozilla/5.0 (Windows; U; Windows NT based; en-US) AppleWebKit/533.3 (KHTML, like Gecko) QtWeb Internet Browser/3.5 http://www.QtWeb.net user_agent = Mozilla/5.0 (Windows; Windows NT 5.1; es-ES; rv:1.9.2a1pre) Gecko/20090402 Firefox/3.6a1pre user_agent = Mozilla/5.0 (Windows; Windows i686) KHTML/4.8.0 (like Gecko) Konqueror/4.8 user_agent = Mozilla/5.0 (X11; Bitrig amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.0.0+ user_agent = Mozilla/5.0 (X11; Bitrig amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.1.1+ user_agent = Mozilla/5.0 (X11; Bitrig amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.1+ user_agent = Mozilla/5.0 (X11; Bitrig amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.2+ user_agent = Mozilla/5.0 (X11; Bitrig i386) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.0.0+ user_agent = Mozilla/5.0 (X11; Bitrig i386) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.1.0+ user_agent = Mozilla/5.0 (X11; Bitrig i386) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.0+ user_agent = Mozilla/5.0 (X11; Bitrig i386) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.1+ user_agent = Mozilla/5.0 (X11; Bitrig i386) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.2+ user_agent = Mozilla/5.0 (X11; Debian; Linux x86_64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 user_agent = Mozilla/5.0 (X11; DragonFly x86_64) AppleWebKit/535.4+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ jumanji/0.0 user_agent = Mozilla/5.0 (X11; DragonFly x86_64; rv:8.0) Gecko/20120303 Firefox/8.0 user_agent = Mozilla/5.0 (X11; FreeBSD amd64) AppleWebKit/534.26+ (KHTML, like Gecko) Version/5.0 Safari/534.26+ Epiphany/2.30.6 user_agent = Mozilla/5.0 (X11; FreeBSD amd64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 user_agent = Mozilla/5.0 (X11; FreeBSD amd64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19 user_agent = Mozilla/5.0 (X11; FreeBSD amd64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (X11; FreeBSD amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.2+ user_agent = Mozilla/5.0 (X11; FreeBSD amd64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (X11; FreeBSD amd64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (X11; FreeBSD amd64) KHTML/4.7.3 (like Gecko) Konqueror/4.7 user_agent = Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0) Gecko/20100101 Firefox/10.0 user_agent = Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20100101 Firefox/10.0.3 user_agent = Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120509 Firefox/12.0 SeaMonkey/2.9.1 Firefox/5.0 user_agent = Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20100101 Firefox/13.0 user_agent = Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20100101 Firefox/8.0 user_agent = Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 user_agent = Mozilla/5.0 (X11; FreeBSD i386) AppleWebKit/534.26+ (KHTML, like Gecko) Version/5.0 Safari/534.26+ 1.10.0+ user_agent = Mozilla/5.0 (X11; FreeBSD i386) AppleWebKit/534.26+ (KHTML, like Gecko) Version/5.0 Safari/534.26+ Epiphany/2.30.6 user_agent = Mozilla/5.0 (X11; FreeBSD i386) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 user_agent = Mozilla/5.0 (X11; FreeBSD i386) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2 user_agent = Mozilla/5.0 (X11; FreeBSD i386) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (X11; FreeBSD i386) KHTML/4.8.4 (like Gecko) Konqueror/4.8 user_agent = Mozilla/5.0 (X11; FreeBSD i386; rv:10.0.5) Gecko/20100101 Firefox/10.0.5 user_agent = Mozilla/5.0 (X11; FreeBSD i386; rv:10.0.6) Gecko/20100101 Firefox/10.0.6 user_agent = Mozilla/5.0 (X11; FreeBSD i386; rv:13.0) Gecko/20100101 Firefox/13.0 user_agent = Mozilla/5.0 (X11; FreeBSD i386; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (X11; FreeBSD i386; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 user_agent = Mozilla/5.0 (X11; I; Linux 2.6.32 i686) user_agent = Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux i386; rv:2.0) Gecko/20100101 Firefox/4.0 user_agent = Mozilla/5.0 (X11; Linux i486; rv:13.0.1) Gecko/20100101 Firefox/13.0.1 Porteus user_agent = Mozilla/5.0 (X11; Linux i686 (x86_64)) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux i686 (x86_64)) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.43 Safari/536.11 user_agent = Mozilla/5.0 (X11; Linux i686 (x86_64)) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (X11; Linux i686 (x86_64)) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux i686 on x86_64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 user_agent = Mozilla/5.0 (X11; Linux i686 on x86_64; rv:10.0.5) Gecko/20100101 Firefox/10.0.5 Iceweasel/10.0.5 user_agent = Mozilla/5.0 (X11; Linux i686 on x86_64; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (X11; Linux i686 on x86_64; rv:13.0) Gecko/20100101 Firefox/13.0 user_agent = Mozilla/5.0 (X11; Linux i686 on x86_64; rv:13.0) Gecko/20100101 Firefox/13.0 slurp user_agent = Mozilla/5.0 (X11; Linux i686 on x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (X11; Linux i686 on x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (X11; Linux i686 on x86_64; rv:15.0) Gecko/20120704 Firefox/15.0a2 user_agent = Mozilla/5.0 (X11; Linux i686 on x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Ubuntu/11.04 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.34 (KHTML, like Gecko) QupZilla/1.3.1 Safari/534.34 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.34 (KHTML, like Gecko) konqueror/4.8.4 Safari/534.34 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.34 (KHTML, like Gecko) rekonq Safari/534.34 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.34 (KHTML, like Gecko) rekonq/1.0 Safari/534.34 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.65 Safari/535.11 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.78 Safari/535.11 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/11.10 Chromium/17.0.963.65 Chrome/17.0.963.65 Safari/535.11 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/11.10 Chromium/17.0.963.79 Chrome/17.0.963.79 Safari/535.11 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) CaixaMagica/18 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Iron/18.0.1050.0 Chrome/18.0.1050.0 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/10.04 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/10.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/10.10 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/11.04 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/11.10 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.0.0+ user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.1.1+ user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.11.3+ user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.2+ user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ Debian/unstable (3.4.2-1) Epiphany/3.4.2 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ Epiphany/3.4.2 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ dwb-hg/rev. 1411 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.7 (KHTML, like Gecko) Iron/16.0.950.0 Chrome/16.0.950.0 Safari/535.7 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.27 Safari/536.11 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.43 Safari/536.11 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.47 Safari/536.5 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/20.0.1086.0 Safari/536.5 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.11 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.57 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1197.0 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1201.0 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux i686) KHTML/4.8.97 (like Gecko) Konqueror/4.8 user_agent = Mozilla/5.0 (X11; Linux i686) KHTML/4.9.0 (like Gecko) Konqueror/4.9 user_agent = Mozilla/5.0 (X11; Linux i686; rv:10.0) Gecko/20100101 Firefox/10.0 Iceweasel/10.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 user_agent = Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 user_agent = Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 Iceweasel/10.0.2 user_agent = Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120319 Firefox/10.0.2 SeaMonkey/2.7.2 user_agent = Mozilla/5.0 (X11; Linux i686; rv:10.0.4) Gecko/20100101 Firefox/10.0.4 Iceweasel/10.0.4 user_agent = Mozilla/5.0 (X11; Linux i686; rv:10.0.5) Gecko/20100101 Firefox/10.0.5 user_agent = Mozilla/5.0 (X11; Linux i686; rv:10.0.5) Gecko/20100101 Firefox/10.0.5 Iceweasel/10.0.5 user_agent = Mozilla/5.0 (X11; Linux i686; rv:10.0.5) Gecko/20120605 Firefox/10.0.5 user_agent = Mozilla/5.0 (X11; Linux i686; rv:10.0.5) Gecko/20120606 Firefox/10.0.5 user_agent = Mozilla/5.0 (X11; Linux i686; rv:10.0.5) Gecko/20120608 Firefox/10.0.5 Iceape/2.7.5 user_agent = Mozilla/5.0 (X11; Linux i686; rv:10.0.6) Gecko/20100101 Firefox/10.0.6 Iceweasel/10.0.6 user_agent = Mozilla/5.0 (X11; Linux i686; rv:10.0.6) Gecko/20120717 Firefox/10.0.6 user_agent = Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0 Iceweasel/11.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0 Iceweasel/12.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20110328 Firefox/12.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120502 Firefox/12.0 SeaMonkey/2.9.1 user_agent = Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120717 icecat/12.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0 Iceweasel/13.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1 Iceweasel/13.0.1 user_agent = Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120609 Firefox/13.0 SeaMonkey/2.10 user_agent = Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Firefox/13.0.1 SeaMonkey/2.10.1 user_agent = Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1 Iceweasel/14.0.1 user_agent = Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20100101 conkeror/1.0pre user_agent = Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120715 Firefox/14.0.1 SeaMonkey/2.11 user_agent = Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120626 Firefox/15.0a2 user_agent = Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/16.0 Firefox/16.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Firefox/17.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:2.0) Gecko/20100101 Firefox/4.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:5.0.1) Gecko/20100101 Firefox/5.0.1 user_agent = Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20110815 IceCat 6.0 (like Firefox/6.0) user_agent = Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20100101 Firefox/6.0.2 Iceweasel/6.0.2 user_agent = Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 user_agent = Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20100101 Firefox/8.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20100101 Firefox/9.0 user_agent = Mozilla/5.0 (X11; Linux i686; rv:9.0.1) Gecko/20111221 Firefox/9.0.1 SeaMonkey/2.6.1 user_agent = Mozilla/5.0 (X11; Linux i686; rv:9.0.1) Gecko/20120127 Firefox/9.0.1 SeaMonkey/2.6.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/533.3 (KHTML, like Gecko) kded/4.8.3 Safari/533.3 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/533.3 (KHTML, like Gecko) kded/4.8.4 Safari/533.3 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/533.3 (KHTML, like Gecko) konqueror/4.8.4 Safari/533.3 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.34 Safari/534.24 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.71 Safari/534.30 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.91 Safari/534.30 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) NG/6.2.19319 Safari/534.34 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) Qt/4.8.2 Safari/534.34 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) QupZilla/1.2.0 Safari/534.34 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) konqueror/4.8.3 Safari/534.34 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) konqueror/4.8.4 Safari/534.34 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Ubuntu/11.10 Chromium/14.0.835.202 Chrome/14.0.835.202 Safari/535.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.46 Safari/535.11 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.78 Safari/535.11 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/11.04 Chromium/17.0.963.79 Chrome/17.0.963.79 Safari/535.11 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.142 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/10.04 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/10.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/10.10 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/11.04 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/11.10 Chromium/18.0.1025.142 Chrome/18.0.1025.142 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/11.10 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.21 (KHTML, like Gecko) Chrome/19.0.1042.0 Safari/535.21 PagePeeker/2.1; +http://pagepeeker.com/robots/ user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.0.0+ user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.10.0+ user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.11.3+ user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ Epiphany/3.4.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ dwb-hg/rev. 1429 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ dwb/2012.07.09 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.4+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ dwb/0.0.18 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.4+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ dwb/0.1.0 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/17.0.942.0 Safari/535.8 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.27 Safari/536.11 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.34 Safari/536.11 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.41 Safari/536.11 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.43 Safari/536.11 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1150.1 Iron/20.0.1150.1 Safari/536.11 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Sabayon Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.15 Safari/536.5 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Sabayon Chrome/19.0.1084.46 Safari/536.5 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.8 (KHTML, like Gecko; Google Page Speed Insights) Chrome/19.0.1084.36 Safari/536.8 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.8 (KHTML, like Gecko; Google Page Speed) Chrome/19.0.1084.36 Safari/536.8 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.8 (KHTML, like Gecko; Google Web Preview) Chrome/19.0.1084.36 Safari/536.8 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1171.0 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.15 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.41 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.49 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.57 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.77 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.81 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1186.0 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1201.0 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Ubuntu/12.04 Chromium/21.0.1180.11 Chrome/21.0.1180.11 Safari/537.1 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.3 (KHTML, like Gecko) Chrome/22.0.1221.0 Safari/537.3 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.3 (KHTML, like Gecko) Chrome/22.0.1221.1 Safari/537.3 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.0 Safari/537.4 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.6 Safari/537.4 user_agent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.6 (KHTML, like Gecko) Chrome/23.0.1240.0 Safari/537.6 user_agent = Mozilla/5.0 (X11; Linux x86_64) KHTML/4.8.4 (like Gecko) Konqueror/4.8 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 /10.0 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0 Iceweasel/10.0 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120314 Firefox/10.0.3 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20100101 Firefox/10.0.4 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20100101 Firefox/10.0.4 Iceweasel/10.0.4 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20100101 Firefox/10.0.5 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20100101 Firefox/10.0.5 Iceweasel/10.0.5 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20110328 Firefox/10.0.5 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120601 Firefox/10.0.5 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120605 Firefox/10.0.5 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120606 Firefox/10.0.5 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6) Gecko/20100101 Firefox/10.0.6 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6) Gecko/20100101 Firefox/10.0.6 Iceweasel/10.0.6 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6) Gecko/20120714 Firefox/10.0.6 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6) Gecko/20120717 Firefox/10.0.6 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 Iceweasel/11.0 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120312 conkeror/1.0pre user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0 Iceweasel/12.0 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120510 Firefox/12.0 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1 Iceweasel/13.0.1 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120601 conkeror/1.0pre user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120717 Firefox/13.0.1 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1 Iceweasel/14.0.1 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20100101 conkeror/1.0pre user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120719 Firefox/14.0.1 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120629 Firefox/15.0a2 Iceweasel/15.0a2 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120706 Firefox/15.0a2 Iceweasel/15.0a2 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120708 Firefox/15.0a2 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120709 Firefox/15.0a2 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120712 Firefox/15.0a2 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120713 Firefox/15.0a2 Iceweasel/15.0a2 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/16.0 Firefox/16.0 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Firefox/17.0 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:2.0) Gecko/20100101 Firefox/4.0 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20110506 Firefox/4.0.1 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1; +http://immediatenet.com) Gecko/20100101 Firefox/4.0.1 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20111229 Firefox/9.0.1 user_agent = Mozilla/5.0 (X11; Linux) AppleWebKit/534.34 (KHTML, like Gecko) kded/4.8.4 Safari/534.34 user_agent = Mozilla/5.0 (X11; Linux) AppleWebKit/534.34 (KHTML, like Gecko) konqueror/4.8.4 Safari/534.34 user_agent = Mozilla/5.0 (X11; Linux) AppleWebKit/535.22 (KHTML, like Gecko) Chrome/18.0.1025.133 Safari/535.22 Midori/0.4 user_agent = Mozilla/5.0 (X11; Linux) AppleWebKit/535.22+ Midori/0.4 user_agent = Mozilla/5.0 (X11; Linux; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Midori/0.4 user_agent = Mozilla/5.0 (X11; NetBSD i386; rv:11.0) Gecko/20120531 Firefox/11.0 user_agent = Mozilla/5.0 (X11; NetBSD i386; rv:15.0) Gecko/20120820 Firefox/15.0 user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/534.26+ (KHTML, like Gecko) Version/5.0 Safari/534.26+ user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.12 Safari/535.11 user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.0.0+ user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.1.0+ user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.1.1+ user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.11.3+ user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.0+ user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.1+ user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.2+ user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.4+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ 1.0.0+ user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.4+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ 1.10.0+ user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.4+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ 1.11.3+ user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.4+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ 1.2.0+ user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.4+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ 1.2.2+ user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7 user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (X11; OpenBSD amd64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (X11; OpenBSD amd64; rv:11.0) Gecko/20100101 Firefox/11.0 user_agent = Mozilla/5.0 (X11; OpenBSD amd64; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (X11; OpenBSD amd64; rv:13.0) Gecko/20100101 Firefox/13.0 user_agent = Mozilla/5.0 (X11; OpenBSD amd64; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (X11; OpenBSD amd64; rv:13.0) Gecko/20100101 conkeror/1.0pre user_agent = Mozilla/5.0 (X11; OpenBSD amd64; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (X11; OpenBSD amd64; rv:5.0) Gecko/20100101 Firefox/5.0 user_agent = Mozilla/5.0 (X11; OpenBSD amd64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 user_agent = Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/534.26+ (KHTML, like Gecko) Version/5.0 Safari/534.26+ $xxxterm: xxxterm.c,v 1.425 2011/07/15 13:42:38 marco Exp $+ user_agent = Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19 user_agent = Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.0.0+ user_agent = Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.11.3+ user_agent = Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ Epiphany/3.4.2 user_agent = Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/535.4+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ 1.10.0+ user_agent = Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/535.4+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ 1.2.2+ user_agent = Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7 user_agent = Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7 user_agent = Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11 user_agent = Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 user_agent = Mozilla/5.0 (X11; OpenBSD i386; rv:11.0) Gecko/20100101 Firefox/11.0 user_agent = Mozilla/5.0 (X11; OpenBSD i386; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (X11; OpenBSD i386; rv:13.0) Gecko/20100101 Firefox/13.0 user_agent = Mozilla/5.0 (X11; OpenBSD i386; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (X11; OpenBSD i386; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (X11; OpenBSD i386; rv:16.0) Gecko/16.0 Firefox/16.0a1 user_agent = Mozilla/5.0 (X11; OpenBSD i386; rv:5.0) Gecko/20100101 Firefox/5.0 user_agent = Mozilla/5.0 (X11; OpenBSD i386; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 user_agent = Mozilla/5.0 (X11; OpenBSD i386; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 user_agent = Mozilla/5.0 (X11; OpenBSD i386; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 conkeror/1.0pre user_agent = Mozilla/5.0 (X11; OpenBSD macppc) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.0.0+ user_agent = Mozilla/5.0 (X11; OpenBSD) AppleWebKit/535.22+ Midori/0.4 user_agent = Mozilla/5.0 (X11; SunOS i86pc; rv:10.0.4) Gecko/20100101 Firefox/10.0.4 user_agent = Mozilla/5.0 (X11; SunOS i86pc; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (X11; SunOS i86pc; rv:13.0) Gecko/20100101 Firefox/13.0 user_agent = Mozilla/5.0 (X11; SunOS i86pc; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (X11; SunOS i86pc; rv:6.0.2) Gecko/20100101 Firefox/6.0.2 user_agent = Mozilla/5.0 (X11; SunOS i86pc; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 user_agent = Mozilla/5.0 (X11; SunOS sun4u; rv:11.0) Gecko/20100101 Firefox/11.0 user_agent = Mozilla/5.0 (X11; Trisquel; Linux i686; rv:13.0) Gecko/20120608 Firefox/13.0 Abrowser/13.0 user_agent = Mozilla/5.0 (X11; Trisquel; Linux x86_64; rv:13.0) Gecko/20120608 Abrowser/13.0 user_agent = Mozilla/5.0 (X11; Trisquel; Linux x86_64; rv:13.0) Gecko/20120609 Firefox/13.0 Abrowser/13.0 user_agent = Mozilla/5.0 (X11; U; AerieBSD i386; en-US; rv:1.8.1.10) Gecko/20080105 Firefox/2.0.0.10 user_agent = Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.0.5) Gecko/2009010115 Firefox/3.0.5 user_agent = Mozilla/5.0 (X11; U; FreeBSD i386; rv:13.0) Gecko/20100101 Firefox/13.0 user_agent = Mozilla/5.0 (X11; U; Linux armv7l; en-GB; rv:1.9.2.3pre) Gecko/20100723 Firefox/3.5 Maemo Browser 1.7.4.8 RX-51 N900 user_agent = Mozilla/5.0 (X11; U; Linux armv7l; es-ES; rv:1.9.2.3pre) Gecko/20100723 Firefox/3.5 Maemo Browser 1.7.4.8 RX-51 N900 user_agent = Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3 user_agent = Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.0.17) Gecko WebThumb/1.0 user_agent = Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.19) Gecko/2012020109 Iceweasel/3.0.6 (Debian-3.0.6-3) user_agent = Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.16) Gecko/20120511 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.12) Gecko/20101027 Ubuntu/10.10 (maverick) Firefox/3.6.12 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.13) Gecko/20101206 Linux Mint/8 (Helena) Firefox/3.6.13 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.18) Gecko/20110628 Ubuntu/10.10 (maverick) Firefox/3.6.18 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.45 Safari/534.13 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.21 (KHTML, like Gecko) Chrome/11.0.673.0 Safari/534.21 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061102 BonEcho/2.0 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080420 Firefox/2.0.0.14 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.2) Gecko/2008092313 Ubuntu/8.04 (hardy) Firefox/3.1 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.2) Gecko/2008092313 Ubuntu/8.04 (hardy) Firefox/3.1.6 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko/2009032608 Firefox/3.0.8 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.5.15-1.fc12 Firefox/3.5.15 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.9 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20111108 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20120315 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20120421 Gecko Firefox/11.0 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20120602 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.3; ips-agent) Gecko/20090824 Fedora/1.0.7-1.1.fc4 Firefox/3.5.3 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5 FirePHP/0.3 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101225 Firefox/3.6.13 (Swiftfox) user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110422 Ubuntu/9.10 (karmic) Firefox/3.6.17 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110515 HeartRails_Capture/1.0.4 (+http://capture.heartrails.com/) Namoroka/3.6.17 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110614 Firefox/3.6.18 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.22) Gecko/20110906 CentOS/3.6-1.el5.centos Firefox/3.6.22 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/3.6.28 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120314 Firefox/3.6.28 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 user_agent = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.6) Gecko/20100628 Linux Mint/9 (Isadora) Firefox/3.6.6 user_agent = Mozilla/5.0 (X11; U; Linux i686; es-CL; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10 user_agent = Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.6) Gecko/20040113 user_agent = Mozilla/5.0 (X11; U; Linux i686; es-MX; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10 user_agent = Mozilla/5.0 (X11; U; Linux i686; fi-FI; rv:1.9.0.6) Gecko/2009012700 SUSE/3.0.6-1.14 Firefox/3.0.6 user_agent = Mozilla/5.0 (X11; U; Linux i686; fr-fr) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ 1.0.0+ user_agent = Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.1.16) Gecko/20110929 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.2.23) Gecko/20111020 Pardus/Corporate 2 Firefox/3.6.24 user_agent = Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.2.24) Gecko/20111108 Fedora/3.6.24-1.fc14 Firefox/3.6.24 user_agent = Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.9.1.16) Gecko/20120602 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.9.1.16) Gecko/20120714 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux i686; ja; rv:1.9.1.16) Gecko/20120714 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.0.2) Gecko/20121223 Ubuntu/9.25 (jaunty) Firefox/3.8 user_agent = Mozilla/5.0 (X11; U; Linux i686; sk; rv:1.9.0.19) Gecko/2012020109 Iceweasel/3.0.6 (Debian-3.0.6-3) user_agent = Mozilla/5.0 (X11; U; Linux i686; tr-TR; rv:1.9.1.16) Gecko/20120714 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; C) AppleWebKit/533.3 (KHTML, like Gecko) Qt/4.7.2 Safari/533.3 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; C) AppleWebKit/534.3 (KHTML, like Gecko) Qt/4.7.3 Safari/534.3 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.18) Gecko/2010021501 Ubuntu/9.04 (jaunty) Firefox/3.0.18 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20120714 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.3) Gecko/20100401 SUSE/3.6.3-1.1 Firefox/3.6.3 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.16) Gecko/20120714 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.3 (KHTML, like Gecko) Qt/4.7.2 Safari/533.3 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.2) Gecko/2008092313 Ubuntu/8.04 (hardy) Firefox/3.1 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120602 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120714 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4) Gecko/20091030 Gentoo Firefox/3.5.4 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko Fedora/1.9.2.13-3.el5 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.16) Gecko/20110323 Ubuntu/10.04 (lucid) Firefox/3.6.16 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.16) Gecko/20110323 Ubuntu/10.10 (maverick) Firefox/3.6.16 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110422 Ubuntu/9.10 (karmic) Firefox/3.6.17 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110921 Ubuntu/10.04 (lucid) Firefox/3.6.23 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110929 Red Hat/3.6-2.el5_7 Firefox/3.6.23 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.28) Gecko/20120314 Firefox/3.6.28 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ user_agent = Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.1.16) Gecko/20120714 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux x86_64; ja-JP) AppleWebKit/533.3 (KHTML, like Gecko) Qt/4.8.0 Safari/533.3 user_agent = Mozilla/5.0 (X11; U; Linux x86_64; ja; rv:1.9.1.16) Gecko/20120421 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux x86_64; ja; rv:1.9.1.16) Gecko/20120714 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux x86_64; pt-BR; rv:1.9.1.16) Gecko/20120714 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux x86_64; ru-RU; rv:1.9.1.16) Gecko/20110929 Iceweasel/3.5.16 (like Firefox/3.5.16) user_agent = Mozilla/5.0 (X11; U; Linux x86_64; ru; rv:1.9.2.18) Gecko/20110628 Ubuntu/11.10 Firefox/3.6.25 user_agent = Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.3 Safari/532.4 user_agent = Mozilla/5.0 (X11; U; Linux; en-us) AppleWebKit/531.2+ (KHTML, like Gecko, surf-0.3) Safari/531.2+ user_agent = Mozilla/5.0 (X11; U; OpenBSD amd64; en-US; rv:1.9.1.19) Gecko/20120213 Firefox/3.5.19 user_agent = Mozilla/5.0 (X11; U; OpenBSD amd64; en-US; rv:1.9.2.25) Gecko/20120213 Firefox/3.6.25 user_agent = Mozilla/5.0 (X11; U; OpenBSD amd64; en-US; rv:1.9.2.25) Gecko/20120708 Firefox/3.6.25 user_agent = Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.8.1.16) Gecko/20080812 Firefox/2.0.0.16 user_agent = Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.9.1.16) Gecko/20110216 SeaMonkey/2.0.11 user_agent = Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.9.1.19) Gecko/20120207 Firefox/3.5.19 user_agent = Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.9.2.13) Gecko/20110216 Firefox/3.6.13 user_agent = Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.9.2.16) Gecko/20111109 Firefox/3.6.16 user_agent = Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.12) Gecko/20110417 Firefox/3.6.12 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:10.0) Gecko/20100101 Firefox/10.0 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20120623 Firefox/15.0a2 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:16.0) Gecko/16.0 Firefox/16.0 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1 AlexaToolbar/alxf-2.15 user_agent = Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0 user_agent = Mozilla/5.0 (compatible user_agent = Mozilla/5.0 (compatible) Feedfetcher-Google; (+http://www.google.com/feedfetcher.html) user_agent = Mozilla/5.0 (compatible) Feedfetcher-Google;(+http://www.google.com/feedfetcher.html) user_agent = Mozilla/5.0 (compatible; 008/0.83; http://www.80legs.com/webcrawler.html) Gecko/2008032620 user_agent = Mozilla/5.0 (compatible; AhrefsBot/3.1; +http://ahrefs.com/robot/) user_agent = Mozilla/5.0 (compatible; Apercite; +http://www.apercite.fr/robot/index.html) user_agent = Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html) user_agent = Mozilla/5.0 (compatible; Blekkobot; ScoutJet; +http://blekko.com/about/blekkobot) user_agent = Mozilla/5.0 (compatible; Butterfly/1.0; +http://labs.topsy.com/butterfly/) Gecko/2009032608 Firefox/3.0.8 user_agent = Mozilla/5.0 (compatible; Dataprovider Site Explorer; http://www.dataprovider.com/) user_agent = Mozilla/5.0 (compatible; Embedly/0.2; +http://support.embed.ly/) user_agent = Mozilla/5.0 (compatible; Embedly/0.2; snap; +http://support.embed.ly/) user_agent = Mozilla/5.0 (compatible; EventGuruBot/1.0; +http://www.eventguru.com/spider.html) user_agent = Mozilla/5.0 (compatible; Exabot/3.0; +http://www.exabot.com/go/robot) user_agent = Mozilla/5.0 (compatible; Ezooms/1.0; ezooms.bot@gmail.com) user_agent = Mozilla/5.0 (compatible; Firefox Addon; Windows XP 5.1) user_agent = Mozilla/5.0 (compatible; FirstSearchBot/1.0; +http://www.first-search.org/bitrig.org.htm) user_agent = Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) user_agent = Mozilla/5.0 (compatible; Googlebot/2.1; actually this is http://ismyblogworking.com/) user_agent = Mozilla/5.0 (compatible; Infohelfer/1.2.0; +http://www.infohelfer.de/crawler.php) user_agent = Mozilla/5.0 (compatible; JikeSpider; +http://shoulu.jike.com/spider.html) user_agent = Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.3 (like Gecko) user_agent = Mozilla/5.0 (compatible; Konqueror/3.5; OpenBSD) KHTML/3.5.10 (like Gecko) user_agent = Mozilla/5.0 (compatible; Konqueror/3.5; OpenBSD; X11; i386; en_US) KHTML/3.5.10 (like Gecko) user_agent = Mozilla/5.0 (compatible; Konqueror/3.5; OpenBSD; X11; i386; fr) KHTML/3.5.10 (like Gecko) user_agent = Mozilla/5.0 (compatible; Konqueror/3.5; OpenBSD; X11; i386; fr, en_US) KHTML/3.5.10 (like Gecko) user_agent = Mozilla/5.0 (compatible; LinkJumper/0.1.2; +Someday ya skazhu) user_agent = Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0) user_agent = Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0) user_agent = Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0; Touch) user_agent = Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1) user_agent = Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1) (http://name911.com) user_agent = Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4325) user_agent = Mozilla/5.0 (compatible; MSIE 7.0; Trident 4.0; Windows 98; Maxthon) user_agent = Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; .NET CLR 2.0.50727) user_agent = Mozilla/5.0 (compatible; MSIE 8.0; Trident 4.0; Windows 98; Alexa Toolbar;GB) user_agent = Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Trident 5.0; Windows NT 5.0; MS-RTC LM 8; IEMB3; Dealio Toolbar 1.0.26; IEMB3) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Trident 5.0; Windows NT 5.1; Avant Browser) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0; BOIE9;ENCA) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; 360SE) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; MAAU) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; MAAU; MAAU) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)2011-10-16 20:21:07 user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; 360SE) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; BOIE9;ENUS) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; MALC) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; BRI/2; InfoPath.3; Lunascape 6.7.1.25446) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; BOIE9;ENUS) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; NOKIA; Lumia 900) user_agent = Mozilla/5.0 (compatible; MSIE or Firefox mutant; not on Windows server; + http://tab.search.daum.net/aboutWebSearch.html) Daumoa/3.0 user_agent = Mozilla/5.0 (compatible; PEAR HTTP_Request class; http://www.rcdtokyo.com/pc2m/) user_agent = Mozilla/5.0 (compatible; PEAR HTTP_Request class;) user_agent = Mozilla/5.0 (compatible; PaperLiBot/2.1; http://support.paper.li/entries/20023257-what-is-paper-li) user_agent = Mozilla/5.0 (compatible; ProCogBot/1.0; +http://www.procog.com/spider.html) user_agent = Mozilla/5.0 (compatible; Qualidator.com Bot 1.0;) user_agent = Mozilla/5.0 (compatible; TweetmemeBot/2.11; +http://tweetmeme.com/) user_agent = Mozilla/5.0 (compatible; U; Haiku x86; en-US) AppleWebKit/536.10 (KHTML, like Gecko) Haiku/R1 WebPositive/1.1 Safari/536.10 user_agent = Mozilla/5.0 (compatible; UnisterBot; crawler@unister.de) user_agent = Mozilla/5.0 (compatible; WASALive-Bot ; http://blog.wasalive.com/wasalive-bots/) user_agent = Mozilla/5.0 (compatible; WGToolsBot/1.0; http://wgtools.com/link-checker-bot/) user_agent = Mozilla/5.0 (compatible; WebmasterCoffee/0.7; +http://webmastercoffee.com/about) user_agent = Mozilla/5.0 (compatible; Windows; U; Windows NT 6.2; en-US; rv:12.0) Gecko/20120403211507 Firefox/12.0 user_agent = Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearch/slurp) user_agent = Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp) user_agent = Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots) user_agent = Mozilla/5.0 (compatible; YandexFavicons/1.0; +http://yandex.com/bots) user_agent = Mozilla/5.0 (compatible; YodaoBot/1.0; http://www.yodao.com/help/webmaster/spider/; ) user_agent = Mozilla/5.0 (compatible; YoudaoBot/1.0; http://www.youdao.com/help/webmaster/spider/; ) user_agent = Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) user_agent = Mozilla/5.0 (compatible; discobot/2.0; +http://discoveryengine.com/discobot.html) user_agent = Mozilla/5.0 (compatible; discoverybot/2.0; +http://discoveryengine.com/discoverybot.html) user_agent = Mozilla/5.0 (compatible; ltbot/1.3; bot@language-tools.com) user_agent = Mozilla/5.0 (compatible; oBot/2.3.1; +http://filterdb.iss.net/crawler/) user_agent = Mozilla/5.0 (compatible; spbot/3.0; +http://www.seoprofiler.com/bot ) user_agent = Mozilla/5.0 (compatible; wmtips.com/1.0; +http://www.wmtips.com/tools/) user_agent = Mozilla/5.0 (compatible; woriobot +http://worio.com) user_agent = Mozilla/5.0 (compatible; woriobot support [at] worio [dot] com +http://worio.com) user_agent = Mozilla/5.0 (compatible;YodaoBot-Image/1.0;http://www.youdao.com/help/webmaster/spider/;) user_agent = Mozilla/5.0 (genuine; rv:13.0; OpenBSD) user_agent = Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.5; U; en-GB) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/234.83 Safari/534.6 TouchPad/1.0 user_agent = Mozilla/5.0 (iPad; CPU OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 user_agent = Mozilla/5.0 (iPad; CPU OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3 user_agent = Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B176 Safari/7534.48 Instapaper/4.2.2 (+http://www.instapaper.com/iphone) user_agent = Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3 user_agent = Mozilla/5.0 (iPad; CPU OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 user_agent = Mozilla/5.0 (iPad; CPU OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 Twitter for iPad user_agent = Mozilla/5.0 (iPad; CPU OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3 user_agent = Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 user_agent = Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10 user_agent = Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10 user_agent = Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; zh-cn) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10 user_agent = Mozilla/5.0 (iPad; U; CPU OS 4_3_5 like Mac OS X; en) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5 user_agent = Mozilla/5.0 (iPad; U; CPU OS 4_3_5 like Mac OS X; sk-sk) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5 user_agent = Mozilla/5.0 (iPad; U; CPU OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3 user_agent = Mozilla/5.0 (iPad; U; CPU OS 5_1 like Mac OS X; en-us) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B176 Safari/7534.48.3 user_agent = Mozilla/5.0 (iPad; U; CPU OS 5_1_1 like Mac OS X; de-de) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3 user_agent = Mozilla/5.0 (iPad; U; CPU OS 5_1_1 like Mac OS X; en-us) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3 user_agent = Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3 user_agent = Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3 user_agent = Mozilla/5.0 (iPhone; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B179 user_agent = Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 user_agent = Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 Twitter for iPhone user_agent = Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3 user_agent = Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B208 Safari/7534.48.3 user_agent = Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_1 like Max OS X; ja-jp) AppleWebKit/525.18.1 (KHTML, like Geko) BB2C/1.3.30 Version/3.1.1 Mobile/5F136 Safari/525.20 user_agent = Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7C144 Safari/528.16 user_agent = Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1_3 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7E18 Safari/528.16 user_agent = Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5 user_agent = Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; de-de) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3 user_agent = Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en-us) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3 user_agent = Mozilla/5.0 (iPhone; U; CPU iPhone OS 6_0 like Mac OS X; en-us) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/10A5376e Safari/7534.48.3 user_agent = Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en user_agent = Mozilla/5.0 (iPod; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 user_agent = Mozilla/5.0 (iPod; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 Twitter for iPhone user_agent = Mozilla/5.0 (iPod; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3 user_agent = Mozilla/5.0 (iPod; U; CPU iPhone OS 4_2_1 like Mac OS X; sv-se) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5 user_agent = Mozilla/5.0 Firefox/14.0 user_agent = Mozilla/5.0 Firefox/3.0.5 user_agent = Mozilla/5.0 Firefox/9.0.1 user_agent = Mozilla/5.0(compatible; Sosospider/2.0; +http://help.soso.com/webspider.htm) user_agent = Mozilla/5.0+(compatible;+googlebot/2.1;++http://www.google.com/bot.html) user_agent = Mozilla/5.1 (X11; OpenBSD amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.2+ user_agent = Mozilla/5.2 (X11; OpenBSD amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.2+ user_agent = Mozilla/5.3 (X11; OpenBSD amd64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ 1.2.2+ user_agent = Mozilla/6.0 (compatible; MSIE 7.0a1; Windows NT 5.2; SV1) user_agent = Mozilla/Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) user_agent = Mozilla: (compatible; Windows XP) user_agent = NING/1.0 user_agent = Newsify/51 CFNetwork/548.1.4 Darwin/11.0.0 user_agent = Nokia2700c-2/2.0 (09.98) Profile/MIDP-2.1 Configuration/CLDC-1.1 Mozilla/5.0 (Java; U; en-in; nokia2700c-2) UCBrowser8.2.1.144/69/352/UCWEB Mobile UNTRUSTED/1.0 user_agent = OpenBSD ftp user_agent = OpenLink Virtuoso RDF crawler user_agent = Opera/7.11 (Windows NT 5.1; U) [en] user_agent = Opera/7.54 (Windows NT 5.1; U) [ru] user_agent = Opera/7.60 (Windows NT 5.2; U) [en] (IBM EVV/3.0/EAK01AG9/LE) user_agent = Opera/8.00 (Windows NT 5.1; U; en) user_agent = Opera/9.00 (Windows NT 5.1; U; en) user_agent = Opera/9.20 (Windows NT 6.0; U; en) user_agent = Opera/9.23 (Windows NT 5.1; U; en) user_agent = Opera/9.64 (Windows NT 5.1; U; en) Presto/2.1.1 user_agent = Opera/9.80 (Android 2.3.3; Linux; Opera Mobi/ADR-1204201842; U; pl) Presto/2.10.254 Version/12.00 user_agent = Opera/9.80 (Android 2.3.4; Linux; Opera Mobi/ADR-1207201819; U; de) Presto/2.10.254 Version/12.00 user_agent = Opera/9.80 (Android 2.3.4; Linux; Opera Mobi/ADR-1207201819; U; en-GB) Presto/2.10.254 Version/12.00 user_agent = Opera/9.80 (Android 2.3.7; Linux; Opera Mobi/ADR-1205181138; U; cs) Presto/2.10.254 Version/12.00 user_agent = Opera/9.80 (Android 2.3.7; Linux; Opera Mobi/ADR-1207201819; U; en) Presto/2.10.254 Version/12.00 user_agent = Opera/9.80 (Android 2.3.7; Linux; Opera Mobi/ADR-1207201819; U; es-ES) Presto/2.10.254 Version/12.00 user_agent = Opera/9.80 (Android 4.0.3; Linux; Opera Mobi/ADR-1207201819; U; de) Presto/2.10.254 Version/12.00 user_agent = Opera/9.80 (Android 4.0.4; Linux; Opera Mobi/ADR-1207201819; U; en-GB) Presto/2.10.254 Version/12.00 user_agent = Opera/9.80 (Android; Opera Mini/7.0.29950/28.1914; U; ja) Presto/2.8.119 Version/11.10 user_agent = Opera/9.80 (Android; Opera Mini/7.0.29950/28.2197; U; ru) Presto/2.8.119 Version/11.10 user_agent = Opera/9.80 (Android; Opera Mini/7.0.29952/28.1977; U; es) Presto/2.8.119 Version/11.10 user_agent = Opera/9.80 (Android; Opera Mini/7.0.29952/28.2075; U; hu) Presto/2.8.119 Version/11.10 user_agent = Opera/9.80 (Android; Opera Mini/7.0.29952/28.2197; U; ja) Presto/2.8.119 Version/11.10 user_agent = Opera/9.80 (Android; Opera Mini/7.0.29952/28.2197; U; ru) Presto/2.8.119 Version/11.10 user_agent = Opera/9.80 (J2ME/MIDP; Opera Mini/4.1.15082/28.2075; U; en) Presto/2.8.119 Version/11.10 user_agent = Opera/9.80 (Linux armv7l; Maemo; Opera Mobi/14; U; fr) Presto/2.9.201 Version/11.50 user_agent = Opera/9.80 (Macintosh; Intel Mac OS X 10.6.6; U; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; es-ES) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Macintosh; Intel Mac OS X 10.7.4; U; Edition MAS; en) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (Macintosh; Intel Mac OS X 10.7.4; U; de) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Macintosh; Intel Mac OS X 10.7.4; U; en) Presto/2.10.229 Version/11.62 user_agent = Opera/9.80 (Macintosh; Intel Mac OS X 10.7.4; U; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Macintosh; Intel Mac OS X 10.7.4; U; en) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (Macintosh; Intel Mac OS X 10.7.4; U; pl) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Macintosh; Intel Mac OS X 10.8.0; U; Edition MAS; en) Presto/2.10.229 Version/11.66 user_agent = Opera/9.80 (S60; SymbOS; Opera Mobi/SYB-1203052169; U; en-GB) Presto/2.10.254 Version/12.00 user_agent = Opera/9.80 (S60; SymbOS; Opera Mobi/SYB-1204232254; U; es-ES) Presto/2.10.254 Version/12.00 user_agent = Opera/9.80 (Series 60; Opera Mini/7.0.29974/28.2144; U; hr) Presto/2.8.119 Version/11.10 user_agent = Opera/9.80 (Windows NT 5.0; U; de) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (Windows NT 5.0; U; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 5.1; U; Distribution 00; de) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 5.1; U; Distribution 00; de) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (Windows NT 5.1; U; Edition IBIS; zh-cn) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (Windows NT 5.1; U; Edition Indonesian Local; en) Presto/2.9.168 Version/11.52 user_agent = Opera/9.80 (Windows NT 5.1; U; Edition Next; Edition IBIS; zh-cn) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (Windows NT 5.1; U; Edition Next; de) Presto/2.11.310 Version/12.50 user_agent = Opera/9.80 (Windows NT 5.1; U; Edition United States Local; en-GB) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 5.1; U; MRA 5.10 (build 5339); ru) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (Windows NT 5.1; U; MRA 5.9 (build 4953); ru) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 5.1; U; cs) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60 user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60 at 109.230.251.24 using colorblind simulator at http://colorfilter.wickline.org/ user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60 at 198.143.159.231 using colorblind simulator at http://colorfilter.wickline.org/ user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60 at 37.59.194.23 using colorblind simulator at http://colorfilter.wickline.org/ user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60 at 46.119.120.182 using colorblind simulator at http://colorfilter.wickline.org/ user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60 at 80.5.203.43 using colorblind simulator at http://colorfilter.wickline.org/ user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60 at 80.82.68.250 using colorblind simulator at http://colorfilter.wickline.org/ user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60 at 93.174.95.149 using colorblind simulator at http://colorfilter.wickline.org/ user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60 at 94.46.8.183 using colorblind simulator at http://colorfilter.wickline.org/ user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.60 at 96.55.116.24 using colorblind simulator at http://colorfilter.wickline.org/ user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.289 Version/12.01 at 70.112.92.159 using colorblind simulator at http://colorfilter.wickline.org/ user_agent = Opera/9.80 (Windows NT 5.1; U; en) Presto/2.9.168 Version/11.51 user_agent = Opera/9.80 (Windows NT 5.1; U; es-ES) Presto/2.10.229 Version/11.62 user_agent = Opera/9.80 (Windows NT 5.1; U; fi) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 5.1; U; it) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 5.1; U; ja) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.10.229 Version/11.62 user_agent = Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.6.30 Version/10.63 user_agent = Opera/9.80 (Windows NT 5.1; U; zh-cn) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.0; U; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.0; U; en) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (Windows NT 6.0; U; it) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.0; U; ja) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (Windows NT 6.0; WOW64; U; Edition Next; en) Presto/2.11.310 Version/12.50 user_agent = Opera/9.80 (Windows NT 6.1; U; Edition Campaign 21; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; U; cs) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; U; de) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; U; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; U; en) Presto/2.7.62 Version/11.00 user_agent = Opera/9.80 (Windows NT 6.1; U; en-US) Presto/2.9.168 Version/11.50 user_agent = Opera/9.80 (Windows NT 6.1; U; es-ES) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; U; fr) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; U; ja) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; U; ru) Presto/2.9.211 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; Edition Campaign 21; cs) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; Edition Campaign 21; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; Edition Next; en) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; Edition United Kingdom Local; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; de) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; de) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; en) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; en) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; es-ES) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; ja) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; nl) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; ro) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; ru) Presto/2.10.229 Version/11.62 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; ru) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; ru) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; sv) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; sv) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (Windows NT 6.1; WOW64; U; zh-cn) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; Win64; x64; Edition Next) Presto/2.12.370 Version/12.50 user_agent = Opera/9.80 (Windows NT 6.1; Win64; x64; U; Edition Next; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; Win64; x64; U; Edition Next; ja) Presto/2.11.310 Version/12.50 user_agent = Opera/9.80 (Windows NT 6.1; Win64; x64; U; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (Windows NT 6.1; Win64; x64; U; sv) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (Windows; U; Windows NT 6.1) Presto/2.9.181 Version/12.00 user_agent = Opera/9.80 (X11; FreeBSD 10.0-CURRENT amd64; U; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; FreeBSD 9.0-RELEASE amd64; U; en) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (X11; FreeBSD 9.0-RELEASE-p3 amd64; U; en) Presto/2.10.229 Version/11.60 user_agent = Opera/9.80 (X11; FreeBSD 9.0-RELEASE-p3 amd64; U; fr) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (X11; FreeBSD 9.0-RELEASE-p3 amd64; U; ru) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; FreeBSD 9.0-RELEASE-p3 i386; U; zh-cn) Presto/2.10.229 Version/11.62 user_agent = Opera/9.80 (X11; FreeBSD 9.0-STABLE amd64; U; de) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; FreeBSD 9.0-STABLE amd64; U; en) Presto/2.10.229 Version/11.62 user_agent = Opera/9.80 (X11; FreeBSD 9.0-STABLE i386; U; en) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (X11; Linux i686; Edition Next) Presto/2.12.363 Version/12.50 user_agent = Opera/9.80 (X11; Linux i686; Edition Next) Presto/2.12.370 Version/12.50 user_agent = Opera/9.80 (X11; Linux i686; U; Edition Linux Mint; cs) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (X11; Linux i686; U; Edition Linux Mint; de) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (X11; Linux i686; U; Edition Linux Mint; de) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux i686; U; Edition Linux Mint; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux i686; U; Edition Linux Mint; hu) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux i686; U; Edition Linux Mint; pl) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux i686; U; Edition Linux Mint; pl) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (X11; Linux i686; U; Edition Next; de) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (X11; Linux i686; U; Edition Next; en) Presto/2.11.310 Version/12.50 user_agent = Opera/9.80 (X11; Linux i686; U; de) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux i686; U; en) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (X11; Linux i686; U; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux i686; U; en) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (X11; Linux i686; U; en) Presto/2.2.15 Version/10.10 user_agent = Opera/9.80 (X11; Linux i686; U; en) Presto/2.7.62 Version/11.01 user_agent = Opera/9.80 (X11; Linux i686; U; en) Presto/2.9.168 Version/11.52 user_agent = Opera/9.80 (X11; Linux i686; U; en-GB) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux i686; U; en-GB) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (X11; Linux i686; U; hr) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (X11; Linux i686; U; hu) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux i686; U; it) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux i686; U; it) Presto/2.9.168 Version/11.50 user_agent = Opera/9.80 (X11; Linux i686; U; ja) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux i686; U; ja) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (X11; Linux i686; U; nl) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux i686; U; pl) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (X11; Linux i686; U; ru) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (X11; Linux x86_64; Edition Next) Presto/2.12.363 Version/12.50 user_agent = Opera/9.80 (X11; Linux x86_64; Edition Next) Presto/2.12.370 Version/12.50 user_agent = Opera/9.80 (X11; Linux x86_64; U; Edition Linux Mint; en) Presto/2.10.229 Version/11.61 user_agent = Opera/9.80 (X11; Linux x86_64; U; Edition Linux Mint; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; Edition Linux Mint; en-GB) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; Edition Linux Mint; hu) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; Edition Linux Mint; it) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; Edition Linux Mint; pl) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; Edition Linux Mint; ru) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; Edition Next; de) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (X11; Linux x86_64; U; Edition Next; de) Presto/2.11.310 Version/12.50 user_agent = Opera/9.80 (X11; Linux x86_64; U; Edition Next; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; Edition Next; en-GB) Presto/2.11.310 Version/12.50 user_agent = Opera/9.80 (X11; Linux x86_64; U; de) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.9.168 Version/11.51 user_agent = Opera/9.80 (X11; Linux x86_64; U; en-GB) Presto/2.10.229 Version/11.64 user_agent = Opera/9.80 (X11; Linux x86_64; U; en-GB) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; en-GB) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (X11; Linux x86_64; U; en-GB) Presto/2.11.310 Version/12.50 user_agent = Opera/9.80 (X11; Linux x86_64; U; fr) Presto/2.10.229 Version/11.61 user_agent = Opera/9.80 (X11; Linux x86_64; U; fr) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; fr) Presto/2.10.289 Version/12.01 user_agent = Opera/9.80 (X11; Linux x86_64; U; hu) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; opera/9.50; en) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; ru) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; sv) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux x86_64; U; uk) Presto/2.10.289 Version/12.00 user_agent = Opera/9.80 (X11; Linux zbov; U; de) Presto/2.9.201 Version/11.50 user_agent = Opera/9.80 (X11; Linux zbov; U; en) Presto/2.10.254 Version/12.00 user_agent = Opera/9.80 (X11; OpenBSD i386; U; en) Presto/2.2.15 Version/10.11 user_agent = Opera/9.80 (X11; OpenBSD i386; U; fr) Presto/2.2.15 Version/10.11 user_agent = PHP user_agent = PHP/5.2.10 user_agent = PHP/5.2.17 user_agent = PHP/5.2.17p1 user_agent = PHP/5.2.9 user_agent = PHP/5.3.10 user_agent = PHP/5.3.13 user_agent = PHP/5.3.14 user_agent = PHP/5.3.15 user_agent = PHP/5.3.8 user_agent = PHP/SWeb.ru user_agent = PHP_sabilulungan.org user_agent = PagePeeker.com (info: http://pagepeeker.com/robots) user_agent = Peeplo Screenshot Bot/0.20 ( abuse at peeplo dot_com ) (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0) user_agent = Pingthesemanticweb-ping/3.0 user_agent = Pingthesemanticweb-robotvalidator/3.0 user_agent = PycURL/7.19.7 user_agent = Python-urllib/2.4 user_agent = Python-urllib/2.6 user_agent = Python-urllib/2.7 user_agent = Python-urllib/3.2 user_agent = R6_CommentReader(www.radian6.com/crawler) user_agent = R6_FeedFetcher_(www.radian6.com/crawler) user_agent = RSScache.com user_agent = RankFlex.com Webspider user_agent = Robots.txt finder user_agent = RockMeltEmbedService user_agent = SAMSUNG-SGH-E250/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html) user_agent = SWAT Crawler. AGH University project. In case of problem contact: opal@tempus.metal.agh.edu.pl. Thanks. user_agent = SeznamBot/3.0 (+http://fulltext.sblog.cz/) user_agent = ShowyouBot (http://showyou.com/crawler) user_agent = SimplePie/1.0 b3.2 (Feed Parser; http://simplepie.org/; Allow like Gecko) Build/20061124 user_agent = SimplePie/1.1 (Feed Parser; http://simplepie.org; Allow like Gecko) Build/20080102221556 user_agent = SimplePie/1.1.1 (Feed Parser; http://simplepie.org; Allow like Gecko) Build/20080315205903 user_agent = SimplePie/1.2.1-dev (Feed Parser; http://simplepie.org; Allow like Gecko) Build/20100222142157 user_agent = SimplePie/1.2.1-dev (Feed Parser; http://simplepie.org; Allow like Gecko) Build/20111014122352 user_agent = Sleipnir/3.5.0.1 CFNetwork/520.4.3 Darwin/11.4.0 (x86_64) (MacBookAir4%2C1) user_agent = Snappy/2.0 ( http://www.urltrends.com/ ) user_agent = Sogou Web Spider user_agent = Sogou web spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07) user_agent = SolomonoBot/1.02 (http://www.solomono.ru) user_agent = Sosospider+(+http://help.soso.com/webspider.htm) user_agent = StatusNet/1.0.1 (Get It Together) user_agent = Surf/0.4.1 (X11; U; Unix; en-US) AppleWebKit/531.2+ Compatible (Safari) user_agent = Surf/0.5 (X11; U; Unix; en-US) AppleWebKit/531.2+ Compatible (Safari) user_agent = Test Certificate Info user_agent = Testing/0.5.1 (+http://test.com; robot@test.com) user_agent = TipTop http://feeltiptop.com user_agent = TrackRank Spider V2.7(+http://TrackRank.net) user_agent = Twitterbot/1.0 user_agent = UnwindFetchor/1.0 (+http://www.gnip.com/) user_agent = UrlTrends Ranking Updater/2.0 user_agent = UrlTrends Ranking Updater/2.0 ( http://www.urltrends.com/ ) user_agent = Uzbl (Webkit 1.8) (OpenBSD amd64 [amd64]) user_agent = Vimprobable2/0.9.11.2 user_agent = W3C_I18n-Checker/1.0 user_agent = W3C_Validator/1.3 user_agent = WDG_Validator/1.6.5 user_agent = WWW::LayeredExtractor::Handler::Feed/0.01 user_agent = WebKit user_agent = WeeChat/0.3.8-rc1 (http://www.weechat.org) user_agent = Wget/1.12 (linux-gnu) user_agent = Wget/1.13.4 (linux-gnu) user_agent = WinHTTP user_agent = WinXP user_agent = WocBot/Mozilla/5.0 (Wocodi Web Crawler 1.0; http://www.wocodi.com/crawler; crawler@wocodi.com) user_agent = WordPress.com mShots; http://support.wordpress.com/contact/ user_agent = WordPress/2.8.5.2; http://www.enjoybuy.org user_agent = Wotbox/2.01 (+http://www.wotbox.com/bot/) user_agent = Xenu Link Sleuth/1.3.8 user_agent = Y!J-BRO/YFSJ crawler (compatible; Mozilla 4.0; MSIE 5.5; http://help.yahoo.co.jp/help/jp/search/indexing/indexing-15.html; YahooFeedSeekerJp/2.0) user_agent = Y!J-BRW/1.0 crawler (http://help.yahoo.co.jp/help/jp/search/indexing/indexing-15.html) user_agent = Yahoo! Slurp China user_agent = Yeti/1.0 (NHN Corp.; http://help.naver.com/robots/) user_agent = Zend_Http_Client user_agent = \x22Mozilla/5.0 (X11; Linux i686; rv:10.0.1) Gecko/20100101 Firefox/10.0.1\x22 user_agent = a4esl.org/p user_agent = aboutthedomain user_agent = bitlybot user_agent = blah user_agent = curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 user_agent = curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2 user_agent = curl/7.26.0 user_agent = dom2dom/1.0 user_agent = eSyndiCat Bot user_agent = facebookexternalhit/1.0 (+http://www.facebook.com/externalhit_uatext.php) user_agent = facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php) user_agent = facebookplatform/1.0 (+http://developers.facebook.com) user_agent = fastbot crawler beta 2.0 (+http://www.fastbot.de) user_agent = googlebot user_agent = gvfs/1.12.1 user_agent = hawc user_agent = http://dvlink.ru user_agent = ichiro/3.0 (http://help.goo.ne.jp/help/article/1142) user_agent = ichiro/3.0 (http://search.goo.ne.jp/option/use/sub4/sub4-1/) user_agent = libwww-perl/5.833 user_agent = libwww-perl/5.834 user_agent = libwww-perl/5.837 user_agent = libwww-perl/6.04 user_agent = lobste.rs! for 188.252.238.39 user_agent = magpie-crawler/1.1 (U; Linux amd64; en-GB; +http://www.brandwatch.net) user_agent = msnbot/2.0b (+http://search.msn.com/msnbot.htm) user_agent = netEstate NE Crawler (+http://www.sengine.info/) user_agent = ping.blo.gs/2.0 user_agent = python-requests.org user_agent = python-requests/0.13.5 CPython/2.6.6 Linux/2.6.32-5-686 user_agent = rbbot user_agent = rbot http util 0.9.15 (http://ruby-rbot.org) user_agent = spider user_agent = spotinfluence/Nutch-1.4 (Spot Influence crawler; http://spotinfluence.com; hello at spotinfluence dot com) user_agent = start.exe user_agent = w3m/0.5.2 user_agent = w3m/0.5.2+cvs-1.1027 user_agent = w3m/0.5.2+cvs-1.1039 user_agent = webcheck21 user_agent = websitevila user_agent = yacybot (freeworld/global; amd64 Linux 2.6.34-gentoo-r12; java 1.6.0_33; UTC/en) http://yacy.net/bot.html user_agent = yacybot (freeworld/global; amd64 Linux 3.4.4-3-ARCH; java 1.6.0_18; Europe/en) http://yacy.net/bot.html user_agent = yolinkBot user_agent = your-search-bot xombrero-1.6.4/version.h010064400017500000000000000022531247066410500142320ustar00dhillwheel/* * Copyright (c) 2011 Conformal Systems LLC * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef XOMBRERO_VERSION_H #define XOMBRERO_VERSION_H #define XOMBRERO_STR(x) #x #define XOMBRERO_STRINGIZE(x) XOMBRERO_STR(x) #define XOMBRERO_MAJOR 1 #define XOMBRERO_MINOR 6 #define XOMBRERO_PATCH 4 #define XOMBRERO_VERSION XOMBRERO_STRINGIZE(XOMBRERO_MAJOR) "." \ XOMBRERO_STRINGIZE(XOMBRERO_MINOR) "." \ XOMBRERO_STRINGIZE(XOMBRERO_PATCH) #endif /* XOMBRERO_VERSION_H */ xombrero-1.6.4/version.sh010075500017500000000000000012001247066410500144070ustar00dhillwheel#!/bin/sh # # Get version from header. # HEADER=version.h SCRIPT=version.sh if [ ! -f "$HEADER" ]; then echo "$SCRIPT: error: $HEADER does not exist" 1>&2 exit 1 fi PAT_PREFIX='^#define[[:space:]]+XOMBRERO_' PAT_SUFFIX='[[:space:]]+[0-9]+$' MAJOR=$(egrep "${PAT_PREFIX}MAJOR${PAT_SUFFIX}" $HEADER | awk '{print $3}') MINOR=$(egrep "${PAT_PREFIX}MINOR${PAT_SUFFIX}" $HEADER | awk '{print $3}') PATCH=$(egrep "${PAT_PREFIX}PATCH${PAT_SUFFIX}" $HEADER | awk '{print $3}') if [ -z "$MAJOR" -o -z "$MINOR" -o -z "$PATCH" ]; then echo "$SCRIPT: error: unable to get version from $HEADER" 1>&2 exit 1 fi echo $MAJOR.$MINOR.$PATCH | tr -d '\n' xombrero-1.6.4/whitelist.c010064400017500000000000000305161247066410500145570ustar00dhillwheel/* * Copyright (c) 2010, 2011 Marco Peereboom * Copyright (c) 2011 Stevan Andjelkovic * Copyright (c) 2010, 2011 Edd Barrett * Copyright (c) 2011 Todd T. Fries * Copyright (c) 2011 Raphael Graf * Copyright (c) 2011 Michal Mazurek * Copyright (c) 2012 Josh Rickmar * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include gchar * find_domain(const gchar *s, int flags) { SoupURI *uri; gchar *ret, *p; if (s == NULL) return (NULL); uri = soup_uri_new(s); if (uri == NULL) return (NULL); if (!SOUP_URI_VALID_FOR_HTTP(uri)) { soup_uri_free(uri); return (NULL); } if (flags & XT_WL_TOPLEVEL && !isdigit((unsigned char)uri->host[strlen(uri->host) - 1])) p = tld_get_suffix(uri->host); else p = uri->host; if (flags & XT_WL_TOPLEVEL) ret = g_strdup_printf(".%s", p); else /* assume FQDN */ ret = g_strdup(p); soup_uri_free(uri); return (ret); } struct wl_entry * wl_find(const gchar *s, struct wl_list *wl) { struct wl_entry *w; if (s == NULL || strlen(s) == 0 || wl == NULL) return (NULL); TAILQ_FOREACH(w, wl, entry) { if (w->re == NULL) continue; if (!regexec(w->re, s, 0, 0, 0)) return (w); } return (NULL); } int wl_save(struct tab *t, struct karg *args, int list) { char file[PATH_MAX], *lst_str = NULL; FILE *f = NULL; char *line = NULL, *lt = NULL, *dom; size_t linelen; const gchar *uri; struct karg a; struct wl_entry *w; GSList *cf; SoupCookie *ci, *c; if (t == NULL || args == NULL) return (1); if (runtime_settings[0] == '\0') return (1); switch (list) { case XT_WL_JAVASCRIPT: lst_str = "JavaScript"; break; case XT_WL_COOKIE: lst_str = "Cookie"; break; case XT_WL_PLUGIN: lst_str = "Plugin"; break; case XT_WL_HTTPS: lst_str = "HTTPS"; break; default: show_oops(t, "Invalid list id: %d", list); return (1); } uri = get_uri(t); dom = find_domain(uri, args->i); if (uri == NULL || dom == NULL || webkit_web_view_get_load_status(t->wv) == WEBKIT_LOAD_FAILED) { show_oops(t, "Can't add domain to %s white list", lst_str); goto done; } switch (list) { case XT_WL_JAVASCRIPT: lt = g_strdup_printf("js_wl=%s", dom); break; case XT_WL_COOKIE: lt = g_strdup_printf("cookie_wl=%s", dom); break; case XT_WL_PLUGIN: lt = g_strdup_printf("pl_wl=%s", dom); break; case XT_WL_HTTPS: lt = g_strdup_printf("force_https=%s", dom); break; default: /* can't happen */ show_oops(t, "Invalid list id: %d", list); goto done; } snprintf(file, sizeof file, "%s" PS "%s", work_dir, runtime_settings); if ((f = fopen(file, "r+")) == NULL) { show_oops(t, "can't open file %s"); goto done; } while (!feof(f)) { line = fparseln(f, &linelen, NULL, NULL, 0); if (line == NULL) continue; if (!strcmp(line, lt)) goto done; free(line); line = NULL; } fprintf(f, "%s\n", lt); a.i = XT_WL_ENABLE; a.i |= args->i; switch (list) { case XT_WL_JAVASCRIPT: w = wl_find(dom, &js_wl); if (w == NULL) { settings_add("js_wl", dom); w = wl_find(dom, &js_wl); } toggle_js(t, &a); break; case XT_WL_COOKIE: w = wl_find(dom, &c_wl); if (w == NULL) { settings_add("cookie_wl", dom); w = wl_find(dom, &c_wl); } toggle_cwl(t, &a); /* find and add to persistent jar */ cf = soup_cookie_jar_all_cookies(s_cookiejar); for (;cf; cf = cf->next) { ci = cf->data; if (!strcmp(dom, ci->domain) || !strcmp(&dom[1], ci->domain)) /* deal with leading . */ { c = soup_cookie_copy(ci); _soup_cookie_jar_add_cookie(p_cookiejar, c); } } soup_cookies_free(cf); break; case XT_WL_PLUGIN: w = wl_find(dom, &pl_wl); if (w == NULL) { settings_add("pl_wl", dom); w = wl_find(dom, &pl_wl); } toggle_pl(t, &a); break; case XT_WL_HTTPS: w = wl_find(dom, &force_https); if (w == NULL) { settings_add("force_https", dom); w = wl_find(dom, &force_https); } toggle_force_https(t, &a); break; default: abort(); /* can't happen */ } if (w != NULL) w->handy = 1; done: if (line) free(line); if (dom) g_free(dom); if (lt) g_free(lt); if (f) fclose(f); return (0); } int wl_show(struct tab *t, struct karg *args, char *title, struct wl_list *wl) { struct wl_entry *w; char *tmp, *body; body = g_strdup(""); /* p list */ if (args->i & XT_WL_PERSISTENT) { tmp = body; body = g_strdup_printf("%s

Persistent

", body); g_free(tmp); TAILQ_FOREACH(w, wl, entry) { if (w->handy == 0) continue; tmp = body; body = g_strdup_printf("%s%s
", body, w->pat); g_free(tmp); } } /* s list */ if (args->i & XT_WL_SESSION) { tmp = body; body = g_strdup_printf("%s

Session

", body); g_free(tmp); TAILQ_FOREACH(w, wl, entry) { if (w->handy == 1) continue; tmp = body; body = g_strdup_printf("%s%s
", body, w->pat); g_free(tmp); } } tmp = get_html_page(title, body, "", 0); g_free(body); if (wl == &js_wl) load_webkit_string(t, tmp, XT_URI_ABOUT_JSWL, 0); else if (wl == &c_wl) load_webkit_string(t, tmp, XT_URI_ABOUT_COOKIEWL, 0); else if (wl == &pl_wl) load_webkit_string(t, tmp, XT_URI_ABOUT_PLUGINWL, 0); else if (wl == &force_https) load_webkit_string(t, tmp, XT_URI_ABOUT_HTTPS, 0); g_free(tmp); return (0); } void wl_add(const char *str, struct wl_list *wl, int flags) { struct wl_entry *w; int add_dot = 0, chopped = 0; const char *s = str; char *escstr, *p, *pat; char **sv; if (str == NULL || wl == NULL || strlen(str) < 2) return; DNPRINTF(XT_D_COOKIE, "wl_add in: %s\n", str); /* slice off port number */ p = g_strrstr(str, ":"); if (p) *p = '\0'; w = g_malloc(sizeof *w); w->re = g_malloc(sizeof *w->re); if (flags & XT_WL_REGEX) { w->pat = g_strdup_printf("re:%s", str); regcomp(w->re, str, REG_EXTENDED | REG_NOSUB); DNPRINTF(XT_D_COOKIE, "wl_add: %s\n", str); } else { /* treat *.moo.com the same as .moo.com */ if (s[0] == '*' && s[1] == '.') s = &s[1]; else if (s[0] != '.' && (flags & XT_WL_TOPLEVEL)) add_dot = 1; if (s[0] == '.') { s = &s[1]; chopped = 1; } sv = g_strsplit(s, ".", 0); escstr = g_strjoinv("\\.", sv); g_strfreev(sv); if (add_dot) { w->pat = g_strdup_printf(".%s", str); pat = g_strdup_printf("^(.*\\.)*%s$", escstr); regcomp(w->re, pat, REG_EXTENDED | REG_NOSUB); } else { w->pat = g_strdup(str); if (chopped) pat = g_strdup_printf("^(.*\\.)*%s$", escstr); else pat = g_strdup_printf("^%s$", escstr); regcomp(w->re, pat, REG_EXTENDED | REG_NOSUB); } DNPRINTF(XT_D_COOKIE, "wl_add: %s\n", pat); g_free(escstr); g_free(pat); } w->handy = (flags & XT_WL_PERSISTENT) ? 1 : 0; TAILQ_INSERT_HEAD(wl, w, entry); return; } int add_cookie_wl(struct settings *s, char *entry) { if (g_str_has_prefix(entry, "re:")) { entry = &entry[3]; wl_add(entry, &c_wl, XT_WL_PERSISTENT | XT_WL_REGEX); } else wl_add(entry, &c_wl, XT_WL_PERSISTENT); return (0); } int add_js_wl(struct settings *s, char *entry) { if (g_str_has_prefix(entry, "re:")) { entry = &entry[3]; wl_add(entry, &js_wl, XT_WL_PERSISTENT | XT_WL_REGEX); } else wl_add(entry, &js_wl, XT_WL_PERSISTENT); return (0); } int add_pl_wl(struct settings *s, char *entry) { if (g_str_has_prefix(entry, "re:")) { entry = &entry[3]; wl_add(entry, &pl_wl, XT_WL_PERSISTENT | XT_WL_REGEX); } else wl_add(entry, &pl_wl, XT_WL_PERSISTENT); return (0); } int toggle_cwl(struct tab *t, struct karg *args) { struct wl_entry *w; const gchar *uri; char *dom = NULL; int es; if (args == NULL) return (1); uri = get_uri(t); dom = find_domain(uri, args->i); if (uri == NULL || dom == NULL || webkit_web_view_get_load_status(t->wv) == WEBKIT_LOAD_FAILED) { show_oops(t, "Can't toggle domain in cookie white list"); goto done; } w = wl_find(dom, &c_wl); if (w == NULL) es = 0; else es = 1; if (args->i & XT_WL_TOGGLE) es = !es; else if ((args->i & XT_WL_ENABLE) && es != 1) es = 1; else if ((args->i & XT_WL_DISABLE) && es != 0) es = 0; if (es) { /* enable cookies for domain */ args->i |= !XT_WL_PERSISTENT; wl_add(dom, &c_wl, args->i); } else { /* disable cookies for domain */ if (w != NULL) { TAILQ_REMOVE(&c_wl, w, entry); g_free(w->re); g_free(w->pat); } } if (args->i & XT_WL_RELOAD) webkit_web_view_reload(t->wv); done: g_free(dom); return (0); } int toggle_js(struct tab *t, struct karg *args) { int es; const gchar *uri; struct wl_entry *w; char *dom = NULL; if (args == NULL) return (1); g_object_get(G_OBJECT(t->settings), "enable-scripts", &es, (char *)NULL); if (args->i & XT_WL_TOGGLE) es = !es; else if ((args->i & XT_WL_ENABLE) && es != 1) es = 1; else if ((args->i & XT_WL_DISABLE) && es != 0) es = 0; else return (1); uri = get_uri(t); dom = find_domain(uri, args->i); if (uri == NULL || dom == NULL || webkit_web_view_get_load_status(t->wv) == WEBKIT_LOAD_FAILED) { show_oops(t, "Can't toggle domain in JavaScript white list"); goto done; } if (es) { button_set_icon_name(t->js_toggle, "media-playback-start"); args->i |= !XT_WL_PERSISTENT; wl_add(dom, &js_wl, args->i); } else { w = wl_find(dom, &js_wl); if (w != NULL) { TAILQ_REMOVE(&js_wl, w, entry); g_free(w->re); g_free(w->pat); } button_set_icon_name(t->js_toggle, "media-playback-pause"); } g_object_set(G_OBJECT(t->settings), "enable-scripts", es, (char *)NULL); g_object_set(G_OBJECT(t->settings), "javascript-can-open-windows-automatically", js_auto_open_windows ? es : 0, (char *)NULL); webkit_web_view_set_settings(t->wv, t->settings); if (args->i & XT_WL_RELOAD) webkit_web_view_reload(t->wv); done: if (dom) g_free(dom); return (0); } int toggle_pl(struct tab *t, struct karg *args) { int es; const gchar *uri; struct wl_entry *w; char *dom = NULL; if (args == NULL) return (1); g_object_get(G_OBJECT(t->settings), "enable-plugins", &es, (char *)NULL); if (args->i & XT_WL_TOGGLE) es = !es; else if ((args->i & XT_WL_ENABLE) && es != 1) es = 1; else if ((args->i & XT_WL_DISABLE) && es != 0) es = 0; else return (1); uri = get_uri(t); dom = find_domain(uri, args->i); if (uri == NULL || dom == NULL || webkit_web_view_get_load_status(t->wv) == WEBKIT_LOAD_FAILED) { show_oops(t, "Can't toggle domain in plugins white list"); goto done; } if (es) { args->i |= !XT_WL_PERSISTENT; wl_add(dom, &pl_wl, args->i); } else { w = wl_find(dom, &pl_wl); if (w != NULL) { TAILQ_REMOVE(&pl_wl, w, entry); g_free(w->re); g_free(w->pat); } } g_object_set(G_OBJECT(t->settings), "enable-plugins", es, (char *)NULL); webkit_web_view_set_settings(t->wv, t->settings); if (args->i & XT_WL_RELOAD) webkit_web_view_reload(t->wv); done: if (dom) g_free(dom); return (0); } int toggle_force_https(struct tab *t, struct karg *args) { int es; const gchar *uri; struct wl_entry *w; char *dom = NULL; if (args == NULL) return (1); uri = get_uri(t); dom = find_domain(uri, args->i); if (uri == NULL || dom == NULL || webkit_web_view_get_load_status(t->wv) == WEBKIT_LOAD_FAILED) { show_oops(t, "Can't toggle domain in https force list"); goto done; } w = wl_find(dom, &force_https); if (w == NULL) es = 0; else es = 1; if (args->i & XT_WL_TOGGLE) es = !es; else if ((args->i & XT_WL_ENABLE) && es != 1) es = 1; else if ((args->i & XT_WL_DISABLE) && es != 0) es = 0; if (es) { args->i |= !XT_WL_PERSISTENT; wl_add(dom, &force_https, args->i); } else if (w != NULL) { TAILQ_REMOVE(&force_https, w, entry); g_free(w->re); g_free(w->pat); } if (args->i & XT_WL_RELOAD) webkit_web_view_reload(t->wv); done: if (dom) g_free(dom); return (0); } xombrero-1.6.4/xombrero.1010064400017500000000000001377331247066410500143270ustar00dhillwheel.\" Copyright (c) 2010, 2011, 2012 Marco Peereboom .\" Copyright (c) 2011 Jason McIntyre .\" Copyright (c) 2012 Josh Rickmar .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd $Mdocdate: August 23 2012 $ .Dt XOMBRERO 1 .Os .Sh NAME .Nm xombrero .Nd lightweight web browser .Sh SYNOPSIS .Nm xombrero .Bk -words .Op Fl nSTtV .Op Fl f Ar file .Op Fl s Ar session_name .Op Ar url ... .Ek .Sh DESCRIPTION .Nm is a minimalistic web browser that tries to stay out of the way so that valuable screen real estate can be used for much more important stuff. It has sane defaults and does not require one to learn a language to do any configuration. It was written by hackers for hackers and it strives to be small, compact, and fast. .Pp .Nm is very simple in its use. Most actions are initiated via key or mouse bindings. Key bindings are based on those of the .Xr vi 1 text editor, giving web browsing a similar feel to navigating a text document. The .Sx KEY BINDINGS section below documents the various defaults and possible customizations. .Pp The options are as follows: .Bl -tag -width Ds .It Fl f Ar file Specify an alternative configuration file. .It Fl n Open a new tab in a running .Nm for each specified URL. This option requires .Cm enable_socket to be enabled. .It Fl e Ar command Execute arbitrary command (see the .Sx COMMAND MODE section below) in a running .Nm instance. This option requires .Cm enable_socket to be enabled. Example run: xombrero -e "tabnew openbsd.org"; xombrero -e tabclose; xombrero -e wq. .It Fl S Disable the toolbar. .It Fl s Ar session_name Open session that was saved with ":session save" command. .It Fl T Disable visualization of tabs. .It Fl t Disable tabs. Pages that would open in tabs open in new windows instead. .It Fl V Display version and exit. .El .Sh FAST STARTUP The following notation is used throughout this page: .Pp .Bl -tag -width Ds -offset indent -compact .It Cm C- Control .It Cm S- Shift .It Cm M1- Meta 1 (sometimes marked Alt) .It Cm M2- Meta 2 .It Cm M3- Meta 3 .It Cm M4- Meta 4 (sometimes marked Windows) .It Cm M5- Meta 2 .It Cm MB1 Mouse button 1 .El .Pp To browse to a specific address, either use the mouse to click on the address bar or press .Cm F6 to shift the keyboard focus to the address bar. The address is then entered manually. .Pp The mouse can be used to navigate the page in the traditional manner, or the keyboard can be used instead. For example, .Cm PageUp and .Cm PageDown will scroll up and down the page. .Pp To follow a link, either click on it or use the .Cm f key and have .Nm assign numbers to each link on the page; entering that number on the keyboard will prompt .Nm to follow the link. .Sh KEY BINDINGS .Nm provides many actions accessed via key or mouse bindings. Most can be reprogrammed using a .Cm keybinding entry in the configuration file. Each keyboard shortcut requires exactly one entry in the configuration file. A shortcut can have multiple entries in the configuration file. The format of the keybinding entry is as follows: .Pp .D1 keybinding = (:)action,(!)keystroke(s) .Pp For example, "keybinding = tabnew,C-t" where .Cm tabnew is the action and .Cm C-t are the keystrokes. .Pp Actions may be any xombrero command that can be run from the command prompt. There is one additional action, .Cm unbind , which will unbind any previous actions to that keybinding. .Pp If the action begins with a colon, the action will be entered into the command prompt instead of being executed. For example, "keybinding = :session open ,M1-s" will open the command prompt with ":open session " entered when using the M1-s keybinding. .Pp Keybindings which open the command prompt may also include the string , which will be replaced by the current tab's URI. For example, "keybinding = :open ,F10" will open the command prompt with replaced with the current URI. .Pp GTK has some default keybindings for manipulating text inside input fields, such as the URI or search entry widget, for example .Cm C-w deletes a word. To override these defaults prefix your key with an exclamation mark (!), like this: "keybinding = tabclose,!C-w". The .Cm clearall key word is special and is meant to reset the key binding list to the GTK+ and WebKit defaults. This keyword should be the first .Cm keybinding entry in the configuration file. .Pp Shift should be used sparingly since it gets in the way of non-USA keyboards. See the accompanying configuration file for examples. .Pp The various bindings are documented below. The relevant keybinding action is given afterwards, in parentheses. .Ss Command mode These commands are used to focus or unfocus input on the default input of a web page. .Pp .Bl -tag -width Ds -offset indent -compact .It Cm ESC Go to command mode; unfocus current entry on web page. .Pq Cm command_mode .It Cm i Go to insert mode; focus on default entry on web page. .Pq Cm insert_mode .El .Ss Search Commands These commands are used to search for text strings within a web page. .Pp .Bl -tag -width Ds -offset indent -compact .It Cm / Start a search .Pq Cm search .It Cm \&? Start a backwards search .Pq Cm searchb .It Cm n Next item matching search .Pq Cm searchnext .It Cm N Previous item matching search .Pq Cm searchprev .El .Ss Focus Commands These commands are used to shift the focus of .Nm from one area to another. .Pp .Bl -tag -width Ds -offset indent -compact .It Cm F6 Focus on address bar .Pq Cm focusaddress .It Cm F7 Focus on search entry .Pq Cm focussearch .El .Ss Command Aliases These commands allow the user to map specific actions to specific keys. .Pp .Bl -tag -width Ds -offset indent -compact .It Cm F1 Alias for "help" .It Cm F2 Alias for "proxy toggle" .It Cm F4 Alias for "toplevel toggle" .El .Ss Prompt Aliases These commands allow the user to open a prompt. These can be useful when the .Fl S option is used. .Pp .Bl -tag -width Ds -offset indent -compact .It Cm F9 Alias for ":open " .It Cm F10 Alias for ":open " .It Cm F11 Alias for ":tabnew " .It Cm F12 Alias for ":tabnew " .El .Ss Navigation Commands These commands allow the user to navigate web pages and, to some extent, control the browser. .Pp .Bl -tag -width "Space, C-f, PageDownXXX" -offset indent -compact .It Cm F5, C-r, C-l Reload page .Pq Cm reload .It Cm BackSpace, M-Left Previous page .Pq Cm goback .It Cm S-BackSpace, M-Right Forward page .Pq Cm goforward .It Cm j, Down Next line on page .Pq Cm scrolldown .It Cm k, Up Previous line on page .Pq Cm scrollup .It Cm G, End Bottom of page .Pq Cm scrollbottom .It Cm gg, Home Top of page .Pq Cm scrolltop .It Cm Space, C-f, PageDown Page down .Pq Cm scrollpagedown .It Cm C-b, PageUp Page up .Pq Cm scrollpageup .It Cm l, Right Page right .Pq Cm scrollright .It Cm h, Left Page left .Pq Cm scrollleft .It Cm $ Page far right .Pq Cm scrollfarright .It Cm 0 Page far left .Pq Cm scrollfarleft .It Cm M-f Favorites .Pq Cm fav .It Cm M-j Cookie jar .Pq Cm cookiejar .It Cm M-d Download manager .Pq Cm dl .It Cm C-p Print page .Pq Cm print .It Cm M-h Global history .Pq Cm history .It Cm C-j Toggle JavaScript enabled for FQDN .Pq Cm js .It Cm C-s Toggle source view .Pq Cm togglesrc .It Cm M-c Toggle cookie enabled for FQDN .Pq Cm cookie .It Cm M-p Toggle plugins enabled for FQDN .Pq Cm plugin .El .Ss Tab Manipulation .Nm supports tabbed browsing. That is, web pages may be opened in separate tabs, allowing the user to quickly move from one page to another, and back. These commands then are used to create, destroy, and move between tabs. .Pp .Bl -tag -width "C-plus, C-equalXXX" -offset indent -compact .It Cm C-MB1 Open new tab with the clicked link .It Cm C-t Create new tab with focus in URL entry .Pq Cm tabnew .It Cm C-T Create new tab with focus in URL entry as the last tab in the browser .Pq Cm 999tabnew .It Cm C-w Destroy current tab .Pq Cm tabclose .It Cm U Undo close tab .Pq Cm tabundoclose .It Cm C-Left, C-PageUp Go to the previous tab .Pq Cm tabprevious .It Cm C-Right, C-PageDown Go to the next tab .Pq Cm tabnext .It Cm C-[1..9] Jump to page .Ar N .Pq Cm tabnext [1..9] .It Cm C-< Jump to first page .Pq Cm tabfirst .It Cm C-> Jump to last page .Pq Cm tablast .It Cm C-minus Zoom out by 4% .Pq Cm focusout .It Cm C-plus, C-equal Zoom in by 4% .Pq Cm focusin .It Cm C-0 Set zoom level to 100% .Pq Cm focusreset .El .Ss Yanking and pasting These commands copy and paste text to and from the clipboard. .Pp .Bl -tag -width Ds -offset indent -compact .It Cm p Paste the contents of the clipboard into the address bar .Pq Cm pasteuricur .It Cm P Paste the contents of the clipboard into a new tab .Pq Cm pasteurinew .It Cm y Yank the current URL into the clipboard .Pq Cm yankuri .El .Ss Hyperlink Following This allows the user to follow hyperlinks without using a mouse. Enter the corresponding number to follow the link. Alternatively one can type the name of the link and when there are no more possibilities .Nm will follow the link. .Pp .Bl -tag -width Ds -offset indent -compact .It Cm f, '.' Highlight all links and prefix them with a number. .Pq Cm hinting .It Cm F, ',' Highlight all links and prefix them with a number but open in a new tab. .Pq Cm hinting_newtab .El .Ss Exiting Commands to exit the browser. .Pp .Bl -tag -width Ds -offset indent -compact .It Cm C-q Quit .Pq Cm quitall .El .Ss Low-Contrast Color Scheme These commands toggle the page style between the default CSS and a low-contrast color scheme with light grey text on a dark grey background. If the .Cm userstyle setting is changed, that stylesheet will be used instead of the low-contrast color scheme. .Pp .Bl -tag -width Ds -offset indent -compact .It Cm s Toggle the current tab's style. .Pq Cm userstyle .It Cm S Toggle the global page style mode. Will also affect new tabs. .Pq Cm userstyle_global .El .Ss Insert-mode commands The following commands are only available when editing an input-field .Pp .Bl -tag -width Ds -offset indent -compact .It Cm C-i Edit the contents of the currently active input-element in an external editor. .Pq Cm editelement .El .Sh COMMAND MODE Command mode works in a similar fashion to the .Xr vi 1 editor; it is entered by typing a colon and exited by pressing Esc. The commands and their descriptions are listed below. .Bl -tag -width Ds -offset indent .It Cm about , version Display the About page. .It Cm buffers , ls , tabs Display the currently opened tabs and let the user switch tabs by typing the tab number or by using the mouse. .It Cm ca Display CA certificates. .It Cm cert , cert show Download and display certificates of the domain on current tab. .It Cm cert save Save certificate into a local store. The next time the site is visited it is compared against the store. If the certificate matches, the address bar will be blue; if it doesn't the bar will be red. .It Cm cookie The .Cm cookie command is used to manipulate the cookie whitelist. Used by itself it expands to .Cm cookie show all . .It Cm cookiejar Show cookie jar contents. .It Cm cookie purge Remove all cookies from the cookie jar. .It Cm cookie save, cookie save fqdn Save the current fully qualified domain name (FQDN) to the persistent whitelist. For example, the www.peereboom.us domain would result in saving www.peereboom.us. .It Cm cookie save domain Save the top level domain name to the persistent whitelist. For example, the www.peereboom.us domain would result in saving .peereboom.us. .Pp This action enables cookies if it is currently disabled for this entry. .It Cm cookie show all Show all persistent and session entries in the cookie whitelist. .It Cm cookie show persistent Show all persistent entries in the cookie whitelist. .It Cm cookie show session Show all session entries in the cookie whitelist. .It Cm cookie toggle domain Toggle cookie support for the current top level domain. .It Cm cookie toggle, cookie toggle fqdn Toggle cookie support for the current FQDN. .It Cm dl Show download manager. .It Cm encoding Op Ar encoding Set the current tab's encoding to .Ar encoding and reload the tab. If .Ar encoding is not provided, the current tab's encoding is displayed. .It Cm editsrc Open the source for the current tab in the editor specified by the setting .Cm external_editor and then check for changes to the file opened. If it is changed, the page will be updated. .It Cm editelement If a text-element is currently active ( or