Add self-destructing option
This commit is contained in:
4
main.go
4
main.go
@ -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")
|
||||
|
Reference in New Issue
Block a user