commit 8fb58d1b3a06f2a6510f2c03979e870e6d305c8d Author: boB Rudis Date: Sat Mar 2 19:09:41 2019 -0500 in-progress diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dc63652 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +# ---> R +# History files +.Rhistory +.Rapp.history + +# Session Data files +.RData + +# Example code in package build process +*-Ex.R + +# Output files from R CMD build +/*.tar.gz + +# Output files from R CMD check +/*.Rcheck/ + +# RStudio files +.Rproj.user/ + +# produced vignettes +vignettes/*.html +vignettes/*.pdf + +# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 +.httr-oauth + +# knitr and R markdown default cache directories +/*_cache/ +/cache/ + +# Temporary files created by R markdown +*.utf8.md +*.knit.md + +# Shiny token, see https://shiny.rstudio.com/articles/shinyapps.html +rsconnect/ + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d449d3e --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) + +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 (including the next +paragraph) 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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..ba49dc5 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# cran-mirror-security + +Exploring CRAN claims of the "security" of CRAN mirrors \ No newline at end of file diff --git a/cran-mirror-security.Rproj b/cran-mirror-security.Rproj new file mode 100644 index 0000000..d96a2b3 --- /dev/null +++ b/cran-mirror-security.Rproj @@ -0,0 +1,15 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +StripTrailingWhitespace: Yes diff --git a/data/cran-dns.rds b/data/cran-dns.rds new file mode 100644 index 0000000..8cc172e Binary files /dev/null and b/data/cran-dns.rds differ diff --git a/data/cran-mirror-other-things.rds b/data/cran-mirror-other-things.rds new file mode 100644 index 0000000..228e47b Binary files /dev/null and b/data/cran-mirror-other-things.rds differ diff --git a/data/cran-recog.rds b/data/cran-recog.rds new file mode 100644 index 0000000..bfd5e3f Binary files /dev/null and b/data/cran-recog.rds differ diff --git a/data/mir-dat.rds b/data/mir-dat.rds new file mode 100644 index 0000000..4ed9467 Binary files /dev/null and b/data/mir-dat.rds differ diff --git a/data/mirrors.html b/data/mirrors.html new file mode 100644 index 0000000..2c3a0cc --- /dev/null +++ b/data/mirrors.html @@ -0,0 +1,1720 @@ + + + + +CRAN - Mirrors + + + + + + +

CRAN Mirrors

+ +

+ The Comprehensive R Archive Network is available at the following + URLs, please choose a location close to you. Some statistics on the + status of the mirrors can be found here: + main page, + windows release, + windows old release. +

+ +

+ If you want to host a new mirror at your institution, please have a + look at the CRAN Mirror HOWTO. +

