8000 Have a beginning of masked PAN output · Issue #13 · dionach/PANhunt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Have a beginning of masked PAN output #13
Open
@Gunstick

Description

@Gunstick

Industry standard for masking pan is to retain max first 6 and last 4 digits.
self.pan[:6]+re.sub('\d','.',self.pan[6:-4]) + self.pan[-4:]
https://www.pcicomplianceguide.org/whats-the-best-practice-for-masking-or-truncating-pan/
Better is to show less.

Basically what I would like is to have a beginning and end of the found PAN so I can better search for it.
So first 2 last 4 would be adequate as well:
self.pan[:2]+re.sub('\d','.',self.pan[2:-4]) + self.pan[-4:]

I also replaced * by . so it's directly useable as a regexp for searching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0