Skip to content

Commit 694de60

Browse files
Update README.md
1 parent a0b209d commit 694de60

File tree

1 file changed

+53
-35
lines changed

1 file changed

+53
-35
lines changed

README.md

Lines changed: 53 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,55 @@
11
# KeyAuth-Python-Example
22
KeyAuth Python Example For The https://keyauth.cc Authentication system.
33

4-
#### **Bugs**
4+
## **Bugs**
55

66
If the default example not added to your software isn't functioning how it should, please join the Discord server https://discord.gg/keyauth and submit the issue in the `#bugs` channel.
77

88
However, we do **NOT** provide support for adding KeyAuth to your project. If you can't figure this out you should use Google or YouTube to learn more about the programming language you want to sell a program in.
99

10-
#### **What is KeyAuth?**
10+
## Copyright License
11+
12+
KeyAuth is licensed under **Elastic License 2.0**
13+
14+
* You may not provide the software to third parties as a hosted or managed
15+
service, where the service provides users with access to any substantial set of
16+
the features or functionality of the software.
17+
18+
* You may not move, change, disable, or circumvent the license key functionality
19+
in the software, and you may not remove or obscure any functionality in the
20+
software that is protected by the license key.
21+
22+
* You may not alter, remove, or obscure any licensing, copyright, or other notices
23+
of the licensor in the software. Any use of the licensor’s trademarks is subject
24+
to applicable law.
25+
26+
Thank you for your compliance, we work hard on the development of KeyAuth and do not appreciate our copyright being infringed.
27+
28+
## **What is KeyAuth?**
1129

