Many years ago, I made a program in C# on Windows which "encrypts" text files using (what I thought was) caeser chipher.
Back then I wanted more characters than just A-Z,0-9 and made it possible but never thought about the actual theory behind it.
Looking at some of the files, and comparing it to this website, it seems like the UTF-8 is being shifted.
I started up a Windows VM (because I'm using Linux now) and typed this:
It generated a text that looks like this in hexadecimals (Shifted 15 times):
70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f c280 c281 c282 c283 c284 c285 c286 c287 c288 c289
How can I shift the hexadecimals to look like this?
61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a
Or are there any easier/better methods of doing this?
I'm using Python 3.5.3, and this is the code I have so far:
import sys arguments = sys.argv[1:] file = "" for arg in arguments: if arg != "-": file = arg lines =  with open(file) as f: lines = f.readlines() for line in lines: result = 0 for value in list(line): #value = "0x"+value temp=value.encode('utf-8').hex() temp+=15 if(temp>0x7a): temp-=0x7a elif(temp<=0): temp+=0x7a #result = result + temp print (result)
Unfortunately, I don't have the C# source code available for the moment. I can try to find it