Skip to content

Cross-platform drop-in replacement for PANHunt (in alpha phase)

License

Notifications You must be signed in to change notification settings

zbalkan/PANSearcher

Repository files navigation

PANSearcher

Build

Description

A command line application to search for PAN numbers in files. It is a hobby project and not ready for production use. The idea is to be a cross-platform drop-in replacement for PANHunt.

Although it is written from scratch, it is using directly (ripping off) some parts of PANHunt such as Regex patterns.

NB! The current target is to get fast search results, causing to use high CPU. however, memory usage is relatively low.

Installation

PANSearcher is portable. Download the compressed file, extract it and run.

There are two types of releases:

Standard: Requires dotnet 6.0 installed. Not a viable option for many.

Self contained: Single-file executable with dotnet 6.0 and other dependencies included. Download and run.

Usage

usage: PANSearcher [ARGUMENTS]

Arguments

Short Long Description Default Value Status
-a --truncate Truncate PANs in output (temporarily using 'a' shorthand) IMPLEMENTED
-c --config configuration file to use IMPLEMENTED
-h --help Show this help message and exit IMPLEMENTED
-o --outfile Output file name for PAN report panhunt_YYYY-MM-DD-HHMMSS.txt IMPLEMENTED
-q --quiet Quiet IMPLEMENTED
-s --search Base directory to search in Windows: C:\, Others: / IMPLEMENTED
-t --textfiles Text file extensions to search .doc,.xls,.xml,.txt,.csv IMPLEMENTED
-u --unmask Unmask PANs in output and report (Risky) IMPLEMENTED
-v --verbose Verbose output. IMPLEMENTED
-x --exclude Directories to exclude from the search Windows: C:\Windows,C:\Program Files,C:\Program Files (x86). Others: /mnt IMPLEMENTED
-e --SPECIALFILES Special file extensions to search .msg NOT IMPLEMENTED
-f --format Format report. Acceptable values: txt, xml, json. txt NOT IMPLEMENTED
-l --OTHERFILES Other file extensions to list .ost,.accdb,.mdb NOT IMPLEMENTED
-m --MAILFILES Email file extensions to search .pst NOT IMPLEMENTED
-p --EXCLUDEPAN The PAN to exclude from search NOT IMPLEMENTED
-z --ZIPFILES zip file extensions to search .docx,.xlsx,.zip NOT IMPLEMENTED

TODO

  • Get rid of interactive UI and use SYSTEM drive as default search root
  • Use the configuration that PANHunt presents
  • Use the same flags with PANHunt
  • Add Quiet option
  • Add report format option
  • Add verbose option
  • Add Zip file, PST and MSG file reading capability
  • Add advanced logging options such as json, syslog, event log formats pushing to a syslog server
  • Add email alerts
  • Use Spectre.Console for better UI experience