项目作者: hrbrmstr

项目描述 :
👀 Analyze Websites and Resources They Request
高级语言: R
项目地址: git://github.com/hrbrmstr/urlscan.git
创建时间: 2018-03-23T14:32:25Z
项目社区:https://github.com/hrbrmstr/urlscan

开源协议:Other

下载


Travis-CI Build
Status
Coverage
Status
CRAN\_Status\_Badge

urlscan

Analyze Websites and Resources They Request

Description

The \ service provides an ‘API’ enabling analysis of
websites and the resources they request. Much like the ‘Inspector’ of
your browser, \ will let you take a look at the individual
resources that are requested when a site is loaded. Tools are provided
to search public \ scan submissions/results and submit
URLs for scanning.

What’s Inside The Tin

The following functions are implemented:

  • urlscan_search: Perform a urlscan.io query
  • urlscan_result: Retrieve detailed results for a given scan ID
  • urlscan_submit: Submit a URL for scanning

Installation

  1. devtools::install_git("https://git.sr.ht/~hrbrmstr/urlscan")
  2. # or
  3. devtools::install_gitlab("hrbrmstr/urlscan")
  4. # or
  5. devtools::install_github("hrbrmstr/urlscan")

Usage

  1. library(urlscan)
  2. library(tidyverse) # for demos
  3. # current verison
  4. packageVersion("urlscan")
  1. ## [1] '0.2.0'
  1. x <- urlscan_search("domain:r-project.org")
  2. as_tibble(x$results$task) %>%
  3. bind_cols(as_tibble(x$results$page)) %>%
  4. mutate(
  5. time = anytime::anytime(time),
  6. id = x$results$`_id`
  7. ) %>%
  8. arrange(desc(time)) %>%
  9. select(url, country, server, ip, id) -> xdf
  10. ures <- urlscan_result(xdf$id[2], include_dom = TRUE, include_shot = TRUE)
  11. ures
  1. ## URL: https://cran.r-project.org/
  2. ## Scan ID: cdc2b957-548c-447a-a1b2-bebd6a734aec
  3. ## Malicious: FALSE
  4. ## Ad Blocked: FALSE
  5. ## Total Links: 0
  6. ## Secure Requests: 9
  7. ## Secure Req %: 100%
  1. magick::image_write(ures$screenshot, "img/shot.png")

urlscan Metrics

Lang # Files (%) LoC (%) Blank lines (%) # Lines (%)
R 10 0.91 157 0.89 51 0.69 130 0.76
Rmd 1 0.09 20 0.11 23 0.31 40 0.24

Code of Conduct

Please note that the ‘urlscan’ project is released with a Contributor
Code of Conduct
. By contributing to this project,
you agree to abide by its terms.