Skip to content

Instantly share code, notes, and snippets.

@zanderz
Created October 31, 2018 21:30
Show Gist options
  • Save zanderz/a376f0a7142a9d6e5d77dc278259dfc0 to your computer and use it in GitHub Desktop.
Save zanderz/a376f0a7142a9d6e5d77dc278259dfc0 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"io/ioutil"
"os"
)
func Win_motw(name string) error {
return ioutil.WriteFile(name+":Zone.Identifier", []byte("[ZoneTransfer]\r\nZoneId=3"), 0644)
}
func main() {
if len(os.Args) < 2 {
fmt.Print("requires filename argument")
os.Exit(1)
}
err := Win_motw(os.Args[1])
if err != nil {
fmt.Errorf("%s", err.Error())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment