Skocz do zawartości

authSKRIPT - Logowanie na twoj serwer.


Rekomendowane odpowiedzi

SKRYPT - https://code.skript.pl/lunrUe1V/

#AUTOR: LIPEX047

on join:
	set {auth.%player%} to false
options:
	auth_message: &aZaloguj sie uzywajac /login <haslo> lub uzyj /register <haslo> <haslo>.
	auth_message_unregister: &aUzyj /unregister <haslo>.
	auth_password_unregister: &aHaslo sie nie zgadza.
	auth_repeat_password: &aHasla sie nie zgadzaja.
	auth_not_register: &aNie jestes zarejestrowany.
	auth_correct_register: &aPomyslna rejestracja!
	auth_correct_login: &aPomyslnie zalogowano!
	auth_register_set: &aJestes juz zarejestrowany!
	auth_login_set: &aJestes juz zalogowany!
	auth_unregister: &aPomyslnie usunieto konto.

on chat:
	if {auth.%player%} is false: 
		cancel event
		send "{@auth_message}"

on command:
	if {auth.%player%} is false:
		if command is not "l" or "login" or "reg" or "register":
			cancel event
			send "{@auth_message}"	

command /register [<text>] [<text>]:
	aliases: /reg, /register
	trigger:
		if {auth_password.%player%} is not set:
			if arg 1 is not set:
				send "{@auth_message}"
			if arg 1 is not arg 2:
				send "{@auth_message}"
			else:
				if arg 1 is arg 2:
					set {auth.%player%} to true
					set {auth_password.%player%} to arg 1
					remove blindness from player
					send "{@auth_correct_register}"
				else:
					send "{@auth_repeat_password}"
			else:
				send "{@auth_register_set}"

command /login [<text>]:
	aliases: /l, /login
	trigger:
		if {auth_password.%player%} is not set:
			send "{@auth_not_register}"
		else:
			if arg 1 is "%{auth_password.%player%}%":
				if {auth.%player%} is false:
					set yaml value "Username: %player%. Password: %arg 1%" from "authlist/accounts.yml" to true
					set {auth.%player%} to true
					send "{@auth_correct_login}"
					remove blindness from player
			else:
				send "{@auth_login_set}"

command /unregister [<text>]:
	trigger:
		if arg 1 is not set:
			send "{@auth_message_unregister}"
		if arg 1 is not "%{auth_password.%player%}%":
			send "{@auth_password_unregister}"
		if arg 1 is "%{auth_password.%player%}%":
			delete {auth_password.%player%}
			set {auth.%player%} to false
			send "{@auth_unregister}"

every 3 real seconds:
	loop all players:
		if {auth.%loop-player%} is false:
			send "{@auth_message}" to loop-player

every 1 tick:
	loop all players:
		if {auth.%loop-player%} is false:
			apply blindness 1 to the loop-player for 1337 second

on damage:
	if {auth.%attacker%} is false:
		cancel event
	if {auth.%victim%} is false:
		cancel event
on ignition:
	if {auth.%player%} is false:
		cancel event
on break:
	if {auth.%player%} is false:
		cancel event
on any movement:
	if {auth.%player%} is false:
		cancel event
on place:
	if {auth.%player%} is false:
		cancel event
on jump:
	if {auth.%player%} is false:
		cancel event
on pickup:
	if {auth.%player%} is false:
		cancel event
on drop:
	if {auth.%player%} is false:
		cancel event

 

Odnośnik do komentarza
https://skript.pl/temat/23625-authskript-logowanie-na-twoj-serwer/
Udostępnij na innych stronach

on join:
	apply blindness 1 to the player for 1337 hours
	set {auth.%player%} to false
