Skip to content

Commit bfbe0cd

Browse files
authored
Merge pull request #40 from brootware/dev
Dev
2 parents de5bca0 + 8695b2f commit bfbe0cd

File tree

1 file changed

+28
-50
lines changed

1 file changed

+28
-50
lines changed

README.md

Lines changed: 28 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -132,30 +132,33 @@ nltk.download()" -->
132132
Run as below to redact a single file
133133

134134
```bash
135-
$ poetry run pyredactkit ip_test.txt
136-
137-
______ ______ _ _ _ ___ _
138-
| ___ \ | ___ \ | | | | | | / (_) |
139-
| |_/ / _ | |_/ /___ __| | __ _ ___| |_ | |/ / _| |_
140-
| __/ | | | | // _ \/ _` |/ _` |/ __| __| | \| | __|
141-
| | | |_| | | |\ \ __/ (_| | (_| | (__| |_ | |\ \ | |_
142-
\_| \__, | \_| \_\___|\__,_|\__,_|\___|\__| \_| \_/_|\__|
143-
__/ |
144-
|___/
145-
+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+-+-+
146-
|P|o|w|e|r|e|d| |b|y| |B|r|o|o|t|w|a|r|e|
147-
+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+-+-+
135+
$ poetry run pyredactkit -f logdata/test.txt
136+
137+
__________ __________ .___ __ ____ __.__ __
138+
\______ \___.__. \______ \ ____ __| _/____ _____/ |_ | |/ _|__|/ |_
139+
| ___< | | | _// __ \ / __ |\__ \ _/ ___\ __\ | < | \ __\
140+
| | \___ | | | \ ___// /_/ | / __ \\ \___| | | | \| || |
141+
|____| / ____| |____|_ /\___ >____ |(____ /\___ >__| |____|__ \__||__|
142+
\/ \/ \/ \/ \/ \/ \/
143+
+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+-+-+
144+
|P|o|w|e|r|e|d| |b|y| |B|r|o|o|t|w|a|r|e|
145+
+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+-+-+
148146

149147
https://github.com/brootware
150-
https://brootware.github.io
148+
https://brootware.github.io
149+
https://twitter.com/brootware
151150

152-
[ + ] Processing starts now. This may take some time depending on the file size. Monitor the redacted file size to monitor progress
153-
[ + ] No option supplied, will be redacting all the sensitive data supported
154-
[ + ] Redacted 10064 targets...
155-
[ + ] Redacted results saved to ./redacted_ip_test.txt
151+
[+] Processing starts now. This may take some time depending on the file size. Monitor the redacted file size to monitor progress
152+
[+] No custom regex pattern supplied, will be redacting all the core sensitive data supported
153+
[+] .hashshadow_test.txt.json file generated. Keep this safe if you need to undo the redaction.
154+
[+] Redacted 10068 targets...
155+
[+] Redacted results saved to ./redacted_test.txt
156+
[+] Estimated total words : 30316
157+
[+] Estimated total minutes saved : 405
158+
[+] Estimated total man hours saved : 6
156159
```
157160
158-
Sample Result (Note that name is not redacted by default):
161+
Sample Result:
159162
160163
```txt
161164
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.
@@ -201,51 +204,26 @@ e0b66cbd-6174-4491-b938-408a47d38fb9,Platinum,142000,CC90518
201204
24f31233-cba6-4f6a-a2d6-0ce49952b2cb,Premium,781000,CC66746
202205
```
203206
204-
Sample result:
205-
206-
```txt
207-
███████████████, please get that article on www.linkedin.com 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 [email protected].
208-
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 ███████████████. I met him and ███████████████ last week. ███████████████ 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 ███████████████, Norman, Ok, 73071. I met a child, who is playing with josh.
209-
this is my IP: 102.23.5.1
210-
My router is : 10.10.10.1
211-
71.159.188.33
212-
81.141.167.45
213-
165.65.59.139
214-
64.248.67.225
215-
216-
https://tech.gov.sg
217-
218-
My email is [email protected]
219-
220-
this is my IP: 102.23.5.1
221-
My router is: 10.10.10.1
222-
71.159.188.33
223-
```
224-
225-
To redact multiple files from a directory and place them in a new directory
226-
227-
```bash
228-
poetry run pyredactkit dir_test -d redacted_dir
229-
```
230-
231207
## Optional Help Menu as below
232208
233209
```bash
234-
usage: pyredactkit [-h] [-f FILE [FILE ...]] [-u UNREDACT] [-d DIROUT] [-r] [-e EXTENSION] [text ...]
210+
usage: pyredactkit [-h] [-f FILE [FILE ...]] [-u UNREDACT] [-d DIROUT] [-c CUSTOMFILE] [-r] [-e EXTENSION] [text ...]
235211

236-
Supply a sentence or paragraph to redact sensitive data from it. Or read in a file or set of files with -f , and return the result.
212+
Supply a sentence or paragraph to redact sensitive data from it. Or read in a file or set of files with -f to redact
237213

238214
positional arguments:
239215
text Redact sensitive data of a sentence from command prompt. (default: None)
240216

241217
optional arguments:
242218
-h, --help show this help message and exit
243219
-f FILE [FILE ...], --file FILE [FILE ...]
244-
Path of a file or a directory of files. Usage: pyredactkit [file/filestoredact] (default: None)
220+
Path of a file or a directory of files. (default: None)
245221
-u UNREDACT, --unredact UNREDACT
246222
Option to unredact masked data. Usage: pyredactkit -f [redacted_file] -u [.hashshadow.json] (default: None)
247223
-d DIROUT, --dirout DIROUT
248224
Output directory of the file. Usage: pyredactkit -f [file/filestoredact] -d [redacted_dir] (default: None)
225+
-c CUSTOMFILE, --customfile CUSTOMFILE
226+
User defined custom regex pattern for redaction. Usage: pyredactkit -f [file/filestoredact] -c [customfile.json] (default: None)
249227
-r, --recursive Search through subfolders (default: True)
250228
-e EXTENSION, --extension EXTENSION
251229
File extension to filter by. (default: )
@@ -254,5 +232,5 @@ optional arguments:
254232
## Sample files
255233
256234
- [All types of data](./logdata/test.txt)
257-
- [Differnt log file types](./logdata/)
235+
- [Different log file types](./logdata/)
258236
- [test_sample2.txt - 10002 lines of IP addresses](https://sanitizationbq.s3.ap-southeast-1.amazonaws.com/test_sample2.txt)

0 commit comments

Comments
 (0)