from __future__ import division
import sys
from rand import rand
import math

alphabet = ["a", "b", "c", "d","e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "`", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "_", "=", "+", "{", "[", "]", "}", "|", ",", ":", ";", "'", '"', "<", ">", "?", " "]

passpharse = sys.argv[2][2:]
path = sys.argv[3]

with open(path[2:]) as fi:
	fi = fi.read()

if sys.argv[1] == "-e":
	fl = len(fi)
	num = rand(fl)
	pl = len(passpharse)
	pass_phrase_full = []
	y = 0
	pass_phrase_list_nums = []
	
	passpharse_list = list(passpharse)
	
	for x in range(0, fl):
		if y >= pl:
			y = 0
		pass_phrase_full.append(passpharse_list[y])
		y += 1
	for x in pass_phrase_full:
		y = 0
		z = 0
		for y in alphabet:
			z += 1

			if y == x:
				break
		pass_phrase_list_nums.append(z)
	num_list = list(num)

	fi_list = list(fi)

	fi_list_nums = []
	fi_list_nums_final = []

	num_list_final = []

	for x in fi_list:
		y = 0
		z = 0
		for y in alphabet:
			z += 1

			if y == x:
				break
		fi_list_nums.append(z)

	for x in range(0, len(num_list)):
		num_list_final.append(str(int(num_list[x]) + int(pass_phrase_list_nums[x])))

	num_final = " ".join(num_list_final)
	
	for x in range(0, len(num_list)):
		fi_list_nums_final.append(str(int(num_list[x]) + int(fi_list_nums[x])))
	fi_nums_final = " ".join(fi_list_nums_final)
	
	print fi_nums_final
	print num_final
@@ -563,17 +563,17 @@
 argv%5B2%5D%5B
-2
+1
 :%5D%0Apath 
@@ -585,16 +585,20 @@
 .argv%5B3%5D
+%5B1:%5D
 %0A%0Awith o
@@ -609,12 +609,8 @@
 path
-%5B2:%5D
 ) as
@@ -765,16 +765,28 @@
 ms = %5B%5D%0A
+%09oo = False%0A
 %09%0A%09passp
@@ -1595,43 +1595,432 @@
 al)%0A
-%09%0A%09print fi_nums_final%0A%09print num_final
+%0A%09try:%0A%09%09save = sys.argv%5B4%5D%0A%09%09if save == %22-d%22:%0A%09%09%09print num_final + %22 file %22 + fi_nums_final%0A%09%09if save == %22-s%22:%0A%09%09%09try:%0A%09%09%09%09save_location = argv%5B5%5D%0A%0A%09%09%09%09with open(save_location,%22w%22) as fil:%0A%09%09%09%09%09fil.write(num_final + %22 file %22 + fi_nums_final)%0A%09%09%09except:%0A%09%09%09%09%22you did not enter a save location or the save location you enterd is not valid%22%0A%09except:%0A%09%09with open(path,%22w%22) as fil:%0A%09%09%09fil.write(num_final + %22 file %22 + fi_nums_final)

add code that writes to the file that needs to be encrypted