options:
	auth_message: &aZaloguj sie uzywajac /login <haslo> lub uzyj /register <haslo> <haslo>.
	auth_message_unregister: &aUzyj /unregister <haslo>.
	auth_password_unregister: &aHaslo sie nie zgadza.
	auth_repeat_password: &aHasla sie nie zgadzaja.
	auth_not_register: &aNie jestes zarejestrowany.
	auth_correct_register: &aPomyslna rejestracja!
	auth_correct_login: &aPomyslnie zalogowano!
	auth_register_set: &aJestes juz zarejestrowany!
	auth_login_set: &aJestes juz zalogowany!
	auth_unregister: &aPomyslnie usunieto konto.

on chat:
	if {auth.%player%} is false: 
		cancel event
		send "{@auth_message}"

on command:
	if {auth.%player%} is false:
		if command is not "l" or "login" or "reg" or "register":
			cancel event
			send "{@auth_message}"	

command /register [<text>] [<text>]:
	aliases: /reg, /register
	trigger:
		if {auth_password.%player%} is not set:
			if arg 1 is not set:
				send "{@auth_message}"
			if arg 1 is not arg 2:
				send "{@auth_message}"
			else:
				if arg 1 is arg 2:
					set {auth.%player%} to true
					set {auth_password.%player%} to arg 1
					remove blindness from player
					send "{@auth_correct_register}"
				else:
					send "{@auth_repeat_password}"
		else:
			send "{@auth_register_set}"

command /login [<text>]:
	aliases: /l, /login
	trigger:
		if {auth_password.%player%} is not set:
			send "{@auth_not_register}"
		else:
			if arg 1 is "%{auth_password.%player%}%":
				if {auth.%player%} is false:
					set yaml value "Username: %player%. Password: %arg 1%" from "authlist/accounts.yml" to true
					set {auth.%player%} to true
					send "{@auth_correct_login}"
					remove blindness from player
			else:
				send "{@auth_login_set}"

command /unregister [<text>]:
	trigger:
		if arg 1 is not set:
			send "{@auth_message_unregister}"
		if arg 1 is not "%{auth_password.%player%}%":
			send "{@auth_password_unregister}"
		if arg 1 is "%{auth_password.%player%}%":
			delete {auth_password.%player%}
			set {auth.%player%} to false
			send "{@auth_unregister}"

every 3 real seconds:
	loop all players:
		if {auth.%loop-player%} is false:
			send "{@auth_message}" to loop-player

on damage:
	if {auth.%attacker%} is false:
		cancel event
	if {auth.%victim%} is false:
		cancel event
on ignition:
	if {auth.%player%} is false:
		cancel event
on break:
	if {auth.%player%} is false:
		cancel event
on any movement:
	if {auth.%player%} is false:
		cancel event
on place:
	if {auth.%player%} is false:
		cancel event
on jump:
	if {auth.%player%} is false:
		cancel event
on pickup:
	if {auth.%player%} is false:
		cancel event
on drop:
	if {auth.%player%} is false:
		cancel event

 

Odnośnik do komentarza
https://skript.pl/temat/23625-authskript-logowanie-na-twoj-serwer/#findComment-160190
Udostępnij na innych stronach

  • 2 tygodnie później...

Skrypt napisany jest nawet nawet, w miarę ok.

Ale, kurczę, hasła nie są hashowane (szyfrowane), co jest OGROMNYM błędem, bo hasła nie są prawie w ogóle bezpieczne. Wystarczy, że administrator dopisze odpowiednią komendę, która czyta ze zmiennych i BOOM! Ma wszystkie hasła graczy. Jest to także ułatwienie w zdobyciu haseł dla hackerów.

Przed wszystkimi zmiennymi lub argumentami z hasłem gracza dopisz "hashed". Wtedy hasła będą szyfrowane, bodajże algorytmem MD5 (nie pamiętam do końca).

Jeżeli potrzebujesz pomocy, napisz.

//Szyfrowanie i hashowanie to dwie różne rzeczy ~Ixidi

Edytowane przez Ixidi
formatowanie
Odnośnik do komentarza
https://skript.pl/temat/23625-authskript-logowanie-na-twoj-serwer/#findComment-161669
Udostępnij na innych stronach

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Nieaktywny
Dodaj odpowiedź do tematu...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...