mirror of
https://github.com/hahwul/WebHackersWeapons.git
synced 2025-03-06 22:05:59 -05:00
Update distribute-readme.go
This commit is contained in:
parent
b150afecc2
commit
7c6751c137
@ -122,5 +122,24 @@ func main() {
|
||||
foot_data, _ := ioutil.ReadAll(foot)
|
||||
readme = string(head_data) + readme + string(foot_data)
|
||||
fmt.Println("======================result====================")
|
||||
fmt.Println(readme)
|
||||
//fmt.Println(readme)
|
||||
|
||||
file, err := os.OpenFile(
|
||||
"README.md",
|
||||
os.O_CREATE|os.O_RDWR|os.O_TRUNC,
|
||||
|
||||
os.FileMode(0644))
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
defer file.Close()
|
||||
_, err = file.Write([]byte(readme))
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
fmt.Println("[+] Patched README.md file")
|
||||
fmt.Println("[+] Please check README file and git push")
|
||||
fmt.Println("[ copy/paste this ] git add data.json README.md ; git commit -m 'distribute readme'; git push -u origin master")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user