Skip to content

Commit

Permalink
basic test & travis
Browse files Browse the repository at this point in the history
  • Loading branch information
hrbrmstr committed Feb 21, 2017
1 parent d88a0ec commit 47529fa
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
^README\.*html$
^NOTES\.*Rmd$
^NOTES\.*html$
^README_files$
^README_files$
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ r:
- release
- devel

apt_packages:
- libv8-dev
- xclip

env:
global:
- CRAN: http://cran.rstudio.com
Expand Down
8 changes: 7 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ Version: 0.1.0
Date: 2017-02-18
Author: Bob Rudis (bob@rud.is)
Maintainer: Bob Rudis <bob@rud.is>
Description: Tools to Import and Process 'PortSwigger' 'Burp' Proxy Data
Description: It is often necessary to use an intercepting proxy server
to identify targets for web-scraping. The 'PortSwigger' <https://portswigger.net/>
'Burp' proxy records web traffic from interactive use of a browser and provides
mechanisms to archive this activity to an XML file for further processing. Tools
are provides to import this archive file and work with the request and response
objects in a similar manner as one would with results of verb calls from functions
in the 'httr' package.
URL: http://github.com/hrbrmstr/burrp
BugReports: https://github.com/hrbrmstr/burrp/issues
License: AGPL
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ importFrom(dplyr,group_by)
importFrom(dplyr,left_join)
importFrom(dplyr,mutate)
importFrom(dplyr,select)
importFrom(dplyr,ungroup)
importFrom(magrittr,"%>%")
importFrom(openssl,base64_decode)
importFrom(readr,read_lines)
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
0.1.0

* basic test
* summary method
* finally got rid of the previous XML example
* the `request` value is now optionally (default `TRUE`) turned into an `httr` `request` object
Expand Down
3 changes: 2 additions & 1 deletion R/aaa.r
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
globalVariables(c("time", "request", "response", "responselength", "url", "time"))
globalVariables(c("time", "request", "response", "responselength", "url", "time",
"description", "extension", "method", "port", "protocol", "status"))
2 changes: 1 addition & 1 deletion R/burrp-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' @docType package
#' @author Bob Rudis (bob@@rud.is)
#' @import purrr xml2 httr anytime
#' @importFrom dplyr mutate filter select group_by count left_join
#' @importFrom dplyr mutate filter select group_by count left_join ungroup
#' @importFrom openssl base64_decode
#' @importFrom tibble as_tibble
#' @importFrom stringi stri_split_fixed
Expand Down
4 changes: 3 additions & 1 deletion R/import.r
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ read_burp <- function(burp_file, convert_response=TRUE, convert_request=TRUE) {
}

#' @export
summary.burrp <- function(x, ...) {
summary.burrp <- function(object, ...) {

x <- object

x <- left_join(x, status_codes_df)

Expand Down
3 changes: 3 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
---
output: rmarkdown::github_document
---
[![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/burrp.svg?branch=master)](https://travis-ci.org/hrbrmstr/burrp)

`burrp` : Tools to Import and Process [PortSwigger](https://portswigger.net/) 'Burp' Proxy Data

The Burp Suite is a set of web application and security testing tools. Combined, they intercept, record and can even transform browser traffic.

It is often necessary to use an intercepting proxy server to identify targets for web-scraping. The 'PortSwigger' 'Burp' proxy records web traffic from interactive use of a browser and provides mechanisms to archive this activity to an XML file for further processing. Tools are provides to import this archive file and work with the request and response objects in a similar manner as one would with results of verb calls from functions in the 'httr' package.

For now, the solo function - `read_burp` - expects the `request` and `response` elements of a Burp XML export file to be base 64 encoded.

Eventually there will likely be an `as_har()` function to turn the entire structure into a `HARtools` object.
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@

[![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/burrp.svg?branch=master)](https://travis-ci.org/hrbrmstr/burrp)

`burrp` : Tools to Import and Process [PortSwigger](https://portswigger.net/) 'Burp' Proxy Data

The Burp Suite is a set of web application and security testing tools. Combined, they intercept, record and can even transform browser traffic.

It is often necessary to use an intercepting proxy server to identify targets for web-scraping. The 'PortSwigger' 'Burp' proxy records web traffic from interactive use of a browser and provides mechanisms to archive this activity to an XML file for further processing. Tools are provides to import this archive file and work with the request and response objects in a similar manner as one would with results of verb calls from functions in the 'httr' package.

For now, the solo function - `read_burp` - expects the `request` and `response` elements of a Burp XML export file to be base 64 encoded.

Eventually there will likely be an `as_har()` function to turn the entire structure into a `HARtools` object.
Expand Down Expand Up @@ -167,13 +171,13 @@ library(testthat)
date()
```

## [1] "Sun Feb 19 23:05:39 2017"
## [1] "Mon Feb 20 22:56:59 2017"

``` r
test_dir("tests/")
```

## testthat results ========================================================================================================
## OK: 0 SKIPPED: 0 FAILED: 0
## OK: 1 SKIPPED: 0 FAILED: 0
##
## DONE ===================================================================================================================
2 changes: 2 additions & 0 deletions tests/test-all.R
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
library(testthat)
library(dplyr)

test_check("burrp")
5 changes: 4 additions & 1 deletion tests/testthat/test-burrp.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
context("basic functionality")
test_that("we can do something", {

#expect_that(some_function(), is_a("data.frame"))
system.file("extdata", "hottest_year.xml", package="burrp") %>%
read_burp() -> burp_df

expect_that(burp_df, is_a("data.frame"))

})

0 comments on commit 47529fa

Please sign in to comment.