Commit 3d78700ed88d7dc4fcdb73810a7a4a8c6e628edf

Authored by Imanol-Mikel Barba Sabariego
1 parent 8beb9cc6

Hackmageddon parser WIP

Showing 29 changed files with 41 additions and 0 deletions
ISO27001effectiveness/R/Hackmageddon_Parser.R 0 → 100644
  1 +#------------------------------------------------------------------------------------------------------
  2 +#-----------------------------Parser Excel - ISO survey------------------------------------------------
  3 +#------------------------------------------------------------------------------------------------------
  4 +
  5 +
  6 +
  7 +#-----------------------------Library tests / install--------------------------------------------------
  8 +
  9 +
  10 +#' Install and load required libraries
  11 +#'
  12 +#' This function checks if every required library is installed to be loaded, if not they will be installed and then loaded.
  13 +#' Libraries installed:
  14 +#' xlsx to parse excel files like ISO survey source format
  15 +LoadParserLibraries <- function(){
  16 + if (!require("xlsx"))
  17 + {
  18 + install.packages("xlsx")
  19 + if (!require("xlsx")) stop("Error while loading package [xlsx]")
  20 + }
  21 +}
  22 +
  23 +#-----------------------------
  24 +
  25 +ParseHMExcel <- function(file){
  26 + print(file)
  27 + if (!file.exists(file)) {
  28 + stop(paste("Error, file [", file, "] not found"))
  29 + }
  30 + dataset <- read.xlsx2(file, 1, header = TRUE,colIndex = 2:10)
  31 + dataset
  32 +}
  33 +
  34 +ParseHMFolder <- function(folder){
  35 + filelist <- list.files(folder)
  36 + frames <- lapply(paste(folder,filelist,sep=""),ParseHMExcel)
  37 + merged_frame = merge(frames)
  38 + merged_frame
  39 +}
  40 +
  41 +
ISO27001effectiveness/data/hackmageddon/1-15 August 2015 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2015/1-15 August 2015 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 November 2015 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2015/1-15 November 2015 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 October 2015 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2015/1-15 October 2015 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 September 2015 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2015/1-15 September 2015 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-30 November 2015 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2015/16-30 November 2015 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-30 September 2015 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2015/16-30 September 2015 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 August 2015 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2015/16-31 August 2015 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 October 2015 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2015/16-31 October 2015 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 April 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/1-15 April 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 February 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/1-15 February 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 January 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/1-15 January 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 July 2016 Cyber Attacks Timelines.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/1-15 July 2016 Cyber Attacks Timelines.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 June 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/1-15 June 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 March 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/1-15 March 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 May 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/1-15 May 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 October 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/1-15 October 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 September 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/1-15 September 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-16 August 2016 Cyber Attacks Timelines.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/1-16 August 2016 Cyber Attacks Timelines.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-29 February 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/16-29 February 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-30 July 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/16-30 July 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-30 June 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/16-30 June 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-30 September 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/16-30 September 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 April 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/16-31 April 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 August 2016 Cyber Attacks Timelines.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/16-31 August 2016 Cyber Attacks Timelines.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 January 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/16-31 January 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 March 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/16-31 March 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 May 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/16-31 May 2016 Cyber Attacks Timeline.xlsx
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 October 2016 Cyber Attacks Timeline.xlsx renamed to ISO27001effectiveness/data/hackmageddon/2016/16-31 October 2016 Cyber Attacks Timeline.xlsx
No preview for this file type