boB Rudis
3 years ago
9 changed files with 187 additions and 4 deletions
@ -0,0 +1,2 @@ |
|||||
|
YEAR: 2021 |
||||
|
COPYRIGHT HOLDER: Bob Rudis |
@ -0,0 +1,21 @@ |
|||||
|
# MIT License |
||||
|
|
||||
|
Copyright (c) 2021 Bob Rudis |
||||
|
|
||||
|
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. |
@ -1,4 +1,5 @@ |
|||||
# Generated by roxygen2: do not edit by hand |
# Generated by roxygen2: do not edit by hand |
||||
|
|
||||
|
export(search_noir) |
||||
import(httr) |
import(httr) |
||||
importFrom(jsonlite,fromJSON) |
importFrom(jsonlite,fromJSON) |
||||
|
@ -0,0 +1,37 @@ |
|||||
|
.darkdumpr_ua <- "Mozilla/5.0 (Compatible; r-darkdumpr/1.0; https://gitlab.com/hrbrmstr/darkdumpr)" |
||||
|
|
||||
|
#' Query darkdump.io for Dark Web Content |
||||
|
#' |
||||
|
#' @param query <chr> terms to search (supports |
||||
|
#' [darkdump.io advanced search composition](https://darksearch.io/dorks)). |
||||
|
#' @param page pagination control |
||||
|
#' @return data frame with a "`metadata`" atttribute containing pagination info |
||||
|
#' @export |
||||
|
#' @examples |
||||
|
#' search_noir("ransomware") |
||||
|
search_noir <- function(query, page = 1) { |
||||
|
|
||||
|
httr::GET( |
||||
|
url = "https://darksearch.io/api/search", |
||||
|
query = list( |
||||
|
query = query[1], |
||||
|
page = page[1] |
||||
|
), |
||||
|
httr::user_agent(.darkdumpr_ua) |
||||
|
) -> res |
||||
|
|
||||
|
httr::stop_for_status(res) |
||||
|
|
||||
|
out <- httr::content(res, as = "text", encoding = "UTF-8") |
||||
|
out <- jsonlite::fromJSON(out) |
||||
|
|
||||
|
if (hasName(out, "data")) { |
||||
|
ret <- out$data |
||||
|
out$data <- NULL |
||||
|
attr(ret, "metadata") <- out |
||||
|
ret |
||||
|
} else { |
||||
|
out |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,92 @@ |
|||||
|
|
||||
|
[![Project Status: Active – The project has reached a stable, usable |
||||
|
state and is being actively |
||||
|
developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) |
||||
|
[![Signed |
||||
|
by](https://img.shields.io/badge/Keybase-Verified-brightgreen.svg)](https://keybase.io/hrbrmstr) |
||||
|
![Signed commit |
||||
|
%](https://img.shields.io/badge/Signed_Commits-100%25-lightgrey.svg) |
||||
|
[![Linux build |
||||
|
Status](https://travis-ci.org/hrbrmstr/darkdumpr.svg?branch=master)](https://travis-ci.org/hrbrmstr/darkdumpr) |
||||
|
![Minimal R |
||||
|
Version](https://img.shields.io/badge/R%3E%3D-3.6.0-blue.svg) |
||||
|
![License](https://img.shields.io/badge/License-MIT-blue.svg) |
||||
|
|
||||
|
# darkdumpr |
||||
|
|
||||
|
Query darkdump.io for Dark Web Content |
||||
|
|
||||
|
## Description |
||||
|
|
||||
|
Query darkdump.io for Dark Web Content. |
||||
|
|
||||
|
## What’s Inside The Tin |
||||
|
|
||||
|
The following functions are implemented: |
||||
|
|
||||
|
- `search_noir`: Query darkdump.io for Dark Web Content |
||||
|
|
||||
|
## Installation |
||||
|
|
||||
|
``` r |
||||
|
remotes::install_git("https://git.rud.is/hrbrmstr/darkdumpr.git") |
||||
|
# or |
||||
|
remotes::install_gitlab("hrbrmstr/darkdumpr") |
||||
|
# or |
||||
|
remotes::install_bitbucket("hrbrmstr/darkdumpr") |
||||
|
# or |
||||
|
remotes::install_github("hrbrmstr/darkdumpr") |
||||
|
``` |
||||
|
|
||||
|
NOTE: To use the ‘remotes’ install options you will need to have the |
||||
|
[{remotes} package](https://github.com/r-lib/remotes) installed. |
||||
|
|
||||
|
## Usage |
||||
|
|
||||
|
``` r |
||||
|
library(darkdumpr) |
||||
|
|
||||
|
# current version |
||||
|
packageVersion("darkdumpr") |
||||
|
## [1] '0.1.0' |
||||
|
``` |
||||
|
|
||||
|
``` r |
||||
|
res <- tibble::as_tibble(search_noir("ransomware")) |
||||
|
|
||||
|
cat(res$description[1]) |
||||
|
## Surfacing The News From The DeepWeb |
||||
|
## |
||||
|
## Menu |
||||
|
## |
||||
|
## * Home |
||||
|
## * News & Articles |
||||
|
## * Markets List |
||||
|
## * Markets Chart |
||||
|
## * Vpn's Chart |
||||
|
## * Bitcoin Casinos |
||||
|
## * BTC Mixer |
||||
|
## * Q&A ~ Ask Here! |
||||
|
## * Videos |
||||
|
## * Contact Us |
||||
|
## |
||||
|
## Home » Articles » An overview of bitcoin <em>ransomware</em> attack campaigns |
||||
|
## |
||||
|
## # An overview of bitcoin |
||||
|
``` |
||||
|
|
||||
|
## darkdumpr Metrics |
||||
|
|
||||
|
| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) | |
||||
|
|:-----|---------:|-----:|----:|-----:|------------:|-----:|---------:|-----:| |
||||
|
| R | 3 | 0.38 | 26 | 0.36 | 8 | 0.16 | 17 | 0.18 | |
||||
|
| Rmd | 1 | 0.12 | 10 | 0.14 | 17 | 0.34 | 30 | 0.32 | |
||||
|
| SUM | 4 | 0.50 | 36 | 0.50 | 25 | 0.50 | 47 | 0.50 | |
||||
|
|
||||
|
clock Package Metrics for darkdumpr |
||||
|
|
||||
|
## Code of Conduct |
||||
|
|
||||
|
Please note that this project is released with a Contributor Code of |
||||
|
Conduct. By participating in this project you agree to abide by its |
||||
|
terms. |
@ -0,0 +1,23 @@ |
|||||
|
% Generated by roxygen2: do not edit by hand |
||||
|
% Please edit documentation in R/darkdumpr.R |
||||
|
\name{search_noir} |
||||
|
\alias{search_noir} |
||||
|
\title{Query darkdump.io for Dark Web Content} |
||||
|
\usage{ |
||||
|
search_noir(query, page = 1) |
||||
|
} |
||||
|
\arguments{ |
||||
|
\item{query}{<chr> terms to search (supports |
||||
|
\href{https://darksearch.io/dorks}{darkdump.io advanced search composition}).} |
||||
|
|
||||
|
\item{page}{pagination control} |
||||
|
} |
||||
|
\value{ |
||||
|
data frame with a "\code{metadata}" atttribute containing pagination info |
||||
|
} |
||||
|
\description{ |
||||
|
Query darkdump.io for Dark Web Content |
||||
|
} |
||||
|
\examples{ |
||||
|
search_noir("ransomware") |
||||
|
} |
Loading…
Reference in new issue