Skip to main content

A Python package for securely wiping files or folders.

Project description

securewipe 3.0.0

  • securewipe is a Python package for securely wiping files or folders by overwriting them with random data. It also provides a command-line interface (CLI) for easy usage.
  • You can rely on Securewipe to overwrite the data using various patterns, ensuring it is virtually impossible to recover.

Benefits

  • Security: Ensures sensitive files or directories are securely wiped by overwriting them with random data, making recovery impossible.
  • Ease of Use: Provides a straightforward CLI interface and Python API for integrating secure file wiping into applications and scripts.
  • Customization: Allows customization through Python scripts for specific file or directory wiping requirements.

Installation

You can install securewipe via pip:

pip install securewipe

Usage

Command-Line Interface (CLI)

Overwrite a specific file

To overwrite a specific file with random data:

securewipe --self-destruct /path/to/file.txt

Overwrite all files in a directory

To overwrite all files within a directory with random data:

securewipe --self-destruct /path/to/folder/

Python Code Examples

Self-destruct current script

from securewipe import replace_random

try:
    replace_random(__file__)
    print("Self-destructed successfully.")
except Exception as e:
    print(f"Error: {e}")

Overwrite a specific file

from securewipe import replace_random

file_path = '/path/to/file.txt'

try:
    replace_random(file_path)
    print(f"Successfully overwritten: {file_path}")
except Exception as e:
    print(f"Error: {e}")

Overwrite all files in a directory

import os
from securewipe import replace_random

folder_path = '/path/to/folder/'

try:
    for file_name in os.listdir(folder_path):
        file_path = os.path.join(folder_path, file_name)
        if os.path.isfile(file_path):
            replace_random(file_path)
            print(f"Successfully overwritten: {file_path}")
except Exception as e:
    print(f"Error: {e}")

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

Thank you for using securewipe! If you find it useful, please consider starring the repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

securewipe-3.0.0.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

securewipe-3.0.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page