I'm working on a Python project that crypts something based on Vigenere Cipher. I'm developing an option to be able to cypher files, based on their binary. But actually, when I open a file's binary through:
fbi=list(open(route, "rb"))
I'm getting weird data like the one that follows, instead of "0" and "1", which is what I'm expecting to get.
, b'\xcc\x0b\x92\x80*\xb1^v\x1c\x9c\x83\
xc1\xc0\x07\x82k\x93\xf0\xaf\xc1=\x13O\xd1\xaft\xedf\xde\xde\xfbR\xb8\xb0Ey\xa4\
xc3,-\xce6d\x0f\xbaG\x07\x1f\x95y\xd8\xf89\xe2{K\xabi/\xfcL-<!\x15\xe0vYo\xe4\x1
6\xd1\xfe\xf3;\x8cE\xf6\x03\x9es\x8e\xa4\xf3\xde\xbe\xba\xf0\xd5\xb5\x9e\x99\xa0
Me\xa6O\r\xcd\x82X\xa7\x91*\x10VPP\x9d\xc0\x8e\x0ez\xf0k\xaf\x82U?\xd8\xce\xd8$\
xc4B\x86\xfe\x1f\x99GJ\x86Dh\xe2vgbD\xc3\x1cu\xc4\xa7\xa7\xb75\x81~6}\xb4:\xa3~\
xe4e\t\xc1]\xae\xc3\xfc=\xab\xf3\x93\xe3E\xcc\xa7\xe2[\x9bx"\xc9\xfd\xd3\x97Q!\x
c6\xd4\xe4\x0c\x11\xc0\x19\xce\x7f\xc6\xbc,\xbe\xcf9\xd8\xb4N\x14\xf9\x8c\xc4\xb
0\x1f/%H\x075\x11Y6/\xee\xf7+\x96\x11\xaeJ+\x8c\x0eO\x1c\x1e=?\\R\xc4\xc8\'w\x8d
\xd1`a\xcb\xe39\xe7\x91\x83\x9c\x0e\x9c\x8cS\xe3\x92O\xde\x12\xf1\xf2\xa0J?\xb8\
xbc\xe3\r\x8fZ\xb4\x92\x01t\x8b\xbc:\xe02\x86^\xab\xc6\xe6<p\xdf\xa5X\xb7Vkfo\x9
9\x98\x11\x8c\x9c\x96\xeaNO\xa0\xe7\xbf5\xdf|=i\xdf\xe2\xdf\x86Q\x03+\x9dN\xdcmR
B\xaedN\x9f\xec\xe4\xe7\xf3\xf7\xaf\xd8\xcf\n'
I'm still a beginner at Python and actually this is the first time I'm trying to manipulate/edit binary so I probably have a lot to learn about still.
Could someone explain to me why I'm getting this? And how to get the 0's and 1's if possible? Thanks in advance,
Full code can be found here: http://pastebin.com/0W8iK3kh#.