import socket as s
import pickle
from time import sleep
import os
class ConnectionToServer:
def __init__(self, server_ip, port):
[Link] = 8
[Link] = server_ip
[Link] = port
self.Connection_complete = False
[Link] = [Link](s.AF_INET, s.SOCK_STREAM)
def connect(self):
try:
[Link](([Link], [Link]))
print("Connect complete")
self.Connection_complete = True
except:
print("Connection failed")
print("Connection...")
class SendData:
def send(self, client, data):
encoded_data = [Link](data)
[Link](encoded_data)
class RecvData:
def recv(self, client):
data = [Link](4096)
decoded_data = [Link](data)
return decoded_data
class UserMenu:
def __init__(self):
[Link] = None
[Link] = None
def hash_only_mode(self, client, send_data, recv_data):
print(f"Your use left {[Link]}")
if [Link] > 0:
input_hash = input("Enter hash to decode: ")
send_data.send(client, input_hash)
decode_hash = recv_data.recv(client)
if decode_hash == None:
print("can not decode this hash")
else:
print(decode_hash)
print("Press any key to next decode")
sleep(2)
input()
[Link]('cls')
else:
print("You have 0 use")
print("Press any key to close")
input()
[Link]('cls')
def full_access_mode(self, client, send_data, recv_data):
print(f"Your use left {[Link]}")
if [Link] > 0:
user_input = input("enter nick to find or hashes to decode: ")
if len(user_input) > 25:
user_action = "hash_decode"
else:
user_action = "find_account"
send_data.send(client, [user_action, user_input])
if user_action == "hash_decode":
decode_hash = recv_data.recv(client)
if decode_hash == None:
print("can not decode this hash")
sleep(0.5)
[Link]('cls')
else:
[Link]('cls')
print(decode_hash)
print()
print("Press any key to next decode")
sleep(2)
input()
[Link]('cls')
elif user_action == "find_account":
decode_hash = recv_data.recv(client)
if decode_hash == None:
print("can not find this account")
sleep(0.5)
[Link]('cls')
else:
[Link]('cls')
print(decode_hash)
print()
if decode_hash != "Nieznaleziono takiego nicku" and "Premium
account: False" in decode_hash:
print("Press any key to next find")
input()
else:
sleep(0.5)
[Link]('cls')
else:
print("You have 0 use")
print("Press any key to close")
input()
[Link]('cls')
def main(server_ip="[Link]", port=5050):
connection = ConnectionToServer(server_ip, port)
send_data = SendData()
recv_data = RecvData()
user_menu = UserMenu()
loggined = False
client = [Link]
[Link]()
if connection.Connection_complete:
while not loggined:
#licnes = input("Enter your licnes: ")
licnes = "lic"
send_data.send(client, licnes)
print("Checking your licnes...")
response = recv_data.recv(client)
print(f"{response[0]} mode: {response[1]}")
sleep(1)
[Link]('cls')
if response[1] != None:
loggined = True
if response[1] != None:
user_menu.mode = response[1]
while loggined:
user_menu.uses = recv_data.recv(client)
if user_menu.mode == "hash_only":
user_menu.hash_only_mode(client, send_data, recv_data)
elif user_menu.mode == "full_access":
user_menu.full_access_mode(client, send_data, recv_data)
else:
[Link]()
if __name__ == '__main__':
main()