Skip to content

Commit 0f762c5

Browse files
K: add scanner for credit cards, social security numbers, and phone numbers
K: add scanner for credit cards, social security numbers, and phone numbers K: add scanner for credit cards, social security numbers, and phone numbers
1 parent 0d1abd2 commit 0f762c5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

scripts/scan.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
# TODO: write the script
1+
printf "\n====== SCANNING FOR CREDIT CARD NUMBERS ======\n"
2+
grep -rE --color=always '(\b[0-9]{4}[- ]?){3}[0-9]{4}\b' . --exclude-dir={.git} --line-number
3+
echo "========= CREDIT CARD SCAN COMPLETE =========="
4+
5+
printf "\n==== SCANNING FOR SOCIAL SECURITY NUMBERS ====\n"
6+
grep -rE --color=always '\b[0-9]{3}-[0-9]{2}-[0-9]{4}\b' . --exclude-dir={.git} --line-number
7+
echo "======= SOCIAL SECURITY SCAN COMPLETE ========"
8+
9+
printf "\n========= SCANNING FOR PHONE NUMBERS =========\n"
10+
grep -rE --color=always '\b[0-9]{3}-[0-9]{3}-[0-9]{4}\b' . --exclude-dir={.git} --line-number
11+
grep -rE --color=always '\([0-9]{3}\) [0-9]{3}-[0-9]{4}' . --exclude-dir={.git} --line-number
12+
echo "========= PHONE NUMBER SCAN COMPLETE =========="

0 commit comments

Comments
 (0)