| skipped 77 lines |
78 | 78 | | func (u *Upgrade) UpgradeAfrogPocs() { |
79 | 79 | | isUp, err := u.CheckUpgrade() |
80 | 80 | | if err != nil { |
| 81 | + | if u.IsUpdatePocs { |
| 82 | + | fmt.Println(log.LogColor.High("PoC Update failed, " + err.Error())) |
| 83 | + | } |
81 | 84 | | return |
82 | 85 | | } |
83 | 86 | | if !isUp { |
| 87 | + | if u.IsUpdatePocs { |
| 88 | + | fmt.Println(log.LogColor.Vulner("Congratulations, the PoC is updated to the latest version")) |
| 89 | + | } |
84 | 90 | | return |
85 | 91 | | } |
86 | 92 | | if isUp { |
87 | 93 | | u.LastestVersion = u.RemoteVersion |
88 | 94 | | if u.IsUpdatePocs { |
89 | | - | fmt.Println(log.LogColor.Info("Downloading latest release...")) |
| 95 | + | fmt.Println(log.LogColor.Vulner("Downloading latest release...")) |
90 | 96 | | u.Download() |
91 | 97 | | } |
92 | 98 | | } |
| skipped 20 lines |
113 | 119 | | |
114 | 120 | | _, err := uz.Extract(src, u.HomeDir) |
115 | 121 | | if err != nil { |
116 | | - | fmt.Println(log.LogColor.Low("Failed updated afrog-pocs ", err)) |
| 122 | + | fmt.Println(log.LogColor.High("Failed updated afrog-pocs ", err)) |
117 | 123 | | } |
118 | 124 | | |
119 | | - | fmt.Println(log.LogColor.Info("Successfully updated afrog-pocs to ", u.HomeDir+upPathName)) |
| 125 | + | fmt.Println(log.LogColor.Vulner("Successfully updated afrog-pocs to ", strings.ReplaceAll(u.HomeDir+upPathName, "\\", "/"))) |
120 | 126 | | } |
121 | 127 | | |