1230
KeyAuth is an Open source authentication system with cloud hosting plans as well. Client SDKs available for [C#](https://github.com/KeyAuth/KeyAuth-CSHARP-Example), [C++](https://github.com/KeyAuth/KeyAuth-CPP-Example), [Python](https://github.com/KeyAuth/KeyAuth-Python-Example), [Java](https://github.com/SprayDown/KeyAuth-JAVA-api), [JavaScript](https://github.com/mazkdevf/KeyAuth-JS-Example), [VB.NET](https://github.com/KeyAuth/KeyAuth-VB-Example), [PHP](https://github.com/KeyAuth/KeyAuth-PHP-Example), [Rust](https://github.com/KeyAuth/KeyAuth-Rust-Example), [Go](https://github.com/mazkdevf/KeyAuth-Go-Example), [Lua](https://github.com/mazkdevf/KeyAuth-Lua-Examples), [Ruby](https://github.com/mazkdevf/KeyAuth-Ruby-Example), and [Perl](https://github.com/mazkdevf/KeyAuth-Perl-Example). KeyAuth has several unique features such as memory streaming, webhook function where you can send requests to API without leaking the API, discord webhook notifications, ban the user securely through the application at your discretion. Feel free to join https://discord.gg/keyauth if you have questions or suggestions.
1331

14-
#### **Customer connection issues?**
32+
## **Customer connection issues?**
1533

1634
This is common amongst all authentication systems. Program obfuscation causes false positives in virus scanners, and with the scale of KeyAuth this is perceived as a malicious domain. So, `keyauth.com` and `keyauth.win` have been blocked by many internet providers. for dashbord, reseller panel, customer panel, use `keyauth.cc`
1735

1836
For API, `keyauth.cc` will not work because I purposefully blocked it on there so `keyauth.cc` doesn't get blocked also. So, you should create your own domain and follow this tutorial video https://www.youtube.com/watch?v=a2SROFJ0eYc. The tutorial video shows you how to create a domain name for 100% free if you don't want to purchase one.
1937

20-
#### **`KeyAuthApp` instance definition**
38+
## **How to compile?**
39+
40+
You can either use Pyinstaller or Nuitka.
41+
42+
Links:
43+
- Nutika: https://nuitka.net/
44+
- Pyinstaller: https://pyinstaller.org/
45+
46+
Pyinstaller:
47+
- Basic command: `pyinstaller --onefile main.py`
48+
49+
Nutika:
50+
- Basic command: `python -m nuitka --follow-imports --onefile main.py`
51+
52+
## **`KeyAuthApp` instance definition**
2153

2254
Visit and select your application, then click on the **Python** tab
2355

@@ -33,11 +65,11 @@ keyauthapp = api(
3365
)
3466
```
3567

36-
#### **Initialize application**
68+
## **Initialize application**
3769

3870
You don't need to add any code to initalize. KeyAuth will initalize when the instance definition is made.
3971

40-
#### **Display application information**
72+
## **Display application information**
4173

4274
```py
4375
print(f"""
@@ -50,15 +82,15 @@ Customer panel link: {keyauthapp.app_data.customer_panel}
5082
""")
5183
```
5284

53-
#### **Check session validation**
85+
## **Check session validation**
5486

5587
Use this to see if the user is logged in or not.
5688

5789
```py
5890
print(f"Current Session Validation Status: {keyauthapp.check()}")
5991
```
6092

61-
#### **Check blacklist status**
93+
## **Check blacklist status**
6294

6395
Check if HWID or IP Address is blacklisted. You can add this if you want, just to make sure nobody can open your program for less than a second if they're blacklisted. Though, if you don't mind a blacklisted user having the program for a few seconds until they try to login and register, and you care about having the quickest program for your users, you shouldn't use this function then. If a blacklisted user tries to login/register, the KeyAuth server will check if they're blacklisted and deny entry if so. So the check blacklist function is just auxiliary function that's optional.
6496

@@ -68,15 +100,15 @@ if keyauthapp.checkblacklist():
68100
os._exit(1)
69101
```
70102

71-
#### **Login with username/password**
103+
## **Login with username/password**
72104

73105
```py
74106
user = input('Provide username: ')
75107
password = input('Provide password: ')
76108
keyauthapp.login(user, password)
77109
```
78110

79-
#### **Register with username/password/key**
111+
## **Register with username/password/key**
80112

81113
```py
82114
user = input('Provide username: ')
@@ -85,7 +117,7 @@ license = input('Provide License: ')
85117
keyauthapp.register(user, password, license)
86118
```
87119

88-
#### **Upgrade user username/key**
120+
## **Upgrade user username/key**
89121

90122
Used so the user can add extra time to their account by claiming new key.
91123

@@ -98,7 +130,7 @@ license = input('Provide License: ')
98130
keyauthapp.upgrade(user, license)
99131
```
100132

101-
#### **Login with just license key**
133+
## **Login with just license key**
102134

103135
Users can use this function if their license key has never been used before, and if it has been used before. So if you plan to just allow users to use keys, you can remove the login and register functions from your code.
104136

@@ -107,7 +139,7 @@ key = input('Enter your license: ')
107139
keyauthapp.license(key)
108140
```
109141

110-
#### **User Data**
142+
## **User Data**
111143

112144
Show information for current logged-in user.
113145

@@ -131,7 +163,7 @@ print("Expires at: " + datetime.utcfromtimestamp(int(keyauthapp.user_data.expire
131163
print(f"Current Session Validation Status: {keyauthapp.check()}")
132164
```
133165

134-
#### **Show list of online users**
166+
## **Show list of online users**
135167

136168
```py
137169
onlineUsers = keyauthapp.fetchOnline()
@@ -145,7 +177,7 @@ else:
145177
print("\n" + OU + "\n")
146178
```
147179

148-
#### **Application variables**
180+
## **Application variables**
149181

150182
A string that is kept on the server-side of KeyAuth. On the dashboard you can choose for each variable to be authenticated (only logged in users can access), or not authenticated (any user can access before login). These are global and static for all users, unlike User Variables which will be dicussed below this section.
151183

@@ -155,7 +187,7 @@ data = keyauthapp.var("varName")
155187
print(data)
156188
```
157189

158-
#### **User Variables**
190+
## **User Variables**
159191

160192
User variables are strings kept on the server-side of KeyAuth. They are specific to users. They can be set on Dashboard in the Users tab, via SellerAPI, or via your loader using the code below. `discord` is the user variable name you fetch the user variable by. `test#0001` is the variable data you get when fetching the user variable.
161193

@@ -172,7 +204,7 @@ data = keyauthapp.getvar("varName")
172204
print(data)
173205
```
174206

175-
#### **Application Logs**
207+
## **Application Logs**
176208

177209
Can be used to log data. Good for anti-debug alerts and maybe error debugging. If you set Discord webhook in the app settings of the Dashboard, it will send log messages to your Discord webhook rather than store them on site. It's recommended that you set Discord webhook, as logs on site may be deleted after a couple months of their creation.
178210

@@ -183,7 +215,7 @@ You can use the log function before login & after login.
183215
keyauthapp.log("Message")
184216
```
185217

186-
#### **Ban the user**
218+
## **Ban the user**
187219

188220
Ban the user and blacklist their HWID and IP Address. Good function to call upon if you use anti-debug and have detected an intrusion attempt.
189221

@@ -193,7 +225,7 @@ Function only works after login.
193225
keyauthapp.ban()
194226
```
195227

196-
#### **Server-sided webhooks**
228+
## **Server-sided webhooks**
197229

198230
Tutorial video https://www.youtube.com/watch?v=ENRaNPPYJbc
199231

@@ -216,7 +248,7 @@ data = keyauthapp.webhook("7kR0UedlVI", "", "type=init&name=test&ownerid=j9Gj0FT
216248
data = keyauthapp.webhook("7kR0UedlVI", "", "{\"content\": \"webhook message here\",\"embeds\": null}", "application/json")
217249
```
218250

219-
#### **Download file**
251+
## **Download file**
220252

221253
Keep files secure by providing KeyAuth your file download link on the KeyAuth dashboard. Make sure this is a direct download link (as soon as you go to the link, it starts downloading without you clicking anything). The KeyAuth download function provides the bytes, and then you get to decide what to do with those. This example shows how to write it to a file named `text.txt` in the same folder as the program, though you could execute with RunPE or whatever you want.
222254

@@ -230,7 +262,7 @@ f.write(bytes)
230262
f.close()
231263
```
232264

233-
#### **Chat channels**
265+
## **Chat channels**
234266

235267
Allow users to communicate amongst themselves in your program.
236268

@@ -253,17 +285,3 @@ Example on how to send chat message.
253285
* Send chat message
254286
keyauthapp.chatSend("MESSAGE", "CHANNEL")
255287
```
256-
257-
#### **How to compile?**
258-
259-
You can either use Pyinstaller or Nuitka.
260-
261-
Links:
262-
- Nutika: https://nuitka.net/
263-
- Pyinstaller: https://pyinstaller.org/
264-
265-
Pyinstaller:
266-
- Basic command: `pyinstaller --onefile main.py`
267-
268-
Nutika:
269-
- Basic command: `python -m nuitka --follow-imports --onefile main.py`

0 commit comments

Comments
 (0)