Exemplo n.º 1
0
from Crypto import Random
from Crypto.Hash import SHA256
from Crypto.Util import Counter
import random
import errno, time
import binascii
from infolib import EncryptionHandler

port = int(sys.argv[1])
max_rcv = 10000

sock = socket.socket()
hashengine = SHA256.new()

#if Checkbox Safe my data is checked:
hash_user = EncryptionHandler()
hash_password = EncryptionHandler()
hash_passord_output = hash_password.get_hash(password) #Give Password here
hash_user_output = hash_user.get_hash(user) #Give User here

save_info_user = open('login_data_user', 'w')
safe_info.write(hash_user_output)
save_info_password = open('login_data_password', 'w')
safe_info.write(hash_password_output)


#On Startup checks if the files are there
try:
	with open('/Users/jan/Desktop/moep.txt'): pass
	auto_login = true
except IOError: pass
Exemplo n.º 2
0
max_rcv = 10000

sock = socket.socket()
hashengine = SHA256.new()

proot = 3
#prime = 2959259
prime = 13
num = random.randrange(1, prime - 2, 1)
a = proot**num % prime

user = raw_input("Username:"******"Passwort:")

#if Checkbox Safe my data is checked:
hash_password = EncryptionHandler()
hash_password_output = hash_password.get_hash(password) #Give Password here

save_info_user = open("login_data_user", 'w')
save_info_user.write(user)
save_info_password = open("login_data_password", 'w')
save_info_password.write(hash_password_output)
message_input = raw_input("Ihre Nachricht:")

plain = "meop:8b2d38b789e90bb18567c2be4abbd4295f461f6453dd0447a3bf248a75eb0ae7"
#plain = user+":"+hash_password_output
print(plain)

msg = "dhex:12.12.12:x:x;" + str(a)

sock.connect(("127.0.0.1", port))