mirror of
https://github.com/HACKERALERT/Picocrypt.git
synced 2025-01-04 21:58:23 +00:00
Update Picocrypt.go
This commit is contained in:
parent
c883c00445
commit
98cdec124b
1 changed files with 11 additions and 10 deletions
|
@ -75,7 +75,7 @@ var keyfilePrompt = "Keyfile (optional):"
|
||||||
var progress float32 = 0
|
var progress float32 = 0
|
||||||
var progressInfo = ""
|
var progressInfo = ""
|
||||||
var status = "Ready."
|
var status = "Ready."
|
||||||
var _status = "adfs"
|
var _status = ""
|
||||||
var _status_color = color.RGBA{0xff,0xff,0xff,255}
|
var _status_color = color.RGBA{0xff,0xff,0xff,255}
|
||||||
var splitUnits = []string{
|
var splitUnits = []string{
|
||||||
"KB",
|
"KB",
|
||||||
|
@ -1622,19 +1622,20 @@ func rsDecode(data []byte,encoder reedsolomon.Encoder,size int) []byte{
|
||||||
|
|
||||||
// Create the master window, set callbacks, and start the UI
|
// Create the master window, set callbacks, and start the UI
|
||||||
func main(){
|
func main(){
|
||||||
v,err := http.Get("https://raw.githubusercontent.com/HACKERALERT/Picocrypt/main/internals/version.txt")
|
go func(){
|
||||||
if err==nil{
|
v,err := http.Get("https://raw.githubusercontent.com/HACKERALERT/Picocrypt/main/internals/version.txt")
|
||||||
fmt.Println(v)
|
|
||||||
body,err := io.ReadAll(v.Body)
|
|
||||||
v.Body.Close()
|
|
||||||
if err==nil{
|
if err==nil{
|
||||||
if string(body[:5])!=version{
|
fmt.Println(v)
|
||||||
if di.Message("A newer version is available. Download it?").YesNo(){
|
body,err := io.ReadAll(v.Body)
|
||||||
browser.OpenURL("https://github.com/HACKERALERT/Picocrypt/releases")
|
v.Body.Close()
|
||||||
|
if err==nil{
|
||||||
|
if string(body[:5])!=version{
|
||||||
|
_status = "A newer version is available."
|
||||||
|
_status_color = color.RGBA{0,0xff,0,255}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}()
|
||||||
di.Init()
|
di.Init()
|
||||||
if runtime.GOOS=="windows"{
|
if runtime.GOOS=="windows"{
|
||||||
exec.Command(filepath.Join(rootDir,"sdelete64.exe"),"/accepteula")
|
exec.Command(filepath.Join(rootDir,"sdelete64.exe"),"/accepteula")
|
||||||
|
|
Loading…
Reference in a new issue