Skip to content

Commit

Permalink
fixed all pii definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4f53 committed Nov 14, 2023
1 parent 581388f commit 790d1db
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
36 changes: 20 additions & 16 deletions definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,13 @@
]
},
"South African Passport": {
"regex": "^[0-9a-z]{8,}$",
"regex": "(?:P<ZAF|PMZAF)<<(?:[A-Z0-9<].+)",
"region": "South Africa",
"keywords": [
"South Africa",
"Republique"
"Republique",
"ZAF",
"Passport"
]
},
"South Korean Passport": {
Expand Down Expand Up @@ -320,47 +322,49 @@
]
},
"Palestinian Passport": {
"regex": "^[0-9]{7,}$",
"regex": "(?:P<PSE|PDPSE)(?:[A-Z0-9<].+)",
"region": "Palestine",
"keywords": [
"Palestinian",
"Authority",
"Palestine",
"Passport",
"Issuing",
"Authority"
"PSE"
]
},
"Australian Passport": {
"regex": "^[a-z0-9]{6}$",
"regex": "(?:P<PSE|PDPSE)(?:[A-Z0-9<].+)",
"region": "Australia",
"keywords": [
"Australia",
"Code",
"Passport",
"Issuing",
"State",
"Authority",
"Document"
"AUS",
"Australian"
]
},
"Canadian Passport": {
"regex": "(?:P<GBR)(?:[A-Z0-9<].+)",
"regex": "(?:P<CAN|PPCAN)(?:[A-Z0-9<].+)",
"region": "Canada",
"keywords": [
"PPCAN",
"P<CAN",
"CAN",
"<<<"
"<<<",
"Passport",
"Canadian"
]
},
"Irish Public Services Card": {
"regex": null,
"regex": "[A-Z][0-9]{7}",
"region": "Ireland",
"keywords": [
"Public",
"Services",
"Card",
"Ireland"
"Ireland",
"Eire",
"Carta",
"Seirbhisi",
"Poibli"
]
}
}
2 changes: 1 addition & 1 deletion octopii.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def search_pii(file_path):

try:
results = search_pii (file_path)
print(json.dumps(results, indent=4).replace("{", "").replace("}", "").replace(" ", ""))
print(json.dumps(results, indent=4))
file_utils.append_to_output_file(results, output_file)
print ("\nOutput saved in " + output_file)

Expand Down

0 comments on commit 790d1db

Please sign in to comment.