Browse Source

0.2.0

master
boB Rudis 4 years ago
parent
commit
2c64d52389
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 1
      .Rbuildignore
  2. 25
      CONDUCT.md
  3. 15
      DESCRIPTION
  4. 3
      NAMESPACE
  5. 39
      R/check-notary.R
  6. 28
      R/check_sig.R
  7. 3
      R/mactheknife-package.R
  8. 2
      R/sw-vers.R
  9. 78
      README.Rmd
  10. 293
      README.md
  11. BIN
      inst/modules/__pycache__/dsstore.cpython-37.pyc
  12. 14
      man/check_notarization.Rd
  13. 14
      man/check_sig.Rd
  14. 8
      man/mactheknife.Rd

1
.Rbuildignore

@ -10,3 +10,4 @@
^README_cache$
^doc$
^tmp$
^CONDUCT\.md$

25
CONDUCT.md

@ -0,0 +1,25 @@
# Contributor Code of Conduct
As contributors and maintainers of this project, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating documentation,
submitting pull requests or patches, and other activities.
We are committed to making participation in this project a harassment-free experience for
everyone, regardless of level of experience, gender, gender identity and expression,
sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
Examples of unacceptable behavior by participants include the use of sexual language or
imagery, derogatory comments or personal attacks, trolling, public or private harassment,
insults, or other unprofessional conduct.
Project maintainers have the right and responsibility to remove, edit, or reject comments,
commits, code, wiki edits, issues, and other contributions that are not aligned to this
Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed
from the project team.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
opening an issue or contacting one or more of the project maintainers.
This Code of Conduct is adapted from the Contributor Covenant
(http:contributor-covenant.org), version 1.0.0, available at
http://contributor-covenant.org/version/1/0/0/

15
DESCRIPTION

