PIIScanner is a command-line tool for detecting Personally Identifiable Information (PII) in various file formats. It supports scanning text files, documents, spreadsheets, presentations, PDFs, and images using regex patterns, keywords, and optional OCR for embedded images.
- Detects common PII types: emails, phone numbers, IP addresses, credit card numbers, passports, and URLs.
- Supports multiple file formats: TXT, XML, DOCX, PPTX, XLSX, PDF, and images (JPG, PNG, etc.).
- Scanning strategies: regex (default), keyword-based.
- Optional OCR integration for scanning text in images and embedded media in documents.
- Recursive directory scanning.
- JSON output for results and statistics.
- Customizable patterns via JSON configuration file.
- pugixml
- libzippp
- nlohmann_json
- cxxopts
- RE2
- xlnt
- Tesseract (with Leptonica)
- Poppler
git clone https://github.com/BES303/PIIS.git
cd PIIS
mkdir build && cd build
cmake ..
cmake --build .Scan a single file:
./PIIScanner -f document.txtScan directory recursively:
./PIIScanner -d /path/to/docs -rExport results to JSON:
./PIIScanner -d /path/to/docs -j