-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.go
70 lines (57 loc) · 1.72 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package main
import (
KeyAuthApp "KeyAuth/KeyAuth"
"fmt"
"os"
"time"
)
func Input(message string) string {
fmt.Print(message)
var input string
fmt.Scanln(&input)
return input
}
func main() {
KeyAuthApp.Api(
"KeyAuth", // -- Application Name
"mpgOizljNW", // -- Owner ID
"1.1", // -- Application Version
"", // -- Token Path (PUT NULL OR LEAVE BLANK IF YOU DON'T WANT TO USE TOKEN SYSTEM)
)
fmt.Println("[1] Login")
fmt.Println("[2] Register")
fmt.Println("[3] Upgrade")
fmt.Println("[4] License Only Login")
ans := Input("\nChoose your option: ")
if ans == "1" {
username := Input("Input username: ")
password := Input("Input password: ")
KeyAuthApp.Login(username, password)
} else if ans == "2" {
username := Input("Input username: ")
password := Input("Input password: ")
license := Input("Input license: ")
KeyAuthApp.Register(username, password, license)
} else if ans == "3" {
username := Input("Input username: ")
license := Input("Input license: ")
KeyAuthApp.Upgrade(username, license)
} else if ans == "4" {
license := Input("Input license: ")
KeyAuthApp.License(license)
} else {
fmt.Println("Invalid option")
time.Sleep(2 * time.Second)
main()
}
fmt.Println("\nUser Data:")
fmt.Println(" Username: ", KeyAuthApp.Username)
fmt.Println(" IP Address: ", KeyAuthApp.IP)
fmt.Println(" HWID: ", KeyAuthApp.HWID)
fmt.Println(" Created At: ", KeyAuthApp.CreatedDate)
fmt.Println(" Last Login At: ", KeyAuthApp.LastLogin)
fmt.Println(" Subscription: ", KeyAuthApp.Subscription)
fmt.Println("\nExiting application in 10 seconds...")
time.Sleep(10 * time.Second)
os.Exit(0)
}