for line in file.readlines(): line=line.strip('\n') if(line[-1]=='='): if(line[-2]=='='): i=table.index(line[-3]) b=bin(i)[2:] b=b.zfill(6) print(line) print(b) print(b[-4:]+'\n')
tmpbin+=b[-4:] else: i = table.index(line[-2]) b = bin(i)[2:] b = b.zfill(6) print(line) print(b) print(b[-2:]+'\n')
tmpbin+=b[-2:]
length= len(tmpbin)/8 for i inrange(int(length)): flag+=chr(int(tmpbin[i*8:i*8+8],2))
for line in file.readlines(): line=line.strip('\n') if(line[-1]=='='): if(line[-3]=='='): if(line[-4]=='='): if (line[-6] == '='): i=table.index(line[-7]) b = bin(i)[2:] b = b.zfill(5) tmpbin+=b[-2:] print(line) print(b) else: i = table.index(line[-5]) b = bin(i)[2:] b = b.zfill(5) tmpbin += b[-4:] print(line) print(b) else: i = table.index(line[-4]) b = bin(i)[2:] b = b.zfill(5) tmpbin += b[-1:] print(line) print(b) else: i = table.index(line[-2]) b = bin(i)[2:] b = b.zfill(5) tmpbin += b[-3:] print(line) print(b)
length= len(tmpbin)/8 for i inrange(int(length)): flag+=chr(int(tmpbin[i*8:i*8+8],2))