sectxt: Parse a 'security.txt' Web Security Policies file & create a...

Description Usage Arguments References Examples

View source: R/sectxt.r

Description

This function takes in a single element character vector and parses it into a sectxt object.

Usage

1
sectxt(x)

Arguments

x

either an atomic character vector containing a complete security.txt file or a length >1 character vector that will be concatenated into a single string or a connection object that will be passed to readLines(), the result of which will be concatenated into a single string and parsed and the connection will be closed.

References

Examples

1
2
3
4
5
sectxt(readLines(system.file("extdata", "security.txt", package="securitytxt")))
## Not run: 
sectxt(url(sectxt_url("https://securitytxt.org")))

## End(Not run)

Example output

<Web Security Policies Object>
# Our security address

Contact: security@example.com
Encryption: https://example.com/pgp-key.txtNULL
Warning message:
In sectxt(url(sectxt_url("https://securitytxt.org"))) :
  security.txt not found

securitytxt documentation built on Aug. 19, 2019, 5:03 p.m.