@ -1,8 +1,8 @@
Package: mactheknife
Type: Package
Title: Various 'macOS'-oriented Tools and Utilities
Version: 0.1.0
Date: 2018-04-29
Version: 0.2.0
Date: 2019-09-01
Authors@R: c(
person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-5670-2640")),
@ -12,9 +12,9 @@ Authors@R: c(
Maintainer: Bob Rudis <bob@rud.is>
Description: A set of tools/methods and data that are geared towards the 'macOS'
ecosystem.
URL: https://github.com/hrbrmstr/mactheknife
BugReports: https://github.com/hrbrmstr/mactheknife/issues
SystemRequirements: Python
URL: https://gitlab.com/hrbrmstr/mactheknife
BugReports: https://gitlab.com/hrbrmstr/mactheknife/issues
SystemRequirements: Python, macOS
Encoding: UTF-8
License: MIT + file LICENSE
Suggests:
@ -30,5 +30,6 @@ Imports:
dplyr,
utils,
purrr,
anytime
RoxygenNote: 6.0.1.9000
anytime,
stringi
RoxygenNote: 6.1.1

3
NAMESPACE

@ -2,6 +2,8 @@
export(airport_scan)
export(applescript)
export(check_notarization)
export(check_sig)
export(find_dsstore)
export(kernel_state)
export(logger)
@ -12,6 +14,7 @@ export(software_update_history)
export(sw_vers)
export(system_profile)
import(reticulate)
import(stringi)
import(sys)
import(xml2)
importFrom(anytime,anytime)

39
R/check-notary.R

@ -0,0 +1,39 @@
#' Check application notarization info
#'
#' @param path_to_app the path to the application or comand line binary
#' @export
check_notarization <- function(path_to_app) {
vers <- sw_vers()
stopifnot(utils::compareVersion(vers$ProductVersion[1], "10.14") >= 0)
path_to_app <- path.expand(path_to_app[1])
stopifnot(file.exists(path_to_app))
spctl <- Sys.which("spctl")
res <- sys::exec_internal(spctl, arg = c("-a", "-vv", path_to_app))
if (res$status != 0) {
stop("Error running spctl utility Are you on macOS?", call.=FALSE)
}
out <- rawToChar(res$stderr)
out <- unlist(stringi::stri_split_lines(out))
out <- out[out != ""]
app_status <- dplyr::tibble(
key = c("application", "status"),
value = trimws(unlist(stri_split_fixed(out[1], ":", 2)))
)
out <- stringi::stri_split_fixed(out[2:length(out)], "=", n=2, simplify=TRUE)
out <- as.data.frame(out, stringsAsFactors=FALSE)
out <- dplyr::as_tibble(out)
colnames(out) <- c("key", "value")
out <- dplyr::bind_rows(app_status, out)
out
}

28
R/check_sig.R

@ -0,0 +1,28 @@
#' Check application signature/notarization information
#'
#' @param path_to_app the path to the application or comand line binary
#' @export
check_sig <- function(path_to_app) {
path_to_app <- path.expand(path_to_app[1])
stopifnot(file.exists(path_to_app))
codesign <- Sys.which("codesign")
res <- sys::exec_internal(codesign, arg = c("-dvvvv", path_to_app))
if (res$status != 0) {
stop("Error running codesign utility. Are you on macOS?", call.=FALSE)
}
out <- rawToChar(res$stderr)
out <- unlist(stringi::stri_split_lines(out))
out <- out[out != ""]
out <- stringi::stri_split_fixed(out, "=", n=2, simplify=TRUE)
out <- as.data.frame(out, stringsAsFactors=FALSE)
out <- dplyr::as_tibble(out)
colnames(out) <- c("key", "value")
out
}

3
R/mactheknife-package.R

@ -12,4 +12,5 @@
#' @importFrom anytime anytime
#' @importFrom stats complete.cases
#' @importFrom utils compareVersion download.file read.fwf type.convert
NULL
#' @import stringi
"_PACKAGE"

2
R/sw-vers.R

@ -32,6 +32,8 @@ sw_vers <- function() {
grepl("^10\\.11$|^10\\.11\\.[0-9]*$", out$ProductVersion) ~ "Mac OS X 10.11 (El Capitan)",
grepl("^10\\.12$|^10\\.12\\.[0-9]*$", out$ProductVersion) ~ sprintf("macOS Sierra (%s)", out$ProductVersion),
grepl("^10\\.13$|^10\\.13\\.[0-9]*$", out$ProductVersion) ~ sprintf("macOS High Sierra (%s)", out$ProductVersion),
grepl("^10\\.14$|^10\\.14\\.[0-9]*$", out$ProductVersion) ~ sprintf("macOS Mojave (%s)", out$ProductVersion),
grepl("^10\\.15$|^10\\.15\\.[0-9]*$", out$ProductVersion) ~ sprintf("macOS Catalina (%s)", out$ProductVersion),
TRUE ~ "Unknown"
) -> out$ProductFullName

78
README.Rmd

@ -1,14 +1,17 @@
---
output: rmarkdown::github_document
---
```{r pkg-knitr-opts, include=FALSE}
hrbrpkghelpr::global_opts()
```
# mactheknife
Various 'macOS'-oriented Tools and Utilities
## Description
```{r badges, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::stinking_badges()
```
A set of tools/methods and data that are geared towards the 'macOS' ecosystem.
```{r description, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::yank_title_and_description()
```
## NOTE
@ -18,29 +21,19 @@ A set of tools/methods and data that are geared towards the 'macOS' ecosystem.
The following functions are implemented:
- `airport_scan`: Scan for available wireless network (requires Wi-Fi enabled Mac)
- `applescript`: Execute AppleScript and Return Results
- `resolve_alias`: Resovle macOS binary alias files to their POSIX path strings
- `kernel_state`: Retrieve kernel state information
- `find_dsstore`: Find and optionally remove '.DS_Store' files on a locally-accessible filesystem
- `read_dsstore`: Read a '.DS_Store' from a file/URL
- `software_update_history`: Retrieve Software Update history
- `sw_vers`: Retrieve macOS Operating System Version Information
```{r ingredients, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::describe_ingredients()
```
## Installation
```{r eval=FALSE}
devtools::install_git("git://gitlab.com/hrbrmstr/mactheknife")
devtools::install_git("git://github.com/hrbrmstr/mactheknife")
```
```{r message=FALSE, warning=FALSE, error=FALSE, include=FALSE}
options(width=120)
```{r install-ex, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::install_block()
```
## Usage
```{r message=FALSE, warning=FALSE, error=FALSE}
```{r use, message=FALSE, warning=FALSE, error=FALSE}
library(mactheknife)
# current verison
@ -50,7 +43,7 @@ packageVersion("mactheknife")
### Kernel state vars
```{r}
```{r ks}
kernel_state()
```
@ -58,7 +51,7 @@ kernel_state()
Using built-in data
```{r}
```{r ds1}
read_dsstore(
path = system.file("extdat", "DS_Store.ctf", package = "mactheknife")
)
@ -68,7 +61,7 @@ read_dsstore(
A URL I should not have let a `.DS_Store` file lying around in
```{r}
```{r ds2}
read_dsstore("https://rud.is/books/21-recipes/.DS_Store")
```
@ -76,12 +69,12 @@ read_dsstore("https://rud.is/books/21-recipes/.DS_Store")
A larger example using my "~/projects" folder (use your own dir as an example).
```{r}
```{r ds-dir, cache = FALSE}
library(magrittr)
list.files(
path = "~/projects", pattern = "\\.DS_Store",
all.files=TRUE, recursive = TRUE, full.names = TRUE
all.files = TRUE, recursive = TRUE, full.names = TRUE
) %>%
lapply(read_dsstore) -> x
@ -90,25 +83,21 @@ str(x)
### "Software Update" History
```{r}
```{r suh}
software_update_history()
```
### macOS Version Info (short)
```{r}
```{r swv}
sw_vers()
```
### Airport scan
```{r airport, cache=TRUE}
airport_scan()
```
### Applescript
```{r applescript}
res <- applescript('
tell application "iTunes"
tell application "Music"
set r_name to name of current track
set r_artist to artist of current track
end
@ -117,3 +106,22 @@ return "artist=" & r_artist & "\ntrack=" & r_name
print(res)
```
### App info
```{r app}
check_sig("/Applications/RSwitch.app") %>%
print(n=nrow(.))
check_notarization("/Applications/RSwitch.app")
```
## macthekinfe Metrics
```{r cloc, echo=FALSE}
cloc::cloc_pkg_md()
```
## 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.

293
README.md

@ -1,4 +1,19 @@
[![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-94.1%25-lightgrey.svg)
[![Linux build
Status](https://travis-ci.org/hrbrmstr/mactheknife.svg?branch=master)](https://travis-ci.org/hrbrmstr/mactheknife)
[![Coverage
Status](https://codecov.io/gh/hrbrmstr/mactheknife/branch/master/graph/badge.svg)](https://codecov.io/gh/hrbrmstr/mactheknife)
![Minimal R
Version](https://img.shields.io/badge/R%3E%3D-3.2.0-blue.svg)
![License](https://img.shields.io/badge/License-MIT-blue.svg)
# mactheknife
Various ‘macOS’-oriented Tools and Utilities
@ -21,21 +36,33 @@ The following functions are implemented:
- `airport_scan`: Scan for available wireless network (requires Wi-Fi
enabled Mac)
- `applescript`: Execute AppleScript and Return Results
- `resolve_alias`: Resovle macOS binary alias files to their POSIX path strings
- `kernel_state`: Retrieve kernel state information
- `find_dsstore`: Find and optionally remove .DS\_Store files on a
- `check_notarization`: Check application notarization info
- `check_sig`: Check application signature/notarization information
- `find_dsstore`: Find and optionally remove .DS\_Store files on a
locally-accessible filesystem
- `read_dsstore`: Read a ‘.DS\_Store’ from a file/URL
- `kernel_state`: Retrieve kernel state information
- `logger`: Log a message to the macOS logging system (searchable from
Console.app)
- `read_dsstore`: Read a .DS\_Store from a file/URL
- `read_plist`: Read a macOS property list file
- `resolve_alias`: Resolve macOS Alias Files to POSIX path strings
- `software_update_history`: Retrieve Software Update history
- `sw_vers`: Retrieve macOS Operating System Version Information
- `system_profile`: Report system hardware and software configuration
## Installation
``` r
devtools::install_git("git://gitlab.com/hrbrmstr/mactheknife")
devtools::install_git("git://github.com/hrbrmstr/mactheknife")
remotes::install_git("https://git.sr.ht/~hrbrmstr/mactheknife")
# or
remotes::install_gitlab("hrbrmstr/mactheknife")
# or
remotes::install_github("hrbrmstr/mactheknife")
```
NOTE: To use the ‘remotes’ install options you will need to have the
[{remotes} package](https://github.com/r-lib/remotes) installed.
## Usage
``` r
@ -43,31 +70,29 @@ library(mactheknife)
# current verison
packageVersion("mactheknife")
## [1] '0.2.0'
```
## [1] '0.1.0'
### Kernel state vars
``` r
kernel_state()
## # A tibble: 1,294 x 2
## setting value
## <chr> <chr>
## 1 user.cs_path /usr/bin:/bin:/usr/sbin:/sbin
## 2 user.bc_base_max 99
## 3 user.bc_dim_max 2048
## 4 user.bc_scale_max 99
## 5 user.bc_string_max 1000
## 6 user.coll_weights_max 2
## 7 user.expr_nest_max 32
## 8 user.line_max 2048
## 9 user.re_dup_max 255
## 10 user.posix2_version 200112
## # … with 1,284 more rows
```
## # A tibble: 1,215 x 2
## setting value
## <chr> <chr>
## 1 user.cs_path /usr/bin:/bin:/usr/sbin:/sbin
## 2 user.bc_base_max 99
## 3 user.bc_dim_max 2048
## 4 user.bc_scale_max 99
## 5 user.bc_string_max 1000
## 6 user.coll_weights_max 2
## 7 user.expr_nest_max 32
## 8 user.line_max 2048
## 9 user.re_dup_max 255
## 10 user.posix2_version 200112
## # ... with 1,205 more rows
### `.DS_Store` example
Using built-in data
@ -76,60 +101,57 @@ Using built-in data
read_dsstore(
path = system.file("extdat", "DS_Store.ctf", package = "mactheknife")
)
## [1] "favicon.ico" "flag" "static" "templates" "vulnerable.py" "vulnerable.wsgi"
```
## [1] "favicon.ico" "flag" "static" "templates" "vulnerable.py" "vulnerable.wsgi"
### From a URL
A URL I should not have let a `.DS_Store` file lying around
in
A URL I should not have let a `.DS_Store` file lying around in
``` r
read_dsstore("https://rud.is/books/21-recipes/.DS_Store")
## [1] "00-About-the-Author.md"
## [2] "01-Introduction.md"
## [3] "01-Using-OAuth.md"
## [4] "02-Diving-In.md"
## [5] "02-Trending-Topics.md"
## [6] "03-Extracting-Tweet-Entities.md"
## [7] "04-Searching-for-Tweets.md"
## [8] "05-Extracting-a-Retweets-Origins.md"
## [9] "06-Creating-a-Graph-of-Retweet-Relationships.md"
## [10] "06-Creating-a-Graph-of-Retweet-Relationships_files"
## [11] "07-Visualizing-a-Graph-of-Retweet-Relationships.md"
## [12] "07-Visualizing-a-Graph-of-Retweet-Relationships_files"
## [13] "08-Twitter-Streaming-API.md"
## [14] "09-Making-Robust-Twitter-Requests.md"
## [15] "10-Harvesting-Tweets.md"
## [16] "11-Creating-a-Tag-Cloud-from-Tweet-Entities.md"
## [17] "12-Summarizing-Link-Targets.md"
## [18] "13-Harvesting-Friends-and-Followers.md"
## [19] "14-Performing-Setwise-Operations.md"
## [20] "15-Resolving-User-Profile-Information.md"
## [21] "16-Crawling-Followers-to-Approximate-Potential-Influence.md"
## [22] "16-Crawling-Followers-to-Approximate-Potential-Influence_files"
## [23] "17-Analyzing-Friendship-Relationships-such-as-FoF.md"
## [24] "18-Analyzing-Friendship-Cliques.md"
## [25] "19-Analyzing-Authors-in-Subs.md"
## [26] "20-Visualizing-Geodata-with-a-Dorling-Cartogram.md"
## [27] "20-Visualizing-Geodata-with-a-Dorling-Cartogram_files"
## [28] "21-Geocoding-Locations-From-Profiles.md"
## [29] "21-recipes-for-mining-twitter-with-rtweet.docx"
## [30] "21-recipes-for-mining-twitter-with-rtweet.epub"
## [31] "21-recipes-for-mining-twitter-with-rtweet.pdf"
## [32] "22-Visualising-Intersecting-Follower-Sets-with-UpsetR.md"
## [33] "22-Visualising-Intersecting-Follower-Sets-with-UpsetR_files"
## [34] "data"
## [35] "figures"
## [36] "index.html"
## [37] "index.md"
## [38] "libs"
## [39] "search_index.json"
## [40] "style.css"
```
## [1] "00-About-the-Author.md"
## [2] "01-Introduction.md"
## [3] "01-Using-OAuth.md"
## [4] "02-Diving-In.md"
## [5] "02-Trending-Topics.md"
## [6] "03-Extracting-Tweet-Entities.md"
## [7] "04-Searching-for-Tweets.md"
## [8] "05-Extracting-a-Retweets-Origins.md"
## [9] "06-Creating-a-Graph-of-Retweet-Relationships.md"
## [10] "06-Creating-a-Graph-of-Retweet-Relationships_files"
## [11] "07-Visualizing-a-Graph-of-Retweet-Relationships.md"
## [12] "07-Visualizing-a-Graph-of-Retweet-Relationships_files"
## [13] "08-Twitter-Streaming-API.md"
## [14] "09-Making-Robust-Twitter-Requests.md"
## [15] "10-Harvesting-Tweets.md"
## [16] "11-Creating-a-Tag-Cloud-from-Tweet-Entities.md"
## [17] "12-Summarizing-Link-Targets.md"
## [18] "13-Harvesting-Friends-and-Followers.md"
## [19] "14-Performing-Setwise-Operations.md"
## [20] "15-Resolving-User-Profile-Information.md"
## [21] "16-Crawling-Followers-to-Approximate-Potential-Influence.md"
## [22] "16-Crawling-Followers-to-Approximate-Potential-Influence_files"
## [23] "17-Analyzing-Friendship-Relationships-such-as-FoF.md"
## [24] "18-Analyzing-Friendship-Cliques.md"
## [25] "19-Analyzing-Authors-in-Subs.md"
## [26] "20-Visualizing-Geodata-with-a-Dorling-Cartogram.md"
## [27] "20-Visualizing-Geodata-with-a-Dorling-Cartogram_files"
## [28] "21-Geocoding-Locations-From-Profiles.md"
## [29] "21-recipes-for-mining-twitter-with-rtweet.docx"
## [30] "21-recipes-for-mining-twitter-with-rtweet.epub"
## [31] "21-recipes-for-mining-twitter-with-rtweet.pdf"
## [32] "22-Visualising-Intersecting-Follower-Sets-with-UpsetR.md"
## [33] "22-Visualising-Intersecting-Follower-Sets-with-UpsetR_files"
## [34] "data"
## [35] "figures"
## [36] "index.html"
## [37] "index.md"
## [38] "libs"
## [39] "search_index.json"
## [40] "style.css"
### A Directory of`.DS_Store`s
A larger example using my “\~/projects” folder (use your own dir as an
@ -140,72 +162,59 @@ library(magrittr)
list.files(
path = "~/projects", pattern = "\\.DS_Store",
all.files=TRUE, recursive = TRUE, full.names = TRUE
all.files = TRUE, recursive = TRUE, full.names = TRUE
) %>%
lapply(read_dsstore) -> x
str(x)
## List of 10
## $ : chr [1:4] "figures" "python" "R" "support"
## $ : chr [1:4] "data" "figures" "python" "R"
## $ : chr(0)
## $ : chr(0)
## $ : chr(0)
## $ : chr [1:3] "data" "figures" "R"
## $ : chr(0)
## $ : chr(0)
## $ : chr(0)
## $ : chr(0)
```
## List of 6
## $ : chr [1:2] "2018-data-220g" "2018-whitehouse-f500"
## $ : chr [1:23] "2018-whitehouse-f500.Rproj" "blacklist.R" "cleanup.R" "cwe-cve-exposure.R" ...
## $ : chr "vulns"
## $ : chr [1:2] "docx" "html5"
## $ : chr [1:2] "figure-docx" "figure-html5"
## $ : chr [1:15] "blacklist-growth-1.png" "dns-app-exposure-1.png" "f500-dmarc-1.png" "heis-conn-ratio-by-sector-1.png" ...
### “Software Update” History
``` r
software_update_history()
## # A tibble: 203 x 6
## displayName displayVersion date packageIdentifiers processName contentType
## <chr> <chr> <dttm> <list> <chr> <chr>
## 1 XProtectPlistConfigData 2103 2019-06-03 22:18:20 <chr [2]> softwareupdated config-data
## 2 Gatekeeper Configuration Data 167 2019-06-03 22:18:20 <chr [2]> softwareupdated config-data
## 3 Microsoft Excel <NA> 2019-06-04 10:35:20 <chr [1]> installer <NA>
## 4 Microsoft PowerPoint <NA> 2019-06-04 10:35:53 <chr [1]> installer <NA>
## 5 Microsoft Word <NA> 2019-06-04 10:36:22 <chr [1]> installer <NA>
## 6 OneDrive 19.062.0331 2019-06-04 11:34:51 <chr [1]> appstoreagent <NA>
## 7 MindNode 6.0.3 2019-06-05 19:50:41 <chr [1]> storedownloadd <NA>
## 8 MindNode 6.0.3 2019-06-06 00:50:26 <chr [1]> appstoreagent <NA>
## 9 Tweetbot 3.3 2019-06-06 00:50:56 <chr [1]> appstoreagent <NA>
## 10 Microsoft Excel <NA> 2019-06-06 00:52:53 <chr [1]> installer <NA>
## # … with 193 more rows
```
## # A tibble: 1,835 x 6
## displayName displayVersion date packageIdentifiers processName contentType
## <chr> <chr> <dttm> <list> <chr> <chr>
## 1 Command Line Developer Tools for OS… 5.1.0.0 2014-10-14 19:06:45 <chr [2]> softwareupda… <NA>
## 2 Command Line Tools (OS X 10.9) 6.0 2014-10-14 19:06:45 <chr [2]> softwareupda… <NA>
## 3 CoreLSKD Configuration Data 8 2014-10-14 19:40:41 <chr [1]> softwareupda… config-data
## 4 XProtectPlistConfigData 1.0 2014-10-14 19:40:41 <chr [1]> softwareupda… config-data
## 5 Chinese Word List Update 3.2 2014-10-14 19:40:41 <chr [1]> softwareupda… config-data
## 6 Gatekeeper Configuration Data 26.0 2014-10-14 19:40:41 <chr [1]> softwareupda… config-data
## 7 Digital Camera RAW Compatibility Up… 5.07 2014-10-15 15:48:03 <chr [1]> softwareupda… <NA>
## 8 iBooks Update 1.0.1 2014-10-15 15:48:03 <chr [2]> softwareupda… <NA>
## 9 iTunes 11.4 2014-10-15 15:48:03 <chr [5]> softwareupda… <NA>
## 10 Keynote 6.2.2 2014-10-15 15:48:21 <chr [1]> storeagent <NA>
## # ... with 1,825 more rows
### macOS Version Info (short)
``` r
sw_vers()
## # A tibble: 1 x 6
## ProductName ProductVersion BuildVersion ProductFullName Hardware KernelVersion
## <chr> <chr> <chr> <chr> <chr> <chr>
## 1 Mac OS X 10.15 19A546d macOS Catalina (10.15) x86_64 19.0.0
```
## # A tibble: 1 x 6
## ProductName ProductVersion BuildVersion ProductFullName Hardware KernelVersion
## <chr> <chr> <chr> <chr> <chr> <chr>
## 1 Mac OS X 10.14.1 18B50c Unknown x86_64 18.2.0
### Airport scan
``` r
airport_scan()
```
## Scanning for available wireless networks...
## # A tibble: 4 x 7
## ssid bssid rssi channel ht cc security
## * <chr> <chr> <int> <chr> <chr> <chr> <chr>
## 1 NETGEAR79-5G 04:a1:51:2a:47:c5 -88 153,-1 Y -- WPA2(PSK/AES/AES)
## 2 RDN-100 56:d9:e7:7b:9e:25 -55 1 Y -- WPA2(PSK,FT-PSK/AES/AES)
## 3 RDN-5G 46:d9:e7:7b:9e:25 -59 1 Y -- WPA2(PSK,FT-PSK/AES/AES)
## 4 RDN-5G 46:d9:e7:b3:80:47 -23 11 Y -- WPA2(PSK,FT-PSK/AES/AES)
### Applescript
``` r
res <- applescript('
tell application "iTunes"
tell application "Music"
set r_name to name of current track
set r_artist to artist of current track
end
@ -213,6 +222,62 @@ return "artist=" & r_artist & "\ntrack=" & r_name
')
print(res)
## [1] "artist=Sukima Switch" "track=Golden Time Lover"
```
## [1] "artist=CHEMISTRY" "track=Period"
### App info
``` r
check_sig("/Applications/RSwitch.app") %>%
print(n=nrow(.))
## # A tibble: 25 x 2
## key value
## <chr> <chr>
## 1 Executable /Applications/RSwitch.app/Contents/MacOS/RSwitch
## 2 Identifier is.rud.bob.RSwitch
## 3 Format app bundle with Mach-O thin (x86_64)
## 4 CodeDirectory v 20500 size=1342 flags=0x10000(runtime) hashes=33+5 location=embedded
## 5 VersionPlatform 1
## 6 VersionMin 658944
## 7 VersionSDK 659200
## 8 Hash type sha256 size=32
## 9 CandidateCDHash sha256 efa512a9daabfb9402af8a91697f008b89ffa81e
## 10 CandidateCDHashFull sha256 efa512a9daabfb9402af8a91697f008b89ffa81ea014452821e39a5365d80fe6
## 11 Hash choices sha256
## 12 CMSDigest efa512a9daabfb9402af8a91697f008b89ffa81ea014452821e39a5365d80fe6
## 13 CMSDigestType 2
## 14 Page size 4096
## 15 CDHash efa512a9daabfb9402af8a91697f008b89ffa81e
## 16 Signature size 8968
## 17 Authority Developer ID Application: Bob Rudis (CBY22P58G8)
## 18 Authority Developer ID Certification Authority
## 19 Authority Apple Root CA
## 20 Timestamp Sep 1, 2019 at 08:46:41
## 21 Info.plist entries 26
## 22 TeamIdentifier CBY22P58G8
## 23 Runtime Version 10.15.0
## 24 Sealed Resources version 2 rules=13 files=26
## 25 Internal requirements count 1 size=212
check_notarization("/Applications/RSwitch.app")
## # A tibble: 4 x 2
## key value
## <chr> <chr>
## 1 application /Applications/RSwitch.app
## 2 status accepted
## 3 source Notarized Developer ID
## 4 origin Developer ID Application: Bob Rudis (CBY22P58G8)
```
## macthekinfe Metrics
| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) |
| :--- | -------: | ---: | --: | ---: | ----------: | ---: | -------: | ---: |
| R | 19 | 0.95 | 329 | 0.91 | 103 | 0.72 | 149 | 0.73 |
| Rmd | 1 | 0.05 | 33 | 0.09 | 40 | 0.28 | 54 | 0.27 |
## 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.

BIN
inst/modules/__pycache__/dsstore.cpython-37.pyc

Binary file not shown.

14
man/check_notarization.Rd

@ -0,0 +1,14 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check-notary.R
\name{check_notarization}
\alias{check_notarization}
\title{Check application notarization info}
\usage{
check_notarization(path_to_app)
}
\arguments{
\item{path_to_app}{the path to the application or comand line binary}
}
\description{
Check application notarization info
}

14
man/check_sig.Rd

@ -0,0 +1,14 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check_sig.R
\name{check_sig}
\alias{check_sig}
\title{Check application signature/notarization information}
\usage{
check_sig(path_to_app)
}
\arguments{
\item{path_to_app}{the path to the application or comand line binary}
}
\description{
Check application signature/notarization information
}

8
man/mactheknife.Rd

@ -8,6 +8,14 @@
\description{
A set of tools/methods and data that are geared towards the 'macOS' ecosystem.
}
\seealso{
Useful links:
\itemize{
\item \url{https://gitlab.com/hrbrmstr/mactheknife}
\item Report bugs at \url{https://gitlab.com/hrbrmstr/mactheknife/issues}
}
}
\author{
Bob Rudis (bob@rud.is)
}

Loading…
Cancel
Save