项目作者: sourcefrenchy

项目描述 :
Secure rm
高级语言: Go
项目地址: git://github.com/sourcefrenchy/srm.git
创建时间: 2020-06-09T16:00:17Z
项目社区:https://github.com/sourcefrenchy/srm

开源协议:GNU General Public License v3.0

下载


Secure rm for OSX

A secure delete for OSX (and other platforms if you want to cross-compile, courtesy of using Golang).
Reading on secure delete techniques and decided to set on NSA 130-2, i.e. 3 passes: random, random, verify last random.

How?

Well, I just use rand.Seed(time.Now().UTC().UnixNano()) and rand.Read() for each random pass.
Then I open the file before doing os.delete on it to ensure the last random was written correctly via Blake) 256-bits.
You can also use “rm -P” from OSX since srm is not longer available:

  1. -P Overwrite regular files before deleting them. Files are overwrit-
  2. ten three times, first with the byte pattern 0xff, then 0x00, and
  3. then 0xff again, before they are deleted.

Why?

Well I didnt know the wheel existed, wrote my mini srm before deciding to read the man rm… But I am still trying to learn Golang so still fun to do.

Feedbacks

Yes, I am really really learning Golang coming from Python so please PR/help/feedback really welcome on making better code, more readable, more efficient and secure if need be :)