-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
160 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
|
||
## Overwrite file contents with uniform random data | ||
|
||
`tird` can partially or completely overwrite the contents of files with random data. | ||
|
||
You can select positions in the file between which the contents will be overwritten with random data. | ||
|
||
#### Overwrite the entire 1 MB file contents with random bytes: | ||
|
||
``` | ||
$ tird | ||
MENU | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
0. Exit 1. Show info | ||
2. Encrypt 3. Decrypt | ||
4. Embed 5. Extract | ||
6. Encrypt & embed 7. Extract & decrypt | ||
8. Create w/ random 9. Overwrite w/ random | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
[01] Select an option [0-9]: 9 | ||
I: action #9: overwrite file contents with random bytes | ||
[07] File to overwrite: 1MB | ||
I: path: "1MB"; size: 1000000 B, 976.6 KiB | ||
[08] Initial position, valid values are [0; 1000000], default=0: | ||
I: initial position: 0 | ||
[09] Final position, valid values are [0; 1000000], default=1000000: | ||
I: final position: 1000000 | ||
I: data size to write: 1000000 B, 976.6 KiB | ||
W: output file will be partially overwritten with random bytes | ||
[13] Proceed? (Y/N): y | ||
I: writing... | ||
I: written 1000000 B, 976.6 KiB, 100.0% in 0.0s, avg 111.6 MiB/s | ||
I: fsyncing... | ||
I: fsynced in 0.0s | ||
I: action is completed | ||
``` | ||
|
||
#### Overwrite the entire 1 MB file contents with random bytes with debug messages enabled: | ||
|
||
``` | ||
$ tird -d | ||
W: debug messages enabled! | ||
MENU | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
0. Exit 1. Show info | ||
2. Encrypt 3. Decrypt | ||
4. Embed 5. Extract | ||
6. Encrypt & embed 7. Extract & decrypt | ||
8. Create w/ random 9. Overwrite w/ random | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
[01] Select an option [0-9]: 9 | ||
I: action #9: overwrite file contents with random bytes | ||
[07] File to overwrite: 1MB | ||
D: real path: "/tmpfs/1MB" | ||
D: opening file "1MB" in mode "rb+" | ||
D: opened file (object): <_io.BufferedRandom name='1MB'> | ||
I: path: "1MB"; size: 1000000 B, 976.6 KiB | ||
[08] Initial position, valid values are [0; 1000000], default=0: | ||
I: initial position: 0 | ||
[09] Final position, valid values are [0; 1000000], default=1000000: | ||
I: final position: 1000000 | ||
I: data size to write: 1000000 B, 976.6 KiB | ||
W: output file will be partially overwritten with random bytes | ||
[13] Proceed? (Y/N): Y | ||
D: current position: of=0 | ||
D: move to position 0 in <_io.BufferedRandom name='1MB'> | ||
D: current position: of=0 | ||
I: writing... | ||
D: current position: of=1000000 | ||
I: written 1000000 B, 976.6 KiB, 100.0% in 0.0s, avg 108.1 MiB/s | ||
I: fsyncing... | ||
I: fsynced in 0.0s | ||
D: closing <_io.BufferedRandom name='1MB'> | ||
D: <_io.BufferedRandom name='1MB'> closed | ||
I: action is completed | ||
``` | ||
|
||
#### Overwriting file contents with random data between positions 1000 and 3000 (writing 2000 random bytes): | ||
|
||
``` | ||
$ tird | ||
MENU | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
0. Exit 1. Show info | ||
2. Encrypt 3. Decrypt | ||
4. Embed 5. Extract | ||
6. Encrypt & embed 7. Extract & decrypt | ||
8. Create w/ random 9. Overwrite w/ random | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
[01] Select an option [0-9]: 9 | ||
I: action #9: overwrite file contents with random bytes | ||
[07] File to overwrite: 1MB | ||
I: path: "1MB"; size: 1000000 B, 976.6 KiB | ||
[08] Initial position, valid values are [0; 1000000], default=0: 1000 | ||
I: initial position: 1000 | ||
[09] Final position, valid values are [1000; 1000000], default=1000000: 3000 | ||
I: final position: 3000 | ||
I: data size to write: 2000 B, 2.0 KiB | ||
W: output file will be partially overwritten with random bytes | ||
[13] Proceed? (Y/N): 1 | ||
I: writing... | ||
I: written 2000 B, 2.0 KiB, 100.0% in 0.0s, avg 28.2 MiB/s | ||
I: fsyncing... | ||
I: fsynced in 0.0s | ||
I: action is completed | ||
``` | ||
|
||
#### Overwriting file contents with random data between positions 10000 and 50000 (writing 40000 random bytes) with debug messages enabled: | ||
|
||
``` | ||
$ tird -d | ||
W: debug messages enabled! | ||
MENU | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
0. Exit 1. Show info | ||
2. Encrypt 3. Decrypt | ||
4. Embed 5. Extract | ||
6. Encrypt & embed 7. Extract & decrypt | ||
8. Create w/ random 9. Overwrite w/ random | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
[01] Select an option [0-9]: 9 | ||
I: action #9: overwrite file contents with random bytes | ||
[07] File to overwrite: 1MB | ||
D: real path: "/tmpfs/1MB" | ||
D: opening file "1MB" in mode "rb+" | ||
D: opened file (object): <_io.BufferedRandom name='1MB'> | ||
I: path: "1MB"; size: 1000000 B, 976.6 KiB | ||
[08] Initial position, valid values are [0; 1000000], default=0: 10000 | ||
I: initial position: 10000 | ||
[09] Final position, valid values are [10000; 1000000], default=1000000: 50000 | ||
I: final position: 50000 | ||
I: data size to write: 40000 B, 39.1 KiB | ||
W: output file will be partially overwritten with random bytes | ||
[13] Proceed? (Y/N): y | ||
D: current position: of=0 | ||
D: move to position 10000 in <_io.BufferedRandom name='1MB'> | ||
D: current position: of=10000 | ||
I: writing... | ||
D: current position: of=50000 | ||
I: written 40000 B, 39.1 KiB, 100.0% in 0.0s, avg 83.2 MiB/s | ||
I: fsyncing... | ||
I: fsynced in 0.0s | ||
D: closing <_io.BufferedRandom name='1MB'> | ||
D: <_io.BufferedRandom name='1MB'> closed | ||
I: action is completed | ||
``` | ||
|