Skip to content

Instantly share code, notes, and snippets.

@totoCZ
Created March 16, 2016 12:59
Show Gist options
  • Save totoCZ/d95bd7dd1b3e5976d77c to your computer and use it in GitHub Desktop.
Save totoCZ/d95bd7dd1b3e5976d77c to your computer and use it in GitHub Desktop.
1/4/2016
pt = [87, 1, 186, 160, 224, 132, 237, 176, 234, 208, 194, 17, 239, 2, 74, 244, 61, 200, 116, 91, 32, 145, 28, 243, 216, 185, 188, 136, 250, 183, 125, 229, 179, 235, 20, 194, 10, 61, 15]
ct = [31, 64, 234, 240, 185, 164, 172, 224, 184, 153, 142, 49, 169, 77, 5, 184, 110, 232, 70, 107, 17, 167, 60, 181, 138, 246, 241, 168, 170, 229, 52, 188, 252, 166, 58, 141, 88, 122, 46]
count = pt.count
for i in 0..count-1 do
p = pt[i]
c = ct[i]
res = c^p
print res.chr
i += 1
end
# severak's version https://repl.it/BwnJ
pt = [87, 1, 186, 160, 224, 132, 237, 176, 234, 208, 194, 17, 239, 2, 74, 244, 61, 200, 116, 91, 32, 145, 28, 243, 216, 185, 188, 136, 250, 183, 125, 229, 179, 235, 20, 194, 10, 61, 15]
ct = [31, 64, 234, 240, 185, 164, 172, 224, 184, 153, 142, 49, 169, 77, 5, 184, 110, 232, 70, 107, 17, 167, 60, 181, 138, 246, 241, 168, 170, 229, 52, 188, 252, 166, 58, 141, 88, 122, 46]
count = pt.count
a = "1/4/2016 NEVER FORGET. XOXO HUGS 222"
for i in 0..count-1 do
p = pt[i]
c = a[i].ord
res = c^p
print res.to_s + " "
#print res
i += 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment