Skip to content

Commit 60d705e

Browse files
author
rootware
committed
updated readme
1 parent 151d2f3 commit 60d705e

File tree

1 file changed

+63
-34
lines changed

1 file changed

+63
-34
lines changed

README.md

Lines changed: 63 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Redacts the following from your text files. 📄 ✍️
2828
- emails ✉️
2929
- ipv4 📟
3030
- ipv6 📟
31+
- base64 🅱️
3132

3233
## Pre-requisites
3334

@@ -48,7 +49,13 @@ python -m pip install pyredactkit
4849
Redact a single file
4950

5051
```bash
51-
pyredactkit ip_test.txt
52+
pyredactkit test.txt
53+
```
54+
55+
Unredact the file
56+
57+
```bash
58+
pyredactkit redacted_test.txt -u .hashshadow_test.txt.json
5259
```
5360

5461
Install nltk data for redacting names
@@ -140,40 +147,53 @@ $ poetry run pyredactkit ip_test.txt
140147
Sample Result (Note that name is not redacted by default):
141148
142149
```txt
143-
John, please get that article on ███████████████ to me by 5:00PM on Jan 9th 2012. 4:00 would be ideal, actually. If you have any questions, You can reach me at(519)-236-2723 or get in touch with my associate at ███████████████.
150+
John, please get that article on b8bd54d3-34ee-4f31-8b2b-0d729929e8aa to me by 5:00PM on Jan 9th 2012. 4:00 would be ideal, actually. If you have any questions, You can reach me at(519)-236-2723 or get in touch with my associate at 7b3c7641-4b09-4e00-8e02-0e68e47b0ded.
144151
All rights reserved. Printed in the United States of America. No part of this book may be used or reproduced in any manner whatsoever without written permission except in the case of brief quotations embodied in critical articles and reviews. For information address HarperCollins Publishers, 10 East 53rd Street, New York, NY 10022. His name is David. I met him and John last week. Gowtham Teja Kanneganti is a good student. I was born on Oct 4, 1995. My Indian mobile number is +91-7761975545. After coming to USA I got a new number +1-405-413-5255. I live on 1003 E Brooks St, Norman, Ok, 73071. I met a child, who is playing with josh.
145-
this is my IP: ███████████████
146-
My router is : ███████████████
147-
███████████████
148-
███████████████
149-
███████████████
150-
███████████████
151-
152-
███████████████
153-
154-
My email is ███████████████
155-
156-
this is my IP: ███████████████
157-
My router is: ███████████████
158-
███████████████
159-
███████████████
160-
███████████████
161-
███████████████
162-
152+
this is my IP: 49f62b69-98c1-4f7b-87d1-8f7f6723f44e
153+
My router is : e83747e7-521f-4f44-982f-0de1b2be4d19
154+
1d6716c8-1f1b-4e90-a62e-a0be14417e78
155+
0a5671c0-5de9-4198-a731-aff33e22a653
156+
ce336df7-e58e-4297-9644-c8199f5e38cf
157+
020fc1b6-6035-474b-8f6d-7c0890e94e6b
158+
c0f238ef-cc94-48e7-9c98-e8883d9dd947
159+
63d76480-e7d4-4ebf-9101-04b9e70ddd8d
160+
c33d0c2a-8d87-48c7-b846-20f938a8f902
161+
My email is c1f04434-c7e9-4d9a-a0a9-7a0651a046cd
162+
a36aab91-9c25-4221-a7a4-a0ff01c8d752
163+
this is my IP: 0c15d46a-67e7-4906-9dd4-ee520ab91b47
164+
My router is: ca00a810-4ff8-4880-8983-9b6dbbeb06f8
165+
12830911-20a9-45f8-ae04-9a4f807ee3b8
166+
6b042458-83a2-4ce9-b029-c62e83180719
167+
e1e8c2f3-5a9f-49ff-bc3e-cefe0f842274
168+
611ccb57-ea69-41b6-946d-1284a1a345d0
169+
492b72d2-cf23-477f-a02e-78bb04ad13ab
170+
Base64 data
171+
dd4e5123-c87a-4ff0-ba40-f7f601270484
172+
d660b76c-c2ce-4401-90a6-35277a2def23
173+
bbde787d-f515-4fcb-a583-e4d3d8185ca3
174+
10c5d831-2728-45d0-8810-c0e6bb40a4c9
175+
a5bac8dd-bd89-4bc8-94a9-b510beb88d6a
176+
Singapore NRIC
177+
c9a85803-e706-4322-99a0-e1c76705c4e8
178+
05759c8a-a2e7-46d8-8739-bb6c97fb8117
179+
0b29e289-a3af-4cbc-92d6-d044601a2458
180+
be05fce6-7464-43cb-9164-914f8e63ff5c
181+
b857a0c2-b108-44d5-b3ea-f0bc05e36dee
182+
5eccbebc-f2a9-4420-a436-66f08a6f63c5
163183
Card_Number,Card_Family,Credit_Limit,Cust_ID
164-
███████████████████,Premium,530000,CC67088
165-
███████████████████,Gold,18000,CC12076
166-
███████████████████,Premium,596000,CC97173
167-
███████████████████,Gold,27000,CC55858
168-
███████████████████,Platinum,142000,CC90518
169-
███████████████████,Gold,50000,CC49168
170-
███████████████████,Premium,781000,CC66746
184+
b35843a8-6483-44ec-884c-868dd3296d34,Premium,530000,CC67088
185+
d392cc27-d20b-4876-ae64-4196c5b05dd3,Gold,18000,CC12076
186+
acb4d6d7-1c7c-42d1-a02c-6b229e2a9e4a,Premium,596000,CC97173
187+
b92d943a-73d8-4318-955d-2e364836f641,Gold,27000,CC55858
188+
e0b66cbd-6174-4491-b938-408a47d38fb9,Platinum,142000,CC90518
189+
6b73619c-bcbf-4509-a064-1fb110f5dd45,Gold,50000,CC49168
190+
24f31233-cba6-4f6a-a2d6-0ce49952b2cb,Premium,781000,CC66746
171191
```
172192
173193
To redact specific type of data. E.g (name)
174194
175195
```bash
176-
poetry run pyredactkit test.txt -t name
196+
pyredactkit test.txt -t name
177197
```
178198
179199
Sample result:
@@ -187,31 +207,40 @@ My router is : 10.10.10.1
187207
81.141.167.45
188208
165.65.59.139
189209
64.248.67.225
210+
211+
https://tech.gov.sg
212+
213+
My email is [email protected]
214+
215+
this is my IP: 102.23.5.1
216+
My router is: 10.10.10.1
217+
71.159.188.33
190218
```
191219
192220
To redact multiple files from a directory and place it in a new directory
193221
194222
```bash
195-
poetry run pyredactkit to_test/ -d redacted_dir
223+
pyredactkit dir_test -d redacted_dir
196224
```
197225
198226
## Optional Help Menu as below
199227
200228
```bash
201-
usage: pyredactkit [-h] [-t REDACTIONTYPE] [-d DIROUT] [-r] [-e EXTENSION] file [file ...]
229+
usage: pyredactkit [-h] [-u UNREDACT] [-t REDACTIONTYPE] [-d DIROUT] [-r] [-e EXTENSION] file [file ...]
202230

203231
Read in a file or set of files, and return the result.
204232

205233
positional arguments:
206-
file Path of a file or a directory of files
234+
file Path of a file or a directory of files. Usage: pyredactkit [file/filestoredact]
207235

208236
optional arguments:
209237
-h, --help show this help message and exit
238+
-u UNREDACT, --unredact UNREDACT
239+
Option to unredact masked data. Usage: pyredactkit [redacted_file] -u [.hashshadow.json] (default: None)
210240
-t REDACTIONTYPE, --redactiontype REDACTIONTYPE
211-
Type of data to redact. names, nric, dns, emails, ipv4, ipv6 (default:
212-
None)
241+
Type of data to redact. names, nric, dns, emails, ipv4, ipv6, base64. Usage: pyredactkit [file/filestoredact] -t ip (default: None)
213242
-d DIROUT, --dirout DIROUT
214-
Output directory of the file (default: None)
243+
Output directory of the file. Usage: pyredactkit [file/filestoredact] -d [redacted_dir] (default: None)
215244
-r, --recursive Search through subfolders (default: True)
216245
-e EXTENSION, --extension EXTENSION
217246
File extension to filter by. (default: )

0 commit comments

Comments
 (0)