ReadPDFFileV2

Load a PDF file's content and metadata into context. Supports extraction of hashes, urls, and emails when available.

python · Common Scripts

Details

IDReadPDFFileV2
Languagepython
From Version5.0.0
Docker Imagedemisto/readpdf:1.0.0.11193239
TagsUtility ingestion

README

Load a PDF file’s content and metadata into context. Supports extraction of hashes, urls, and emails when available.

Script Data


Name Description
Script Type python3
Tags Utility, ingestion
Cortex XSOAR Version 4.1.0+

Inputs


Argument Name Description
entryID The War Room entryID of the file to read.
userPassword The password for the file, if encrypted.
maxImages The maximum number of images to extract from the PDF file.
unescape_url To unescape URLs that have been escaped as part of the URLs extraction. Invalid characters will be ignored. Default is true.

Outputs


Path Description Type
URL.Data The list of URLs that were extracted from the PDF file. String
File.Text The text that was extracted from the PDF file. String
File.Producer The producer of the PDF file. String
File.Title The title of the PDF file. String
File.Author The author of the PDF file. String
File.ModDate The ModDate of the PDF file. Date
File.CreationDate The CreationDate of the PDF file. Date
File.Pages The number of pages in the PDF file. String
File.Size The file size in bytes. Number
File.Form The PDF form type. String
File.Encrypted Whether the file is encrypted. String
File.FileSize The file size in bytes. String
File.SHA1 The SHA1 file hash of the file. String
File.PageRot The page rotation of the PDF file. String
File.Optimized Whether the page has been optimized. String
File.SHA256 The SHA256 file hash of the file. String
File.PDFVersion The PDF version. String
File.Name The name of the PDF file. String
File.Creator The creator of the PDF file. String
File.Tagged Whether the file has tagged meta-information. String
File.SSDeep The SSDeep hash of the file. String
File.EntryID The Entry ID of the file. String
File.JavaScript Whether the file is in JavaScript. String
File.Info The additional information about the file. String
File.PageSize The PDF file page size. String
File.Type The file type. String
File.Suspects Indicates the presence of tag suspects. String
File.MD5 The MD5 file hash of the file. String
File.UserProperties Indicates the presence of the structure elements that contain user properties attributes. String
File.Extension The file’s extension. String
Account.Email The email address of the account. String
Hashes.type The hash type extracted from the PDF file. String
Hashes.value The hash value extracted from the PDF file. String
args:
- default: true
  description: War Room entryID of the file to read.
  name: entryID
  required: true
- description: Password for the file, if encrypted.
  name: userPassword
- defaultValue: "20"
  description: Maximum number of images to extract from the PDF file.
  name: maxImages
- auto: PREDEFINED
  defaultValue: 'true'
  description: To unescape URLs that have been escaped as part of the URLs extraction. Invalid characters will be ignored.
  name: unescape_url
  predefined:
  - 'true'
  - 'false'
comment: |-
  Load a PDF file's content and metadata into context. Supports extraction of hashes, urls, and emails when available.
commonfields:
  id: ReadPDFFileV2
  version: -1
enabled: true
name: ReadPDFFileV2
outputs:
- contextPath: Hashes.type
  description: The hash type extracted from the PDF file.
  type: String
- contextPath: Hashes.value
  description: The hash value extracted from the PDF file.
  type: String
- contextPath: URL.Data
  description: A list of URLs that were extracted from the PDF file.
  type: String
- contextPath: File.Text
  description: The text that was extracted from the PDF file.
  type: String
- contextPath: File.Producer
  description: The producer of the PDF file.
  type: String
- contextPath: File.Title
  description: The title of the PDF file.
  type: String
- contextPath: File.Author
  description: The author of the PDF file.
  type: String
- contextPath: File.ModDate
  description: The ModDate of the PDF file.
  type: Date
- contextPath: File.CreationDate
  description: The CreationDate of the PDF file.
  type: Date
- contextPath: File.Pages
  description: Number of pages in the PDF file.
  type: String
- contextPath: File.Size
  description: The file size in bytes.
  type: Number
- contextPath: File.Form
  description: PDF form type.
  type: String
- contextPath: File.Encrypted
  description: Is the file is encrypted.
  type: String
- contextPath: File.FileSize
  description: The file size in bytes.
  type: String
- contextPath: File.SHA1
  description: SHA1 hash of the file.
  type: String
- contextPath: File.PageRot
  description: Page rotation of the PDF file.
  type: String
- contextPath: File.Optimized
  description: Has the page has been optimzed.
  type: String
- contextPath: File.SHA256
  description: SHA256 hash of the file.
  type: String
- contextPath: File.PDFVersion
  description: The PDF version.
  type: String
- contextPath: File.Name
  description: The name of the PDF file.
  type: String
- contextPath: File.Creator
  description: The creator of the PDF file.
  type: String
- contextPath: File.Tagged
  description: Does the file have tagged meta-information.
  type: String
- contextPath: File.SSDeep
  description: SSDeep hash of the file.
  type: String
- contextPath: File.EntryID
  description: The Entry ID of the file.
  type: String
- contextPath: File.JavaScript
  description: Is the file in JavaScript.
  type: String
- contextPath: File.Info
  description: Additional information about the file.
  type: String
- contextPath: File.PageSize
  description: The PDF file page size.
  type: String
- contextPath: File.Type
  description: The file type.
  type: String
- contextPath: File.Suspects
  description: Indicating the presence of tag suspects.
  type: String
- contextPath: File.MD5
  description: MD5 hash of the file.
  type: String
- contextPath: File.UserProperties
  description: Indicating the presence of structure elements that contain user properties attributes.
  type: String
- contextPath: File.Extension
  description: The file's extension.
  type: String
- contextPath: Account.Email
  description: The email address of the account.
  type: String
script: "-"
subtype: python3
tags:
- Utility
- ingestion
timeout: "0"
type: python
dockerimage: demisto/readpdf:1.0.0.11193239
runas: DBotRole
tests:
- Extract Indicators From File - Generic v2 - Test
- ReadPDFFileV2-Test
fromversion: 5.0.0