02-10-2010, 03:09 PM
(02-10-2010, 02:52 PM)Аноним Интерфейс Wrote: Thanks dude! I figured it out already; here is the code that actually works:Ahh now I see what your going for, quite a complicated encryption, I never quite had the stomach for those, good luck with the decryptor, and thanks Btw: If your really into encryption take a look at this
BTW, +1. You've always been helpful in the area of Python. :pCode:from __future__ import division
import string
import random
import os
while 1 > 0:
def process(op1, op2):
ran = random.randrange(0, 1000, 1)
xx = ran
aa = [xx+xx**2, xx+xx**3, xx+xx**4, xx-xx**2, xx-xx**3, xx-xx**4, xx**2+xx**3, xx**2+xx**4, xx**2-xx**3, xx**2-xx**4, xx**3+xx**4, xx**3-xx**4]
start_1 = random.choice(aa)
ee = start_1/4
ex = str(ee)
rr = string.replace(op1, op2, ex)
return rr
p = raw_input('>>> ')
pp = string.join(p)
os.system('clear')
n_0 = process(pp, '0')
n_1 = process(n_0, '1')
n_2 = process(n_1, '2')
n_3 = process(n_2, '3')
n_4 = process(n_3, '4')
n_5 = process(n_4, '5')
n_6 = process(n_5, '6')
n_7 = process(n_6, '7')
n_8 = process(n_7, '8')
n_9 = process(n_8, '9')
a = process(n_9, 'a')
A = process(a, 'A')
b = process(A, 'b')
B = process(b, 'B')
c = process(B, 'c')
C = process(c, 'C')
d = process(C, 'd')
D = process(d, 'D')
e = process(D, 'e')
E = process(e, 'E')
f = process(E, 'f')
F = process(f, 'F')
g = process(F, 'g')
G = process(g, 'G')
h = process(G, 'h')
H = process(h, 'H')
i = process(H, 'i')
I = process(i, 'I')
j = process(I, 'j')
J = process(j, 'J')
k = process(J, 'k')
K = process(k, 'K')
l = process(K, 'l')
L = process(l, 'L')
m = process(L, 'm')
M = process(m, 'M')
n = process(M, 'n')
N = process(n, 'N')
o = process(N, 'o')
O = process(o, 'O')
p = process(O, 'p')
P = process(p, 'P')
q = process(P, 'q')
Q = process(q, 'Q')
r = process(Q, 'r')
R = process(r, 'R')
s = process(R, 's')
S = process(s, 'S')
t = process(S, 't')
T = process(t, 'T')
u = process(T, 'u')
U = process(u, 'U')
v = process(U, 'v')
V = process(v, 'V')
w = process(V, 'w')
W = process(w, 'W')
x = process(W, 'x')
X = process(x, 'X')
y = process(X, 'y')
Y = process(y, 'Y')
z = process(Y, 'z')
Z = process(z, 'Z')
a_ = process(Z, '.')
a_1 = process(a_, '!')
a_2 = process(a_1, '?')
a_3 = process(a_2, ';')
a_4 = process(a_3, ':')
a_5 = process(a_4, "'")
a_6 = process(a_5, '"')
a_7 = process(a_6, '[')
a_8 = process(a_7, "]")
a_9 = process(a_8, '/')
a_10 = process(a_9, '+')
a_11 = process(a_10, '-')
a_12 = process(a_11, ')')
a_13 = process(a_12, '(')
a_14 = process(a_13, '\\')
r_ = string.replace(a_14, ' ', '$')
r_0 = string.replace(r_, '-', '>')
r_01 = string.replace(r_0, '.', '#')
r_1 = string.replace(r_01, '1', '-Z')
r_2 = string.replace(r_1, '2', '-Y')
r_3 = string.replace(r_2, '3', '-X')
r_4 = string.replace(r_3, '4', '+A')
r_5 = string.replace(r_4, '5', '+B')
r_6 = string.replace(r_5, '6', '+C')
r_7 = string.replace(r_6, '7', '^z')
r_8 = string.replace(r_7, '8', '^y')
r_9 = string.replace(r_8, '9', '^x')
r_0 = string.replace(r_9, '0', '_')
print('\n'+r_0+'\n')
EDIT: BTW, this is only half of the project I'm doing. I have to make the decryption program now :/ If you want more details, please don't be afraid to ask!! :p