Created
October 31, 2018 21:30
-
-
Save zanderz/a376f0a7142a9d6e5d77dc278259dfc0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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