daily pastebin goal
59%
SHARE
TWEET

aaa

a guest Jan 18th, 2019 122 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import re
  2. import os
  3.  
  4. c = ""
  5.  
  6. while c != "0":
  7.     result = ""
  8.     filepath = input("enter file path")
  9.     f = open(filepath, "r")
  10.     c = input("e to encrypt / d to dcrypt  ")
  11.  
  12.     if c == "e":
  13.         messege = f.read()
  14.         for i in range(0,len(messege)):
  15.             result += chr(int(ord(messege[i]) * (len(messege))))
  16.         f.close()
  17.         os.remove(filepath)
  18.         w = open(filepath, "w")
  19.         w.write(result)
  20.         w.close()
  21.            
  22.         continue
  23.    
  24.     if c == "d":
  25.         messege = f.read()
  26.         for i in range(0,len(messege)):
  27.             result += chr(int(ord(messege[i]) / (len(messege))))
  28.         f.close()
  29.         os.remove(filepath)
  30.         w = open(filepath, "w")
  31.         w.write(result)
  32.         w.close()
  33.         continue
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top