Skip to content

Commit

Permalink
Split config function
Browse files Browse the repository at this point in the history
Move close window
  • Loading branch information
JeGoi committed Aug 11, 2023
1 parent 8d5f57d commit 361b759
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,26 +146,26 @@ func main() {
Text: "Configure",
OnClicked: func() {
Configure()
mw1.Close()
},
},
},
}.Run()); err != nil {
walk.MsgBox(windowMsgBox, T("errorWindowTitle"), T("errorMainWindow"), walk.MsgBoxOK)
log.Println("Failed opening main window: ", err)
mw1.Close()
exit_1()
}
clean_files()
mw1.Close()
os.Exit(0)
}

func Configure() {
var xmlPlistProfile map[string]interface{}
var eapType uint64
var userCertDecode string
var wifiIndex int
var wiredIndex int
downloadProfile()
extractProfile()
}

func downloadProfile(){
ProfileDownloaded = TempPATH + "\\profile.xml"
// Download mobileconfig file
err := writeProfileToLocalFile(ProfileDownloaded, PROFILE_URL)
Expand All @@ -174,6 +174,15 @@ func Configure() {
log.Println("Failed loading profile: ", err)
exit_1()
}
log.Printf("Load Profile from PF")
}

func extractProfile() {
var xmlPlistProfile map[string]interface{}
var eapType uint64
var userCertDecode string
var wifiIndex int
var wiredIndex int

// Read xml profile, convert to string
data, err := ioutil.ReadFile(ProfileDownloaded)
Expand Down

0 comments on commit 361b759

Please sign in to comment.