Add self-destructing option

This commit is contained in:
idk
2022-03-03 23:48:32 -05:00
parent 01da2b0605
commit 06b6bf6453
2 changed files with 36 additions and 0 deletions

View File

@ -93,6 +93,7 @@ var (
mirror = flag.String("mirror", "https://dist.torproject.org/torbrowser/", "Mirror to use")
solidarity = flag.Bool("onion", false, "Serve an onion site which shows some I2P propaganda")
torrent = flag.Bool("torrent", tbget.TorrentReady(), "Create a torrent of the downloaded files and seed it over I2P using an Open Tracker")
destruct = flag.Bool("destruct", false, "Destructively delete the working directory when finished")
/*ptop = flag.Bool("p2p", false, "Use bittorrent over I2P to download the initial copy of Tor Browser")*/
)
@ -121,6 +122,9 @@ func main() {
if *snowflake {
go Snowflake()
}
if *destruct {
defer OverwriteDirectoryContents(*directory)
}
tbget.WORKING_DIR = *directory
if filename == "i2pbrowser" {
log.Println("Starting I2P in Tor Browser")