Hello, I hope you’re all right! Today we are going to talk about security. Specifically we’ll see about hard disk space. The white space inside them contains sensitive information that can be recovered later putting our security and privacy at risk. This happens because every time we erase information or even format a disk, it is not completely erased, but remains potentially unaltered. In other words, the empty space on hard drives on Windows or any SO doesn’t stay that way. For that reason, the information can be retrieved later.
So imagine for a moment that you lose access to your hard drive. All your personal information could be exposed, even if you took the precaution of deleting it. Sounds a little scary, doesn’t it? However, they have just released a program whose main function is to overwrite the blank space you have on a hard drive. In this way, the information really remains blank, making it impossible to recover it later. In fact, the name of the program is Overwrite. A very interesting tool. So here we show you how to install Overwrite for the empty space of the disks in Windows 10.
Compiling Overwrite with Visual Studio Code
Overwrite is a program written in C language, which is contained in a single file. It can be compiled on different platforms, but here we are going to compile for Windows 10. With that in mind, we are going to use Visual Studio Code. To know how to install it please check our post. In the same way, we’ll need a C/C++ Compiler, for this example I’m going to use MinGW. The installation process is simple, just go to this address and download the installer.
Then double click on the installer. When the wizard starts, select all the options for a basic installation. Next, wait for the wizard to download all the necessary files and proceed to install them. This will take a few minutes, depending on your internet connection.
Add MinGW to the environment variables.
Next, we’ll add the compiler to the Windows environment variables. This is very important because it will allow you to compile from any CMD without going to the address of the program. Also, the Run Code extension of the editor uses the command prompt of Windows to run the compiler. To find out how to do this, I invite you to check out our post about Wget in Windows 10. Here I simply show you the already added variable:
to check that everything has been installed correctly, please press the “Win+R” combination, and run CMD to open a Command Pro.
In the command prompt please type the following command:
If running the command throws the error that there are no input files, then we are ready to move on.
Install the extensions in Visual Studio Code.
Now we need to add the necessary extensions to compile in C in Visual Studio Code. With this in mind, open the program. And in the Marketplace write C++ and Code Runner, and proceed to download and install them.
All right, we’re ready to compile the program. The first thing we need to do is to download the package from here
Once downloaded, please remember the location of the download and open Visual Studio Code. Once there, in the left column in Explore, locate the folder where you downloaded the program and click on overwrite.c. Then on the menu on the right press Run.
Finally, we have compiled Overwrite, as you can see in the previous screen, there is already an executable file for windows. However, this program does not have a graphical interface but must be executed in a CMD. In addition, it is necessary to open a Command Prompt at the location of the program. To avoid this complication, we will add the environment variable.
Uses of Overwrite
overwrite [-h -v -test -one -rand -block:] (-files: &| -data:) -path: -h Print help and usage message. -v Print program version. -test For test, don't delete written files. -one Overwrite with 1, default with 0. -rand Overwrite with random data, default with 0. -block Block size, default 4096 bytes as NTFS and EXT4. -files Number of files to write, block size each. -data Quantity of data to write, ex: 1mb, 1gb, all. -path Path to directory where to write data.
Let’s use a practical example. Write 10 files and 10Mb data, on Windows C drive.
overwrite -files:10 -data:10mb -path:c:\
Obviously, there are several commands we can use to run the tool. Very well, we have learned how to install Overwrite for the empty space of the disks in Windows 10. And also, we have seen how to compile C in Visual Studio Code. I hope you enjoyed this tutorial as much as I did. See you next time.