im aware there is a module for this but: 1. idk how to use it 2. i dont want my effort to go to waste (since i made my own cube manipulator) 3. i dont like installing one time modules cus they clog up space
since it was just cbc i just had to map it to a cube and reverse the scramble then xorred it to get a pdf file
i spent too long fixing bugs with the xor process and how bytes are handled i also spent too long fixing bugs of my cube program
'''so uhhh orange top green front OOO OOO OOOYYYWWWGGGBBB - form LRFBYYYWWWGGGBBBYYYWWWGGGBBB RRR RRR RRR OOO OOO YYYYYRWWWOGGBBBYYRWWWOGGBBBYYRWWWOGGBBB GGG RRR RRR WWW WWW WWWRRRRRGOOOYYYYYYRRGGGGOOOYYYRRGGGGOOOBYYYWYORGRRGYBBYOOGGGRROBBBWOOGGGRGWOOOBBBRRWWYWWYWRWY'''facestring ="WWWWWWWWWRRRBBBOOOGGGRRRBBBOOOGGGRRRBBBOOOGGGYYYYYYYYY"defformat(a): out ="" a = a.replace("'","22")for i in a.split(" "): out += (i[0]+" ")*len(i) out = out[:-1]return outdefnice(a):for i inrange(3):print(" "+a[i*3:i*3+3])for i inrange(3):print(a[i*12+9:i*12+21])for i inrange(3):print(" "+a[i*3+45:i*3+48])defstrface(a): new = [[[""for _ inrange(3)] for _ inrange(3)] for _ inrange(6)]for i,j inenumerate(a[:9]): new[0][i//3][i%3] = jfor i,j inenumerate(a[-9:]): new[5][i//3][i%3] = j mid = a[9:-9]for i inrange(36): new[(i//3)%4+1][i//12][i%3] = mid[i]return newdeffacestr(a): new =""for i in a[0]: new +="".join(i)for i inrange(3):for j in a[1:-1]: new +="".join(j[i])for i in a[-1]: new +="".join(i)return newdefbfacestr(a): new = []for i in a[0]: new += ifor i inrange(3):for j in a[1:-1]: new += j[i]for i in a[-1]: new += ireturn newprint(strface(facestring))print(facestr(strface(facestring)))defr(face,n=1):for i inrange(n): face = [list(x)for x inzip(*face[::-1])]return facedefshift(faces,nums): new = [x[:]for x in faces] newnums = nums[-1:]+ nums[:-1]for i inrange(4): new[newnums[i]][0] = faces[nums[i]][0]return newdefspin(faces,a):if a ==0:return facesif a ==1:return [r(faces[1]),r(faces[5]),r(faces[2]),r(faces[0]),r(faces[4],3),r(faces[3])]if a ==2:return [faces[2],r(faces[1],3),faces[5],r(faces[3]),r(faces[0],2),r(faces[4],2)]if a ==3:for i inrange(3): faces =spin(faces,1)return facesif a ==4:for i inrange(3): faces =spin(faces,2)return facesif a ==5:for i inrange(2): faces =spin(faces,2)return facesdefturn(faces,a): b = ["U","L","F","R","B","D"].index(a) new_faces =spin(faces,b) new_faces[0]=r(new_faces[0]) new_faces =shift(new_faces,[1,2,3,4])for i inrange(3): new_faces =spin(new_faces,b)return new_facesturns ="F' D F L' F U R' B2 U' D' L U2 D F2 L2 B2 L2 D"turns =format(turns)print(turns)IV =b"ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuv"withopen("enc_","rb")as f: kek = f.read() f.close()kek2 = [kek[i*54:i*54+54]for i inrange(len(kek)//54)]out =b""for kek3 in kek2: cube =strface(kek3)for i in turns.split(" "): cube =turn(cube,i) pp1 =bfacestr(cube) pp2 =bytes([_a ^ _b for _a, _b inzip(pp1, IV)]) out += pp2 IV = kek3#print(out)withopen("out","wb")as f: f.write(out) f.close()