-
-
Save glasnt/8fa0d305f5af15d8a87f to your computer and use it in GitHub Desktop.
Lanyard.py Iterations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from https://github.com/zookeepr/zookeepr/blob/3040eec8df44e6b4aba5d3312c8d1bcb6bb34fbb/zkpylons/lib/helpers.py#L293 | |
import os | |
rot_26 = "rot_13" | |
def silly_description_checksum(desc): | |
import hashlib, math | |
haiku = "Come to Ballarat"\ | |
"LCA Under the stars"\ | |
"Comets is landing..." | |
#This is meant to be difficult to read, no telling me its indistinguishable from my normal code - Josh | |
def fun(cion): | |
e = 0.0 | |
a = 4.1963944517268459E+00 | |
b = -5.5753297516829114E+00 | |
c = 2.7916995626938470E+00 | |
d = -6.5696680861318413E-01 | |
f = 7.2840990594877031E-02 | |
g = -3.0390408978587477E-03 | |
e = g | |
e = e * cion + f | |
e = e * cion + d | |
e = e * cion + c | |
e = e * cion + b | |
e = e * cion + a | |
e = 1.0 / e | |
return e | |
false = "" | |
true = False | |
for ny in range(1,9): | |
if (ny == 5) or (ny == 8): | |
false=false+(haiku[int(math.floor(fun(ny)+1))],haiku[int(math.ceil(fun(ny)+1))])[true] | |
else: | |
false=false+(haiku[int(math.floor(fun(ny)))],haiku[int(math.ceil(fun(ny)))])[true] | |
true = not true | |
false=false.lower()+"("+")" | |
# Some assistance provided here. All we're doing is taking the silly input string and hashing it with some mysterious salt. Mmmmmm salt | |
server = "zookeepr1" | |
salted = desc + haiku+server.encode(rot_26) | |
return hashlib.sha1(salted.encode('latin1')).hexdigest() | |
# New generation wrapper | |
silly_desc = "ONE COMPLETELY VALID QUESTION" | |
silly_desc_parse = silly_description_checksum(silly_desc) | |
print(silly_desc) | |
print(silly_desc_parse) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment