@@ -22,15 +22,14 @@ api KeyAuthApp(name.decrypt(), ownerid.decrypt(), secret.decrypt(), version.decr
22
22
int main ()
23
23
{
24
24
// Freeing memory to prevent memory leak or memory scraping
25
- name.clear (); ownerid.clear (); secret.clear (); version.clear (); url.clear ();
26
-
25
+ name.clear (); ownerid.clear (); secret.clear (); version.clear (); url.clear ();
27
26
std::string consoleTitle = skCrypt (" Loader - Built at: " ).decrypt () + compilation_date + " " + compilation_time;
28
27
SetConsoleTitleA (consoleTitle.c_str ());
29
28
std::cout << skCrypt (" \n\n Connecting.." );
30
29
KeyAuthApp.init ();
31
- if (!KeyAuthApp.data .success )
30
+ if (!KeyAuthApp.response .success )
32
31
{
33
- std::cout << skCrypt (" \n Status: " ) << KeyAuthApp.data .message ;
32
+ std::cout << skCrypt (" \n Status: " ) << KeyAuthApp.response .message ;
34
33
Sleep (1500 );
35
34
exit (1 );
36
35
}
@@ -41,10 +40,10 @@ int main()
41
40
{
42
41
std::string key = ReadFromJson (" test.json" , " license" );
43
42
KeyAuthApp.license (key);
44
- if (!KeyAuthApp.data .success )
43
+ if (!KeyAuthApp.response .success )
45
44
{
46
45
std::remove (" test.json" );
47
- std::cout << skCrypt (" \n Status: " ) << KeyAuthApp.data .message ;
46
+ std::cout << skCrypt (" \n Status: " ) << KeyAuthApp.response .message ;
48
47
Sleep (1500 );
49
48
exit (1 );
50
49
}
@@ -55,10 +54,10 @@ int main()
55
54
std::string username = ReadFromJson (" test.json" , " username" );
56
55
std::string password = ReadFromJson (" test.json" , " password" );
57
56
KeyAuthApp.login (username, password);
58
- if (!KeyAuthApp.data .success )
57
+ if (!KeyAuthApp.response .success )
59
58
{
60
59
std::remove (" test.json" );
61
- std::cout << skCrypt (" \n Status: " ) << KeyAuthApp.data .message ;
60
+ std::cout << skCrypt (" \n Status: " ) << KeyAuthApp.response .message ;
62
61
Sleep (1500 );
63
62
exit (1 );
64
63
}
@@ -111,9 +110,9 @@ int main()
111
110
exit (1 );
112
111
}
113
112
114
- if (!KeyAuthApp.data .success )
113
+ if (!KeyAuthApp.response .success )
115
114
{
116
- std::cout << skCrypt (" \n Status: " ) << KeyAuthApp.data .message ;
115
+ std::cout << skCrypt (" \n Status: " ) << KeyAuthApp.response .message ;
117
116
Sleep (1500 );
118
117
exit (1 );
119
118
}
@@ -130,24 +129,24 @@ int main()
130
129
131
130
132
131
}
133
-
132
+
134
133
std::cout << skCrypt (" \n User data:" );
135
- std::cout << skCrypt (" \n Username: " ) << KeyAuthApp.data .username ;
136
- std::cout << skCrypt (" \n IP address: " ) << KeyAuthApp.data .ip ;
137
- std::cout << skCrypt (" \n Hardware-Id: " ) << KeyAuthApp.data .hwid ;
138
- std::cout << skCrypt (" \n Create date: " ) << tm_to_readable_time (timet_to_tm (string_to_timet (KeyAuthApp.data .createdate )));
139
- std::cout << skCrypt (" \n Last login: " ) << tm_to_readable_time (timet_to_tm (string_to_timet (KeyAuthApp.data .lastlogin )));
134
+ std::cout << skCrypt (" \n Username: " ) << KeyAuthApp.user_data .username ;
135
+ std::cout << skCrypt (" \n IP address: " ) << KeyAuthApp.user_data .ip ;
136
+ std::cout << skCrypt (" \n Hardware-Id: " ) << KeyAuthApp.user_data .hwid ;
137
+ std::cout << skCrypt (" \n Create date: " ) << tm_to_readable_time (timet_to_tm (string_to_timet (KeyAuthApp.user_data .createdate )));
138
+ std::cout << skCrypt (" \n Last login: " ) << tm_to_readable_time (timet_to_tm (string_to_timet (KeyAuthApp.user_data .lastlogin )));
140
139
std::cout << skCrypt (" \n Subscription(s): " );
141
140
142
- for (int i = 0 ; i < KeyAuthApp.data .subscriptions .size (); i++) {
143
- auto sub = KeyAuthApp.data .subscriptions .at (i);
141
+ for (int i = 0 ; i < KeyAuthApp.user_data .subscriptions .size (); i++) {
142
+ auto sub = KeyAuthApp.user_data .subscriptions .at (i);
144
143
std::cout << skCrypt (" \n name: " ) << sub.name ;
145
144
std::cout << skCrypt (" : expiry: " ) << tm_to_readable_time (timet_to_tm (string_to_timet (sub.expiry )));
146
145
}
147
146
148
147
std::cout << skCrypt (" \n\n Closing in five seconds..." );
149
148
Sleep (5000 );
150
-
149
+
151
150
return 0 ;
152
151
}
153
152
0 commit comments