Browse Source

initial commit

master
boB Rudis 4 years ago
commit
b8cd8cba74
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 1
      README.md
  2. 46
      panos-scanner.R
  3. 154
      panos-versions.txt

1
README.md

@ -0,0 +1 @@
A much less capable example R version of Bishop Fox's spiffy [PAN-OS GlobalProtect Portal Scanner](https://github.com/noperator/panos-scanner)

46
panos-scanner.R

@ -0,0 +1,46 @@
#!env Rscript
library(purrr)
gg <- glue::glue
# we also use {httr}, {readr}, {lubridate}, {anytime}, and {jsonlite}
args <- commandArgs(trailingOnly = TRUE)
stopifnot(
c(
"Must supply both IP address and port" = length(args) == 2
)
)
ip <- args[1]
port <- args[2]
httr::HEAD(
url = gg("https://{ip}:{port}/global-protect/login.esp"),
config = httr::config(
ssl_verifyhost =FALSE,
ssl_verifypeer = FALSE
)
) -> res
httr::headers(res) %>%
pluck("etag") %>%
gsub('"', '', .) %>%
substr(5, 12) %>%
as.hexmode() %>%
as.integer() %>%
anytime::anytime(tz = "GMT") %>%
as.Date() -> version_date
panos_trans <- readr::read_csv("panos-versions.txt", col_types = "cD")
res <- panos_trans[panos_trans[["date"]] == version_date,]
if (nrow(res) == 0) {
cat(gg('{{"ip":"{ip}","port":"{port}","version"=null,"date"=null}}\n'))
} else {
res$ip <- ip
res$port <- port
jsonlite::stream_out(res[,c("ip", "port", "version", "date")], verbose = FALSE)
}

154
panos-versions.txt

@ -0,0 +1,154 @@
version,date
6.0.0,2013-12-23
6.0.1,2014-02-26
6.0.2,2014-04-18
6.0.3,2014-05-29
6.0.4,2014-07-30
6.0.5,2014-09-04
6.0.5-h3,2014-10-07
6.0.6,2014-10-07
6.0.7,2014-11-18
6.0.8,2015-01-13
6.0.9,2015-02-27
6.0.10,2015-04-22
6.0.11,2015-08-12
6.0.12,2015-11-19
6.0.13,2016-02-13
6.0.14,2016-06-28
6.0.15,2016-10-05
6.1.0,2014-10-17
6.1.1,2014-11-13
6.1.2,2015-01-23
6.1.3,2015-03-10
6.1.4,2015-04-22
6.1.5,2015-06-17
6.1.6,2015-07-23
6.1.7,2015-09-10
6.1.8,2015-11-04
6.1.9,2016-01-08
6.1.10,2016-02-12
6.1.11,2016-04-02
6.1.12,2016-05-21
6.1.13,2016-07-15
6.1.14,2016-08-10
6.1.15,2016-10-05
6.1.16,2017-01-10
6.1.17,2017-04-14
6.1.18,2017-07-14
6.1.19,2017-11-05
6.1.20,2018-02-13
6.1.21,2018-05-25
6.1.22,2018-10-15
7.0.1,2015-07-03
7.0.2,2015-08-21
7.0.3,2015-10-08
7.0.4,2015-12-12
7.0.5,2016-01-30
7.0.5-h2,2016-02-17
7.0.6,2016-03-12
7.0.7,2016-04-19
7.0.8,2016-06-11
7.0.9,2016-07-27
7.0.10,2016-08-29
7.0.11,2016-10-20
7.0.12,2016-12-06
7.0.13,2016-12-29
7.0.14,2017-02-08
7.0.15,2017-04-12
7.0.16,2017-05-30
7.0.17,2017-07-10
7.0.18,2017-08-16
7.0.19,2017-11-10
7.1.0,2016-03-16
7.1.1,2016-04-06
7.1.2,2016-05-03
7.1.3,2016-06-21
7.1.4,2016-08-02
7.1.4-h2,2016-08-12
7.1.5,2016-09-24
7.1.6,2016-11-09
7.1.7,2016-12-17
7.1.8,2017-02-14
7.1.9,2017-03-27
7.1.9-h4,2017-06-16
7.1.10,2017-05-05
7.1.11,2017-06-29
7.1.12,2017-08-18
7.1.13,2017-09-28
7.1.14,2017-11-13
7.1.15,2018-01-05
7.1.16,2018-02-20
7.1.17,2018-04-11
7.1.18,2018-06-06
7.1.19,2018-07-16
7.1.20,2018-09-07
7.1.21,2018-10-31
7.1.22,2018-12-17
7.1.23,2019-03-09
7.1.24,2019-06-14
7.1.24-h1,2019-08-15
7.1.25,2019-08-30
7.1.26,2020-04-21
8.0.0,2017-01-25
8.0.1,2017-03-09
8.0.2,2017-04-25
8.0.3,2017-06-08
8.0.3-h4,2017-06-22
8.0.4,2017-07-21
8.0.5,2017-09-10
8.0.6,2017-11-04
8.0.6-h3,2017-11-16
8.0.7,2017-12-24
8.0.8,2018-01-31
8.0.9,2018-03-23
8.0.10,2018-05-04
8.0.11-h1,2018-06-29
8.0.12,2018-08-04
8.0.13,2018-09-18
8.0.14,2018-11-17
8.0.15,2018-12-08
8.0.16,2019-02-12
8.0.17,2019-03-22
8.0.18,2019-05-13
8.0.19,2019-06-20
8.0.19-h1,2019-08-15
8.0.20,2019-10-18
8.1.0,2018-03-01
8.1.1,2018-04-23
8.1.2,2018-06-06
8.1.3,2018-08-08
8.1.4,2018-10-05
8.1.5,2018-11-21
8.1.6,2019-01-17
8.1.6-h2,2019-01-23
8.1.7,2019-03-13
8.1.8,2019-04-30
8.1.8-h5,2019-06-17
8.1.9,2019-07-03
8.1.9-h4,2019-08-15
8.1.10,2019-08-21
8.1.11,2019-10-12
8.1.12,2019-12-10
8.1.13,2020-01-25
8.1.14,2020-04-01
8.1.14-h2,2020-04-18
8.1.15,2020-06-13
9.0.0,2019-01-29
9.0.1,2019-03-26
9.0.2,2019-05-07
9.0.2-h4,2019-06-21
9.0.3,2019-07-10
9.0.3-h2,2019-07-18
9.0.3-h3,2019-08-14
9.0.4,2019-09-10
9.0.5,2019-11-07
9.0.6,2020-01-24
9.0.7,2020-03-13
9.0.8,2020-04-07
9.0.9,2020-06-20
9.1.0,2019-12-11
9.1.0-h3,2019-12-21
9.1.1,2020-01-24
9.1.2,2020-03-30
9.1.2-h1,2020-04-09
9.1.3,2020-06-20
Loading…
Cancel
Save