Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text Encrypt 1.1 Through Version 1.4
#1
Sorry, I dont think that is a text encryptor, im not really sure what to call it....
But any ways, this is my second python script. It takes a word and scrambles the letters up, and mixes it with a bunch of other letters. The decryptor for this will be coming soon
Version 1.1
Code:
choice = 0
loop = 1
y = "b l a g h s d g i x"
z = "l w j r g s d f g v"
while loop == 1:
    choice = input("How many Letters is your word?(1-10): ")
    if choice == 1:
        x = raw_input("Type your word: ")
        print y,x[0:1],z
    elif choice == 2:
        x = raw_input("Type your word: ")
        print y,x[0:1],z,x[1:2],y
    elif choice == 3:
        x = raw_input("Type your word: ")
        print y,x[0:1],z,x[1:2],y,x[2:3],z
    elif choice == 4:
        x = raw_input("Type your word: ")
        print y,x[0:1],z,x[1:2],y,x[2:3],z,x[3:4],y
    elif choice == 5:
        x = raw_input("Type your word: ")
        print y,x[0:1],z,x[1:2],y,x[2:3],z,x[3:4],y,x[4:5],z
    elif choice == 6:
        x = raw_input("Type your word: ")
        print y,x[0:1],z,x[1:2],y,x[2:3],z,x[3:4],y,x[4:5],z,x[5:6],y
    elif choice == 7:
        x = raw_input("Type your word: ")
        print y,x[0:1],z,x[1:2],y,x[2:3],z,x[3:4],y,x[4:5],z,x[5:6],y,x[6:7],z
    elif choice == 8:
        x = raw_input("Type your word: ")
        print y,x[0:1],z,x[1:2],y,x[2:3],z,x[3:4],y,x[4:5],z,x[5:6],y,x[6:7],z,x[7:8],y
    elif choice == 9:
        x = raw_input("Type your word: ")
        print y,x[0:1],z,x[1:2],y,x[2:3],z,x[3:4],y,x[4:5],z,x[5:6],y,x[6:7],z,x[7:8],y,x[8:9],z
    elif choice == 10:
        x = raw_input("Type your word: ")
        print y,x[0:1],z,x[1:2],y,x[2:3],z,x[3:4],y,x[4:5],z,x[5:6],y,x[6:7],z,x[7:8],y,x[8:9],z,x[9:10],y

I edited the script. I made it so you dont have to count how many letters are in the word.
Version 1.2
Code:
y = "b l a g h s d g i x"
z = "l w j r g s d f g v"
a = raw_input("Type your word: ")
x = len(a)
if x == 1:
    print z,a[0:1],y
if x == 2:
    print z,a[0:1],y,a[1:2],z
if x == 3:
    print z,a[0:1],y,a[1:2],z,a[2:3],y
if x == 4:
    print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z
if x == 5:
    print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y
if x == 6:
    print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z
if x == 7:
    print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z,a[6:7],y
if x == 8:
    print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z,a[6:7],y,a[7:8],z
if x == 9:
    print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z,a[6:7],y,a[7:8],z,a[8:9],y
if x == 10:
    print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z,a[6:7],y,a[7:8],z,a[8:9],y,a[10:11],z

EDIT:
The encryptor and decryptor
Version 1.3
Code:
    choice = input("What would you like to do?: ")
    if choice == 1:
        y = "b l a g h s d g i x"
        z = "l w j r g s d f g v"
        a = raw_input("Type your word: ")
        x = len(a)
        if x == 1:
            print z,a[0:1],y
        if x == 2:
            print z,a[0:1],y,a[1:2],z
        if x == 3:
            print z,a[0:1],y,a[1:2],z,a[2:3],y
        if x == 4:
            print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z
        if x == 5:
            print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y
        if x == 6:
            print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z
        if x == 7:
            print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z,a[6:7],y
        if x == 8:
            print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z,a[6:7],y,a[7:8],z
        if x == 9:
            print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z,a[6:7],y,a[7:8],z,a[8:9],y
        if x == 10:
            print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z,a[6:7],y,a[7:8],z,a[8:9],y,a[9:10],z
        print "-------------------------------------------------------------------"
        print "-------------------------------------------------------------------"
    if choice == 2:
        x = raw_input("Paste in the message: ")
        print x[20:21],x[42:43],x[64:65],x[86:87],x[108:109],x[130:131],x[152:153],x[174:175],x[196:197],x[218:219]
        print "-------------------------------------------------------------------"
        print "-------------------------------------------------------------------"

Another Edit:
This is not necessary, the previous version works as well, this just makes the program easier to use. I believe this one will only work on Linux or mac.
EDIT: This does work on windows
Version 1.4
Code:
loop = 1
choice = 0
import os
while loop == 1:
    os.system("clear")
    print "1) Encrypt"
    print "2) Decrypt"
    choice = input("What would you like to do?: ")
    if choice == 1:
        y = "b l a g h s d g i x"
        z = "l w j r g s d f g v"
        a = raw_input("Type your word: ")
        x = len(a)
        if x == 1:
            print z,a[0:1],y
        if x == 2:
            print z,a[0:1],y,a[1:2],z
        if x == 3:
            print z,a[0:1],y,a[1:2],z,a[2:3],y
        if x == 4:
            print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z
        if x == 5:
            print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y
        if x == 6:
            print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z
        if x == 7:
            print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z,a[6:7],y
        if x == 8:
            print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z,a[6:7],y,a[7:8],z
        if x == 9:
            print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z,a[6:7],y,a[7:8],z,a[8:9],y
        if x == 10:
            print z,a[0:1],y,a[1:2],z,a[2:3],y,a[3:4],z,a[4:5],y,a[5:6],z,a[6:7],y,a[7:8],z,a[8:9],y,a[9:10],z
        raw_input("Press Enter To Continue")
    if choice == 2:
        x = raw_input("Paste in the message: ")
        print x[20:21],x[42:43],x[64:65],x[86:87],x[108:109],x[130:131],x[152:153],x[174:175],x[196:197],x[218:219]
        raw_input("Press Enter To Continue")
Reply
#2
Pretty impressive I might make one.
Reply
#3
edit edit edit edit.
Either way, nice work
Confused
Reply
#4
This is a good work
[Image: 2d75599e9a.png]:superman:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Business Manager Version 1.5 and Other Info About The Project nevets04 3 1,276 01-13-2010, 01:21 PM
Last Post: White Knaghelt
  Busniess Management Script Version 1.4 nevets04 2 1,052 11-15-2009, 06:26 PM
Last Post: nevets04
  Text Encrypt 1.5 nevets04 0 777 10-13-2009, 02:58 PM
Last Post: nevets04

Forum Jump:


Users browsing this thread: 1 Guest(s)