+ +
+
0-Cloud
+
+ + + + + + + + + + + +
+https://cloud.r-project.org/ + +Automatic redirection to servers worldwide, currently sponsored by Rstudio +
+http://cloud.r-project.org/ + +Automatic redirection to servers worldwide, currently sponsored by Rstudio +
+
+
Algeria
+
+ + + + + + + + + + + +
+https://cran.usthb.dz/ + +University of Science and Technology Houari Boumediene +
+http://cran.usthb.dz/ + +University of Science and Technology Houari Boumediene +
+
+
Argentina
+
+ + + + + + +
+http://mirror.fcaglp.unlp.edu.ar/CRAN/ + +Universidad Nacional de La Plata +
+
+
Australia
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+https://cran.csiro.au/ + +CSIRO +
+http://cran.csiro.au/ + +CSIRO +
+https://mirror.aarnet.edu.au/pub/CRAN/ + +AARNET +
+https://cran.ms.unimelb.edu.au/ + +School of Mathematics and Statistics, University of Melbourne +
+https://cran.curtin.edu.au/ + +Curtin University of Technology +
+
+
Austria
+
+ + + + + + + + + + + +
+https://cran.wu.ac.at/ + +Wirtschaftsuniversität Wien +
+http://cran.wu.ac.at/ + +Wirtschaftsuniversität Wien +
+
+
Belgium
+
+ + + + + + + + + + + + + + + + + + + + + +
+https://www.freestatistics.org/cran/ + +Patrick Wessa +
+http://www.freestatistics.org/cran/ + +Patrick Wessa +
+https://lib.ugent.be/CRAN/ + +Ghent University Library +
+http://lib.ugent.be/CRAN/ + +Ghent University Library +
+
+
Brazil
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+http://nbcgib.uesc.br/mirrors/cran/ + +Computational Biology Center at Universidade Estadual de Santa Cruz +
+https://cran-r.c3sl.ufpr.br/ + +Universidade Federal do Parana +
+http://cran-r.c3sl.ufpr.br/ + +Universidade Federal do Parana +
+https://cran.fiocruz.br/ + +Oswaldo Cruz Foundation, Rio de Janeiro +
+http://cran.fiocruz.br/ + +Oswaldo Cruz Foundation, Rio de Janeiro +
+https://vps.fmvz.usp.br/CRAN/ + +University of Sao Paulo, Sao Paulo +
+http://vps.fmvz.usp.br/CRAN/ + +University of Sao Paulo, Sao Paulo +
+https://brieger.esalq.usp.br/CRAN/ + +University of Sao Paulo, Piracicaba +
+http://brieger.esalq.usp.br/CRAN/ + +University of Sao Paulo, Piracicaba +
+
+
Bulgaria
+
+ + + + + + + + + + + +
+https://ftp.uni-sofia.bg/CRAN/ + +Sofia University +
+http://ftp.uni-sofia.bg/CRAN/ + +Sofia University +
+
+
Canada
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+https://mirror.its.sfu.ca/mirror/CRAN/ + +Simon Fraser University, Burnaby +
+http://cran.stat.sfu.ca/ + +Simon Fraser University, Burnaby +
+https://muug.ca/mirror/cran/ + +Manitoba Unix User Group +
+http://muug.ca/mirror/cran/ + +Manitoba Unix User Group +
+https://mirror.its.dal.ca/cran/ + +Dalhousie University, Halifax +
+http://mirror.its.dal.ca/cran/ + +Dalhousie University, Halifax +
+http://cran.utstat.utoronto.ca/ + +University of Toronto +
+
+
Chile
+
+ + + + + + + + + + + + + + + + +
+https://dirichlet.mat.puc.cl/ + +Pontificia Universidad Catolica de Chile, Santiago +
+http://dirichlet.mat.puc.cl/ + +Pontificia Universidad Catolica de Chile, Santiago +
+https://cran.dcc.uchile.cl/ + +Departamento de Ciencias de la Computación, Universidad de Chile +
+
+
China
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+https://mirrors.tuna.tsinghua.edu.cn/CRAN/ + +TUNA Team, Tsinghua University +
+http://mirrors.tuna.tsinghua.edu.cn/CRAN/ + +TUNA Team, Tsinghua University +
+https://mirrors.ustc.edu.cn/CRAN/ + +University of Science and Technology of China +
+http://mirrors.ustc.edu.cn/CRAN/ + +University of Science and Technology of China +
+https://mirror-hk.koddos.net/CRAN/ + +KoDDoS in Hong Kong +
+https://mirrors.eliteu.cn/CRAN/ + +Elite Education +
+https://mirror.lzu.edu.cn/CRAN/ + +Lanzhou University Open Source Society +
+http://mirror.lzu.edu.cn/CRAN/ + +Lanzhou University Open Source Society +
+https://mirrors.tongji.edu.cn/CRAN/ + +Tongji University +
+https://mirrors.shu.edu.cn/CRAN/ + +Shanghai University +
+
+
Colombia
+
+ + + + + + + + + + + +
+https://www.icesi.edu.co/CRAN/ + +Icesi University +
+http://www.icesi.edu.co/CRAN/ + +Icesi University +
+
+
Czech Republic
+
+ + + + + + + + + + + +
+https://mirrors.nic.cz/R/ + +CZ.NIC, Prague +
+http://mirrors.nic.cz/R/ + +CZ.NIC, Prague +
+
+
Denmark
+
+ + + + + + + + + + + +
+https://mirrors.dotsrc.org/cran/ + +Aalborg University +
+http://mirrors.dotsrc.org/cran/ + +Aalborg University +
+
+
0-Cloud-East-Asia
+
+ + + + + + +
+https://cran.asia/ + +Personnel Psychology Laboratory, Industrial Psychology Department, Kwangwoon University (sites: Tokyo, Seoul/Wonjoo, Singapore) +
+
+
Ecuador
+
+ + + + + + + + + + + + + + + + +
+https://mirror.cedia.org.ec/CRAN/ + +CEDIA +
+http://mirror.cedia.org.ec/CRAN/ + +CEDIA +
+https://mirror.epn.edu.ec/CRAN/ + +Escuela Politécnica Nacional +
+
+
El Salvador
+
+ + + + + + +
+http://cran.salud.gob.sv/ + +Ministry of Health (Ministerio de Salud) +
+
+
Estonia
+
+ + + + + + + + + + + +
+https://ftp.eenet.ee/pub/cran/ + +EENet +
+http://ftp.eenet.ee/pub/cran/ + +EENet +
+
+
France
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+https://pbil.univ-lyon1.fr/CRAN/ + +Dept. of Biometry & Evol. Biology, University of Lyon +
+https://mirror.ibcp.fr/pub/CRAN/ + +CNRS IBCP, Lyon +
+http://mirror.ibcp.fr/pub/CRAN/ + +CNRS IBCP, Lyon +
+https://cran.biotools.fr/ + +IBDM, Marseille +
+http://cran.biotools.fr/ + +IBDM, Marseille +
+https://ftp.igh.cnrs.fr/pub/CRAN/ + +Institut de Genetique Humaine, Montpellier +
+http://ftp.igh.cnrs.fr/pub/CRAN/ + +Institut de Genetique Humaine, Montpellier +
+http://cran.irsn.fr/ + +French Nuclear Safety Institute, Paris +
+https://cran.univ-paris1.fr/ + +SAMM, Université Paris 1 Panthéon-Sorbonne +
+http://cran.univ-paris1.fr/ + +SAMM, Université Paris 1 Panthéon-Sorbonne +
+
+
Germany
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+https://ftp.fau.de/cran/ + +Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU) +
+https://ftp.gwdg.de/pub/misc/cran/ + +GWDG Göttingen +
+http://ftp.gwdg.de/pub/misc/cran/ + +GWDG Göttingen +
+https://cran.uni-muenster.de/ + +University of Münster, Germany +
+http://cran.uni-muenster.de/ + +University of Münster, Germany +
+
+
Greece
+
+ + + + + + + + + + + +
+https://ftp.cc.uoc.gr/mirrors/CRAN/ + +University of Crete +
+http://ftp.cc.uoc.gr/mirrors/CRAN/ + +University of Crete +
+
+
Hungary
+
+ + + + + + + + + + + +
+https://cran.rapporter.net/ + +Rapporter.net, Budapest +
+http://cran.rapporter.net/ + +Rapporter.net, Budapest +
+
+
Iceland
+
+ + + + + + + + + + + +
+https://cran.hafro.is/ + +Marine Research Institute +
+http://cran.hafro.is/ + +Marine Research Institute +
+
+
Indonesia
+
+ + + + + + +
+https://repo.bppt.go.id/cran/ + +Agency for The Application and Assessment of Technology +
+
+
Iran
+
+ + + + + + + + + + + +
+https://cran.um.ac.ir/ + +Ferdowsi University of Mashhad +
+http://cran.um.ac.ir/ + +Ferdowsi University of Mashhad +
+
+
Ireland
+
+ + + + + + + + + + + +
+https://ftp.heanet.ie/mirrors/cran.r-project.org/ + +HEAnet,Dublin +
+http://ftp.heanet.ie/mirrors/cran.r-project.org/ + +HEAnet,Dublin +
+
+
Italy
+
+ + + + + + + + + + + + + + + + +
+http://cran.mirror.garr.it/mirrors/CRAN/ + +Garr Mirror, Milano +
+https://cran.stat.unipd.it/ + +University of Padua +
+http://cran.stat.unipd.it/ + +University of Padua +
+
+
Japan
+
+ + + + + + + + + + + + + + + + +
+https://cran.ism.ac.jp/ + +The Institute of Statistical Mathematics, Tokyo +
+http://cran.ism.ac.jp/ + +The Institute of Statistical Mathematics, Tokyo +
+https://ftp.yz.yamagata-u.ac.jp/pub/cran/ + +Yamagata University +
+
+
Korea
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+https://ftp.harukasan.org/CRAN/ + +Information and Database Systems Laboratory, Pukyong National University +
+https://cran.yu.ac.kr/ + +Yeungnam University +
+https://cran.seoul.go.kr/ + +Bigdata Campus, Seoul Metropolitan Govermment +
+http://healthstat.snu.ac.kr/CRAN/ + +Graduate School of Public Health, Seoul National University, Seoul +
+https://cran.biodisk.org/ + +The Genome Institute of UNIST (Ulsan National Institute of Science and Technology) +
+http://cran.biodisk.org/ + +The Genome Institute of UNIST (Ulsan National Institute of Science and Technology) +
+
+
Malaysia
+
+ + + + + + + + + + + +
+https://wbc.upm.edu.my/cran/ + +Univerisiti Putra Malaysia +
+http://wbc.upm.edu.my/cran/ + +Univerisiti Putra Malaysia +
+
+
Mexico
+
+ + + + + + + + + + + + + + + + +
+https://cran.itam.mx/ + +Instituto Tecnologico Autonomo de Mexico +
+http://cran.itam.mx/ + +Instituto Tecnologico Autonomo de Mexico +
+http://www.est.colpos.mx/R-mirror/ + +Colegio de Postgraduados, Texcoco +
+
+
New Zealand
+
+ + + + + + + + + + + +
+https://cran.stat.auckland.ac.nz/ + +University of Auckland +
+http://cran.stat.auckland.ac.nz/ + +University of Auckland +
+
+
Norway
+
+ + + + + + + + + + + +
+https://cran.uib.no/ + +University of Bergen +
+http://cran.uib.no/ + +University of Bergen +
+
+
Philippines
+
+ + + + + + + + + + + +
+https://cran.stat.upd.edu.ph/ + +University of the Philippines and PREGINET +
+http://cran.stat.upd.edu.ph/ + +University of the Philippines and PREGINET +
+
+
Portugal
+
+ + + + + + + + + + + +
+http://cran.radicaldevelop.com/ + +RadicalDevelop, Lda +
+http://cran.dcc.fc.up.pt/ + +University of Porto +
+
+
Serbia
+
+ + + + + + +
+https://fourdots.com/mirror/CRAN/ + +Four Dots +
+
+
Singapore
+
+ + + + + + + + + + + +
+https://cran.stat.nus.edu.sg/ + +National University of Singapore, Singapore +
+http://cran.stat.nus.edu.sg/ + +National University of Singapore, Singapore +
+
+
South Africa
+
+ + + + + + + + + + + +
+http://r.adu.org.za/ + +University of Cape Town +
+http://cran.mirror.ac.za/ + +TENET, Johannesburg +
+
+
Spain
+
+ + + + + + + + + + + + + + + + + + + + + +
+https://ftp.cixug.es/CRAN/ + +Oficina de software libre (CIXUG) +
+http://ftp.cixug.es/CRAN/ + +Oficina de software libre (CIXUG) +
+https://cran.rediris.es/ + +Spanish National Research Network, Madrid +
+http://cran.rediris.es/ + +Spanish National Research Network, Madrid +
+
+
Sweden
+
+ + + + + + + + + + + +
+https://ftp.acc.umu.se/mirror/CRAN/ + +Academic Computer Club, Umeå University +
+http://ftp.acc.umu.se/mirror/CRAN/ + +Academic Computer Club, Umeå University +
+
+
Switzerland
+
+ + + + + + + + + + + +
+https://stat.ethz.ch/CRAN/ + +ETH Zürich +
+http://stat.ethz.ch/CRAN/ + +ETH Zürich +
+
+
Taiwan
+
+ + + + + + + + + + + + + + + + +
+https://ftp.yzu.edu.tw/CRAN/ + +Department of Computer Science and Engineering, Yuan Ze University +
+http://ftp.yzu.edu.tw/CRAN/ + +Department of Computer Science and Engineering, Yuan Ze University +
+http://cran.csie.ntu.edu.tw/ + +National Taiwan University, Taipei +
+
+
Thailand
+
+ + + + + + +
+http://mirrors.psu.ac.th/pub/cran/ + +Prince of Songkla University, Hatyai +
+
+
Turkey
+
+ + + + + + + + + + + + + + + + + + + + + +
+https://cran.pau.edu.tr/ + +Pamukkale University, Denizli +
+http://cran.pau.edu.tr/ + +Pamukkale University, Denizli +
+https://cran.ncc.metu.edu.tr/ + +Middle East Technical University Northern Cyprus Campus, Mersin +
+http://cran.ncc.metu.edu.tr/ + +Middle East Technical University Northern Cyprus Campus, Mersin +
+
+
UK
+
+ + + + + + + + + + + + + + + + + + + + + +
+https://www.stats.bris.ac.uk/R/ + +University of Bristol +
+http://www.stats.bris.ac.uk/R/ + +University of Bristol +
+https://cran.ma.imperial.ac.uk/ + +Imperial College London +
+http://cran.ma.imperial.ac.uk/ + +Imperial College London +
+
+
USA
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+https://cran.cnr.berkeley.edu/ + +University of California, Berkeley, CA +
+http://cran.cnr.berkeley.edu/ + +University of California, Berkeley, CA +
+http://cran.stat.ucla.edu/ + +University of California, Los Angeles, CA +
+https://mirror.las.iastate.edu/CRAN/ + +Iowa State University, Ames, IA +
+http://mirror.las.iastate.edu/CRAN/ + +Iowa State University, Ames, IA +
+https://ftp.ussg.iu.edu/CRAN/ + +Indiana University +
+http://ftp.ussg.iu.edu/CRAN/ + +Indiana University +
+https://rweb.crmda.ku.edu/cran/ + +University of Kansas, Lawrence, KS +
+http://rweb.crmda.ku.edu/cran/ + +University of Kansas, Lawrence, KS +
+https://cran.mtu.edu/ + +Michigan Technological University, Houghton, MI +
+http://cran.mtu.edu/ + +Michigan Technological University, Houghton, MI +
+http://cran.wustl.edu/ + +Washington University, St. Louis, MO +
+http://archive.linux.duke.edu/cran/ + +Duke University, Durham, NC +
+https://cran.case.edu/ + +Case Western Reserve University, Cleveland, OH +
+http://cran.case.edu/ + +Case Western Reserve University, Cleveland, OH +
+https://ftp.osuosl.org/pub/cran/ + +Oregon State University +
+http://ftp.osuosl.org/pub/cran/ + +Oregon State University +
+http://lib.stat.cmu.edu/R/CRAN/ + +Statlib, Carnegie Mellon University, Pittsburgh, PA +
+http://cran.mirrors.hoobly.com/ + +Hoobly Classifieds, Pittsburgh, PA +
+https://mirrors.nics.utk.edu/cran/ + +National Institute for Computational Sciences, Oak Ridge, TN +
+http://mirrors.nics.utk.edu/cran/ + +National Institute for Computational Sciences, Oak Ridge, TN +
+https://cran.revolutionanalytics.com/ + +Revolution Analytics, Dallas, TX +
+http://cran.revolutionanalytics.com/ + +Revolution Analytics, Dallas, TX +
+
+
Uruguay
+
+ + + + + + +
+https://espejito.fder.edu.uy/cran/ + +Facultad de Derecho, Universidad de la República +
+
+
Venezuela
+
+ + + + + + +
+http://camoruco.ing.uc.edu.ve/cran/ + +Universidad de Carabobo Venezuela +
+
+
+ + diff --git a/orly.R b/orly.R new file mode 100644 index 0000000..f0eabc1 --- /dev/null +++ b/orly.R @@ -0,0 +1,200 @@ +library(xml2) +library(httr) +library(curl) +library(stringi) +library(urltools) +library(ipinfo) +library(openssl) +library(furrr) +library(vershist) +library(ggalt) +library(ggbeeswarm) +library(hrbrthemes) +library(tidyverse) + +mdoc <- xml2::read_xml("~/data/mirrors.html", as_html = TRUE) + +xml_find_all(mdoc, ".//td/a[contains(@href, 'https')]") %>% + xml_attr("href") %>% + unique() -> ssl_mirrors + +ssl_mirrors + +plan(multiprocess) + +dl_cert <- possibly(openssl::download_ssl_cert, NULL) +HEAD_ <- possibly(httr::HEAD, NULL) +dig <- possibly(curl::nslookup, NULL) +query_ip_ <- possibly(ipinfo::query_ip, NULL) + +ssl_mirrors %>% + future_map(~{ + host <- domain(.x) + ip <- dig(host, TRUE) + ip_info <- if (length(ip)) query_ip_(ip) else NULL + list( + host = host, + cert = dl_cert(host), + head = HEAD_(.x), + ip = ip, + ip_info = ip_info + ) + }) -> mir_dat + +saveRDS(mir_dat, "~/data/mir-dat.rds") + +str(mir_dat, 3) + +maps::map("world", ".", exact = FALSE, plot = FALSE, fill = TRUE) %>% + fortify() %>% + filter(region != "Antarctica") -> world + +map_chr(mir_dat, ~.x$ip_info$loc) %>% + stri_split_fixed(pattern = ",", n = 2, simplify = TRUE) %>% + as_tibble() %>% + mutate_all(list(as.numeric)) -> wheres_cran + +ggplot() + + ggalt::geom_cartogram( + data = world, map = world, aes(long, lat, map_id=region), + color = ft_cols$gray, size = 0.125 + ) + + geom_point(data = wheres_cran, aes(V2, V1), color = "white") + + ggalt::coord_proj("+proj=wintri") + + labs( + x = NULL, y = NULL + ) + + theme_ft_rc(grid="") + + theme(axis.text = element_blank()) + +map_df(mir_dat, ~{ + tibble( + host = .x$host, + s_issuer = .x$cert[[1]]$issuer %||% NA_character_, + i_issuer = .x$cert[[2]]$issuer %||% NA_character_, + algo = .x$cert[[1]]$algorithm %||% NA_character_, + names = .x$cert[[1]]$alt_names %||% NA_character_, + nm_ct = length(.x$cert[[1]]$alt_names), + key_size = .x$cert[[1]]$pubkey$size %||% NA_integer_ + ) +}) -> certs + +count(certs, names, sort=TRUE) + +distinct(certs, host, algo, key_size) %>% + count(algo, key_size, sort=TRUE) + +distinct(certs, host, i_issuer) %>% + count(i_issuer, sort = TRUE) %>% + print(n = 28) + +count(certs, host, sort=TRUE) %>% + ggplot() + + geom_quasirandom(aes("", n)) + +filter(certs, host == "cran.cnr.berkeley.edu") %>% + select(names) + +filter(certs, host == "cran.rapporter.net") %>% + select(names) + +filter(certs, host == "cran-r.c3sl.ufpr.br") %>% + select(names) + +filter(certs, host == "fourdots.com") %>% + select(names) + +map(mir_dat, ~.x$head$headers) %>% + compact() %>% + map_df(~{ + flatten_df(.x) %>% + gather(name, value) + }, .id = "site_num") -> hdrs + +count(hdrs, name, sort=TRUE) %>% + print(n=31) + +filter(hdrs, name == "server") %>% + separate(value, c("kind", "version"), sep="/", fill="right", extra="merge") -> svr + +count(svr, kind, sort=TRUE) + +apache_httpd_version_history() %>% + arrange(rls_date) %>% + mutate( + vers = factor(as.character(vers), levels = as.character(vers)) + ) -> apa_all + +filter(svr, kind == "Apache") %>% + filter(!is.na(version)) %>% + mutate(version = stri_replace_all_regex(version, " .*$", "")) %>% + count(version) %>% + separate(version, c("maj", "min", "pat"), sep="\\.", convert = TRUE, fill = "right") %>% + mutate(pat = ifelse(is.na(pat), 1, pat)) %>% + mutate(v = sprintf("%s.%s.%s", maj, min, pat)) %>% + mutate(v = factor(v, levels = apa_all$vers)) %>% + arrange(v) -> apa_vers + +filter(apa_all, vers %in% apa_vers$v) %>% + arrange(rls_date) %>% + group_by(rls_year) %>% + slice(1) %>% + ungroup() %>% + arrange(rls_date) -> apa_yrs + +ggplot() + + geom_blank( + data = apa_vers, aes(v, n) + ) + + geom_segment( + data = apa_yrs, aes(vers, 0, xend=vers, yend=Inf), + linetype = "dotted", size = 0.25, color = "white" + ) + + geom_segment( + data = apa_vers, aes(v, n, xend=v, yend=0), + color = ft_cols$gray, size = 8 + ) + + geom_label( + data = apa_yrs, aes(vers, Inf, label = rls_year), + family = font_rc, color = "white", fill = "#262a31", size = 4, + vjust = 1, hjust = 0, nudge_x = 0.01, label.size = 0 + ) + + scale_y_comma(limits = c(0, 15)) + + labs( + x = "Apache Version #", y = "# Servers" + ) + + theme_ft_rc(grid="Y") + + theme(axis.text.x = element_text(family = "mono", color = "white")) + +cran_mirror_other_things <- readRDS("~/data/cran-mirror-other-things.rds") + +distinct(cran_mirror_other_things, ip, port) %>% + count(ip, sort = TRUE) + +distinct(cran_mirror_other_things, ip, port) %>% + count(port, sort=TRUE) + +distinct(cran_mirror_other_things, ip, port) %>% + filter(ip == "104.25.94.23") + +distinct(cran_mirror_other_things, ip, port) %>% + filter(ip == "143.107.10.17") + +distinct(cran_mirror_other_things, ip, port) %>% + filter(ip == "137.208.57.37") + +cran_recog <- readRDS("~/data/cran-recog.rds") + +count(cran_recog, ip, sort=TRUE) + +distinct(cran_recog, ip, cpe) %>% + filter(ip == "192.75.96.254") + +distinct(cran_recog, ip, cpe) %>% + count(ip, sort=TRUE) + +cran_dns <- readRDS("~/data/cran-dns.rds") + + + +