Manual merge and fix Github issue #213

This commit is contained in:
Jonathan Warren 2013-06-14 15:58:46 -04:00
commit 5938efca1a
19 changed files with 4528 additions and 4380 deletions

View File

@ -2,286 +2,135 @@
# Resource object code
#
# Created: Sat May 25 13:22:59 2013
# by: The Resource Compiler for PyQt (Qt v4.8.3)
# Created: jeu. juin 13 10:47:41 2013
# by: The Resource Compiler for PyQt (Qt v4.8.4)
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
qt_resource_data = "\
\x00\x00\x10\xdb\
\x00\x00\x07\x62\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x0a\x4d\x69\x43\x43\x50\x50\x68\x6f\
\x74\x6f\x73\x68\x6f\x70\x20\x49\x43\x43\x20\x70\x72\x6f\x66\x69\
\x6c\x65\x00\x00\x78\xda\x9d\x53\x77\x58\x93\xf7\x16\x3e\xdf\xf7\
\x65\x0f\x56\x42\xd8\xf0\xb1\x97\x6c\x81\x00\x22\x23\xac\x08\xc8\
\x10\x59\xa2\x10\x92\x00\x61\x84\x10\x12\x40\xc5\x85\x88\x0a\x56\
\x14\x15\x11\x9c\x48\x55\xc4\x82\xd5\x0a\x48\x9d\x88\xe2\xa0\x28\
\xb8\x67\x41\x8a\x88\x5a\x8b\x55\x5c\x38\xee\x1f\xdc\xa7\xb5\x7d\
\x7a\xef\xed\xed\xfb\xd7\xfb\xbc\xe7\x9c\xe7\xfc\xce\x79\xcf\x0f\
\x80\x11\x12\x26\x91\xe6\xa2\x6a\x00\x39\x52\x85\x3c\x3a\xd8\x1f\
\x8f\x4f\x48\xc4\xc9\xbd\x80\x02\x15\x48\xe0\x04\x20\x10\xe6\xcb\
\xc2\x67\x05\xc5\x00\x00\xf0\x03\x79\x78\x7e\x74\xb0\x3f\xfc\x01\
\xaf\x6f\x00\x02\x00\x70\xd5\x2e\x24\x12\xc7\xe1\xff\x83\xba\x50\
\x26\x57\x00\x20\x91\x00\xe0\x22\x12\xe7\x0b\x01\x90\x52\x00\xc8\
\x2e\x54\xc8\x14\x00\xc8\x18\x00\xb0\x53\xb3\x64\x0a\x00\x94\x00\
\x00\x6c\x79\x7c\x42\x22\x00\xaa\x0d\x00\xec\xf4\x49\x3e\x05\x00\
\xd8\xa9\x93\xdc\x17\x00\xd8\xa2\x1c\xa9\x08\x00\x8d\x01\x00\x99\
\x28\x47\x24\x02\x40\xbb\x00\x60\x55\x81\x52\x2c\x02\xc0\xc2\x00\
\xa0\xac\x40\x22\x2e\x04\xc0\xae\x01\x80\x59\xb6\x32\x47\x02\x80\
\xbd\x05\x00\x76\x8e\x58\x90\x0f\x40\x60\x00\x80\x99\x42\x2c\xcc\
\x00\x20\x38\x02\x00\x43\x1e\x13\xcd\x03\x20\x4c\x03\xa0\x30\xd2\
\xbf\xe0\xa9\x5f\x70\x85\xb8\x48\x01\x00\xc0\xcb\x95\xcd\x97\x4b\
\xd2\x33\x14\xb8\x95\xd0\x1a\x77\xf2\xf0\xe0\xe2\x21\xe2\xc2\x6c\
\xb1\x42\x61\x17\x29\x10\x66\x09\xe4\x22\x9c\x97\x9b\x23\x13\x48\
\xe7\x03\x4c\xce\x0c\x00\x00\x1a\xf9\xd1\xc1\xfe\x38\x3f\x90\xe7\
\xe6\xe4\xe1\xe6\x66\xe7\x6c\xef\xf4\xc5\xa2\xfe\x6b\xf0\x6f\x22\
\x3e\x21\xf1\xdf\xfe\xbc\x8c\x02\x04\x00\x10\x4e\xcf\xef\xda\x5f\
\xe5\xe5\xd6\x03\x70\xc7\x01\xb0\x75\xbf\x6b\xa9\x5b\x00\xda\x56\
\x00\x68\xdf\xf9\x5d\x33\xdb\x09\xa0\x5a\x0a\xd0\x7a\xf9\x8b\x79\
\x38\xfc\x40\x1e\x9e\xa1\x50\xc8\x3c\x1d\x1c\x0a\x0b\x0b\xed\x25\
\x62\xa1\xbd\x30\xe3\x8b\x3e\xff\x33\xe1\x6f\xe0\x8b\x7e\xf6\xfc\
\x40\x1e\xfe\xdb\x7a\xf0\x00\x71\x9a\x40\x99\xad\xc0\xa3\x83\xfd\
\x71\x61\x6e\x76\xae\x52\x8e\xe7\xcb\x04\x42\x31\x6e\xf7\xe7\x23\
\xfe\xc7\x85\x7f\xfd\x8e\x29\xd1\xe2\x34\xb1\x5c\x2c\x15\x8a\xf1\
\x58\x89\xb8\x50\x22\x4d\xc7\x79\xb9\x52\x91\x44\x21\xc9\x95\xe2\
\x12\xe9\x7f\x32\xf1\x1f\x96\xfd\x09\x93\x77\x0d\x00\xac\x86\x4f\
\xc0\x4e\xb6\x07\xb5\xcb\x6c\xc0\x7e\xee\x01\x02\x8b\x0e\x58\xd2\
\x76\x00\x40\x7e\xf3\x2d\x8c\x1a\x0b\x91\x00\x10\x67\x34\x32\x79\
\xf7\x00\x00\x93\xbf\xf9\x8f\x40\x2b\x01\x00\xcd\x97\xa4\xe3\x00\
\x00\xbc\xe8\x18\x5c\xa8\x94\x17\x4c\xc6\x08\x00\x00\x44\xa0\x81\
\x2a\xb0\x41\x07\x0c\xc1\x14\xac\xc0\x0e\x9c\xc1\x1d\xbc\xc0\x17\
\x02\x61\x06\x44\x40\x0c\x24\xc0\x3c\x10\x42\x06\xe4\x80\x1c\x0a\
\xa1\x18\x96\x41\x19\x54\xc0\x3a\xd8\x04\xb5\xb0\x03\x1a\xa0\x11\
\x9a\xe1\x10\xb4\xc1\x31\x38\x0d\xe7\xe0\x12\x5c\x81\xeb\x70\x17\
\x06\x60\x18\x9e\xc2\x18\xbc\x86\x09\x04\x41\xc8\x08\x13\x61\x21\
\x3a\x88\x11\x62\x8e\xd8\x22\xce\x08\x17\x99\x8e\x04\x22\x61\x48\
\x34\x92\x80\xa4\x20\xe9\x88\x14\x51\x22\xc5\xc8\x72\xa4\x02\xa9\
\x42\x6a\x91\x5d\x48\x23\xf2\x2d\x72\x14\x39\x8d\x5c\x40\xfa\x90\
\xdb\xc8\x20\x32\x8a\xfc\x8a\xbc\x47\x31\x94\x81\xb2\x51\x03\xd4\
\x02\x75\x40\xb9\xa8\x1f\x1a\x8a\xc6\xa0\x73\xd1\x74\x34\x0f\x5d\
\x80\x96\xa2\x6b\xd1\x1a\xb4\x1e\x3d\x80\xb6\xa2\xa7\xd1\x4b\xe8\
\x75\x74\x00\x7d\x8a\x8e\x63\x80\xd1\x31\x0e\x66\x8c\xd9\x61\x5c\
\x8c\x87\x45\x60\x89\x58\x1a\x26\xc7\x16\x63\xe5\x58\x35\x56\x8f\
\x35\x63\x1d\x58\x37\x76\x15\x1b\xc0\x9e\x61\xef\x08\x24\x02\x8b\
\x80\x13\xec\x08\x5e\x84\x10\xc2\x6c\x82\x90\x90\x47\x58\x4c\x58\
\x43\xa8\x25\xec\x23\xb4\x12\xba\x08\x57\x09\x83\x84\x31\xc2\x27\
\x22\x93\xa8\x4f\xb4\x25\x7a\x12\xf9\xc4\x78\x62\x3a\xb1\x90\x58\
\x46\xac\x26\xee\x21\x1e\x21\x9e\x25\x5e\x27\x0e\x13\x5f\x93\x48\
\x24\x0e\xc9\x92\xe4\x4e\x0a\x21\x25\x90\x32\x49\x0b\x49\x6b\x48\
\xdb\x48\x2d\xa4\x53\xa4\x3e\xd2\x10\x69\x9c\x4c\x26\xeb\x90\x6d\
\xc9\xde\xe4\x08\xb2\x80\xac\x20\x97\x91\xb7\x90\x0f\x90\x4f\x92\
\xfb\xc9\xc3\xe4\xb7\x14\x3a\xc5\x88\xe2\x4c\x09\xa2\x24\x52\xa4\
\x94\x12\x4a\x35\x65\x3f\xe5\x04\xa5\x9f\x32\x42\x99\xa0\xaa\x51\
\xcd\xa9\x9e\xd4\x08\xaa\x88\x3a\x9f\x5a\x49\x6d\xa0\x76\x50\x2f\
\x53\x87\xa9\x13\x34\x75\x9a\x25\xcd\x9b\x16\x43\xcb\xa4\x2d\xa3\
\xd5\xd0\x9a\x69\x67\x69\xf7\x68\x2f\xe9\x74\xba\x09\xdd\x83\x1e\
\x45\x97\xd0\x97\xd2\x6b\xe8\x07\xe9\xe7\xe9\x83\xf4\x77\x0c\x0d\
\x86\x0d\x83\xc7\x48\x62\x28\x19\x6b\x19\x7b\x19\xa7\x18\xb7\x19\
\x2f\x99\x4c\xa6\x05\xd3\x97\x99\xc8\x54\x30\xd7\x32\x1b\x99\x67\
\x98\x0f\x98\x6f\x55\x58\x2a\xf6\x2a\x7c\x15\x91\xca\x12\x95\x3a\
\x95\x56\x95\x7e\x95\xe7\xaa\x54\x55\x73\x55\x3f\xd5\x79\xaa\x0b\
\x54\xab\x55\x0f\xab\x5e\x56\x7d\xa6\x46\x55\xb3\x50\xe3\xa9\x09\
\xd4\x16\xab\xd5\xa9\x1d\x55\xbb\xa9\x36\xae\xce\x52\x77\x52\x8f\
\x50\xcf\x51\x5f\xa3\xbe\x5f\xfd\x82\xfa\x63\x0d\xb2\x86\x85\x46\
\xa0\x86\x48\xa3\x54\x63\xb7\xc6\x19\x8d\x21\x16\xc6\x32\x65\xf1\
\x58\x42\xd6\x72\x56\x03\xeb\x2c\x6b\x98\x4d\x62\x5b\xb2\xf9\xec\
\x4c\x76\x05\xfb\x1b\x76\x2f\x7b\x4c\x53\x43\x73\xaa\x66\xac\x66\
\x91\x66\x9d\xe6\x71\xcd\x01\x0e\xc6\xb1\xe0\xf0\x39\xd9\x9c\x4a\
\xce\x21\xce\x0d\xce\x7b\x2d\x03\x2d\x3f\x2d\xb1\xd6\x6a\xad\x66\
\xad\x7e\xad\x37\xda\x7a\xda\xbe\xda\x62\xed\x72\xed\x16\xed\xeb\
\xda\xef\x75\x70\x9d\x40\x9d\x2c\x9d\xf5\x3a\x6d\x3a\xf7\x75\x09\
\xba\x36\xba\x51\xba\x85\xba\xdb\x75\xcf\xea\x3e\xd3\x63\xeb\x79\
\xe9\x09\xf5\xca\xf5\x0e\xe9\xdd\xd1\x47\xf5\x6d\xf4\xa3\xf5\x17\
\xea\xef\xd6\xef\xd1\x1f\x37\x30\x34\x08\x36\x90\x19\x6c\x31\x38\
\x63\xf0\xcc\x90\x63\xe8\x6b\x98\x69\xb8\xd1\xf0\x84\xe1\xa8\x11\
\xcb\x68\xba\x91\xc4\x68\xa3\xd1\x49\xa3\x27\xb8\x26\xee\x87\x67\
\xe3\x35\x78\x17\x3e\x66\xac\x6f\x1c\x62\xac\x34\xde\x65\xdc\x6b\
\x3c\x61\x62\x69\x32\xdb\xa4\xc4\xa4\xc5\xe4\xbe\x29\xcd\x94\x6b\
\x9a\x66\xba\xd1\xb4\xd3\x74\xcc\xcc\xc8\x2c\xdc\xac\xd8\xac\xc9\
\xec\x8e\x39\xd5\x9c\x6b\x9e\x61\xbe\xd9\xbc\xdb\xfc\x8d\x85\xa5\
\x45\x9c\xc5\x4a\x8b\x36\x8b\xc7\x96\xda\x96\x7c\xcb\x05\x96\x4d\
\x96\xf7\xac\x98\x56\x3e\x56\x79\x56\xf5\x56\xd7\xac\x49\xd6\x5c\
\xeb\x2c\xeb\x6d\xd6\x57\x6c\x50\x1b\x57\x9b\x0c\x9b\x3a\x9b\xcb\
\xb6\xa8\xad\x9b\xad\xc4\x76\x9b\x6d\xdf\x14\xe2\x14\x8f\x29\xd2\
\x29\xf5\x53\x6e\xda\x31\xec\xfc\xec\x0a\xec\x9a\xec\x06\xed\x39\
\xf6\x61\xf6\x25\xf6\x6d\xf6\xcf\x1d\xcc\x1c\x12\x1d\xd6\x3b\x74\
\x3b\x7c\x72\x74\x75\xcc\x76\x6c\x70\xbc\xeb\xa4\xe1\x34\xc3\xa9\
\xc4\xa9\xc3\xe9\x57\x67\x1b\x67\xa1\x73\x9d\xf3\x35\x17\xa6\x4b\
\x90\xcb\x12\x97\x76\x97\x17\x53\x6d\xa7\x8a\xa7\x6e\x9f\x7a\xcb\
\x95\xe5\x1a\xee\xba\xd2\xb5\xd3\xf5\xa3\x9b\xbb\x9b\xdc\xad\xd9\
\x6d\xd4\xdd\xcc\x3d\xc5\x7d\xab\xfb\x4d\x2e\x9b\x1b\xc9\x5d\xc3\
\x3d\xef\x41\xf4\xf0\xf7\x58\xe2\x71\xcc\xe3\x9d\xa7\x9b\xa7\xc2\
\xf3\x90\xe7\x2f\x5e\x76\x5e\x59\x5e\xfb\xbd\x1e\x4f\xb3\x9c\x26\
\x9e\xd6\x30\x6d\xc8\xdb\xc4\x5b\xe0\xbd\xcb\x7b\x60\x3a\x3e\x3d\
\x65\xfa\xce\xe9\x03\x3e\xc6\x3e\x02\x9f\x7a\x9f\x87\xbe\xa6\xbe\
\x22\xdf\x3d\xbe\x23\x7e\xd6\x7e\x99\x7e\x07\xfc\x9e\xfb\x3b\xfa\
\xcb\xfd\x8f\xf8\xbf\xe1\x79\xf2\x16\xf1\x4e\x05\x60\x01\xc1\x01\
\xe5\x01\xbd\x81\x1a\x81\xb3\x03\x6b\x03\x1f\x04\x99\x04\xa5\x07\
\x35\x05\x8d\x05\xbb\x06\x2f\x0c\x3e\x15\x42\x0c\x09\x0d\x59\x1f\
\x72\x93\x6f\xc0\x17\xf2\x1b\xf9\x63\x33\xdc\x67\x2c\x9a\xd1\x15\
\xca\x08\x9d\x15\x5a\x1b\xfa\x30\xcc\x26\x4c\x1e\xd6\x11\x8e\x86\
\xcf\x08\xdf\x10\x7e\x6f\xa6\xf9\x4c\xe9\xcc\xb6\x08\x88\xe0\x47\
\x6c\x88\xb8\x1f\x69\x19\x99\x17\xf9\x7d\x14\x29\x2a\x32\xaa\x2e\
\xea\x51\xb4\x53\x74\x71\x74\xf7\x2c\xd6\xac\xe4\x59\xfb\x67\xbd\
\x8e\xf1\x8f\xa9\x8c\xb9\x3b\xdb\x6a\xb6\x72\x76\x67\xac\x6a\x6c\
\x52\x6c\x63\xec\x9b\xb8\x80\xb8\xaa\xb8\x81\x78\x87\xf8\x45\xf1\
\x97\x12\x74\x13\x24\x09\xed\x89\xe4\xc4\xd8\xc4\x3d\x89\xe3\x73\
\x02\xe7\x6c\x9a\x33\x9c\xe4\x9a\x54\x96\x74\x63\xae\xe5\xdc\xa2\
\xb9\x17\xe6\xe9\xce\xcb\x9e\x77\x3c\x59\x35\x59\x90\x7c\x38\x85\
\x98\x12\x97\xb2\x3f\xe5\x83\x20\x42\x50\x2f\x18\x4f\xe5\xa7\x6e\
\x4d\x1d\x13\xf2\x84\x9b\x85\x4f\x45\xbe\xa2\x8d\xa2\x51\xb1\xb7\
\xb8\x4a\x3c\x92\xe6\x9d\x56\x95\xf6\x38\xdd\x3b\x7d\x43\xfa\x68\
\x86\x4f\x46\x75\xc6\x33\x09\x4f\x52\x2b\x79\x91\x19\x92\xb9\x23\
\xf3\x4d\x56\x44\xd6\xde\xac\xcf\xd9\x71\xd9\x2d\x39\x94\x9c\x94\
\x9c\xa3\x52\x0d\x69\x96\xb4\x2b\xd7\x30\xb7\x28\xb7\x4f\x66\x2b\
\x2b\x93\x0d\xe4\x79\xe6\x6d\xca\x1b\x93\x87\xca\xf7\xe4\x23\xf9\
\x73\xf3\xdb\x15\x6c\x85\x4c\xd1\xa3\xb4\x52\xae\x50\x0e\x16\x4c\
\x2f\xa8\x2b\x78\x5b\x18\x5b\x78\xb8\x48\xbd\x48\x5a\xd4\x33\xdf\
\x66\xfe\xea\xf9\x23\x0b\x82\x16\x7c\xbd\x90\xb0\x50\xb8\xb0\xb3\
\xd8\xb8\x78\x59\xf1\xe0\x22\xbf\x45\xbb\x16\x23\x8b\x53\x17\x77\
\x2e\x31\x5d\x52\xba\x64\x78\x69\xf0\xd2\x7d\xcb\x68\xcb\xb2\x96\
\xfd\x50\xe2\x58\x52\x55\xf2\x6a\x79\xdc\xf2\x8e\x52\x83\xd2\xa5\
\xa5\x43\x2b\x82\x57\x34\x95\xa9\x94\xc9\xcb\x6e\xae\xf4\x5a\xb9\
\x63\x15\x61\x95\x64\x55\xef\x6a\x97\xd5\x5b\x56\x7f\x2a\x17\x95\
\x5f\xac\x70\xac\xa8\xae\xf8\xb0\x46\xb8\xe6\xe2\x57\x4e\x5f\xd5\
\x7c\xf5\x79\x6d\xda\xda\xde\x4a\xb7\xca\xed\xeb\x48\xeb\xa4\xeb\
\x6e\xac\xf7\x59\xbf\xaf\x4a\xbd\x6a\x41\xd5\xd0\x86\xf0\x0d\xad\
\x1b\xf1\x8d\xe5\x1b\x5f\x6d\x4a\xde\x74\xa1\x7a\x6a\xf5\x8e\xcd\
\xb4\xcd\xca\xcd\x03\x35\x61\x35\xed\x5b\xcc\xb6\xac\xdb\xf2\xa1\
\x36\xa3\xf6\x7a\x9d\x7f\x5d\xcb\x56\xfd\xad\xab\xb7\xbe\xd9\x26\
\xda\xd6\xbf\xdd\x77\x7b\xf3\x0e\x83\x1d\x15\x3b\xde\xef\x94\xec\
\xbc\xb5\x2b\x78\x57\x6b\xbd\x45\x7d\xf5\x6e\xd2\xee\x82\xdd\x8f\
\x1a\x62\x1b\xba\xbf\xe6\x7e\xdd\xb8\x47\x77\x4f\xc5\x9e\x8f\x7b\
\xa5\x7b\x07\xf6\x45\xef\xeb\x6a\x74\x6f\x6c\xdc\xaf\xbf\xbf\xb2\
\x09\x6d\x52\x36\x8d\x1e\x48\x3a\x70\xe5\x9b\x80\x6f\xda\x9b\xed\
\x9a\x77\xb5\x70\x5a\x2a\x0e\xc2\x41\xe5\xc1\x27\xdf\xa6\x7c\x7b\
\xe3\x50\xe8\xa1\xce\xc3\xdc\xc3\xcd\xdf\x99\x7f\xb7\xf5\x08\xeb\
\x48\x79\x2b\xd2\x3a\xbf\x75\xac\x2d\xa3\x6d\xa0\x3d\xa1\xbd\xef\
\xe8\x8c\xa3\x9d\x1d\x5e\x1d\x47\xbe\xb7\xff\x7e\xef\x31\xe3\x63\
\x75\xc7\x35\x8f\x57\x9e\xa0\x9d\x28\x3d\xf1\xf9\xe4\x82\x93\xe3\
\xa7\x64\xa7\x9e\x9d\x4e\x3f\x3d\xd4\x99\xdc\x79\xf7\x4c\xfc\x99\
\x6b\x5d\x51\x5d\xbd\x67\x43\xcf\x9e\x3f\x17\x74\xee\x4c\xb7\x5f\
\xf7\xc9\xf3\xde\xe7\x8f\x5d\xf0\xbc\x70\xf4\x22\xf7\x62\xdb\x25\
\xb7\x4b\xad\x3d\xae\x3d\x47\x7e\x70\xfd\xe1\x48\xaf\x5b\x6f\xeb\
\x65\xf7\xcb\xed\x57\x3c\xae\x74\xf4\x4d\xeb\x3b\xd1\xef\xd3\x7f\
\xfa\x6a\xc0\xd5\x73\xd7\xf8\xd7\x2e\x5d\x9f\x79\xbd\xef\xc6\xec\
\x1b\xb7\x6e\x26\xdd\x1c\xb8\x25\xba\xf5\xf8\x76\xf6\xed\x17\x77\
\x0a\xee\x4c\xdc\x5d\x7a\x8f\x78\xaf\xfc\xbe\xda\xfd\xea\x07\xfa\
\x0f\xea\x7f\xb4\xfe\xb1\x65\xc0\x6d\xe0\xf8\x60\xc0\x60\xcf\xc3\
\x59\x0f\xef\x0e\x09\x87\x9e\xfe\x94\xff\xd3\x87\xe1\xd2\x47\xcc\
\x47\xd5\x23\x46\x23\x8d\x8f\x9d\x1f\x1f\x1b\x0d\x1a\xbd\xf2\x64\
\xce\x93\xe1\xa7\xb2\xa7\x13\xcf\xca\x7e\x56\xff\x79\xeb\x73\xab\
\xe7\xdf\xfd\xe2\xfb\x4b\xcf\x58\xfc\xd8\xf0\x0b\xf9\x8b\xcf\xbf\
\xae\x79\xa9\xf3\x72\xef\xab\xa9\xaf\x3a\xc7\x23\xc7\x1f\xbc\xce\
\x79\x3d\xf1\xa6\xfc\xad\xce\xdb\x7d\xef\xb8\xef\xba\xdf\xc7\xbd\
\x1f\x99\x28\xfc\x40\xfe\x50\xf3\xd1\xfa\x63\xc7\xa7\xd0\x4f\xf7\
\x3e\xe7\x7c\xfe\xfc\x2f\xf7\x84\xf3\xfb\x25\xd2\x9f\x33\x00\x00\
\x00\x20\x63\x48\x52\x4d\x00\x00\x7a\x25\x00\x00\x80\x83\x00\x00\
\xf9\xff\x00\x00\x80\xe9\x00\x00\x75\x30\x00\x00\xea\x60\x00\x00\
\x3a\x98\x00\x00\x17\x6f\x92\x5f\xc5\x46\x00\x00\x06\x08\x49\x44\
\x41\x54\x78\xda\x7c\x95\x4b\x6c\x5c\x57\x1d\xc6\x7f\xe7\x75\x9f\
\xf3\xf2\x78\xe2\x44\x4d\x62\xd7\x89\x84\x1a\xd2\xa4\x45\xb5\x54\
\x09\x81\xe8\x43\x08\xca\x82\xd2\xa4\xca\x02\x29\xb0\xa4\x42\xa4\
\x22\x20\x9e\xad\x40\x88\x45\xc5\xa3\x2d\xed\x02\x16\x20\x0a\x62\
\xd1\x96\xd7\xa2\x20\x55\x2a\x05\x91\x8a\xaa\x09\x11\x28\x71\x5c\
\xda\x38\x49\x15\xc7\xf6\x78\xc6\xf6\x4c\x6c\x8f\x67\xe6\xce\xe3\
\xdc\xc3\x62\xec\x49\x4a\x24\x8e\x74\x74\xcf\xe2\x1e\x7d\xff\xff\
\xf7\x9d\xef\xfb\x0b\xe7\x1c\xd6\x5a\xb6\x97\x73\x0e\x21\xc4\xf0\
\xbc\xbd\xa4\x94\xd4\x6a\xb5\x7b\x2f\x5e\xbc\x74\xa4\xdf\xb7\xf7\
\x16\x0a\xf9\x95\xc2\x48\xfe\x4c\x69\x47\xe9\x2f\x71\x14\x9d\x4f\
\x6d\x7a\xf3\xff\x02\x70\x5a\x6b\xc4\xff\x01\x10\x6e\xeb\x86\x52\
\x8a\xd5\xd5\xda\x43\xd3\xd3\x17\xfe\xb0\xd9\x6c\x86\xa3\xa3\x45\
\x46\x4b\xa3\x64\x32\x31\x4a\xca\xb6\x56\xfa\xe7\x61\x18\x3e\x1b\
\x45\xd1\x55\x80\x34\x75\x80\xc3\x18\x83\xe4\xd6\x25\x00\x0d\x48\
\x21\x04\x42\x08\x9c\x73\x66\xa9\x52\x79\xb2\x6f\xd3\x70\x6c\x6c\
\x27\x85\x42\x81\x30\x0a\x08\xc2\x90\x52\x69\x47\x58\x2c\x16\x1f\
\xef\x74\x3a\x67\x6b\xb5\xda\x67\x06\x77\x90\x5b\x24\xbc\x1f\xc0\
\x39\xa7\x81\xdd\x80\x03\xec\x76\xf5\x57\xe7\xae\x7d\x77\x7e\xa1\
\xfc\xe1\x4c\x26\x26\x8a\x42\x82\x20\x40\x0a\x09\xce\x61\xfb\x7d\
\xa4\x94\x94\x4a\xa5\x52\x10\x04\x7f\x5c\x5a\x5a\xfa\xb1\x94\x32\
\x55\x52\xde\x02\x20\x84\x10\xbe\x10\xa2\x01\x58\xe7\x1c\x4a\x29\
\x56\x56\x6b\x1f\x7b\xf7\xdd\xd9\xaf\x47\x61\x40\x2e\x97\x23\x8c\
\x7c\x8c\xa7\xf1\x3c\x0f\xdf\xf7\xd1\x5a\x03\xd0\xef\xf7\xc9\x66\
\xb3\xe2\xda\xc2\xc2\x57\x67\x2f\x5d\xfe\xb2\x90\xea\xd6\x0e\x80\
\x16\xb0\xbe\xad\x43\x92\x24\xd9\x99\x0b\x33\xcf\x4b\x29\x4c\x26\
\x93\x41\x48\x30\xc6\x60\x8c\x19\x00\x78\x1e\x4a\x29\x9c\x73\xf4\
\x7a\x3d\xae\xce\xcd\x91\x24\x09\x57\xae\xbc\xf7\x44\xbb\x9d\x8c\
\xff\x2f\x80\xdb\xda\x6c\x53\x73\xf9\xca\x7b\xdf\xdb\x68\x34\x0e\
\xe7\xf3\x79\x7c\xdf\xc7\xf7\xbd\x21\x80\xef\xf9\x48\xa9\x10\x42\
\x60\xad\xa5\xd9\x6a\x52\xa9\x56\xe8\xf7\x2d\x42\xc8\x52\xb9\x5c\
\x7e\x90\x2d\x31\xdf\xaf\xb0\x10\x03\x6a\x56\x56\x3f\x79\xf9\xf2\
\x95\x93\xc5\x62\x91\x6c\x36\x8b\xef\xfb\x78\x9e\x46\x69\x85\xe7\
\x79\x18\xad\x50\x42\x90\xa6\x29\x9d\x4e\x87\xea\xf2\x32\xad\x56\
\x82\x40\x90\xc9\xc4\x34\x1a\x9b\x13\x43\x80\xed\x77\xbf\xcd\x65\
\xa7\xdb\xfb\xe8\xcc\xcc\xdb\xbf\x31\xc6\x90\xcf\xe7\x51\x5a\xa1\
\x8d\x1c\x56\xee\x1b\x83\x94\x0a\x84\xa0\xdb\xeb\x52\xab\xd7\x58\
\x5e\x5e\x01\x37\xe8\x3c\x8a\x22\x4a\xa5\xd2\xfc\x10\xa0\x52\xad\
\xde\xc4\x93\xf3\xae\xcd\x2d\x3c\xb1\xbe\xb1\x59\xda\xb3\xe7\x36\
\x3c\x33\xe0\xda\x78\x06\xcf\x18\x7c\xe3\xa1\x94\x46\x0a\x81\x4d\
\x53\x5a\xcd\x16\x95\xca\x32\xa9\x1d\xf8\x49\x6b\xc5\x8e\xb1\xd2\
\xc2\xae\x5d\x63\xaf\x0d\x01\xea\xf5\xf5\x21\x3d\xbd\x7e\xf7\x47\
\xd5\x6a\xf5\x13\xc5\x62\x91\x38\x8a\x30\x9e\x46\x1b\x85\xd1\x06\
\x63\x3c\xb4\xd2\x03\x6f\x00\xbd\x6e\x97\x6a\xb5\xca\x46\x63\x03\
\x81\x44\x6b\xcd\x68\x69\x94\x42\x21\xff\x45\x07\xf3\x43\x91\x53\
\xdb\x27\xb5\x7d\x04\x6e\xaa\xb6\x5a\x7b\x2c\x08\x02\xf2\xb9\x3c\
\x42\x49\xb4\x51\x68\xad\xd1\xc6\x60\x8c\x46\x2a\x39\x14\x76\x6d\
\x7d\x8d\x6a\x75\x19\xdc\x40\x8b\x28\x8a\x30\xda\xbc\xd1\x6e\xb7\
\xff\x54\xaf\xd7\x19\x76\xe0\x84\x23\x0a\x43\xba\x9d\xee\xb7\x84\
\xc0\x1b\x1f\xdf\xcb\xc8\x48\x01\x21\x05\xce\x0d\x2c\xef\x69\x83\
\x54\x6a\xa8\x57\xd2\x49\x58\xaa\x54\x48\x92\x36\x42\x48\xc2\x30\
\x42\x4a\xd9\x69\x34\x36\xbe\xed\x48\xb1\xd6\xb2\x73\x6c\x6c\x00\
\x10\xfa\x21\xef\xfc\x67\xf6\x9b\xa7\x4e\x9d\x3a\x62\xd3\x94\x89\
\xf1\xbd\x1c\xba\xeb\x4e\xa6\xa6\xee\x21\x97\xcd\xe1\xd2\x41\x90\
\x39\xe7\x10\x08\x7a\xbd\x1e\x2b\xb5\x1a\x2b\xcb\xab\x80\xc4\xf7\
\x43\xf2\xf9\x3c\x1b\x8d\xf5\x9f\xa4\xa9\x7d\xb3\xb1\xd9\x20\x0c\
\xc3\x1b\x1d\x9c\x3b\x77\xfe\xc4\x33\x4f\x3f\xf7\xd4\xda\xda\x75\
\xda\x49\x9b\x24\x49\x30\xc6\xe3\x8e\x03\x77\xf0\xf9\xcf\x1d\xe7\
\xd8\xb1\xa3\xf8\xbe\x07\x40\xaf\xd7\x63\xa3\xb1\xc1\xfc\xb5\x79\
\xba\xdd\x1e\x41\x10\x10\xc7\x11\x9d\x4e\xfb\x4a\xbb\xdd\x7a\x36\
\x4d\x53\xb2\xd9\x2c\x93\x93\x93\x37\x9c\x7c\x69\xf6\xd2\xc7\xfb\
\xfd\x1e\xd9\x6c\x96\x5c\x36\x47\xa1\x50\xc0\x78\x86\xe9\xe9\x69\
\xbe\x74\xe2\x71\x8e\x1c\x3d\xc6\xf9\xe9\x0b\x83\x8a\xb4\xa6\x5a\
\x5d\x66\xed\xfa\x1a\x9e\xe7\x91\xcb\xe5\xf0\x03\x8f\xcd\x66\xf3\
\x07\x40\x35\x08\x02\x26\x26\x26\x50\xea\xa6\xa8\xc8\xe5\xf2\x67\
\xb4\xd6\x43\x97\x9a\xad\xe7\x98\xcb\xe5\x18\x2d\x16\x39\x73\xe6\
\x2c\x8f\x3c\xf2\x28\x2f\xbe\xf8\x32\xed\x24\x61\xb3\xb9\x49\x10\
\x84\x64\xb2\x59\xa2\x38\xa0\xb9\xd9\x7c\xc3\xda\xf4\x17\x42\x28\
\x76\xef\xde\x43\x1c\x47\xa4\x69\x7a\x83\xa2\xf1\x89\xf1\x5f\xef\
\xde\x7d\xdb\x89\xc5\xc5\xf2\x4e\xdf\xf7\x71\xce\x21\x85\x44\x59\
\x4b\xaa\x52\x4a\xa3\x1e\x49\xb7\xcb\xc9\xaf\x7c\x8d\x73\xd3\xe7\
\x79\xf8\xe1\x4f\x6f\x51\x13\x62\xad\x65\xd7\xae\xb7\x7e\xb7\x6f\
\x72\xfa\xdf\xb0\x7e\x37\xd4\x81\xeb\xab\x50\xfe\x8e\x73\x9b\x3f\
\x93\x00\x71\x36\x5e\xb8\xef\xfe\xfb\x9e\xda\x6e\x6b\x10\x0b\xde\
\xf0\x6b\xb4\x47\x26\x8a\xc9\xe7\x72\xfc\xf6\xa5\xdf\xf3\xcf\xd3\
\x67\xc9\xe6\x32\x84\x61\x40\xbb\xdd\x7e\x6d\xdf\xe4\x9b\x27\x61\
\xee\x6e\x38\x0f\xbc\x03\xcc\x97\xac\x5d\xff\xe9\xda\x5a\xf2\x90\
\xdc\x1a\x04\x1c\x38\x78\xe0\xb9\x07\x1e\xb8\xff\x19\xb5\x15\x60\
\x41\x10\xdc\xb4\x7d\x7c\xcf\x23\x0e\x63\x02\x3f\xe0\x95\x57\xfe\
\x8c\xd6\x9a\x34\x4d\xbb\xfd\x7e\xff\xfb\xb0\xb8\x0f\x2e\x02\x57\
\x81\x65\xd2\xf4\x3a\xab\xab\x3d\x16\x17\xf9\xac\x1e\x8e\x49\xe0\
\x9e\xa9\xa9\x27\x41\xc4\xa7\x4f\x9f\xfe\x42\xab\xd5\x1a\x68\xe1\
\xfb\x58\x6b\x49\xad\xc5\xa6\x29\xc6\x33\xac\xae\xd4\x98\x99\x9e\
\xe1\xe0\xa1\x0f\xfe\xca\x18\xf3\x0f\x98\x03\xae\x03\x03\xde\x93\
\x04\x96\x96\x60\x61\x81\xcc\x20\x4d\x9d\xc0\x39\x88\xc2\xb0\x7d\
\xe8\xd0\x9d\x8f\xc5\x99\xf8\xef\x33\x33\x33\x3f\xac\x56\xaa\x7b\
\xfb\xfd\x3e\x9e\xe7\x0d\xdd\x3b\x88\x14\xc9\x62\xb9\xdc\xb8\xeb\
\x43\x87\x9f\x8f\xe3\x98\x4e\xa7\xd2\xee\x76\x5d\x28\x04\x58\x0b\
\x0b\x0b\x30\x3b\x0b\xcd\x26\x7f\xd5\xc3\x49\x00\x28\x25\x65\x9c\
\x89\xdd\xed\x93\xb7\xbf\x34\x52\x1c\x79\x75\x71\x71\xf1\x68\xb9\
\x5c\x3e\x5e\xab\xd5\x3f\xd2\x6a\xb5\x34\x42\x80\x73\x4c\xee\x9f\
\x6c\x1d\x3e\x7c\xe8\xa4\x10\xe2\x6d\x80\x4a\xc5\x7d\xa3\x56\xe3\
\xe9\x24\xc1\x34\x1a\x03\x80\xf5\x75\x5e\x8e\x22\x5e\x10\xce\x39\
\x5e\x7f\xfd\x6f\xc3\x39\xe3\x9c\x63\x7d\x63\xd3\x5a\x6b\x49\x92\
\x84\x7a\xbd\x4e\xa7\xd3\x9d\x52\x4a\x7e\x4a\x48\x3e\x50\xc8\x17\
\xd6\xf6\xef\xdf\xf7\x42\x61\x24\xff\x2f\xa9\x04\x5a\x69\x7c\x73\
\x90\xb9\x39\x1e\x2c\x97\x39\x5e\xaf\x93\x6f\xb7\x79\xd5\x18\x7e\
\x19\x45\xf4\xff\x3b\x00\x34\xc0\xa8\x5e\x05\x6f\x81\xc4\x00\x00\
\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x01\x97\x70\x0d\x6e\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\
\x0b\x13\x01\x00\x9a\x9c\x18\x00\x00\x07\x02\x49\x44\x41\x54\x48\
\xc7\x55\x95\x6b\x70\x5d\x55\x15\xc7\x7f\xfb\x3c\xee\x3d\xe7\x9e\
\x7b\x93\xfb\x68\x4a\x93\x86\xb6\x69\x4b\xaa\x38\x16\x06\x3a\x16\
\x4b\x81\x22\x4c\xad\x55\xa9\x83\xce\xe0\xa3\x55\xa1\x0a\xc3\x07\
\xf0\x05\x0c\x33\x38\xea\x28\xc2\xe0\x03\x44\x1c\x18\x64\x8a\x03\
\xa3\x32\x08\x88\xa0\x0c\x8f\x3e\xd2\x34\x84\x16\xab\x96\x3e\xd2\
\x34\x49\x9b\x26\x6d\x92\x9b\xc7\xcd\x4d\x9a\xe6\xde\xdc\x7b\xf6\
\x39\x67\xf9\x21\x24\xc0\xfa\xb8\x67\xd6\xfa\xed\xb5\xd6\xff\xbf\
\xb7\x12\x11\x82\x20\xa0\xe2\x57\x2f\x41\x44\x78\xef\xf0\x51\x29\
\x57\x66\x04\x11\xa1\xa9\xa9\x59\x0e\x1f\x3d\x22\x68\xad\x69\x6b\
\x6b\x7f\x48\x6b\x8d\xaa\x56\xab\x4c\x97\x4b\x72\xf8\xbd\xa3\x18\
\x57\xac\xbd\x4a\x9c\xb8\xc3\xe2\xc6\x06\xc5\xfb\xd5\x6a\x47\xc7\
\x0a\xd7\x74\xf5\x74\x8b\xef\xfb\xf2\xce\x81\x03\x62\x00\xb4\xee\
\x6b\x9b\x0c\x42\xbd\x77\xf9\xb2\x26\x76\xed\xde\x8d\x6d\x59\xeb\
\x0d\x80\x96\xdd\xfb\x9e\xfc\xfa\x4d\xdf\xe4\xca\x75\x1b\x48\x67\
\xd2\x6a\xcd\xe5\x6b\xde\x26\x08\x02\x82\x20\x20\x0c\x43\x0e\x1d\
\x3a\xfc\x42\x10\x04\x68\xad\x21\x08\x02\xa5\xb5\x66\x4f\x4b\xab\
\xe4\x47\x86\x45\x6b\x2d\x22\x82\xa1\x94\x92\xb6\xb6\xf6\xb1\x65\
\x4d\x4b\x58\x90\xcd\xd1\xd6\xde\xce\xc0\xc0\xd0\x76\xd5\xdd\xd3\
\x43\x32\x99\x94\x64\x32\x89\x48\xc4\xa1\x43\x47\x58\x50\x97\x55\
\x6a\xed\xa7\xd6\xcb\xe4\xe4\x24\x7e\xe0\xf3\xf8\xe3\x7f\xc0\x30\
\x0d\xe3\xd2\x4b\x57\x8b\x71\xff\x03\x3f\x57\xb9\x5c\x8e\x86\x0b\
\xea\x19\x2f\x14\xd8\x78\xfd\x17\xa2\xa1\x81\x85\xa2\x44\x84\x30\
\x0c\x11\x11\xa5\x94\x32\x80\xb0\xe3\x78\x67\x7b\xa9\x34\xb3\xae\
\x7e\xf1\x42\x1a\x16\x35\x30\x75\xee\x5c\x21\x9b\xcd\xd6\x45\x51\
\x88\xc1\xfb\xa1\x94\x12\xd3\x34\xc3\x7f\xbd\xf6\xba\x80\x5a\x77\
\xe1\x92\x06\xea\x72\x75\xd8\x96\x05\x8a\x05\xbb\x5b\xf6\x4a\x7f\
\xff\xd9\x9b\x95\x88\x70\xac\xe3\x04\x41\xa8\x1f\x9d\x3a\x37\x75\
\x67\x43\x43\x3d\xa9\x9a\x24\xe9\x54\x2d\x96\x6d\xd1\xd5\xdd\xcd\
\xe0\x60\x9e\xfa\x86\x45\xac\x6a\x6e\x56\x4a\x44\xb8\x62\xed\xd5\
\x92\x1f\x1e\x22\x0c\x23\x1e\x7c\xf0\x97\x6c\xdb\xf6\x35\xb4\xd6\
\xb4\xef\xdf\x8f\x5f\xd5\xd4\xd6\xa6\x4e\x15\x27\x8a\x2b\x2f\xbb\
\xec\x32\x94\x88\xf0\xd8\x63\x4f\x7c\xef\xaf\x7f\x79\xee\x77\x5a\
\x6b\xb4\xd6\x84\x51\x44\xa9\x34\xcd\x8b\x7f\x7f\x9e\x6a\xb5\xf2\
\xd6\xba\x2b\xee\xdb\x08\x1d\x84\xe1\xc4\x6c\xc2\xce\xb7\x5a\xf0\
\xb5\xaf\x06\x06\x07\x6b\x0e\x1e\x3c\xf8\x8f\xb3\x67\x07\x36\x44\
\x41\xc8\x8f\xee\xfe\xfe\x77\x1a\x16\xd7\xef\x08\xfc\xd5\xfe\xd8\
\x18\x76\x47\x07\xcf\xcf\xef\x6e\x6e\x67\x5a\x6b\x46\x47\x47\xd7\
\xb6\xb4\xec\xdb\x7b\xba\xaf\xef\xae\x48\xa2\xb9\x73\x25\x22\x1f\
\x4c\x09\xb0\x94\x52\x18\x86\x61\xff\xef\xd0\x91\x03\x0b\xea\x72\
\xd7\x78\xa9\xe4\xaf\xc3\x20\x94\x62\xb1\xf8\x25\x40\x01\xf3\x09\
\x1e\x10\x98\xa6\xc9\x1b\x6f\xee\x2a\xcd\x4d\x2a\x1e\x8b\x61\x18\
\x06\x75\x75\x75\x2f\x9f\x3c\xd5\x7b\xe7\x87\x13\x4a\xb3\xe3\x3d\
\xfe\x70\x26\x93\xb6\x1d\x37\x46\x22\x91\xc0\x75\x5c\x82\x20\xe0\
\xc0\xbf\xdf\xa5\xb7\xb7\xef\x11\x00\x43\x29\x85\x52\x8a\x99\x4a\
\xf5\xaa\xfe\xfe\x33\x3f\x48\x67\xd2\x78\x9e\x47\xca\xf3\x30\x0d\
\x83\xa1\xfc\x10\xe5\x52\x85\x85\x0b\xeb\x66\xef\x7d\xbc\xb3\x1b\
\xa5\x14\x3d\x3d\xdd\xfb\x56\x35\x37\xe3\x79\x2e\x5e\xc2\xc3\xb2\
\x6c\x2a\x95\x0a\xdd\x3d\x27\xb1\x4c\x9b\x8b\x9a\x57\xdc\x00\x60\
\x84\x91\x06\x09\x5f\x6a\x6e\xbe\x88\x4c\x2e\x4d\x22\x91\x20\xee\
\xc4\x51\x4a\xd1\xd9\x75\x82\x28\x8c\x48\x26\x93\xd5\x7c\x3e\xff\
\x4f\x00\xa3\xab\xb3\xfb\x8e\x2f\xdf\x78\xd3\x8d\xd7\x6e\xb8\x9e\
\xad\xdf\xb8\x99\x94\x97\xc2\x89\xc5\x19\x2f\x8e\x33\x38\x90\x27\
\x9b\xcd\x31\x31\x39\xbe\xb4\x50\x28\x00\x60\x8c\x0c\x8f\xd6\x64\
\xb3\x59\xea\xea\xea\xe8\xeb\xeb\x63\x71\x63\x13\xcf\x3d\xf7\x3c\
\xa7\x7a\x7b\xc9\xe6\x72\x04\x81\xde\xa7\x94\x39\x72\xf1\xc5\x1f\
\x9f\x15\xe9\xce\xdd\x2d\xfc\xf4\xc7\x3f\x93\x30\x0c\xf1\x7d\x1f\
\xad\x03\x7c\x5d\xe5\xf6\xdb\x6f\x63\xd3\xe6\x8d\x7c\xac\xf9\xbe\
\x5e\x38\xb4\x1c\x26\x98\x98\x98\xd8\x6c\x48\x14\x71\xf7\x3d\x77\
\x27\x52\xa9\x14\xa9\x54\x8a\x4c\x26\x4d\x36\x93\xe5\xe9\x1d\xcf\
\x50\xa9\x54\xfe\x08\xef\x2c\x87\x5e\xca\xe5\x09\xda\xdb\xb9\xd5\
\x22\x52\xa4\x92\x5e\x75\xfb\x77\xb7\xab\xe3\xc7\x8f\xdf\x72\xf4\
\xe8\xb1\x27\xa7\xcf\x4f\x5b\xcb\x96\x37\x95\x6d\xdb\xbe\xad\xbf\
\x3f\x7f\x6c\x70\x90\xdf\x77\x76\x82\xd6\x6c\x9d\x77\xdc\x5c\x88\
\x08\x4a\x29\x00\x25\x22\x02\x60\x9a\x26\x85\xc2\xf8\xe7\x8e\x1c\
\x39\xfa\xd2\x74\xa9\xe4\xe6\x72\x59\x72\x0b\x72\x24\x93\x1e\xa6\
\x61\xcc\x58\xa6\xf5\x94\xeb\xba\x8f\x24\x12\x89\x3e\x80\x28\x12\
\x40\xb0\x6d\x9b\x8f\x00\x44\xc4\x02\x16\x29\xa5\xf2\x40\x38\x57\
\xbc\xf7\x74\xdf\xfd\x9d\x27\xba\xef\x4b\xd7\xd6\x90\x4c\x26\xf1\
\xbc\x04\xb1\xb8\x8d\xeb\xba\x24\x13\x1e\xf1\x78\x1c\xc3\x30\x98\
\x9a\x9a\x92\xf3\xe7\xcf\x3f\x5c\x5f\x5f\x7f\x97\x42\x50\x86\xf9\
\x11\x80\xfa\xa0\x89\xd9\x2e\xb4\xd6\xa9\xfd\xfb\xdf\x7d\xbb\xea\
\xfb\xab\x73\xb9\x1c\x6e\xc2\xc1\xf3\x12\xc4\xe3\x71\x1c\xc7\xc1\
\x4b\x24\xb0\x2d\x1b\x11\xc1\xf7\x7d\x86\x47\x46\xe8\xeb\xef\xa7\
\x5c\x9a\x29\x7c\xe6\xda\x0d\x97\xbb\xae\x73\xe6\xc3\xee\x11\x40\
\x94\x52\x58\x96\x45\xb1\x38\xb1\xe9\x8d\x37\x77\x4e\x99\x96\xb5\
\xba\xb1\xb1\x91\x74\x3a\x4d\x2a\x95\xc4\x71\x1d\x3c\xcf\x23\x99\
\x48\x60\x9b\x16\x22\x42\xb9\x5c\xa6\xb7\xef\x34\xbd\xa7\xfb\x08\
\x83\x88\x54\x2a\xb5\xa0\xab\xab\xfb\x16\x00\x0b\x60\x64\x74\xf4\
\x43\x14\x89\x9d\xe9\x1f\x78\x75\x64\x64\xec\xb3\x8d\x8d\x8d\x78\
\x09\x8f\xb8\x13\x23\xe6\xd8\x38\xb1\x38\xae\xe3\x12\x8b\xc5\x30\
\x0d\x83\x50\x84\xa9\xa9\x29\x7a\x7a\x4e\x52\x2a\x95\x09\xc3\x90\
\x78\x3c\xc6\xd2\x65\x4b\x06\x16\xd7\xd7\xef\x98\x07\x14\xc6\xc6\
\x67\x8d\x64\x59\x6b\xf2\xc3\xc3\xed\x5a\xeb\x58\xd3\xb2\xa5\xc4\
\xdd\x38\x8e\x13\x23\x16\x8b\x11\x77\x1c\xdc\x78\x1c\xdb\xb2\x31\
\x0c\x83\x20\x0c\x29\x8c\x17\xe8\xea\xea\x41\xeb\x00\x11\xa1\xb6\
\xb6\x96\x4c\x26\xbd\x2f\x1e\x8f\x5d\x33\x5e\x2c\x72\xc1\xc2\x85\
\xb3\x00\xc7\x71\x38\x71\xa2\xfb\xde\xd6\xd6\xd6\x07\xc3\x28\x62\
\xe9\x92\x0b\xb1\x6c\x93\x35\x6b\x2e\xa7\x26\x55\x83\x44\x11\x22\
\xb3\x1f\x9f\xa1\x0c\xb4\xd6\x0c\x0e\xe7\xe9\xe9\xea\x41\x04\x1c\
\xc7\x25\x93\x49\x33\x75\xfe\xdc\x43\xf9\xe1\xa1\x7b\x87\xf2\x83\
\xb8\xae\xfb\x01\xe0\x85\xbf\xbd\xf8\xea\xcb\x2f\xbf\xf2\x45\xa5\
\x14\x95\x4a\x05\x5f\xfb\xf8\x5a\x53\x2a\x95\xa8\x56\xab\xac\x5f\
\x7f\x25\x0f\x3c\xf0\x0b\x2e\x59\xfd\x49\x44\x84\x9e\x13\x27\x39\
\x75\xaa\x77\xbe\xb0\x9b\x70\x28\x14\x0a\xb7\x06\x81\x7e\x2a\x16\
\x8b\xb1\x72\xe5\x4a\x5c\xd7\x65\x4e\xeb\xbc\xf2\xca\x6b\x8d\xcf\
\x3e\xf3\xec\x7f\x06\x07\x87\x2e\x98\x83\x84\x61\x48\x18\x86\x44\
\x51\x84\x20\x54\x7c\x9f\xca\xcc\x0c\xdf\xfa\xf6\x56\xb6\x6c\xb9\
\x61\xf6\xf9\x4f\xd7\x00\x42\x6d\x4d\xcb\x1d\xcb\x9b\x8e\x6c\x87\
\x73\x97\x42\x11\x98\x28\xc0\xd0\x4f\x44\xa6\x9f\x50\x22\xc2\xae\
\xdd\x2d\xa0\x14\xad\x7b\x5a\x7f\xdb\xb2\x67\xef\x0f\xc3\x28\xc4\
\x34\x4d\xa2\x28\x9a\x87\x44\x51\x84\x44\xc2\x4c\x65\x86\xfa\x86\
\x7a\x1e\x79\xf4\x37\xd8\xb6\xe5\x17\x0a\x85\xeb\xae\x5e\x7f\x4f\
\x1b\x9c\x01\x86\x81\x88\x28\x82\xb1\x31\x18\x1b\xe3\xcf\xb3\xdf\
\xc8\xce\x96\x59\x05\x45\xc2\xe4\xe4\x24\xbd\xa7\x4f\x7f\xf5\xd8\
\xb1\x63\xbf\x1a\x19\x1e\xb9\x30\x08\x02\x4c\xd3\x44\x29\x35\x6f\
\xc8\x72\x79\x86\x1b\xbf\xb2\xe5\xfc\xe6\xcf\x6f\xfa\x74\x14\x45\
\x1d\xab\x2e\xba\xa4\xec\xfb\xe2\x2a\x05\x61\x08\x03\x03\xd0\xd1\
\x01\xa5\x12\x77\xcc\x76\xb0\x6b\xcf\x9c\x4a\x4d\x11\xe1\xdc\xd4\
\x74\x18\x86\x21\x95\x4a\x85\x62\xb1\x48\xb5\xea\xaf\x31\x4d\x63\
\xb3\x32\x68\x4e\xd7\xa6\x27\x57\xac\x58\xfe\xa7\x74\xa6\xf6\xbf\
\x86\xa9\xb0\x4c\x8b\xb8\xfd\x09\xfa\xfb\xb9\x6e\x68\x88\x6d\xc5\
\x22\xb5\x33\x33\xbc\x6e\xdb\x3c\x9d\x48\x10\xfc\x1f\x86\x93\xb9\
\x1a\xfd\x43\x9a\xa3\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\
\x82\
\x00\x00\x02\x24\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@ -319,214 +168,48 @@ qt_resource_data = "\
\xeb\x57\xff\x7d\xcb\x0f\xef\x28\xb0\x8e\xa2\xf8\x2d\xc0\x00\x14\
\x2c\x1a\x71\xde\xeb\xd2\x54\x00\x00\x00\x00\x49\x45\x4e\x44\xae\
\x42\x60\x82\
\x00\x00\x0c\xdd\
\x00\x00\x02\x7a\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x0a\x4f\x69\x43\x43\x50\x50\x68\x6f\
\x74\x6f\x73\x68\x6f\x70\x20\x49\x43\x43\x20\x70\x72\x6f\x66\x69\
\x6c\x65\x00\x00\x78\xda\x9d\x53\x67\x54\x53\xe9\x16\x3d\xf7\xde\
\xf4\x42\x4b\x88\x80\x94\x4b\x6f\x52\x15\x08\x20\x52\x42\x8b\x80\
\x14\x91\x26\x2a\x21\x09\x10\x4a\x88\x21\xa1\xd9\x15\x51\xc1\x11\
\x45\x45\x04\x1b\xc8\xa0\x88\x03\x8e\x8e\x80\x8c\x15\x51\x2c\x0c\
\x8a\x0a\xd8\x07\xe4\x21\xa2\x8e\x83\xa3\x88\x8a\xca\xfb\xe1\x7b\
\xa3\x6b\xd6\xbc\xf7\xe6\xcd\xfe\xb5\xd7\x3e\xe7\xac\xf3\x9d\xb3\
\xcf\x07\xc0\x08\x0c\x96\x48\x33\x51\x35\x80\x0c\xa9\x42\x1e\x11\
\xe0\x83\xc7\xc4\xc6\xe1\xe4\x2e\x40\x81\x0a\x24\x70\x00\x10\x08\
\xb3\x64\x21\x73\xfd\x23\x01\x00\xf8\x7e\x3c\x3c\x2b\x22\xc0\x07\
\xbe\x00\x01\x78\xd3\x0b\x08\x00\xc0\x4d\x9b\xc0\x30\x1c\x87\xff\
\x0f\xea\x42\x99\x5c\x01\x80\x84\x01\xc0\x74\x91\x38\x4b\x08\x80\
\x14\x00\x40\x7a\x8e\x42\xa6\x00\x40\x46\x01\x80\x9d\x98\x26\x53\
\x00\xa0\x04\x00\x60\xcb\x63\x62\xe3\x00\x50\x2d\x00\x60\x27\x7f\
\xe6\xd3\x00\x80\x9d\xf8\x99\x7b\x01\x00\x5b\x94\x21\x15\x01\xa0\
\x91\x00\x20\x13\x65\x88\x44\x00\x68\x3b\x00\xac\xcf\x56\x8a\x45\
\x00\x58\x30\x00\x14\x66\x4b\xc4\x39\x00\xd8\x2d\x00\x30\x49\x57\
\x66\x48\x00\xb0\xb7\x00\xc0\xce\x10\x0b\xb2\x00\x08\x0c\x00\x30\
\x51\x88\x85\x29\x00\x04\x7b\x00\x60\xc8\x23\x23\x78\x00\x84\x99\
\x00\x14\x46\xf2\x57\x3c\xf1\x2b\xae\x10\xe7\x2a\x00\x00\x78\x99\
\xb2\x3c\xb9\x24\x39\x45\x81\x5b\x08\x2d\x71\x07\x57\x57\x2e\x1e\
\x28\xce\x49\x17\x2b\x14\x36\x61\x02\x61\x9a\x40\x2e\xc2\x79\x99\
\x19\x32\x81\x34\x0f\xe0\xf3\xcc\x00\x00\xa0\x91\x15\x11\xe0\x83\
\xf3\xfd\x78\xce\x0e\xae\xce\xce\x36\x8e\xb6\x0e\x5f\x2d\xea\xbf\
\x06\xff\x22\x62\x62\xe3\xfe\xe5\xcf\xab\x70\x40\x00\x00\xe1\x74\
\x7e\xd1\xfe\x2c\x2f\xb3\x1a\x80\x3b\x06\x80\x6d\xfe\xa2\x25\xee\
\x04\x68\x5e\x0b\xa0\x75\xf7\x8b\x66\xb2\x0f\x40\xb5\x00\xa0\xe9\
\xda\x57\xf3\x70\xf8\x7e\x3c\x3c\x45\xa1\x90\xb9\xd9\xd9\xe5\xe4\
\xe4\xd8\x4a\xc4\x42\x5b\x61\xca\x57\x7d\xfe\x67\xc2\x5f\xc0\x57\
\xfd\x6c\xf9\x7e\x3c\xfc\xf7\xf5\xe0\xbe\xe2\x24\x81\x32\x5d\x81\
\x47\x04\xf8\xe0\xc2\xcc\xf4\x4c\xa5\x1c\xcf\x92\x09\x84\x62\xdc\
\xe6\x8f\x47\xfc\xb7\x0b\xff\xfc\x1d\xd3\x22\xc4\x49\x62\xb9\x58\
\x2a\x14\xe3\x51\x12\x71\x8e\x44\x9a\x8c\xf3\x32\xa5\x22\x89\x42\
\x92\x29\xc5\x25\xd2\xff\x64\xe2\xdf\x2c\xfb\x03\x3e\xdf\x35\x00\
\xb0\x6a\x3e\x01\x7b\x91\x2d\xa8\x5d\x63\x03\xf6\x4b\x27\x10\x58\
\x74\xc0\xe2\xf7\x00\x00\xf2\xbb\x6f\xc1\xd4\x28\x08\x03\x80\x68\
\x83\xe1\xcf\x77\xff\xef\x3f\xfd\x47\xa0\x25\x00\x80\x66\x49\x92\
\x71\x00\x00\x5e\x44\x24\x2e\x54\xca\xb3\x3f\xc7\x08\x00\x00\x44\
\xa0\x81\x2a\xb0\x41\x1b\xf4\xc1\x18\x2c\xc0\x06\x1c\xc1\x05\xdc\
\xc1\x0b\xfc\x60\x36\x84\x42\x24\xc4\xc2\x42\x10\x42\x0a\x64\x80\
\x1c\x72\x60\x29\xac\x82\x42\x28\x86\xcd\xb0\x1d\x2a\x60\x2f\xd4\
\x40\x1d\x34\xc0\x51\x68\x86\x93\x70\x0e\x2e\xc2\x55\xb8\x0e\x3d\
\x70\x0f\xfa\x61\x08\x9e\xc1\x28\xbc\x81\x09\x04\x41\xc8\x08\x13\
\x61\x21\xda\x88\x01\x62\x8a\x58\x23\x8e\x08\x17\x99\x85\xf8\x21\
\xc1\x48\x04\x12\x8b\x24\x20\xc9\x88\x14\x51\x22\x4b\x91\x35\x48\
\x31\x52\x8a\x54\x20\x55\x48\x1d\xf2\x3d\x72\x02\x39\x87\x5c\x46\
\xba\x91\x3b\xc8\x00\x32\x82\xfc\x86\xbc\x47\x31\x94\x81\xb2\x51\
\x3d\xd4\x0c\xb5\x43\xb9\xa8\x37\x1a\x84\x46\xa2\x0b\xd0\x64\x74\
\x31\x9a\x8f\x16\xa0\x9b\xd0\x72\xb4\x1a\x3d\x8c\x36\xa1\xe7\xd0\
\xab\x68\x0f\xda\x8f\x3e\x43\xc7\x30\xc0\xe8\x18\x07\x33\xc4\x6c\
\x30\x2e\xc6\xc3\x42\xb1\x38\x2c\x09\x93\x63\xcb\xb1\x22\xac\x0c\
\xab\xc6\x1a\xb0\x56\xac\x03\xbb\x89\xf5\x63\xcf\xb1\x77\x04\x12\
\x81\x45\xc0\x09\x36\x04\x77\x42\x20\x61\x1e\x41\x48\x58\x4c\x58\
\x4e\xd8\x48\xa8\x20\x1c\x24\x34\x11\xda\x09\x37\x09\x03\x84\x51\
\xc2\x27\x22\x93\xa8\x4b\xb4\x26\xba\x11\xf9\xc4\x18\x62\x32\x31\
\x87\x58\x48\x2c\x23\xd6\x12\x8f\x13\x2f\x10\x7b\x88\x43\xc4\x37\
\x24\x12\x89\x43\x32\x27\xb9\x90\x02\x49\xb1\xa4\x54\xd2\x12\xd2\
\x46\xd2\x6e\x52\x23\xe9\x2c\xa9\x9b\x34\x48\x1a\x23\x93\xc9\xda\
\x64\x6b\xb2\x07\x39\x94\x2c\x20\x2b\xc8\x85\xe4\x9d\xe4\xc3\xe4\
\x33\xe4\x1b\xe4\x21\xf2\x5b\x0a\x9d\x62\x40\x71\xa4\xf8\x53\xe2\
\x28\x52\xca\x6a\x4a\x19\xe5\x10\xe5\x34\xe5\x06\x65\x98\x32\x41\
\x55\xa3\x9a\x52\xdd\xa8\xa1\x54\x11\x35\x8f\x5a\x42\xad\xa1\xb6\
\x52\xaf\x51\x87\xa8\x13\x34\x75\x9a\x39\xcd\x83\x16\x49\x4b\xa5\
\xad\xa2\x95\xd3\x1a\x68\x17\x68\xf7\x69\xaf\xe8\x74\xba\x11\xdd\
\x95\x1e\x4e\x97\xd0\x57\xd2\xcb\xe9\x47\xe8\x97\xe8\x03\xf4\x77\
\x0c\x0d\x86\x15\x83\xc7\x88\x67\x28\x19\x9b\x18\x07\x18\x67\x19\
\x77\x18\xaf\x98\x4c\xa6\x19\xd3\x8b\x19\xc7\x54\x30\x37\x31\xeb\
\x98\xe7\x99\x0f\x99\x6f\x55\x58\x2a\xb6\x2a\x7c\x15\x91\xca\x0a\
\x95\x4a\x95\x26\x95\x1b\x2a\x2f\x54\xa9\xaa\xa6\xaa\xde\xaa\x0b\
\x55\xf3\x55\xcb\x54\x8f\xa9\x5e\x53\x7d\xae\x46\x55\x33\x53\xe3\
\xa9\x09\xd4\x96\xab\x55\xaa\x9d\x50\xeb\x53\x1b\x53\x67\xa9\x3b\
\xa8\x87\xaa\x67\xa8\x6f\x54\x3f\xa4\x7e\x59\xfd\x89\x06\x59\xc3\
\x4c\xc3\x4f\x43\xa4\x51\xa0\xb1\x5f\xe3\xbc\xc6\x20\x0b\x63\x19\
\xb3\x78\x2c\x21\x6b\x0d\xab\x86\x75\x81\x35\xc4\x26\xb1\xcd\xd9\
\x7c\x76\x2a\xbb\x98\xfd\x1d\xbb\x8b\x3d\xaa\xa9\xa1\x39\x43\x33\
\x4a\x33\x57\xb3\x52\xf3\x94\x66\x3f\x07\xe3\x98\x71\xf8\x9c\x74\
\x4e\x09\xe7\x28\xa7\x97\xf3\x7e\x8a\xde\x14\xef\x29\xe2\x29\x1b\
\xa6\x34\x4c\xb9\x31\x65\x5c\x6b\xaa\x96\x97\x96\x58\xab\x48\xab\
\x51\xab\x47\xeb\xbd\x36\xae\xed\xa7\x9d\xa6\xbd\x45\xbb\x59\xfb\
\x81\x0e\x41\xc7\x4a\x27\x5c\x27\x47\x67\x8f\xce\x05\x9d\xe7\x53\
\xd9\x53\xdd\xa7\x0a\xa7\x16\x4d\x3d\x3a\xf5\xae\x2e\xaa\x6b\xa5\
\x1b\xa1\xbb\x44\x77\xbf\x6e\xa7\xee\x98\x9e\xbe\x5e\x80\x9e\x4c\
\x6f\xa7\xde\x79\xbd\xe7\xfa\x1c\x7d\x2f\xfd\x54\xfd\x6d\xfa\xa7\
\xf5\x47\x0c\x58\x06\xb3\x0c\x24\x06\xdb\x0c\xce\x18\x3c\xc5\x35\
\x71\x6f\x3c\x1d\x2f\xc7\xdb\xf1\x51\x43\x5d\xc3\x40\x43\xa5\x61\
\x95\x61\x97\xe1\x84\x91\xb9\xd1\x3c\xa3\xd5\x46\x8d\x46\x0f\x8c\
\x69\xc6\x5c\xe3\x24\xe3\x6d\xc6\x6d\xc6\xa3\x26\x06\x26\x21\x26\
\x4b\x4d\xea\x4d\xee\x9a\x52\x4d\xb9\xa6\x29\xa6\x3b\x4c\x3b\x4c\
\xc7\xcd\xcc\xcd\xa2\xcd\xd6\x99\x35\x9b\x3d\x31\xd7\x32\xe7\x9b\
\xe7\x9b\xd7\x9b\xdf\xb7\x60\x5a\x78\x5a\x2c\xb6\xa8\xb6\xb8\x65\
\x49\xb2\xe4\x5a\xa6\x59\xee\xb6\xbc\x6e\x85\x5a\x39\x59\xa5\x58\
\x55\x5a\x5d\xb3\x46\xad\x9d\xad\x25\xd6\xbb\xad\xbb\xa7\x11\xa7\
\xb9\x4e\x93\x4e\xab\x9e\xd6\x67\xc3\xb0\xf1\xb6\xc9\xb6\xa9\xb7\
\x19\xb0\xe5\xd8\x06\xdb\xae\xb6\x6d\xb6\x7d\x61\x67\x62\x17\x67\
\xb7\xc5\xae\xc3\xee\x93\xbd\x93\x7d\xba\x7d\x8d\xfd\x3d\x07\x0d\
\x87\xd9\x0e\xab\x1d\x5a\x1d\x7e\x73\xb4\x72\x14\x3a\x56\x3a\xde\
\x9a\xce\x9c\xee\x3f\x7d\xc5\xf4\x96\xe9\x2f\x67\x58\xcf\x10\xcf\
\xd8\x33\xe3\xb6\x13\xcb\x29\xc4\x69\x9d\x53\x9b\xd3\x47\x67\x17\
\x67\xb9\x73\x83\xf3\x88\x8b\x89\x4b\x82\xcb\x2e\x97\x3e\x2e\x9b\
\x1b\xc6\xdd\xc8\xbd\xe4\x4a\x74\xf5\x71\x5d\xe1\x7a\xd2\xf5\x9d\
\x9b\xb3\x9b\xc2\xed\xa8\xdb\xaf\xee\x36\xee\x69\xee\x87\xdc\x9f\
\xcc\x34\x9f\x29\x9e\x59\x33\x73\xd0\xc3\xc8\x43\xe0\x51\xe5\xd1\
\x3f\x0b\x9f\x95\x30\x6b\xdf\xac\x7e\x4f\x43\x4f\x81\x67\xb5\xe7\
\x23\x2f\x63\x2f\x91\x57\xad\xd7\xb0\xb7\xa5\x77\xaa\xf7\x61\xef\
\x17\x3e\xf6\x3e\x72\x9f\xe3\x3e\xe3\x3c\x37\xde\x32\xde\x59\x5f\
\xcc\x37\xc0\xb7\xc8\xb7\xcb\x4f\xc3\x6f\x9e\x5f\x85\xdf\x43\x7f\
\x23\xff\x64\xff\x7a\xff\xd1\x00\xa7\x80\x25\x01\x67\x03\x89\x81\
\x41\x81\x5b\x02\xfb\xf8\x7a\x7c\x21\xbf\x8e\x3f\x3a\xdb\x65\xf6\
\xb2\xd9\xed\x41\x8c\xa0\xb9\x41\x15\x41\x8f\x82\xad\x82\xe5\xc1\
\xad\x21\x68\xc8\xec\x90\xad\x21\xf7\xe7\x98\xce\x91\xce\x69\x0e\
\x85\x50\x7e\xe8\xd6\xd0\x07\x61\xe6\x61\x8b\xc3\x7e\x0c\x27\x85\
\x87\x85\x57\x86\x3f\x8e\x70\x88\x58\x1a\xd1\x31\x97\x35\x77\xd1\
\xdc\x43\x73\xdf\x44\xfa\x44\x96\x44\xde\x9b\x67\x31\x4f\x39\xaf\
\x2d\x4a\x35\x2a\x3e\xaa\x2e\x6a\x3c\xda\x37\xba\x34\xba\x3f\xc6\
\x2e\x66\x59\xcc\xd5\x58\x9d\x58\x49\x6c\x4b\x1c\x39\x2e\x2a\xae\
\x36\x6e\x6c\xbe\xdf\xfc\xed\xf3\x87\xe2\x9d\xe2\x0b\xe3\x7b\x17\
\x98\x2f\xc8\x5d\x70\x79\xa1\xce\xc2\xf4\x85\xa7\x16\xa9\x2e\x12\
\x2c\x3a\x96\x40\x4c\x88\x4e\x38\x94\xf0\x41\x10\x2a\xa8\x16\x8c\
\x25\xf2\x13\x77\x25\x8e\x0a\x79\xc2\x1d\xc2\x67\x22\x2f\xd1\x36\
\xd1\x88\xd8\x43\x5c\x2a\x1e\x4e\xf2\x48\x2a\x4d\x7a\x92\xec\x91\
\xbc\x35\x79\x24\xc5\x33\xa5\x2c\xe5\xb9\x84\x27\xa9\x90\xbc\x4c\
\x0d\x4c\xdd\x9b\x3a\x9e\x16\x9a\x76\x20\x6d\x32\x3d\x3a\xbd\x31\
\x83\x92\x91\x90\x71\x42\xaa\x21\x4d\x93\xb6\x67\xea\x67\xe6\x66\
\x76\xcb\xac\x65\x85\xb2\xfe\xc5\x6e\x8b\xb7\x2f\x1e\x95\x07\xc9\
\x6b\xb3\x90\xac\x05\x59\x2d\x0a\xb6\x42\xa6\xe8\x54\x5a\x28\xd7\
\x2a\x07\xb2\x67\x65\x57\x66\xbf\xcd\x89\xca\x39\x96\xab\x9e\x2b\
\xcd\xed\xcc\xb3\xca\xdb\x90\x37\x9c\xef\x9f\xff\xed\x12\xc2\x12\
\xe1\x92\xb6\xa5\x86\x4b\x57\x2d\x1d\x58\xe6\xbd\xac\x6a\x39\xb2\
\x3c\x71\x79\xdb\x0a\xe3\x15\x05\x2b\x86\x56\x06\xac\x3c\xb8\x8a\
\xb6\x2a\x6d\xd5\x4f\xab\xed\x57\x97\xae\x7e\xbd\x26\x7a\x4d\x6b\
\x81\x5e\xc1\xca\x82\xc1\xb5\x01\x6b\xeb\x0b\x55\x0a\xe5\x85\x7d\
\xeb\xdc\xd7\xed\x5d\x4f\x58\x2f\x59\xdf\xb5\x61\xfa\x86\x9d\x1b\
\x3e\x15\x89\x8a\xae\x14\xdb\x17\x97\x15\x7f\xd8\x28\xdc\x78\xe5\
\x1b\x87\x6f\xca\xbf\x99\xdc\x94\xb4\xa9\xab\xc4\xb9\x64\xcf\x66\
\xd2\x66\xe9\xe6\xde\x2d\x9e\x5b\x0e\x96\xaa\x97\xe6\x97\x0e\x6e\
\x0d\xd9\xda\xb4\x0d\xdf\x56\xb4\xed\xf5\xf6\x45\xdb\x2f\x97\xcd\
\x28\xdb\xbb\x83\xb6\x43\xb9\xa3\xbf\x3c\xb8\xbc\x65\xa7\xc9\xce\
\xcd\x3b\x3f\x54\xa4\x54\xf4\x54\xfa\x54\x36\xee\xd2\xdd\xb5\x61\
\xd7\xf8\x6e\xd1\xee\x1b\x7b\xbc\xf6\x34\xec\xd5\xdb\x5b\xbc\xf7\
\xfd\x3e\xc9\xbe\xdb\x55\x01\x55\x4d\xd5\x66\xd5\x65\xfb\x49\xfb\
\xb3\xf7\x3f\xae\x89\xaa\xe9\xf8\x96\xfb\x6d\x5d\xad\x4e\x6d\x71\
\xed\xc7\x03\xd2\x03\xfd\x07\x23\x0e\xb6\xd7\xb9\xd4\xd5\x1d\xd2\
\x3d\x54\x52\x8f\xd6\x2b\xeb\x47\x0e\xc7\x1f\xbe\xfe\x9d\xef\x77\
\x2d\x0d\x36\x0d\x55\x8d\x9c\xc6\xe2\x23\x70\x44\x79\xe4\xe9\xf7\
\x09\xdf\xf7\x1e\x0d\x3a\xda\x76\x8c\x7b\xac\xe1\x07\xd3\x1f\x76\
\x1d\x67\x1d\x2f\x6a\x42\x9a\xf2\x9a\x46\x9b\x53\x9a\xfb\x5b\x62\
\x5b\xba\x4f\xcc\x3e\xd1\xd6\xea\xde\x7a\xfc\x47\xdb\x1f\x0f\x9c\
\x34\x3c\x59\x79\x4a\xf3\x54\xc9\x69\xda\xe9\x82\xd3\x93\x67\xf2\
\xcf\x8c\x9d\x95\x9d\x7d\x7e\x2e\xf9\xdc\x60\xdb\xa2\xb6\x7b\xe7\
\x63\xce\xdf\x6a\x0f\x6f\xef\xba\x10\x74\xe1\xd2\x45\xff\x8b\xe7\
\x3b\xbc\x3b\xce\x5c\xf2\xb8\x74\xf2\xb2\xdb\xe5\x13\x57\xb8\x57\
\x9a\xaf\x3a\x5f\x6d\xea\x74\xea\x3c\xfe\x93\xd3\x4f\xc7\xbb\x9c\
\xbb\x9a\xae\xb9\x5c\x6b\xb9\xee\x7a\xbd\xb5\x7b\x66\xf7\xe9\x1b\
\x9e\x37\xce\xdd\xf4\xbd\x79\xf1\x16\xff\xd6\xd5\x9e\x39\x3d\xdd\
\xbd\xf3\x7a\x6f\xf7\xc5\xf7\xf5\xdf\x16\xdd\x7e\x72\x27\xfd\xce\
\xcb\xbb\xd9\x77\x27\xee\xad\xbc\x4f\xbc\x5f\xf4\x40\xed\x41\xd9\
\x43\xdd\x87\xd5\x3f\x5b\xfe\xdc\xd8\xef\xdc\x7f\x6a\xc0\x77\xa0\
\xf3\xd1\xdc\x47\xf7\x06\x85\x83\xcf\xfe\x91\xf5\x8f\x0f\x43\x05\
\x8f\x99\x8f\xcb\x86\x0d\x86\xeb\x9e\x38\x3e\x39\x39\xe2\x3f\x72\
\xfd\xe9\xfc\xa7\x43\xcf\x64\xcf\x26\x9e\x17\xfe\xa2\xfe\xcb\xae\
\x17\x16\x2f\x7e\xf8\xd5\xeb\xd7\xce\xd1\x98\xd1\xa1\x97\xf2\x97\
\x93\xbf\x6d\x7c\xa5\xfd\xea\xc0\xeb\x19\xaf\xdb\xc6\xc2\xc6\x1e\
\xbe\xc9\x78\x33\x31\x5e\xf4\x56\xfb\xed\xc1\x77\xdc\x77\x1d\xef\
\xa3\xdf\x0f\x4f\xe4\x7c\x20\x7f\x28\xff\x68\xf9\xb1\xf5\x53\xd0\
\xa7\xfb\x93\x19\x93\x93\xff\x04\x03\x98\xf3\xfc\x63\x33\x2d\xdb\
\x00\x00\x00\x20\x63\x48\x52\x4d\x00\x00\x7a\x25\x00\x00\x80\x83\
\x00\x00\xf9\xff\x00\x00\x80\xe9\x00\x00\x75\x30\x00\x00\xea\x60\
\x00\x00\x3a\x98\x00\x00\x17\x6f\x92\x5f\xc5\x46\x00\x00\x02\x08\
\x49\x44\x41\x54\x78\xda\x64\x91\x3d\x6b\x14\x41\x18\xc7\x7f\x73\
\xb7\x2c\x6c\x0c\xb9\x20\xa6\x0d\x58\x45\x90\x88\x1f\x40\xb1\x12\
\x2e\x8d\x82\x5f\x41\x08\x58\x05\xb4\xb5\x0c\xd8\x09\xa2\x20\x08\
\x7e\x88\x58\x05\xac\x04\xfb\x08\x56\x42\x40\x48\x9d\xdc\xe5\xf6\
\x66\xe7\x75\x67\xc7\xe2\x19\x72\x07\x0e\xfc\x18\x06\xe6\xff\x32\
\xcf\xa8\x9c\x1f\x00\xb7\x81\x09\x70\x0b\xa8\xf7\x40\x1d\x42\x7a\
\x02\xe1\x21\x78\xc0\xfe\x82\xee\x07\x74\x9f\x41\x9f\x83\x41\xf0\
\xa8\x9c\x1f\x17\x83\x4d\xa0\x7e\x0d\xea\x18\xfa\x46\x84\xae\xe0\
\x01\x0b\x18\x0b\xe6\x2d\x98\xf7\x72\x0e\xa8\x9c\x0f\x80\x49\x0d\
\xf5\x09\xa8\x29\xf4\xe5\x72\x57\x76\x0f\x44\x20\xac\x19\x9a\x53\
\x70\xcf\x21\x84\x11\xd4\x00\x1f\xa1\x9f\x4a\xad\x05\x70\x05\x5c\
\x96\x7d\x06\x5c\x03\xcb\x62\xda\x01\x66\x9a\xb3\x79\x17\x42\x8f\
\xca\xf9\xd9\x3e\x54\x67\x90\xc6\x92\xb8\x28\xe8\x92\x9e\x80\x5c\
\x48\x80\x23\xa5\x88\x31\xa4\x10\xb8\x5f\x41\x38\x84\x38\x96\x6a\
\x4b\x60\x5e\x12\x6d\xa9\x9e\x91\xa5\x80\x9e\x10\x32\xd6\x82\x31\
\x8c\xbd\xe7\x55\x05\x66\x2a\xce\xb6\x18\x2c\xcb\x84\x03\x30\xb0\
\xbe\x62\x14\x71\xd7\x09\xd6\xf2\xa8\x02\xbd\xfb\xff\xe0\x62\x11\
\xe7\x1b\x71\xce\x10\x23\x78\x0f\xc6\xc0\x72\x09\xc6\xb0\x5b\x49\
\x62\xcf\xea\xdb\xe2\xda\xbb\x57\xe2\x94\xa0\xef\xb9\x69\x50\x0c\
\x18\xc1\xf2\x02\xda\x32\x34\x49\xcf\x39\x93\x33\x37\x0c\x83\xa4\
\x5b\x0b\x5a\x43\xdb\x0a\x5d\xc7\xc5\x08\xda\x53\x99\x7a\x4b\x4a\
\x96\x18\x13\x21\x48\x5a\x4a\xab\xda\x5a\xc3\xf5\x35\xcc\x66\x42\
\xdb\x82\xb5\xfc\x54\x29\xb1\xef\x1c\x67\x31\x32\xee\x7b\x49\x04\
\x50\x4a\xf6\x94\xc0\x39\xa9\x7c\x79\x09\x57\x57\xb0\x58\x40\x08\
\xa4\xba\xe6\x5e\x65\x0c\xbf\xad\xe5\x93\x73\x1c\xc5\x28\xc9\xc3\
\xb0\x12\xf7\xbd\xbc\xb5\x6d\x61\x3e\x17\xb1\xf7\x30\x1a\xf1\xa1\
\x69\x38\x57\xb3\x19\x68\x4d\xdd\x75\x9c\x58\xcb\x34\x04\x11\xae\
\xd7\xb7\x56\x0c\xb4\x96\x33\xf0\x6d\x63\x83\x17\x77\xee\x90\xaa\
\x61\x80\x61\x20\xc4\xc8\x81\x73\x1c\x19\xc3\xb1\x73\x6c\x7a\x0f\
\x21\x48\x7d\x6b\x85\x18\xd1\x4a\xf1\xa6\x69\xf8\xb2\xb5\x05\xdb\
\xdb\xa0\xe6\x73\xf9\x96\xb6\x95\x7a\x6d\xcb\x5d\xad\x79\xa9\x35\
\x4f\xad\x65\xcf\x7b\x88\x91\x3f\x29\xf1\x7d\x3c\xe6\x6b\xd3\xf0\
\x77\x32\x81\x9d\x1d\xe1\xdf\x00\x3c\x20\x6c\x94\x21\xaa\x95\x54\
\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\
\x0b\x13\x01\x00\x9a\x9c\x18\x00\x00\x00\x07\x74\x49\x4d\x45\x07\
\xdd\x06\x0d\x08\x1d\x33\x51\xf1\xd4\x9e\x00\x00\x02\x07\x49\x44\
\x41\x54\x38\xcb\x65\x91\x3d\x6b\x14\x41\x18\xc7\x7f\x73\xb7\x2c\
\x6c\x0c\xb9\x20\xa6\x0d\x58\x45\x90\x88\x1f\x40\xb1\x12\x2e\x8d\
\x82\x5f\x41\x08\x58\x05\xb4\xb5\x0c\xd8\x09\xa2\x20\x08\x7e\x88\
\x58\x05\xac\x04\xfb\x08\x56\x42\x40\x48\x9d\xdc\xe5\xf6\x66\xe7\
\x75\x67\xc7\xe2\x19\x72\x07\x0e\xfc\x18\x06\xe6\xff\x32\xcf\xa8\
\x9c\x1f\x00\xb7\x81\x09\x70\x0b\xa8\xf7\x40\x1d\x42\x7a\x02\xe1\
\x21\x78\xc0\xfe\x82\xee\x07\x74\x9f\x41\x9f\x83\x41\xf0\xa8\x9c\
\x1f\x17\x83\x4d\xa0\x7e\x0d\xea\x18\xfa\x46\x84\xae\xe0\x01\x0b\
\x18\x0b\xe6\x2d\x98\xf7\x72\x0e\xa8\x9c\x0f\x80\x49\x0d\xf5\x09\
\xa8\x29\xf4\xe5\x72\x57\x76\x0f\x44\x20\xac\x19\x9a\x53\x70\xcf\
\x21\x84\x11\xd4\x00\x1f\xa1\x9f\x4a\xad\x05\x70\x05\x5c\x96\x7d\
\x06\x5c\x03\xcb\x62\xda\x01\x66\x9a\xb3\x79\x17\x42\x8f\xca\xf9\
\xd9\x3e\x54\x67\x90\xc6\x92\xb8\x28\xe8\x92\x9e\x80\x5c\x48\x80\
\x23\xa5\x88\x31\xa4\x10\xb8\x5f\x41\x38\x84\x38\x96\x6a\x4b\x60\
\x5e\x12\x6d\xa9\x9e\x91\xa5\x80\x9e\x10\x32\xd6\x82\x31\x8c\xbd\
\xe7\x55\x05\x66\x2a\xce\xb6\x18\x2c\xcb\x84\x03\x30\xb0\xbe\x62\
\x14\x71\xd7\x09\xd6\xf2\xa8\x02\xbd\xfb\xff\xe0\x62\x11\xe7\x1b\
\x71\xce\x10\x23\x78\x0f\xc6\xc0\x72\x09\xc6\xb0\x5b\x49\x62\xcf\
\xea\xdb\xe2\xda\xbb\x57\xe2\x94\xa0\xef\xb9\x69\x50\x0c\x18\xc1\
\xf2\x02\xda\x32\x34\x49\xcf\x39\x93\x33\x37\x0c\x83\xa4\x5b\x0b\
\x5a\x43\xdb\x0a\x5d\xc7\xc5\x08\xda\x53\x99\x7a\x4b\x4a\x96\x18\
\x13\x21\x48\x5a\x4a\xab\xda\x5a\xc3\xf5\x35\xcc\x66\x42\xdb\x82\
\xb5\xfc\x54\x29\xb1\xef\x1c\x67\x31\x32\xee\x7b\x49\x04\x50\x4a\
\xf6\x94\xc0\x39\xa9\x7c\x79\x09\x57\x57\xb0\x58\x40\x08\xa4\xba\
\xe6\x5e\x65\x0c\xbf\xad\xe5\x93\x73\x1c\xc5\x28\xc9\xc3\xb0\x12\
\xf7\xbd\xbc\xb5\x6d\x61\x3e\x17\xb1\xf7\x30\x1a\xf1\xa1\x69\x38\
\x57\xb3\x19\x68\x4d\xdd\x75\x9c\x58\xcb\x34\x04\x11\xae\xd7\xb7\
\x56\x0c\xb4\x96\x33\xf0\x6d\x63\x83\x17\x77\xee\x90\xaa\x61\x80\
\x61\x20\xc4\xc8\x81\x73\x1c\x19\xc3\xb1\x73\x6c\x7a\x0f\x21\x48\
\x7d\x6b\x85\x18\xd1\x4a\xf1\xa6\x69\xf8\xb2\xb5\x05\xdb\xdb\xa0\
\xe6\x73\xf9\x96\xb6\x95\x7a\x6d\xcb\x5d\xad\x79\xa9\x35\x4f\xad\
\x65\xcf\x7b\x88\x91\x3f\x29\xf1\x7d\x3c\xe6\x6b\xd3\xf0\x77\x32\
\x81\x9d\x1d\xe1\x1f\x3c\x20\x6c\x94\x65\x65\x77\x27\x00\x00\x00\
\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x03\x37\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@ -626,234 +309,71 @@ qt_resource_data = "\
\xe3\xf6\x5a\x27\x1b\x9e\x98\xc0\x6f\x01\x06\x00\x48\xae\x45\x78\
\x60\x4e\x1f\xe2\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\
\x00\x00\x0e\x12\
\x00\x00\x03\xef\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x0a\x4d\x69\x43\x43\x50\x50\x68\x6f\
\x74\x6f\x73\x68\x6f\x70\x20\x49\x43\x43\x20\x70\x72\x6f\x66\x69\
\x6c\x65\x00\x00\x78\xda\x9d\x53\x77\x58\x93\xf7\x16\x3e\xdf\xf7\
\x65\x0f\x56\x42\xd8\xf0\xb1\x97\x6c\x81\x00\x22\x23\xac\x08\xc8\
\x10\x59\xa2\x10\x92\x00\x61\x84\x10\x12\x40\xc5\x85\x88\x0a\x56\
\x14\x15\x11\x9c\x48\x55\xc4\x82\xd5\x0a\x48\x9d\x88\xe2\xa0\x28\
\xb8\x67\x41\x8a\x88\x5a\x8b\x55\x5c\x38\xee\x1f\xdc\xa7\xb5\x7d\
\x7a\xef\xed\xed\xfb\xd7\xfb\xbc\xe7\x9c\xe7\xfc\xce\x79\xcf\x0f\
\x80\x11\x12\x26\x91\xe6\xa2\x6a\x00\x39\x52\x85\x3c\x3a\xd8\x1f\
\x8f\x4f\x48\xc4\xc9\xbd\x80\x02\x15\x48\xe0\x04\x20\x10\xe6\xcb\
\xc2\x67\x05\xc5\x00\x00\xf0\x03\x79\x78\x7e\x74\xb0\x3f\xfc\x01\
\xaf\x6f\x00\x02\x00\x70\xd5\x2e\x24\x12\xc7\xe1\xff\x83\xba\x50\
\x26\x57\x00\x20\x91\x00\xe0\x22\x12\xe7\x0b\x01\x90\x52\x00\xc8\
\x2e\x54\xc8\x14\x00\xc8\x18\x00\xb0\x53\xb3\x64\x0a\x00\x94\x00\
\x00\x6c\x79\x7c\x42\x22\x00\xaa\x0d\x00\xec\xf4\x49\x3e\x05\x00\
\xd8\xa9\x93\xdc\x17\x00\xd8\xa2\x1c\xa9\x08\x00\x8d\x01\x00\x99\
\x28\x47\x24\x02\x40\xbb\x00\x60\x55\x81\x52\x2c\x02\xc0\xc2\x00\
\xa0\xac\x40\x22\x2e\x04\xc0\xae\x01\x80\x59\xb6\x32\x47\x02\x80\
\xbd\x05\x00\x76\x8e\x58\x90\x0f\x40\x60\x00\x80\x99\x42\x2c\xcc\
\x00\x20\x38\x02\x00\x43\x1e\x13\xcd\x03\x20\x4c\x03\xa0\x30\xd2\
\xbf\xe0\xa9\x5f\x70\x85\xb8\x48\x01\x00\xc0\xcb\x95\xcd\x97\x4b\
\xd2\x33\x14\xb8\x95\xd0\x1a\x77\xf2\xf0\xe0\xe2\x21\xe2\xc2\x6c\
\xb1\x42\x61\x17\x29\x10\x66\x09\xe4\x22\x9c\x97\x9b\x23\x13\x48\
\xe7\x03\x4c\xce\x0c\x00\x00\x1a\xf9\xd1\xc1\xfe\x38\x3f\x90\xe7\
\xe6\xe4\xe1\xe6\x66\xe7\x6c\xef\xf4\xc5\xa2\xfe\x6b\xf0\x6f\x22\
\x3e\x21\xf1\xdf\xfe\xbc\x8c\x02\x04\x00\x10\x4e\xcf\xef\xda\x5f\
\xe5\xe5\xd6\x03\x70\xc7\x01\xb0\x75\xbf\x6b\xa9\x5b\x00\xda\x56\
\x00\x68\xdf\xf9\x5d\x33\xdb\x09\xa0\x5a\x0a\xd0\x7a\xf9\x8b\x79\
\x38\xfc\x40\x1e\x9e\xa1\x50\xc8\x3c\x1d\x1c\x0a\x0b\x0b\xed\x25\
\x62\xa1\xbd\x30\xe3\x8b\x3e\xff\x33\xe1\x6f\xe0\x8b\x7e\xf6\xfc\
\x40\x1e\xfe\xdb\x7a\xf0\x00\x71\x9a\x40\x99\xad\xc0\xa3\x83\xfd\
\x71\x61\x6e\x76\xae\x52\x8e\xe7\xcb\x04\x42\x31\x6e\xf7\xe7\x23\
\xfe\xc7\x85\x7f\xfd\x8e\x29\xd1\xe2\x34\xb1\x5c\x2c\x15\x8a\xf1\
\x58\x89\xb8\x50\x22\x4d\xc7\x79\xb9\x52\x91\x44\x21\xc9\x95\xe2\
\x12\xe9\x7f\x32\xf1\x1f\x96\xfd\x09\x93\x77\x0d\x00\xac\x86\x4f\
\xc0\x4e\xb6\x07\xb5\xcb\x6c\xc0\x7e\xee\x01\x02\x8b\x0e\x58\xd2\
\x76\x00\x40\x7e\xf3\x2d\x8c\x1a\x0b\x91\x00\x10\x67\x34\x32\x79\
\xf7\x00\x00\x93\xbf\xf9\x8f\x40\x2b\x01\x00\xcd\x97\xa4\xe3\x00\
\x00\xbc\xe8\x18\x5c\xa8\x94\x17\x4c\xc6\x08\x00\x00\x44\xa0\x81\
\x2a\xb0\x41\x07\x0c\xc1\x14\xac\xc0\x0e\x9c\xc1\x1d\xbc\xc0\x17\
\x02\x61\x06\x44\x40\x0c\x24\xc0\x3c\x10\x42\x06\xe4\x80\x1c\x0a\
\xa1\x18\x96\x41\x19\x54\xc0\x3a\xd8\x04\xb5\xb0\x03\x1a\xa0\x11\
\x9a\xe1\x10\xb4\xc1\x31\x38\x0d\xe7\xe0\x12\x5c\x81\xeb\x70\x17\
\x06\x60\x18\x9e\xc2\x18\xbc\x86\x09\x04\x41\xc8\x08\x13\x61\x21\
\x3a\x88\x11\x62\x8e\xd8\x22\xce\x08\x17\x99\x8e\x04\x22\x61\x48\
\x34\x92\x80\xa4\x20\xe9\x88\x14\x51\x22\xc5\xc8\x72\xa4\x02\xa9\
\x42\x6a\x91\x5d\x48\x23\xf2\x2d\x72\x14\x39\x8d\x5c\x40\xfa\x90\
\xdb\xc8\x20\x32\x8a\xfc\x8a\xbc\x47\x31\x94\x81\xb2\x51\x03\xd4\
\x02\x75\x40\xb9\xa8\x1f\x1a\x8a\xc6\xa0\x73\xd1\x74\x34\x0f\x5d\
\x80\x96\xa2\x6b\xd1\x1a\xb4\x1e\x3d\x80\xb6\xa2\xa7\xd1\x4b\xe8\
\x75\x74\x00\x7d\x8a\x8e\x63\x80\xd1\x31\x0e\x66\x8c\xd9\x61\x5c\
\x8c\x87\x45\x60\x89\x58\x1a\x26\xc7\x16\x63\xe5\x58\x35\x56\x8f\
\x35\x63\x1d\x58\x37\x76\x15\x1b\xc0\x9e\x61\xef\x08\x24\x02\x8b\
\x80\x13\xec\x08\x5e\x84\x10\xc2\x6c\x82\x90\x90\x47\x58\x4c\x58\
\x43\xa8\x25\xec\x23\xb4\x12\xba\x08\x57\x09\x83\x84\x31\xc2\x27\
\x22\x93\xa8\x4f\xb4\x25\x7a\x12\xf9\xc4\x78\x62\x3a\xb1\x90\x58\
\x46\xac\x26\xee\x21\x1e\x21\x9e\x25\x5e\x27\x0e\x13\x5f\x93\x48\
\x24\x0e\xc9\x92\xe4\x4e\x0a\x21\x25\x90\x32\x49\x0b\x49\x6b\x48\
\xdb\x48\x2d\xa4\x53\xa4\x3e\xd2\x10\x69\x9c\x4c\x26\xeb\x90\x6d\
\xc9\xde\xe4\x08\xb2\x80\xac\x20\x97\x91\xb7\x90\x0f\x90\x4f\x92\
\xfb\xc9\xc3\xe4\xb7\x14\x3a\xc5\x88\xe2\x4c\x09\xa2\x24\x52\xa4\
\x94\x12\x4a\x35\x65\x3f\xe5\x04\xa5\x9f\x32\x42\x99\xa0\xaa\x51\
\xcd\xa9\x9e\xd4\x08\xaa\x88\x3a\x9f\x5a\x49\x6d\xa0\x76\x50\x2f\
\x53\x87\xa9\x13\x34\x75\x9a\x25\xcd\x9b\x16\x43\xcb\xa4\x2d\xa3\
\xd5\xd0\x9a\x69\x67\x69\xf7\x68\x2f\xe9\x74\xba\x09\xdd\x83\x1e\
\x45\x97\xd0\x97\xd2\x6b\xe8\x07\xe9\xe7\xe9\x83\xf4\x77\x0c\x0d\
\x86\x0d\x83\xc7\x48\x62\x28\x19\x6b\x19\x7b\x19\xa7\x18\xb7\x19\
\x2f\x99\x4c\xa6\x05\xd3\x97\x99\xc8\x54\x30\xd7\x32\x1b\x99\x67\
\x98\x0f\x98\x6f\x55\x58\x2a\xf6\x2a\x7c\x15\x91\xca\x12\x95\x3a\
\x95\x56\x95\x7e\x95\xe7\xaa\x54\x55\x73\x55\x3f\xd5\x79\xaa\x0b\
\x54\xab\x55\x0f\xab\x5e\x56\x7d\xa6\x46\x55\xb3\x50\xe3\xa9\x09\
\xd4\x16\xab\xd5\xa9\x1d\x55\xbb\xa9\x36\xae\xce\x52\x77\x52\x8f\
\x50\xcf\x51\x5f\xa3\xbe\x5f\xfd\x82\xfa\x63\x0d\xb2\x86\x85\x46\
\xa0\x86\x48\xa3\x54\x63\xb7\xc6\x19\x8d\x21\x16\xc6\x32\x65\xf1\
\x58\x42\xd6\x72\x56\x03\xeb\x2c\x6b\x98\x4d\x62\x5b\xb2\xf9\xec\
\x4c\x76\x05\xfb\x1b\x76\x2f\x7b\x4c\x53\x43\x73\xaa\x66\xac\x66\
\x91\x66\x9d\xe6\x71\xcd\x01\x0e\xc6\xb1\xe0\xf0\x39\xd9\x9c\x4a\
\xce\x21\xce\x0d\xce\x7b\x2d\x03\x2d\x3f\x2d\xb1\xd6\x6a\xad\x66\
\xad\x7e\xad\x37\xda\x7a\xda\xbe\xda\x62\xed\x72\xed\x16\xed\xeb\
\xda\xef\x75\x70\x9d\x40\x9d\x2c\x9d\xf5\x3a\x6d\x3a\xf7\x75\x09\
\xba\x36\xba\x51\xba\x85\xba\xdb\x75\xcf\xea\x3e\xd3\x63\xeb\x79\
\xe9\x09\xf5\xca\xf5\x0e\xe9\xdd\xd1\x47\xf5\x6d\xf4\xa3\xf5\x17\
\xea\xef\xd6\xef\xd1\x1f\x37\x30\x34\x08\x36\x90\x19\x6c\x31\x38\
\x63\xf0\xcc\x90\x63\xe8\x6b\x98\x69\xb8\xd1\xf0\x84\xe1\xa8\x11\
\xcb\x68\xba\x91\xc4\x68\xa3\xd1\x49\xa3\x27\xb8\x26\xee\x87\x67\
\xe3\x35\x78\x17\x3e\x66\xac\x6f\x1c\x62\xac\x34\xde\x65\xdc\x6b\
\x3c\x61\x62\x69\x32\xdb\xa4\xc4\xa4\xc5\xe4\xbe\x29\xcd\x94\x6b\
\x9a\x66\xba\xd1\xb4\xd3\x74\xcc\xcc\xc8\x2c\xdc\xac\xd8\xac\xc9\
\xec\x8e\x39\xd5\x9c\x6b\x9e\x61\xbe\xd9\xbc\xdb\xfc\x8d\x85\xa5\
\x45\x9c\xc5\x4a\x8b\x36\x8b\xc7\x96\xda\x96\x7c\xcb\x05\x96\x4d\
\x96\xf7\xac\x98\x56\x3e\x56\x79\x56\xf5\x56\xd7\xac\x49\xd6\x5c\
\xeb\x2c\xeb\x6d\xd6\x57\x6c\x50\x1b\x57\x9b\x0c\x9b\x3a\x9b\xcb\
\xb6\xa8\xad\x9b\xad\xc4\x76\x9b\x6d\xdf\x14\xe2\x14\x8f\x29\xd2\
\x29\xf5\x53\x6e\xda\x31\xec\xfc\xec\x0a\xec\x9a\xec\x06\xed\x39\
\xf6\x61\xf6\x25\xf6\x6d\xf6\xcf\x1d\xcc\x1c\x12\x1d\xd6\x3b\x74\
\x3b\x7c\x72\x74\x75\xcc\x76\x6c\x70\xbc\xeb\xa4\xe1\x34\xc3\xa9\
\xc4\xa9\xc3\xe9\x57\x67\x1b\x67\xa1\x73\x9d\xf3\x35\x17\xa6\x4b\
\x90\xcb\x12\x97\x76\x97\x17\x53\x6d\xa7\x8a\xa7\x6e\x9f\x7a\xcb\
\x95\xe5\x1a\xee\xba\xd2\xb5\xd3\xf5\xa3\x9b\xbb\x9b\xdc\xad\xd9\
\x6d\xd4\xdd\xcc\x3d\xc5\x7d\xab\xfb\x4d\x2e\x9b\x1b\xc9\x5d\xc3\
\x3d\xef\x41\xf4\xf0\xf7\x58\xe2\x71\xcc\xe3\x9d\xa7\x9b\xa7\xc2\
\xf3\x90\xe7\x2f\x5e\x76\x5e\x59\x5e\xfb\xbd\x1e\x4f\xb3\x9c\x26\
\x9e\xd6\x30\x6d\xc8\xdb\xc4\x5b\xe0\xbd\xcb\x7b\x60\x3a\x3e\x3d\
\x65\xfa\xce\xe9\x03\x3e\xc6\x3e\x02\x9f\x7a\x9f\x87\xbe\xa6\xbe\
\x22\xdf\x3d\xbe\x23\x7e\xd6\x7e\x99\x7e\x07\xfc\x9e\xfb\x3b\xfa\
\xcb\xfd\x8f\xf8\xbf\xe1\x79\xf2\x16\xf1\x4e\x05\x60\x01\xc1\x01\
\xe5\x01\xbd\x81\x1a\x81\xb3\x03\x6b\x03\x1f\x04\x99\x04\xa5\x07\
\x35\x05\x8d\x05\xbb\x06\x2f\x0c\x3e\x15\x42\x0c\x09\x0d\x59\x1f\
\x72\x93\x6f\xc0\x17\xf2\x1b\xf9\x63\x33\xdc\x67\x2c\x9a\xd1\x15\
\xca\x08\x9d\x15\x5a\x1b\xfa\x30\xcc\x26\x4c\x1e\xd6\x11\x8e\x86\
\xcf\x08\xdf\x10\x7e\x6f\xa6\xf9\x4c\xe9\xcc\xb6\x08\x88\xe0\x47\
\x6c\x88\xb8\x1f\x69\x19\x99\x17\xf9\x7d\x14\x29\x2a\x32\xaa\x2e\
\xea\x51\xb4\x53\x74\x71\x74\xf7\x2c\xd6\xac\xe4\x59\xfb\x67\xbd\
\x8e\xf1\x8f\xa9\x8c\xb9\x3b\xdb\x6a\xb6\x72\x76\x67\xac\x6a\x6c\
\x52\x6c\x63\xec\x9b\xb8\x80\xb8\xaa\xb8\x81\x78\x87\xf8\x45\xf1\
\x97\x12\x74\x13\x24\x09\xed\x89\xe4\xc4\xd8\xc4\x3d\x89\xe3\x73\
\x02\xe7\x6c\x9a\x33\x9c\xe4\x9a\x54\x96\x74\x63\xae\xe5\xdc\xa2\
\xb9\x17\xe6\xe9\xce\xcb\x9e\x77\x3c\x59\x35\x59\x90\x7c\x38\x85\
\x98\x12\x97\xb2\x3f\xe5\x83\x20\x42\x50\x2f\x18\x4f\xe5\xa7\x6e\
\x4d\x1d\x13\xf2\x84\x9b\x85\x4f\x45\xbe\xa2\x8d\xa2\x51\xb1\xb7\
\xb8\x4a\x3c\x92\xe6\x9d\x56\x95\xf6\x38\xdd\x3b\x7d\x43\xfa\x68\
\x86\x4f\x46\x75\xc6\x33\x09\x4f\x52\x2b\x79\x91\x19\x92\xb9\x23\
\xf3\x4d\x56\x44\xd6\xde\xac\xcf\xd9\x71\xd9\x2d\x39\x94\x9c\x94\
\x9c\xa3\x52\x0d\x69\x96\xb4\x2b\xd7\x30\xb7\x28\xb7\x4f\x66\x2b\
\x2b\x93\x0d\xe4\x79\xe6\x6d\xca\x1b\x93\x87\xca\xf7\xe4\x23\xf9\
\x73\xf3\xdb\x15\x6c\x85\x4c\xd1\xa3\xb4\x52\xae\x50\x0e\x16\x4c\
\x2f\xa8\x2b\x78\x5b\x18\x5b\x78\xb8\x48\xbd\x48\x5a\xd4\x33\xdf\
\x66\xfe\xea\xf9\x23\x0b\x82\x16\x7c\xbd\x90\xb0\x50\xb8\xb0\xb3\
\xd8\xb8\x78\x59\xf1\xe0\x22\xbf\x45\xbb\x16\x23\x8b\x53\x17\x77\
\x2e\x31\x5d\x52\xba\x64\x78\x69\xf0\xd2\x7d\xcb\x68\xcb\xb2\x96\
\xfd\x50\xe2\x58\x52\x55\xf2\x6a\x79\xdc\xf2\x8e\x52\x83\xd2\xa5\
\xa5\x43\x2b\x82\x57\x34\x95\xa9\x94\xc9\xcb\x6e\xae\xf4\x5a\xb9\
\x63\x15\x61\x95\x64\x55\xef\x6a\x97\xd5\x5b\x56\x7f\x2a\x17\x95\
\x5f\xac\x70\xac\xa8\xae\xf8\xb0\x46\xb8\xe6\xe2\x57\x4e\x5f\xd5\
\x7c\xf5\x79\x6d\xda\xda\xde\x4a\xb7\xca\xed\xeb\x48\xeb\xa4\xeb\
\x6e\xac\xf7\x59\xbf\xaf\x4a\xbd\x6a\x41\xd5\xd0\x86\xf0\x0d\xad\
\x1b\xf1\x8d\xe5\x1b\x5f\x6d\x4a\xde\x74\xa1\x7a\x6a\xf5\x8e\xcd\
\xb4\xcd\xca\xcd\x03\x35\x61\x35\xed\x5b\xcc\xb6\xac\xdb\xf2\xa1\
\x36\xa3\xf6\x7a\x9d\x7f\x5d\xcb\x56\xfd\xad\xab\xb7\xbe\xd9\x26\
\xda\xd6\xbf\xdd\x77\x7b\xf3\x0e\x83\x1d\x15\x3b\xde\xef\x94\xec\
\xbc\xb5\x2b\x78\x57\x6b\xbd\x45\x7d\xf5\x6e\xd2\xee\x82\xdd\x8f\
\x1a\x62\x1b\xba\xbf\xe6\x7e\xdd\xb8\x47\x77\x4f\xc5\x9e\x8f\x7b\
\xa5\x7b\x07\xf6\x45\xef\xeb\x6a\x74\x6f\x6c\xdc\xaf\xbf\xbf\xb2\
\x09\x6d\x52\x36\x8d\x1e\x48\x3a\x70\xe5\x9b\x80\x6f\xda\x9b\xed\
\x9a\x77\xb5\x70\x5a\x2a\x0e\xc2\x41\xe5\xc1\x27\xdf\xa6\x7c\x7b\
\xe3\x50\xe8\xa1\xce\xc3\xdc\xc3\xcd\xdf\x99\x7f\xb7\xf5\x08\xeb\
\x48\x79\x2b\xd2\x3a\xbf\x75\xac\x2d\xa3\x6d\xa0\x3d\xa1\xbd\xef\
\xe8\x8c\xa3\x9d\x1d\x5e\x1d\x47\xbe\xb7\xff\x7e\xef\x31\xe3\x63\
\x75\xc7\x35\x8f\x57\x9e\xa0\x9d\x28\x3d\xf1\xf9\xe4\x82\x93\xe3\
\xa7\x64\xa7\x9e\x9d\x4e\x3f\x3d\xd4\x99\xdc\x79\xf7\x4c\xfc\x99\
\x6b\x5d\x51\x5d\xbd\x67\x43\xcf\x9e\x3f\x17\x74\xee\x4c\xb7\x5f\
\xf7\xc9\xf3\xde\xe7\x8f\x5d\xf0\xbc\x70\xf4\x22\xf7\x62\xdb\x25\
\xb7\x4b\xad\x3d\xae\x3d\x47\x7e\x70\xfd\xe1\x48\xaf\x5b\x6f\xeb\
\x65\xf7\xcb\xed\x57\x3c\xae\x74\xf4\x4d\xeb\x3b\xd1\xef\xd3\x7f\
\xfa\x6a\xc0\xd5\x73\xd7\xf8\xd7\x2e\x5d\x9f\x79\xbd\xef\xc6\xec\
\x1b\xb7\x6e\x26\xdd\x1c\xb8\x25\xba\xf5\xf8\x76\xf6\xed\x17\x77\
\x0a\xee\x4c\xdc\x5d\x7a\x8f\x78\xaf\xfc\xbe\xda\xfd\xea\x07\xfa\
\x0f\xea\x7f\xb4\xfe\xb1\x65\xc0\x6d\xe0\xf8\x60\xc0\x60\xcf\xc3\
\x59\x0f\xef\x0e\x09\x87\x9e\xfe\x94\xff\xd3\x87\xe1\xd2\x47\xcc\
\x47\xd5\x23\x46\x23\x8d\x8f\x9d\x1f\x1f\x1b\x0d\x1a\xbd\xf2\x64\
\xce\x93\xe1\xa7\xb2\xa7\x13\xcf\xca\x7e\x56\xff\x79\xeb\x73\xab\
\xe7\xdf\xfd\xe2\xfb\x4b\xcf\x58\xfc\xd8\xf0\x0b\xf9\x8b\xcf\xbf\
\xae\x79\xa9\xf3\x72\xef\xab\xa9\xaf\x3a\xc7\x23\xc7\x1f\xbc\xce\
\x79\x3d\xf1\xa6\xfc\xad\xce\xdb\x7d\xef\xb8\xef\xba\xdf\xc7\xbd\
\x1f\x99\x28\xfc\x40\xfe\x50\xf3\xd1\xfa\x63\xc7\xa7\xd0\x4f\xf7\
\x3e\xe7\x7c\xfe\xfc\x2f\xf7\x84\xf3\xfb\x25\xd2\x9f\x33\x00\x00\
\x00\x20\x63\x48\x52\x4d\x00\x00\x7a\x25\x00\x00\x80\x83\x00\x00\
\xf9\xff\x00\x00\x80\xe9\x00\x00\x75\x30\x00\x00\xea\x60\x00\x00\
\x3a\x98\x00\x00\x17\x6f\x92\x5f\xc5\x46\x00\x00\x03\x3f\x49\x44\
\x41\x54\x78\xda\x4c\x92\x4b\x68\x5c\x75\x18\xc5\xcf\xff\x75\xdf\
\x33\xf7\xde\xb9\x33\xf7\xde\x98\xa1\x8c\x21\xf8\x00\xd1\x85\x9b\
\xd6\xae\xdc\x58\x17\x6e\xa2\xa4\xc1\xfa\x44\x70\x63\x45\xea\x2e\
\xfb\x62\xa5\xa0\xae\xc4\x8d\xe0\x42\x17\x2e\x4a\xc1\x95\x88\xa5\
\x14\xc1\xd2\xa6\x55\x92\x51\x5a\xd3\x26\xa9\xe9\xb4\x99\x99\x66\
\x26\xce\x4c\xe7\x79\x1f\xf3\xbf\x2e\x94\x34\x67\x75\x16\x87\x1f\
\xe7\xfb\x38\x24\x4d\x53\x00\x40\x96\x65\x20\x84\x20\xcb\x32\x00\
\x00\xa5\x14\x8d\xc6\x83\x57\xaa\xd5\x3f\x4e\xfb\x81\x2f\xc2\xd0\
\x5f\x73\x5d\xf7\x73\x55\x51\x56\x0f\xe6\xc8\x41\x00\x00\x46\x08\
\xc9\x08\x21\x32\x8e\xe3\xb9\x2b\x57\xaf\xfd\xa9\xaa\xaa\xe1\x07\
\x45\x38\x8e\x03\x53\x37\x92\xf1\x78\xfc\xb5\x65\x99\xa7\x18\xe3\
\x49\x96\x49\x50\x3c\x52\x9e\x10\x22\x00\x48\x42\x29\x6e\xdc\x5c\
\xff\x0a\x80\x51\xf0\x5c\x28\x8a\x02\xce\x39\x54\x55\x15\xae\xeb\
\x7e\xd0\x6a\xb7\x7f\x89\xa2\xa8\xc8\xb9\xd8\x07\x10\x42\xc8\x08\
\xc0\x84\x31\x86\x8d\xdb\x1b\xcb\xad\x56\xeb\x98\xe7\x15\xa0\x69\
\x2a\x74\x43\x87\xae\xe9\x20\x20\x88\xa2\x09\xea\x8d\xe6\x91\x1b\
\x37\xff\xfa\x22\x4d\x13\x8b\xff\x0f\xc8\x00\xa4\x8c\x31\x74\x3a\
\xdd\x23\x1b\x9b\x5b\xa7\x83\x20\x80\x61\xe8\x50\x55\x15\x86\x66\
\x40\x70\x8e\xa9\x94\xb8\xb7\xb3\x83\x6e\xb7\x07\x02\xf2\x5a\xad\
\xb6\x73\xfe\xe0\x09\x88\xa2\xc8\x5f\xab\x56\xbf\xb5\x6d\x87\xe7\
\xf2\x39\xa8\x9a\x0a\x5d\xd7\xa1\x08\x01\x00\xe8\xf6\x3a\xa8\xd7\
\x9b\x20\x20\xb0\x6d\x1b\x42\x08\xc2\xef\xef\xd4\x1f\x7d\xbd\xd9\
\x3c\x1b\xc7\xd3\xf9\x30\x70\xa1\xa9\x0a\x54\x55\x85\xae\x68\x60\
\x8c\x21\x8e\x63\xd4\x6a\xf7\x30\x19\x4f\x60\x18\x3a\x2a\x95\x43\
\xdf\x15\x3d\xef\x02\xef\x76\x7b\xa0\x84\x82\x10\xf2\xf6\x5e\x7b\
\xef\xdd\x72\xb9\x0c\x45\x15\x10\x8a\x80\xa6\x69\x60\x9c\x21\xcb\
\x32\x34\x9b\x4d\xb4\x5a\x7b\x60\x8c\xc1\x76\xec\x5d\xca\xe8\x72\
\xaf\xff\x70\xc8\x85\xe0\x20\x40\x71\x6b\xeb\xce\x19\xc3\x34\x10\
\x84\x25\xe4\x72\x39\xa4\x69\x0a\xc1\x05\x08\x21\x18\x0c\x06\xd8\
\xbe\x7b\x17\x52\x4a\x38\x8e\x83\xf1\x68\x7c\xaa\x56\xab\x75\x01\
\x80\xef\x3e\xd8\x3d\x7c\xee\xdc\xf9\x2f\x57\x56\xae\xcf\x52\x4a\
\x30\x33\x3b\x83\xd7\x97\x96\xb0\xb8\xf8\xea\x7e\xf5\x3b\xdb\xdb\
\xe8\xf7\x87\x28\x14\x0a\x98\xca\xf4\xa7\x5e\xaf\xfb\xbd\xe3\x38\
\x08\xc3\x10\xf4\xd6\xfa\xed\x17\xd6\x56\xab\xcf\x4f\xd3\x14\x9d\
\x4e\x17\x2b\x57\xaf\xe1\xe4\x87\x1f\xe1\xf8\xd2\x1b\xd8\xdc\xdc\
\x42\x1c\xc7\x68\xd4\x1b\x30\x2d\x13\xba\xae\x65\xc3\xc1\x70\xd9\
\x34\x4d\x54\x2a\x15\xd8\xb6\x0d\xea\x07\xc1\x8f\xf3\xf3\xf3\xab\
\x9c\x73\xe4\x2c\x0b\x9e\x5b\x40\xd1\xf3\x70\xf9\xd7\xcb\x58\x3c\
\x7e\x02\x17\x2f\x5d\x82\x65\xe5\xe0\xba\x0e\xc6\x93\xf1\x37\x32\
\x93\x55\xc7\x71\xa1\x2a\x0a\x92\x24\x01\xcd\xdb\xf9\xf5\x63\x2f\
\xbf\x74\xd2\xb6\xed\x11\xe7\x1c\xa6\x69\xc2\x34\x4c\x84\x41\x88\
\xc1\xc3\x3e\xce\x7e\xfa\x19\x28\x25\x10\x82\x8f\xa4\x9c\x7e\x62\
\x18\x3a\xa2\x68\x02\x99\x65\x10\x42\x80\x66\x99\xc4\x63\xb3\x33\
\x57\x16\x16\x16\x4e\x94\x4a\xa5\x1e\xe7\x1c\x86\x61\xc0\xb2\x2c\
\x78\x9e\x87\xce\x3f\x1d\xfc\x76\xfd\x77\x48\x39\x3d\xc3\x39\xff\
\xdb\xb6\x6d\x3c\xf5\xc4\x93\x70\x6d\x07\xae\xed\x80\xbd\xf5\xe6\
\x3b\x90\x53\x09\xcf\xf3\x6e\xf9\x81\xff\x43\x92\x24\x4f\x27\x69\
\x32\x4b\x40\x38\xa5\x14\x9c\x0b\x94\x0f\x95\xb7\x9f\x7d\xee\x99\
\xf7\x28\x65\xd1\x5c\xe5\x71\xe4\x72\xb9\xfd\xf1\x91\x0b\x3f\x5f\
\xfc\xcf\x50\xc2\x06\xc3\xd1\xb4\xdf\x1f\xa0\x5e\xaf\xcf\xb5\xdb\
\x7b\xef\xa7\x69\xf2\xa2\xef\xfb\x8d\xa3\x47\x0f\x7f\x6c\x3b\xf9\
\xed\x30\x08\xe0\x97\x7c\x48\x29\xf7\x01\xff\x0e\x00\x87\x7e\x46\
\xf6\x00\xdd\xdd\x70\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\
\x82\
\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x01\x68\xf4\xcf\xf7\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\
\x0b\x13\x01\x00\x9a\x9c\x18\x00\x00\x03\x8f\x49\x44\x41\x54\x38\
\xcb\x3d\x91\xdf\x4f\x5b\x75\x00\xc5\xcf\xf7\x7e\x2f\xb4\xbd\xb7\
\xdc\x76\x8c\xfe\x80\x5b\xe4\x87\x73\xcc\x84\x8c\x9f\x0d\x83\x25\
\x2e\x6e\x3e\x8c\x44\xb3\x64\x66\x21\x6a\x62\x8c\xba\x68\xa6\x0f\
\xea\x93\x0f\x26\x8b\x0f\xc6\x7f\xc0\x44\x97\xc5\x2c\x53\x5f\xdc\
\xe2\xa3\xc8\xa0\xb0\x1f\x22\x14\xc1\x6d\x08\x6d\x2d\x90\x51\xda\
\x4b\x27\x3f\xd6\x52\xee\xbd\x50\x7a\xbf\xbd\x5f\x1f\x10\x5e\x4f\
\xce\x39\xf9\xe4\x1c\xca\x18\x43\x4f\x4f\xdf\x23\xc4\xe2\x09\x30\
\xc6\x38\xb1\x2c\x0b\x00\x20\xe6\xb6\xf2\x7c\xf9\xc9\x0a\x08\x63\
\x0c\xdb\xdb\x7a\x6f\xb1\x54\x9c\x30\x0c\x03\x88\x8c\xde\x43\xb8\
\xbb\x8f\xf7\xf6\xbe\xc4\x1f\x8c\xff\x0e\x58\x96\x85\x72\xb9\x8c\
\x8c\xa6\xfd\x64\x59\x16\xc0\x18\xc3\xf4\xcc\x43\x5e\x2e\x97\xf9\
\x48\x64\xcc\xa4\xe1\x70\x8f\xd6\x15\xee\x54\xa2\xd1\x28\x8e\x54\
\x7b\x2b\x71\xee\xec\x79\xb3\xed\x64\x37\x9f\x8b\xcd\x9b\x1b\xcf\
\x36\xf7\x23\x96\x65\x29\x8c\x31\xcc\xfc\xf5\x68\x28\x91\x4c\xf2\
\x7c\x61\x8b\xdb\xb6\xcd\x4d\xd3\xac\x21\xa9\x95\x34\x04\x41\x40\
\x3c\x9e\xe4\x27\x4e\x1c\x43\xd0\x1f\x00\x07\xc7\xfd\x07\xe3\xe8\
\xec\x6c\xbf\x86\xef\xbe\xbd\xfe\x59\x7b\x5b\x98\x07\x82\xf5\xfc\
\xe2\xeb\x03\x5c\xd7\x75\x3e\x7a\xf7\x1e\x1f\x1e\x89\xb4\x65\xff\
\x7d\x0a\x32\x3c\x3c\x06\x70\xe0\xe7\x5b\xb7\x22\xa9\xe5\xd4\x39\
\xc3\x30\x71\xe3\x87\x6b\xde\x50\x5d\xa8\x20\xcb\xf2\x3e\xc3\xff\
\x1c\xd0\xb4\xec\xab\xd3\x33\x0f\xe7\x0d\xd3\xec\x38\xd0\x0e\x0c\
\x4e\x9b\x73\x8c\xdd\xbd\xcf\x57\x32\x69\x5e\x2e\x97\xb9\xb6\xaa\
\x4d\x70\xce\x21\x02\x00\xa5\xb4\xf8\xeb\xe0\x90\xd5\xd2\xf2\x02\
\x8e\x56\x1f\x85\x6d\x73\xc4\x13\xc9\xde\xbd\xa2\x75\x41\xd4\x56\
\xb3\x58\x5b\x5f\xbf\xd1\xdc\xd4\x24\x2a\x1e\x05\x2e\xa7\x13\x8f\
\x67\x67\xe1\x74\x38\xd0\xd4\xd4\x10\x11\x76\x4c\xb3\xc6\xd0\xf5\
\x77\x1a\x9b\x1b\xa0\x54\x29\xd0\x75\x1d\x6b\x6b\x1b\xa8\xac\xac\
\x7c\xf3\xf1\xdf\xb3\x26\xe9\xeb\x3d\xc3\xd7\x37\x36\x90\xcb\xe7\
\x30\x15\x1d\xc7\xc2\xe2\x22\x82\xc1\x20\x37\x4c\x5d\x68\x6d\x6d\
\x85\xf0\xd1\xc7\x57\xfa\x8e\x78\xbd\x68\xa8\x7f\x0e\xfd\xe7\x5f\
\x83\xa2\x28\x30\x77\x8c\xe7\x5d\x2e\x17\x00\x40\xf0\xf9\x7c\x93\
\xef\xbd\xff\xee\x8b\xb5\x75\xb5\x7b\xaa\xaa\x22\x12\x19\x4b\x29\
\x8a\xb2\x1c\xee\xea\x86\x57\xf1\xec\x3f\x0e\x00\x9c\x73\x00\xa0\
\x84\x10\x4e\x08\xb1\x4b\xa5\x52\xf3\x64\xf4\xcf\x39\x87\xc3\x21\
\xf9\x03\x35\xf0\x7a\xbd\x90\x5d\x92\xb5\xbb\xbb\x7b\xdd\xed\x96\
\x3f\xa1\x54\xb4\x38\xb7\x0f\x0b\x08\x00\x0a\x80\x51\x4a\xb1\xb0\
\xb0\xf8\xf9\x93\xe5\xd4\xd7\x75\x75\xb5\x50\x3c\x55\x90\xdd\x32\
\x14\xb7\x82\x4a\xb1\x02\x7b\xa5\x22\xe6\x62\x71\x80\xe3\xc7\x8e\
\xf6\x93\x57\x0e\x09\x00\x80\x31\xe6\x9f\x98\x8c\xfe\x51\x51\xe1\
\x38\xe6\xf3\xd7\x40\x92\x9c\xa8\xaa\xaa\x82\xec\x92\x40\x29\x45\
\x2e\x9f\x43\x2c\xfe\x0f\xac\x92\x05\x8f\xc7\xb3\x13\x0c\x04\xde\
\x12\xe7\x63\x09\x08\x44\x00\x21\xe4\xed\x8c\x96\xb9\x19\x0a\x85\
\x20\x49\x4e\xb8\x24\x17\xdc\x6e\x37\x24\xa7\x0b\x84\x10\xa4\xd3\
\x69\x24\x17\x96\x40\x29\x85\x3f\xe0\x5b\x57\xd5\xba\x16\x4a\xe9\
\x96\x98\xcf\xe5\x4e\xdd\xbe\xfd\xcb\x37\x53\x53\xd3\x5d\x82\x40\
\x50\xab\xd6\xe2\x8d\x81\x01\x5c\xba\x74\x11\x94\x52\x94\x4a\x25\
\xc4\x12\x09\x68\x99\x55\x54\x57\x57\x83\x08\x18\x5a\x5d\xd5\xfa\
\x4d\xd3\x40\x30\x18\x84\x90\xcf\x17\xb6\x0c\xdd\x14\x08\x00\x66\
\x31\x2c\x25\x97\x70\xf5\xea\x97\x50\xd5\x46\x74\x74\xf6\xe0\xb7\
\x3b\x77\xa0\x6f\x1b\x08\xd5\xab\x00\xe1\xdf\xeb\xba\xde\xaf\xaa\
\x21\xb4\x1c\x3f\x0e\x49\x92\x40\x46\x22\x63\x10\x45\x11\xb1\xb9\
\xc4\x85\xc1\xc1\xc1\x9b\xf9\x7c\xde\x23\x08\xc2\xc1\x26\x28\x14\
\x0a\xf8\xe0\xc3\xcb\x38\xfb\xca\x99\x2f\x4c\x73\xe7\x2b\x59\x96\
\xd1\xd4\xd0\x08\x49\x92\x20\x08\x02\xc8\xc8\xf0\x28\x00\x80\x08\
\x84\x1a\xe6\x4e\x59\xd7\x0d\x64\xb3\xd9\xe6\xcd\xcd\x67\x97\x19\
\xb3\x5e\xf6\xfb\xfd\x4f\x4f\x9f\x3e\xf5\xa9\xc7\xab\xa4\x82\x81\
\x00\xfc\x3e\x3f\x6c\xdb\x3e\x1c\xfe\x3f\x11\x5f\xc4\xbb\xcd\x16\
\x27\xa0\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x02\xaf\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@ -941,548 +461,245 @@ qt_resource_data = "\
\x12\xe3\x03\xfa\xf1\xc0\xf9\xeb\x4d\xf9\x37\x2f\x04\xe0\x8f\x00\
\x03\x00\xe7\xe3\x7a\x6e\x30\xbb\xf3\xb7\x00\x00\x00\x00\x49\x45\
\x4e\x44\xae\x42\x60\x82\
\x00\x00\x10\xe5\
\x00\x00\x07\x65\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x0a\x4d\x69\x43\x43\x50\x50\x68\x6f\
\x74\x6f\x73\x68\x6f\x70\x20\x49\x43\x43\x20\x70\x72\x6f\x66\x69\
\x6c\x65\x00\x00\x78\xda\x9d\x53\x77\x58\x93\xf7\x16\x3e\xdf\xf7\
\x65\x0f\x56\x42\xd8\xf0\xb1\x97\x6c\x81\x00\x22\x23\xac\x08\xc8\
\x10\x59\xa2\x10\x92\x00\x61\x84\x10\x12\x40\xc5\x85\x88\x0a\x56\
\x14\x15\x11\x9c\x48\x55\xc4\x82\xd5\x0a\x48\x9d\x88\xe2\xa0\x28\
\xb8\x67\x41\x8a\x88\x5a\x8b\x55\x5c\x38\xee\x1f\xdc\xa7\xb5\x7d\
\x7a\xef\xed\xed\xfb\xd7\xfb\xbc\xe7\x9c\xe7\xfc\xce\x79\xcf\x0f\
\x80\x11\x12\x26\x91\xe6\xa2\x6a\x00\x39\x52\x85\x3c\x3a\xd8\x1f\
\x8f\x4f\x48\xc4\xc9\xbd\x80\x02\x15\x48\xe0\x04\x20\x10\xe6\xcb\
\xc2\x67\x05\xc5\x00\x00\xf0\x03\x79\x78\x7e\x74\xb0\x3f\xfc\x01\
\xaf\x6f\x00\x02\x00\x70\xd5\x2e\x24\x12\xc7\xe1\xff\x83\xba\x50\
\x26\x57\x00\x20\x91\x00\xe0\x22\x12\xe7\x0b\x01\x90\x52\x00\xc8\
\x2e\x54\xc8\x14\x00\xc8\x18\x00\xb0\x53\xb3\x64\x0a\x00\x94\x00\
\x00\x6c\x79\x7c\x42\x22\x00\xaa\x0d\x00\xec\xf4\x49\x3e\x05\x00\
\xd8\xa9\x93\xdc\x17\x00\xd8\xa2\x1c\xa9\x08\x00\x8d\x01\x00\x99\
\x28\x47\x24\x02\x40\xbb\x00\x60\x55\x81\x52\x2c\x02\xc0\xc2\x00\
\xa0\xac\x40\x22\x2e\x04\xc0\xae\x01\x80\x59\xb6\x32\x47\x02\x80\
\xbd\x05\x00\x76\x8e\x58\x90\x0f\x40\x60\x00\x80\x99\x42\x2c\xcc\
\x00\x20\x38\x02\x00\x43\x1e\x13\xcd\x03\x20\x4c\x03\xa0\x30\xd2\
\xbf\xe0\xa9\x5f\x70\x85\xb8\x48\x01\x00\xc0\xcb\x95\xcd\x97\x4b\
\xd2\x33\x14\xb8\x95\xd0\x1a\x77\xf2\xf0\xe0\xe2\x21\xe2\xc2\x6c\
\xb1\x42\x61\x17\x29\x10\x66\x09\xe4\x22\x9c\x97\x9b\x23\x13\x48\
\xe7\x03\x4c\xce\x0c\x00\x00\x1a\xf9\xd1\xc1\xfe\x38\x3f\x90\xe7\
\xe6\xe4\xe1\xe6\x66\xe7\x6c\xef\xf4\xc5\xa2\xfe\x6b\xf0\x6f\x22\
\x3e\x21\xf1\xdf\xfe\xbc\x8c\x02\x04\x00\x10\x4e\xcf\xef\xda\x5f\
\xe5\xe5\xd6\x03\x70\xc7\x01\xb0\x75\xbf\x6b\xa9\x5b\x00\xda\x56\
\x00\x68\xdf\xf9\x5d\x33\xdb\x09\xa0\x5a\x0a\xd0\x7a\xf9\x8b\x79\
\x38\xfc\x40\x1e\x9e\xa1\x50\xc8\x3c\x1d\x1c\x0a\x0b\x0b\xed\x25\
\x62\xa1\xbd\x30\xe3\x8b\x3e\xff\x33\xe1\x6f\xe0\x8b\x7e\xf6\xfc\
\x40\x1e\xfe\xdb\x7a\xf0\x00\x71\x9a\x40\x99\xad\xc0\xa3\x83\xfd\
\x71\x61\x6e\x76\xae\x52\x8e\xe7\xcb\x04\x42\x31\x6e\xf7\xe7\x23\
\xfe\xc7\x85\x7f\xfd\x8e\x29\xd1\xe2\x34\xb1\x5c\x2c\x15\x8a\xf1\
\x58\x89\xb8\x50\x22\x4d\xc7\x79\xb9\x52\x91\x44\x21\xc9\x95\xe2\
\x12\xe9\x7f\x32\xf1\x1f\x96\xfd\x09\x93\x77\x0d\x00\xac\x86\x4f\
\xc0\x4e\xb6\x07\xb5\xcb\x6c\xc0\x7e\xee\x01\x02\x8b\x0e\x58\xd2\
\x76\x00\x40\x7e\xf3\x2d\x8c\x1a\x0b\x91\x00\x10\x67\x34\x32\x79\
\xf7\x00\x00\x93\xbf\xf9\x8f\x40\x2b\x01\x00\xcd\x97\xa4\xe3\x00\
\x00\xbc\xe8\x18\x5c\xa8\x94\x17\x4c\xc6\x08\x00\x00\x44\xa0\x81\
\x2a\xb0\x41\x07\x0c\xc1\x14\xac\xc0\x0e\x9c\xc1\x1d\xbc\xc0\x17\
\x02\x61\x06\x44\x40\x0c\x24\xc0\x3c\x10\x42\x06\xe4\x80\x1c\x0a\
\xa1\x18\x96\x41\x19\x54\xc0\x3a\xd8\x04\xb5\xb0\x03\x1a\xa0\x11\
\x9a\xe1\x10\xb4\xc1\x31\x38\x0d\xe7\xe0\x12\x5c\x81\xeb\x70\x17\
\x06\x60\x18\x9e\xc2\x18\xbc\x86\x09\x04\x41\xc8\x08\x13\x61\x21\
\x3a\x88\x11\x62\x8e\xd8\x22\xce\x08\x17\x99\x8e\x04\x22\x61\x48\
\x34\x92\x80\xa4\x20\xe9\x88\x14\x51\x22\xc5\xc8\x72\xa4\x02\xa9\
\x42\x6a\x91\x5d\x48\x23\xf2\x2d\x72\x14\x39\x8d\x5c\x40\xfa\x90\
\xdb\xc8\x20\x32\x8a\xfc\x8a\xbc\x47\x31\x94\x81\xb2\x51\x03\xd4\
\x02\x75\x40\xb9\xa8\x1f\x1a\x8a\xc6\xa0\x73\xd1\x74\x34\x0f\x5d\
\x80\x96\xa2\x6b\xd1\x1a\xb4\x1e\x3d\x80\xb6\xa2\xa7\xd1\x4b\xe8\
\x75\x74\x00\x7d\x8a\x8e\x63\x80\xd1\x31\x0e\x66\x8c\xd9\x61\x5c\
\x8c\x87\x45\x60\x89\x58\x1a\x26\xc7\x16\x63\xe5\x58\x35\x56\x8f\
\x35\x63\x1d\x58\x37\x76\x15\x1b\xc0\x9e\x61\xef\x08\x24\x02\x8b\
\x80\x13\xec\x08\x5e\x84\x10\xc2\x6c\x82\x90\x90\x47\x58\x4c\x58\
\x43\xa8\x25\xec\x23\xb4\x12\xba\x08\x57\x09\x83\x84\x31\xc2\x27\
\x22\x93\xa8\x4f\xb4\x25\x7a\x12\xf9\xc4\x78\x62\x3a\xb1\x90\x58\
\x46\xac\x26\xee\x21\x1e\x21\x9e\x25\x5e\x27\x0e\x13\x5f\x93\x48\
\x24\x0e\xc9\x92\xe4\x4e\x0a\x21\x25\x90\x32\x49\x0b\x49\x6b\x48\
\xdb\x48\x2d\xa4\x53\xa4\x3e\xd2\x10\x69\x9c\x4c\x26\xeb\x90\x6d\
\xc9\xde\xe4\x08\xb2\x80\xac\x20\x97\x91\xb7\x90\x0f\x90\x4f\x92\
\xfb\xc9\xc3\xe4\xb7\x14\x3a\xc5\x88\xe2\x4c\x09\xa2\x24\x52\xa4\
\x94\x12\x4a\x35\x65\x3f\xe5\x04\xa5\x9f\x32\x42\x99\xa0\xaa\x51\
\xcd\xa9\x9e\xd4\x08\xaa\x88\x3a\x9f\x5a\x49\x6d\xa0\x76\x50\x2f\
\x53\x87\xa9\x13\x34\x75\x9a\x25\xcd\x9b\x16\x43\xcb\xa4\x2d\xa3\
\xd5\xd0\x9a\x69\x67\x69\xf7\x68\x2f\xe9\x74\xba\x09\xdd\x83\x1e\
\x45\x97\xd0\x97\xd2\x6b\xe8\x07\xe9\xe7\xe9\x83\xf4\x77\x0c\x0d\
\x86\x0d\x83\xc7\x48\x62\x28\x19\x6b\x19\x7b\x19\xa7\x18\xb7\x19\
\x2f\x99\x4c\xa6\x05\xd3\x97\x99\xc8\x54\x30\xd7\x32\x1b\x99\x67\
\x98\x0f\x98\x6f\x55\x58\x2a\xf6\x2a\x7c\x15\x91\xca\x12\x95\x3a\
\x95\x56\x95\x7e\x95\xe7\xaa\x54\x55\x73\x55\x3f\xd5\x79\xaa\x0b\
\x54\xab\x55\x0f\xab\x5e\x56\x7d\xa6\x46\x55\xb3\x50\xe3\xa9\x09\
\xd4\x16\xab\xd5\xa9\x1d\x55\xbb\xa9\x36\xae\xce\x52\x77\x52\x8f\
\x50\xcf\x51\x5f\xa3\xbe\x5f\xfd\x82\xfa\x63\x0d\xb2\x86\x85\x46\
\xa0\x86\x48\xa3\x54\x63\xb7\xc6\x19\x8d\x21\x16\xc6\x32\x65\xf1\
\x58\x42\xd6\x72\x56\x03\xeb\x2c\x6b\x98\x4d\x62\x5b\xb2\xf9\xec\
\x4c\x76\x05\xfb\x1b\x76\x2f\x7b\x4c\x53\x43\x73\xaa\x66\xac\x66\
\x91\x66\x9d\xe6\x71\xcd\x01\x0e\xc6\xb1\xe0\xf0\x39\xd9\x9c\x4a\
\xce\x21\xce\x0d\xce\x7b\x2d\x03\x2d\x3f\x2d\xb1\xd6\x6a\xad\x66\
\xad\x7e\xad\x37\xda\x7a\xda\xbe\xda\x62\xed\x72\xed\x16\xed\xeb\
\xda\xef\x75\x70\x9d\x40\x9d\x2c\x9d\xf5\x3a\x6d\x3a\xf7\x75\x09\
\xba\x36\xba\x51\xba\x85\xba\xdb\x75\xcf\xea\x3e\xd3\x63\xeb\x79\
\xe9\x09\xf5\xca\xf5\x0e\xe9\xdd\xd1\x47\xf5\x6d\xf4\xa3\xf5\x17\
\xea\xef\xd6\xef\xd1\x1f\x37\x30\x34\x08\x36\x90\x19\x6c\x31\x38\
\x63\xf0\xcc\x90\x63\xe8\x6b\x98\x69\xb8\xd1\xf0\x84\xe1\xa8\x11\
\xcb\x68\xba\x91\xc4\x68\xa3\xd1\x49\xa3\x27\xb8\x26\xee\x87\x67\
\xe3\x35\x78\x17\x3e\x66\xac\x6f\x1c\x62\xac\x34\xde\x65\xdc\x6b\
\x3c\x61\x62\x69\x32\xdb\xa4\xc4\xa4\xc5\xe4\xbe\x29\xcd\x94\x6b\
\x9a\x66\xba\xd1\xb4\xd3\x74\xcc\xcc\xc8\x2c\xdc\xac\xd8\xac\xc9\
\xec\x8e\x39\xd5\x9c\x6b\x9e\x61\xbe\xd9\xbc\xdb\xfc\x8d\x85\xa5\
\x45\x9c\xc5\x4a\x8b\x36\x8b\xc7\x96\xda\x96\x7c\xcb\x05\x96\x4d\
\x96\xf7\xac\x98\x56\x3e\x56\x79\x56\xf5\x56\xd7\xac\x49\xd6\x5c\
\xeb\x2c\xeb\x6d\xd6\x57\x6c\x50\x1b\x57\x9b\x0c\x9b\x3a\x9b\xcb\
\xb6\xa8\xad\x9b\xad\xc4\x76\x9b\x6d\xdf\x14\xe2\x14\x8f\x29\xd2\
\x29\xf5\x53\x6e\xda\x31\xec\xfc\xec\x0a\xec\x9a\xec\x06\xed\x39\
\xf6\x61\xf6\x25\xf6\x6d\xf6\xcf\x1d\xcc\x1c\x12\x1d\xd6\x3b\x74\
\x3b\x7c\x72\x74\x75\xcc\x76\x6c\x70\xbc\xeb\xa4\xe1\x34\xc3\xa9\
\xc4\xa9\xc3\xe9\x57\x67\x1b\x67\xa1\x73\x9d\xf3\x35\x17\xa6\x4b\
\x90\xcb\x12\x97\x76\x97\x17\x53\x6d\xa7\x8a\xa7\x6e\x9f\x7a\xcb\
\x95\xe5\x1a\xee\xba\xd2\xb5\xd3\xf5\xa3\x9b\xbb\x9b\xdc\xad\xd9\
\x6d\xd4\xdd\xcc\x3d\xc5\x7d\xab\xfb\x4d\x2e\x9b\x1b\xc9\x5d\xc3\
\x3d\xef\x41\xf4\xf0\xf7\x58\xe2\x71\xcc\xe3\x9d\xa7\x9b\xa7\xc2\
\xf3\x90\xe7\x2f\x5e\x76\x5e\x59\x5e\xfb\xbd\x1e\x4f\xb3\x9c\x26\
\x9e\xd6\x30\x6d\xc8\xdb\xc4\x5b\xe0\xbd\xcb\x7b\x60\x3a\x3e\x3d\
\x65\xfa\xce\xe9\x03\x3e\xc6\x3e\x02\x9f\x7a\x9f\x87\xbe\xa6\xbe\
\x22\xdf\x3d\xbe\x23\x7e\xd6\x7e\x99\x7e\x07\xfc\x9e\xfb\x3b\xfa\
\xcb\xfd\x8f\xf8\xbf\xe1\x79\xf2\x16\xf1\x4e\x05\x60\x01\xc1\x01\
\xe5\x01\xbd\x81\x1a\x81\xb3\x03\x6b\x03\x1f\x04\x99\x04\xa5\x07\
\x35\x05\x8d\x05\xbb\x06\x2f\x0c\x3e\x15\x42\x0c\x09\x0d\x59\x1f\
\x72\x93\x6f\xc0\x17\xf2\x1b\xf9\x63\x33\xdc\x67\x2c\x9a\xd1\x15\
\xca\x08\x9d\x15\x5a\x1b\xfa\x30\xcc\x26\x4c\x1e\xd6\x11\x8e\x86\
\xcf\x08\xdf\x10\x7e\x6f\xa6\xf9\x4c\xe9\xcc\xb6\x08\x88\xe0\x47\
\x6c\x88\xb8\x1f\x69\x19\x99\x17\xf9\x7d\x14\x29\x2a\x32\xaa\x2e\
\xea\x51\xb4\x53\x74\x71\x74\xf7\x2c\xd6\xac\xe4\x59\xfb\x67\xbd\
\x8e\xf1\x8f\xa9\x8c\xb9\x3b\xdb\x6a\xb6\x72\x76\x67\xac\x6a\x6c\
\x52\x6c\x63\xec\x9b\xb8\x80\xb8\xaa\xb8\x81\x78\x87\xf8\x45\xf1\
\x97\x12\x74\x13\x24\x09\xed\x89\xe4\xc4\xd8\xc4\x3d\x89\xe3\x73\
\x02\xe7\x6c\x9a\x33\x9c\xe4\x9a\x54\x96\x74\x63\xae\xe5\xdc\xa2\
\xb9\x17\xe6\xe9\xce\xcb\x9e\x77\x3c\x59\x35\x59\x90\x7c\x38\x85\
\x98\x12\x97\xb2\x3f\xe5\x83\x20\x42\x50\x2f\x18\x4f\xe5\xa7\x6e\
\x4d\x1d\x13\xf2\x84\x9b\x85\x4f\x45\xbe\xa2\x8d\xa2\x51\xb1\xb7\
\xb8\x4a\x3c\x92\xe6\x9d\x56\x95\xf6\x38\xdd\x3b\x7d\x43\xfa\x68\
\x86\x4f\x46\x75\xc6\x33\x09\x4f\x52\x2b\x79\x91\x19\x92\xb9\x23\
\xf3\x4d\x56\x44\xd6\xde\xac\xcf\xd9\x71\xd9\x2d\x39\x94\x9c\x94\
\x9c\xa3\x52\x0d\x69\x96\xb4\x2b\xd7\x30\xb7\x28\xb7\x4f\x66\x2b\
\x2b\x93\x0d\xe4\x79\xe6\x6d\xca\x1b\x93\x87\xca\xf7\xe4\x23\xf9\
\x73\xf3\xdb\x15\x6c\x85\x4c\xd1\xa3\xb4\x52\xae\x50\x0e\x16\x4c\
\x2f\xa8\x2b\x78\x5b\x18\x5b\x78\xb8\x48\xbd\x48\x5a\xd4\x33\xdf\
\x66\xfe\xea\xf9\x23\x0b\x82\x16\x7c\xbd\x90\xb0\x50\xb8\xb0\xb3\
\xd8\xb8\x78\x59\xf1\xe0\x22\xbf\x45\xbb\x16\x23\x8b\x53\x17\x77\
\x2e\x31\x5d\x52\xba\x64\x78\x69\xf0\xd2\x7d\xcb\x68\xcb\xb2\x96\
\xfd\x50\xe2\x58\x52\x55\xf2\x6a\x79\xdc\xf2\x8e\x52\x83\xd2\xa5\
\xa5\x43\x2b\x82\x57\x34\x95\xa9\x94\xc9\xcb\x6e\xae\xf4\x5a\xb9\
\x63\x15\x61\x95\x64\x55\xef\x6a\x97\xd5\x5b\x56\x7f\x2a\x17\x95\
\x5f\xac\x70\xac\xa8\xae\xf8\xb0\x46\xb8\xe6\xe2\x57\x4e\x5f\xd5\
\x7c\xf5\x79\x6d\xda\xda\xde\x4a\xb7\xca\xed\xeb\x48\xeb\xa4\xeb\
\x6e\xac\xf7\x59\xbf\xaf\x4a\xbd\x6a\x41\xd5\xd0\x86\xf0\x0d\xad\
\x1b\xf1\x8d\xe5\x1b\x5f\x6d\x4a\xde\x74\xa1\x7a\x6a\xf5\x8e\xcd\
\xb4\xcd\xca\xcd\x03\x35\x61\x35\xed\x5b\xcc\xb6\xac\xdb\xf2\xa1\
\x36\xa3\xf6\x7a\x9d\x7f\x5d\xcb\x56\xfd\xad\xab\xb7\xbe\xd9\x26\
\xda\xd6\xbf\xdd\x77\x7b\xf3\x0e\x83\x1d\x15\x3b\xde\xef\x94\xec\
\xbc\xb5\x2b\x78\x57\x6b\xbd\x45\x7d\xf5\x6e\xd2\xee\x82\xdd\x8f\
\x1a\x62\x1b\xba\xbf\xe6\x7e\xdd\xb8\x47\x77\x4f\xc5\x9e\x8f\x7b\
\xa5\x7b\x07\xf6\x45\xef\xeb\x6a\x74\x6f\x6c\xdc\xaf\xbf\xbf\xb2\
\x09\x6d\x52\x36\x8d\x1e\x48\x3a\x70\xe5\x9b\x80\x6f\xda\x9b\xed\
\x9a\x77\xb5\x70\x5a\x2a\x0e\xc2\x41\xe5\xc1\x27\xdf\xa6\x7c\x7b\
\xe3\x50\xe8\xa1\xce\xc3\xdc\xc3\xcd\xdf\x99\x7f\xb7\xf5\x08\xeb\
\x48\x79\x2b\xd2\x3a\xbf\x75\xac\x2d\xa3\x6d\xa0\x3d\xa1\xbd\xef\
\xe8\x8c\xa3\x9d\x1d\x5e\x1d\x47\xbe\xb7\xff\x7e\xef\x31\xe3\x63\
\x75\xc7\x35\x8f\x57\x9e\xa0\x9d\x28\x3d\xf1\xf9\xe4\x82\x93\xe3\
\xa7\x64\xa7\x9e\x9d\x4e\x3f\x3d\xd4\x99\xdc\x79\xf7\x4c\xfc\x99\
\x6b\x5d\x51\x5d\xbd\x67\x43\xcf\x9e\x3f\x17\x74\xee\x4c\xb7\x5f\
\xf7\xc9\xf3\xde\xe7\x8f\x5d\xf0\xbc\x70\xf4\x22\xf7\x62\xdb\x25\
\xb7\x4b\xad\x3d\xae\x3d\x47\x7e\x70\xfd\xe1\x48\xaf\x5b\x6f\xeb\
\x65\xf7\xcb\xed\x57\x3c\xae\x74\xf4\x4d\xeb\x3b\xd1\xef\xd3\x7f\
\xfa\x6a\xc0\xd5\x73\xd7\xf8\xd7\x2e\x5d\x9f\x79\xbd\xef\xc6\xec\
\x1b\xb7\x6e\x26\xdd\x1c\xb8\x25\xba\xf5\xf8\x76\xf6\xed\x17\x77\
\x0a\xee\x4c\xdc\x5d\x7a\x8f\x78\xaf\xfc\xbe\xda\xfd\xea\x07\xfa\
\x0f\xea\x7f\xb4\xfe\xb1\x65\xc0\x6d\xe0\xf8\x60\xc0\x60\xcf\xc3\
\x59\x0f\xef\x0e\x09\x87\x9e\xfe\x94\xff\xd3\x87\xe1\xd2\x47\xcc\
\x47\xd5\x23\x46\x23\x8d\x8f\x9d\x1f\x1f\x1b\x0d\x1a\xbd\xf2\x64\
\xce\x93\xe1\xa7\xb2\xa7\x13\xcf\xca\x7e\x56\xff\x79\xeb\x73\xab\
\xe7\xdf\xfd\xe2\xfb\x4b\xcf\x58\xfc\xd8\xf0\x0b\xf9\x8b\xcf\xbf\
\xae\x79\xa9\xf3\x72\xef\xab\xa9\xaf\x3a\xc7\x23\xc7\x1f\xbc\xce\
\x79\x3d\xf1\xa6\xfc\xad\xce\xdb\x7d\xef\xb8\xef\xba\xdf\xc7\xbd\
\x1f\x99\x28\xfc\x40\xfe\x50\xf3\xd1\xfa\x63\xc7\xa7\xd0\x4f\xf7\
\x3e\xe7\x7c\xfe\xfc\x2f\xf7\x84\xf3\xfb\x25\xd2\x9f\x33\x00\x00\
\x00\x20\x63\x48\x52\x4d\x00\x00\x7a\x25\x00\x00\x80\x83\x00\x00\
\xf9\xff\x00\x00\x80\xe9\x00\x00\x75\x30\x00\x00\xea\x60\x00\x00\
\x3a\x98\x00\x00\x17\x6f\x92\x5f\xc5\x46\x00\x00\x06\x12\x49\x44\
\x41\x54\x78\xda\x7c\x95\x5b\x88\x9c\x67\x1d\xc6\x7f\xef\xe9\x3b\
\xce\x69\x67\x27\x9b\x60\x36\x49\x37\xd1\xda\x1c\xbd\xe8\x42\x41\
\x94\x62\xa3\xb4\xf5\xc2\xda\xa4\x04\x04\x6b\xbd\xb2\x45\x6c\xb0\
\x08\x52\x4d\xc1\x88\x17\x45\xd4\xd6\x96\x5e\xa9\x45\xad\x85\xea\
\x85\x42\xab\x22\xc4\xa2\xa6\x34\x90\x50\x85\x66\xb3\x49\x9a\xc3\
\xe6\xb0\x87\xc9\xcc\xec\xce\xec\xee\xcc\xce\xcc\x37\x87\xef\x7b\
\xbd\x98\xdd\x69\x6a\xc0\x17\x5e\xf8\x2e\xbe\x97\xe7\xff\x7f\x9e\
\xff\xf3\xfc\x85\xb5\x96\x38\x8e\xd9\x38\xd6\x5a\x84\x10\xc3\xef\
\x8d\x23\xa5\xa4\x5a\xad\xde\x77\xe9\xd2\x95\x43\xfd\x7e\x7c\x5f\
\x2e\x97\x5d\xcc\x8d\x64\xcf\x14\x36\x15\xfe\x1e\x06\xc1\xd9\x24\
\x4e\x6e\xff\x5f\x00\x56\x6b\x8d\xf8\x3f\x00\xc2\xae\xbf\x50\x4a\
\xb1\xb4\x54\x7d\x78\x6a\xea\xdc\x1f\xd7\x9a\x4d\x7f\x74\x34\xcf\
\x68\x61\x94\x54\x2a\x44\x49\xd9\xd6\x4a\xff\xd2\xf7\xfd\x17\x83\
\x20\xb8\x01\x90\x24\x16\xb0\x18\x63\x90\xdc\x79\x04\xa0\x01\x29\
\x84\x40\x08\x81\xb5\xd6\xdc\x2a\x95\x9e\xeb\xc7\x89\x3f\x36\xb6\
\x99\x5c\x2e\x87\x1f\x78\x78\xbe\x4f\xa1\xb0\xc9\xcf\xe7\xf3\x47\
\x3b\x9d\xce\x7b\xd5\x6a\xf5\xcb\x83\x37\xc8\x75\x12\x3e\x0a\x60\
\xad\xd5\xc0\x56\xc0\x02\xf1\x46\xf5\x37\x6e\xce\xfe\x60\x6e\xbe\
\xf8\xe9\x54\x2a\x24\x08\x7c\x3c\xcf\x43\x0a\x09\xd6\x12\xf7\xfb\
\x48\x29\x29\x14\x0a\x05\xcf\xf3\xfe\x74\xeb\xd6\xad\x9f\x4a\x29\
\x13\x25\xe5\x1d\x00\x42\x08\xe1\x0a\x21\x1a\x40\x6c\xad\x45\x29\
\xc5\xe2\x52\xf5\xfe\x0f\x3e\xb8\xfc\xdd\xc0\xf7\xc8\x64\x32\xf8\
\x81\x8b\x71\x34\x8e\xe3\xe0\xba\x2e\x5a\x6b\x00\xfa\xfd\x3e\xe9\
\x74\x5a\xcc\xce\xcf\x7f\xe7\xf2\x95\xab\xdf\x16\x52\xdd\xd9\x01\
\xd0\x02\x56\x37\x74\x88\xa2\x28\x3d\x7d\x6e\xfa\x65\x29\x85\x49\
\xa5\x52\x08\x09\xc6\x18\x8c\x31\x03\x00\xc7\x41\x29\x85\xb5\x96\
\x5e\xaf\xc7\x8d\x9b\x37\x89\xa2\x88\x99\x99\x6b\xc7\xda\xed\x68\
\xfb\xff\x02\xd8\xf5\xcb\x06\x35\x57\x67\xae\xfd\xb0\xde\x68\x1c\
\xc8\x66\xb3\xb8\xae\x8b\xeb\x3a\x43\x00\xd7\x71\x91\x52\x21\x84\
\x20\x8e\x63\x9a\xad\x26\xa5\x72\x89\x7e\x3f\x46\x08\x59\x28\x16\
\x8b\x07\x59\x17\xf3\xa3\x0a\x0b\x31\xa0\x66\x71\xe9\xa1\xab\x57\
\x67\x9e\xc9\xe7\xf3\xa4\xd3\x69\x5c\xd7\xc5\x71\x34\x4a\x2b\x1c\
\xc7\xc1\x68\x85\x12\x82\x24\x49\xe8\x74\x3a\x94\x2b\x15\x5a\xad\
\x08\x81\x20\x95\x0a\x69\x34\xd6\x76\x0c\x01\x36\xe6\x7e\x83\xcb\
\x4e\xb7\xf7\xd9\xe9\xe9\xf3\xbf\x33\xc6\x90\xcd\x66\x51\x5a\xa1\
\x8d\x1c\x56\xee\x1a\x83\x94\x0a\x84\xa0\xdb\xeb\x52\xad\x55\xa9\
\x54\x16\xc1\x0e\x3a\x0f\x82\x80\x42\xa1\x30\x37\x04\x28\x95\xcb\
\xb7\xf1\x64\x9d\xd9\x9b\xf3\xc7\x56\xeb\x6b\x85\xf1\xf1\x8f\xe1\
\x98\x01\xd7\xc6\x31\x38\xc6\xe0\x1a\x07\xa5\x34\x52\x08\xe2\x24\
\xa1\xd5\x6c\x51\x2a\x55\x48\xe2\x81\x9f\xb4\x56\x6c\x1a\x2b\xcc\
\x6f\xd9\x32\x76\x62\x08\x50\xab\xad\x0e\xe9\xe9\xf5\xbb\x3f\x29\
\x97\xcb\x0f\xe6\xf3\x79\xc2\x20\xc0\x38\x1a\x6d\x14\x46\x1b\x8c\
\x71\xd0\x4a\x0f\xbc\x01\xf4\xba\x5d\xca\xe5\x32\xf5\x46\x1d\x81\
\x44\x6b\xcd\x68\x61\x94\x5c\x2e\xfb\x4d\x0b\x73\x43\x91\x93\xb8\
\x4f\x12\xf7\x11\xd8\xc9\xea\x52\xf5\x29\xcf\xf3\xc8\x66\xb2\x08\
\x25\xd1\x46\xa1\xb5\x46\x1b\x83\x31\x1a\xa9\xe4\x50\xd8\x95\xd5\
\x15\xca\xe5\x0a\xd8\x81\x16\x41\x10\x60\xb4\x79\xa7\xdd\x6e\xff\
\xb9\x56\xab\x31\xec\xc0\x0a\x4b\xe0\xfb\x74\x3b\xdd\xef\x09\x81\
\xb3\x7d\xfb\x36\x46\x46\x72\x08\x29\xb0\x76\x60\x79\x47\x1b\xa4\
\x52\x43\xbd\xa2\x4e\xc4\xad\x52\x89\x28\x6a\x23\x84\xc4\xf7\x03\
\xa4\x94\x9d\x46\xa3\xfe\x7d\x4b\x42\x1c\xc7\x6c\x1e\x1b\x1b\x00\
\xf8\xae\xcf\xc5\x0b\x97\x9f\x3d\x79\xf2\xe4\xa1\x38\x49\xd8\xb1\
\x7d\x1b\xfb\x3f\xb5\x8f\xc9\xc9\x7b\xc9\xa4\x33\xd8\x64\x10\x64\
\xd6\x5a\x04\x82\x5e\xaf\xc7\x62\xb5\xca\x62\x65\x09\x90\xb8\xae\
\x4f\x36\x9b\xa5\xde\x58\xfd\x79\x92\xc4\xa7\x1a\x6b\x0d\x7c\xdf\
\xff\xb0\x83\xf7\xdf\x3f\xfb\xf4\x0b\x3f\x7b\xe9\xf9\x95\x95\x65\
\xda\x51\x9b\x28\x8a\x30\xc6\xe1\x9e\xdd\xf7\xf0\xc4\xd7\x1e\xe7\
\xc8\x91\xc3\xb8\xae\x03\x40\xaf\xd7\xa3\xde\xa8\x33\x37\x3b\x47\
\xb7\xdb\xc3\xf3\x3c\xc2\x30\xa0\xd3\x69\xcf\xb4\xdb\xad\x17\x93\
\x24\x21\x9d\x4e\x33\x31\x31\xf1\xa1\x93\xaf\x5c\xbe\xf2\x85\x7e\
\xbf\x47\x3a\x9d\x26\x93\xce\x90\xcb\xe5\x30\x8e\x61\x6a\x6a\x8a\
\x6f\x3d\x7d\x94\x43\x87\x8f\x70\x76\xea\xdc\xa0\x22\xad\x29\x97\
\x2b\xac\x2c\xaf\xe0\x38\x0e\x99\x4c\x06\xd7\x73\x58\x6b\x36\x7f\
\x0c\x94\x3d\xcf\x63\xc7\x8e\x1d\x28\x75\x5b\x54\x64\x32\xd9\x33\
\x5a\xeb\xa1\x4b\xcd\xfa\x38\x66\x32\x19\x46\xf3\x79\xce\x9c\x79\
\x8f\x47\x1f\x7d\x8c\x37\xde\xf8\x03\xed\x28\x62\xad\xb9\x86\xe7\
\xf9\xa4\xd2\x69\x82\xd0\xa3\xb9\xd6\x7c\x27\x8e\x93\x5f\x09\xa1\
\xd8\xba\x75\x9c\x30\x0c\x48\x92\x84\x8d\xcc\xe7\xcd\x37\xff\x3a\
\xfe\xda\x6f\x5f\xfb\xf7\xc2\x42\x71\xf3\x7a\x06\x11\xc7\x31\x71\
\x1c\x93\x24\x09\x16\x4b\xd4\xed\x12\xb5\xdb\x3c\xf1\xf5\xaf\xf2\
\xc8\x23\x5f\xa2\xdb\xe9\x91\xcd\x65\x00\x4b\xad\xb6\xfc\xe0\xc1\
\xd7\x5f\xdf\x4a\xb7\x7b\x94\xe5\xe5\x2d\x94\xcb\xff\xe2\xc6\x8d\
\x63\x34\x9b\xd7\xd4\xf1\xe3\xc7\x99\x2f\x16\xeb\xa9\x30\xd5\xbb\
\x70\xfe\xc2\x43\x1b\x29\xba\x11\x19\x52\x4a\xa4\x50\x38\xeb\x63\
\x3a\x75\xf6\x1c\xdb\xc6\xc7\xf9\xc4\x27\x3f\x4e\x10\xf8\x34\x1a\
\x8d\x13\xf7\xbf\xf2\x4a\x85\x56\xeb\x17\xcc\xcc\x6c\x61\x6e\x2e\
\x45\xad\xb6\xcf\xd6\xeb\x0f\xb7\xba\xdd\x53\x72\x7d\x11\xb0\x7b\
\xef\xee\x97\x1e\x78\xe0\x73\x2f\xa8\xf5\x00\xf3\x3c\xef\xb6\xeb\
\xe2\x3a\x0e\xa1\x1f\xe2\xb9\x1e\x6f\xbd\xf5\x17\xb4\xd6\x24\x49\
\xd2\xed\xf7\xfb\x3f\x62\x69\xe9\x28\x17\x2f\xc2\xf4\x34\x5c\xbf\
\x8e\x2d\x95\x58\x8a\xa2\xbb\x17\x92\xe4\x1b\x7a\xb8\x26\x81\x7b\
\x27\x27\x9f\x03\x11\x9e\x3e\x7d\xfa\xc9\x56\xab\x35\xd0\xc2\x75\
\x07\x54\xc5\x31\x71\x92\x60\x1c\xc3\xd2\x62\x95\xe9\xa9\x69\xf6\
\xee\xdf\xf3\x1b\x63\xcc\xbb\x5c\xbf\x3e\x4a\xb5\x0a\x51\x34\xf0\
\x08\x03\x1b\x97\x61\x6c\xbd\x03\x81\x4d\x20\xf0\xfd\xf6\xfe\xfd\
\xfb\x9e\x3a\xf8\xf9\x83\x5f\x99\xd8\x39\x31\xe7\x38\x83\xd1\x74\
\x1c\x07\x3f\x08\xf0\x7d\x9f\x30\x0c\x09\x82\x80\x85\x62\xb1\xa1\
\xb5\x7e\x39\x0c\x43\xfa\xb3\xb3\xa7\xd6\xea\x75\x1a\x40\x1d\x98\
\x01\x2e\x01\x25\xf8\xa7\x1e\x6e\x02\x40\x29\x29\xc3\x54\x68\xef\
\x9a\xb8\xeb\xf7\x23\xf9\x91\xbf\x2d\x2c\x2c\x1c\x2e\x16\x8b\x8f\
\x57\xab\xb5\xcf\xb4\x5a\x2d\x8d\x10\x60\x2d\x13\xbb\x26\x5a\x07\
\x0e\xec\x7f\x46\x08\x71\x1e\xa0\x12\xc7\xcf\x56\x60\x67\x03\x0e\
\xd4\x81\x79\x88\x5b\xf0\xbc\x07\xaf\x0a\x6b\x2d\x6f\xbf\xfd\x8f\
\xe1\x9e\xb1\xd6\xb2\x5a\x5f\x8b\xe3\x38\x26\x8a\x22\x6a\xb5\x1a\
\x9d\x4e\x77\x52\x29\xf9\x45\x21\xb9\x3b\x97\xcd\xad\xec\xda\xb5\
\xf3\xd7\xb9\x91\xec\x7f\xa4\x12\x68\xa5\x49\xed\xd9\xcb\x02\xec\
\x99\x85\x27\x17\x61\xbc\x09\x27\x1c\x78\xd5\x87\xfe\x7f\x07\x00\
\x06\x52\xb7\xcc\xfb\x20\x61\xb3\x00\x00\x00\x00\x49\x45\x4e\x44\
\x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x01\x97\x70\x0d\x6e\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\
\x0b\x13\x01\x00\x9a\x9c\x18\x00\x00\x07\x05\x49\x44\x41\x54\x48\
\xc7\x55\x95\x6b\x70\x54\xe5\x19\xc7\x7f\xef\x39\x67\x77\xcf\xd9\
\x73\x36\xd9\x4b\x16\xd8\x10\xb9\x08\xc6\x82\x8a\x8a\x99\x62\x11\
\x05\x6a\x47\xad\x9d\x8a\x83\x9d\xb1\x17\x6c\x6b\x69\xeb\x27\xed\
\x4d\x3a\x76\xec\x4c\x6d\x55\x1c\xab\x15\x1d\x3b\xf6\xc2\xd0\x8e\
\x8e\x2d\xb5\x6a\x29\xb6\x4e\xbd\x00\x21\x89\x29\x58\x6c\xb9\x5f\
\xb2\x81\x64\x03\x49\x36\x09\x9b\x4d\x08\x6c\xb2\xbb\xe7\xf2\xf4\
\x43\x48\xd0\xe7\xe3\x3b\xf3\x3c\xbf\xf7\x79\x9e\xff\xff\x7d\x95\
\x88\xe0\x79\x1e\xe5\x6a\xe5\x5a\x44\x84\x03\x07\x0f\xcb\x78\x79\
\x42\x10\x11\xe6\xcf\x6f\x94\x83\x87\x0f\x09\xae\xeb\xd2\xd6\xd6\
\xfe\xb4\xeb\xba\xa8\x4a\xa5\xc2\x85\xf1\x92\x1c\x3c\x70\x18\xed\
\xc6\x65\x37\x8b\x19\x31\x99\xdd\x50\xaf\xb8\x58\xad\x76\xe8\x6c\
\x61\x65\x47\x67\x56\xaa\xd5\xaa\xfc\x7b\xef\x5e\xd1\x00\x5a\x5a\
\xdb\x46\x3d\xdf\xdd\x7d\xf9\xbc\xf9\xec\xd8\xb9\x93\x90\x61\xac\
\xd0\x00\x9a\x77\xb6\xfe\xee\xab\xf7\x7e\x9d\x9b\x96\xaf\x22\x9e\
\x88\xab\xa6\xa6\xa6\x0f\xf0\x3c\x0f\xcf\xf3\xf0\x7d\x9f\xfd\xfb\
\x0f\xbe\xee\x79\x1e\xae\xeb\x82\xe7\x79\xca\x75\x5d\x76\x35\xb7\
\x48\x7e\x70\x40\x5c\xd7\x15\x11\x41\x53\x4a\x49\x5b\x5b\xfb\xd9\
\x79\xf3\xe7\x50\x97\x4c\xd1\xd6\xde\x4e\x6f\x6f\xff\x7a\x95\xed\
\xec\xc4\x71\x1c\x71\x1c\x07\x91\x80\xfd\xfb\x0f\x51\x97\x4e\x2a\
\xb5\xec\xd3\x2b\x64\x74\x74\x94\xaa\x57\xe5\xa5\x97\x7e\x8d\xa6\
\x6b\xda\x75\xd7\x2d\x11\xed\x89\x8d\xbf\x50\xa9\x54\x8a\xfa\x99\
\x19\x86\x0b\x05\x6e\xbb\x67\x6d\xd0\x9b\x9e\x21\x4a\x44\xf0\x7d\
\x1f\x11\x51\x4a\x29\x0d\xf0\x8f\x1e\x3b\xde\x5e\x2a\x4d\x2c\xcf\
\xcc\x9e\x41\xfd\xac\x7a\xc6\xce\x9d\x2b\x24\x93\xc9\x74\x10\xf8\
\x68\x5c\x0c\xa5\x94\xe8\xba\xee\xff\xf3\xed\x7f\x09\xa8\xe5\x97\
\xcd\xa9\x27\x9d\x4a\x13\x32\x0c\x50\xd4\xed\x6c\xde\x2d\x3d\x3d\
\x67\xee\x57\x22\xc2\x91\xa3\x27\xf0\x7c\xf7\x85\xb1\x73\x63\x0f\
\xd5\xd7\x67\x88\xd5\x38\xc4\x63\xb5\x18\x21\x83\x8e\x6c\x96\xbe\
\xbe\x3c\x99\xfa\x59\x5c\xd9\xd8\xa8\x94\x88\x70\xe3\xb2\x5b\x24\
\x3f\xd0\x8f\xef\x07\x3c\xf5\xd4\x93\xdc\x77\xdf\x57\x70\x5d\x97\
\xf6\x3d\x7b\xa8\x56\x5c\x6a\x6b\x63\xa7\x8a\x23\xc5\x85\x4b\x97\
\x2e\x45\x89\x08\x2f\xbe\xf8\x9b\xef\xfd\xf9\x4f\x5b\x9f\x77\x5d\
\x17\xd7\x75\xf1\x83\x80\x52\xe9\x02\x6f\xfc\xed\x35\x2a\x95\xf2\
\x7b\xcb\x9f\x79\xf6\x36\x0e\x1c\x40\xfa\xfb\xb3\x4a\x44\x78\xff\
\xbd\x66\xaa\x6e\x55\xf5\xf6\xf5\xd5\xec\xdb\xb7\xef\xef\x67\xce\
\xf4\xae\x0a\x3c\x9f\x1f\x6d\xf8\xfe\xb7\xeb\x67\x67\xb6\x04\xd7\
\x2c\x39\xd8\x07\x4b\xb2\xf0\xc4\xf4\xee\xa6\x76\xe6\xba\x2e\x43\
\x43\x43\xcb\x9a\x9b\x5b\x77\x77\xe7\x72\x0f\x07\x12\x4c\x9d\x2b\
\x11\xb9\x34\x25\xc0\x50\x4a\xa1\x69\x5a\xe8\x7f\xfb\x0f\xed\xad\
\x4b\xa7\x56\xda\x31\xe7\x19\xdf\xf3\xa5\x58\x2c\xde\x0d\x28\x60\
\x3a\xc1\x06\x3c\x5d\xd7\x79\xe7\xdd\x1d\xa5\xa9\x49\x45\xc2\x61\
\x34\x4d\x23\x9d\x4e\x6f\x3b\x79\xaa\xeb\xa1\x8f\x27\x94\x26\xc7\
\x7b\xec\xb9\x44\x22\x1e\x32\xad\x30\xd1\x68\x14\xcb\xb4\xf0\x3c\
\x8f\xbd\xff\xf9\x90\xae\xae\xdc\x26\x00\x4d\x29\x85\x52\x8a\x89\
\x72\xe5\xe6\x9e\x9e\xd3\x3f\x88\x27\xe2\xd8\xb6\x4d\xcc\xb6\xd1\
\x35\x8d\xfe\x7c\x3f\xe3\xa5\x32\x33\x66\xa4\x27\xef\x7d\xec\x78\
\x16\xa5\x14\x9d\x9d\xd9\xd6\x2b\x1b\x1b\xb1\x6d\x0b\x3b\x6a\x63\
\x18\x21\xca\xe5\x32\xd9\xce\x93\x18\x7a\x88\x2b\x1a\x17\xdc\x05\
\xa0\xf9\x81\x0b\xe2\xbf\xd9\xd8\x78\x05\x89\x54\x9c\x68\x34\x4a\
\xc4\x8c\xa0\x94\xe2\x78\xc7\x09\x02\x3f\xc0\x71\x9c\x4a\x3e\x9f\
\xff\x07\x80\xd6\x71\x3c\xfb\xe0\x3d\x6b\xef\x5d\xbb\x7a\xd5\xe7\
\x58\xf7\xb5\xfb\x89\xd9\x31\xcc\x70\x84\xe1\xe2\x30\x7d\xbd\x79\
\x92\xc9\x14\x23\xa3\xc3\x73\x0b\x85\x02\x00\xda\xe0\xc0\x50\x4d\
\x32\x99\x24\x9d\x4e\x93\xcb\xe5\x98\xdd\x30\x9f\xad\x5b\x5f\xe3\
\x54\x57\x17\xc9\x54\x0a\xcf\x73\x5b\x95\xd2\x07\x17\x2f\x5e\x34\
\x99\xb0\xe8\xea\x45\x4f\x2a\xa5\x70\x6c\x87\x1a\x27\x46\x66\xe6\
\x2c\x1e\x7b\xec\x71\x3e\xdc\xb3\x8f\xba\xba\x04\xcb\x9f\xdf\xf4\
\x97\xdb\x7e\xf2\x88\x24\x17\x5f\x2d\x25\x5d\xbf\x5e\x93\x20\x60\
\xc3\x8f\x37\x44\x63\xb1\x18\xb1\x58\x8c\x44\x22\x4e\x32\x91\xe4\
\x0f\x5b\x5e\xa6\x5c\x2e\xff\x9e\x7d\xfb\x7e\xce\x47\x1f\x31\x91\
\xcf\xd3\x1a\x04\x3f\xd5\x08\x14\x31\xc7\xae\xac\xff\xce\x7a\xb5\
\x72\xf5\xca\xf5\xa9\x74\x9d\xe7\xc4\x62\x5c\x75\xcd\x55\xe3\xa1\
\x50\xe8\x81\xfe\xee\xee\x9b\xdb\x80\x57\xc0\xcf\xc1\xba\x69\xc7\
\x4d\x85\x88\xa0\x94\x02\x50\x22\x22\x00\xba\xae\x53\x28\x0c\x7f\
\xfe\xd0\xa1\xc3\x6f\x5e\x28\x95\xac\x54\x2a\x49\xaa\x2e\x85\xe3\
\xd8\xe8\x9a\x36\x61\xe8\xc6\x66\xcb\xb2\x36\x45\xa3\xd1\x1c\x40\
\x10\x08\x20\x84\x42\x21\x3e\x01\x10\x11\x03\x98\xa5\x94\xca\x03\
\xfe\x54\xf1\xae\xee\xdc\x13\xc7\x4f\x64\x1f\x8d\xd7\xd6\xe0\x38\
\x0e\xb6\x1d\x25\x1c\x09\x61\x59\x16\x4e\xd4\x26\x12\x89\xa0\x69\
\x1a\x63\x63\x63\x72\xfe\xfc\xf9\xe7\x32\x99\xcc\xc3\x0a\x41\x69\
\xfa\x27\x00\xea\x52\x13\x93\x5d\xb8\xae\x1b\xdb\xb3\xe7\xc3\x0f\
\x2a\xd5\xea\x92\x54\x2a\x85\x15\x35\xb1\xed\x28\x91\x48\x04\xd3\
\x34\xb1\xa3\x51\x42\x46\x08\x11\xa1\x5a\xad\x32\x30\x38\x48\xae\
\xa7\x87\xf1\xd2\x44\xe1\xb3\xab\x57\xdd\x60\x59\xe6\xe9\x8f\xbb\
\x47\x00\x51\x4a\x61\x18\x06\xc5\xe2\xc8\x1d\xef\xbc\xfb\xfe\x98\
\x6e\x18\x4b\x1a\x1a\x1a\x88\xc7\xe3\xc4\x62\x0e\xa6\x65\x62\xdb\
\x36\x4e\x34\x4a\x48\x37\x10\x11\xc6\xc7\xc7\xe9\xca\x75\xd3\xd5\
\x9d\xc3\xf7\x02\x62\xb1\x58\x5d\x47\x47\xf6\x5b\x00\x06\xc0\xe0\
\xd0\xd0\xc7\x28\x12\x3e\xdd\xd3\xfb\xd6\xe0\xe0\xd9\xdb\x1b\x1a\
\x1a\xb0\xa3\x36\x11\x33\x4c\xd8\x0c\x61\x86\x23\x58\xa6\x45\x38\
\x1c\x46\xd7\x34\x7c\x11\xc6\xc6\xc6\xe8\xec\x3c\x49\xa9\x34\x8e\
\xef\xfb\x44\x22\x61\xe6\xce\x9b\xd3\x3b\x3b\x93\xd9\x32\x0d\x28\
\x9c\x1d\x9e\x34\x92\x61\x34\xe5\x07\x06\xda\x5d\xd7\x0d\xcf\x9f\
\x37\x97\x88\x15\xc1\x34\xc3\x84\xc3\x61\x22\xa6\x89\x15\x89\x10\
\x32\x42\x68\x9a\x86\xe7\xfb\x14\x86\x0b\x74\x74\x74\xe2\xba\x1e\
\x22\x42\x6d\x6d\x2d\x89\x44\xbc\x35\x12\x09\xaf\x1c\x2e\x16\x99\
\x39\x63\xc6\x24\xc0\x34\x4d\x4e\x9c\xc8\x3e\xd2\xd2\xd2\xf2\x94\
\x1f\x04\xcc\x9d\x73\x19\x46\x48\xa7\xa9\xe9\x06\x6a\x62\x35\x48\
\x10\x20\x32\xf9\xf1\x69\x4a\xc3\x75\x5d\xfa\x06\xf2\x74\x76\x74\
\x22\x02\xa6\x69\x91\x48\xc4\x19\x3b\x7f\xee\xe9\xfc\x40\xff\x23\
\xfd\xf9\x3e\x2c\xcb\xba\x04\x78\xfd\xaf\x6f\xbc\xb5\x6d\xdb\xf6\
\x2f\x2a\xa5\x28\x97\xcb\x54\xdd\x2a\x55\xd7\xa5\x54\x2a\x51\xa9\
\x54\x58\xb1\xe2\x26\x36\x6e\x7c\x9c\x6b\x97\x5c\x83\x88\xd0\x79\
\xe2\x24\xa7\x4e\x75\x4d\x17\xb6\xa2\x26\x85\x42\xe1\xbb\x9e\xe7\
\x6e\x0e\x87\xc3\x2c\x5c\xb8\x10\xcb\xb2\x98\xd2\x3a\xdb\xb7\xbf\
\xdd\xf0\xca\xcb\xaf\x7c\xd4\xd7\xd7\x3f\x73\x0a\xe2\xfb\x3e\xbe\
\xef\x13\x04\x01\x82\x50\xae\x56\x29\x4f\x4c\xf0\x8d\x6f\xae\x63\
\xcd\x9a\xbb\x26\x9f\xff\x78\x0d\x20\x14\x8b\x23\xb7\xdf\xfa\xea\
\xab\xb3\xa9\x56\x1f\x62\x64\x64\x16\x83\x83\xbb\xc9\xe5\x1e\xa5\
\x54\xea\x52\x22\xc2\x8e\x9d\xcd\xa0\x14\x2d\xbb\x5a\x7e\xd5\xbc\
\x6b\xf7\x0f\xfd\xc0\x47\xd7\x75\x82\x20\x98\x86\x04\x41\x80\x04\
\xc2\x44\x79\x82\x4c\x7d\x86\x4d\x2f\x3c\x4b\x28\x64\x54\x0b\x85\
\xc2\xad\xb7\xfc\xec\xb1\xcd\xe4\xf3\x9f\xa2\xbb\x1b\x2a\x15\x04\
\x28\x88\x30\x02\xbf\x9d\xfc\x46\xde\x6f\x9e\x54\x50\x20\x8c\x8e\
\x8e\xd2\xd5\xdd\xfd\xe5\x23\x47\x8e\xfc\x72\x70\x60\xf0\x32\xcf\
\xf3\xd0\x75\x1d\xa5\xd4\xb4\x21\xc7\xc7\x27\x58\xfb\xa5\x35\xe7\
\xef\xfc\xc2\x1d\x9f\x09\x82\xe0\xe8\xe2\xeb\xae\xdf\x56\xf6\xfd\
\xbb\xe5\xa2\xd6\x4f\x03\x87\x81\x32\x3c\x38\xd9\xc1\x8e\x5d\x53\
\x2a\xd5\x45\x84\x73\x63\x17\x7c\xdf\xf7\x29\x97\xcb\x14\x8b\x45\
\x2a\x95\x6a\x93\xae\x6b\x77\x2a\x8d\xc6\x78\x6d\x7c\x74\xc1\x82\
\xcb\xff\x18\x4f\xd4\xfe\x57\xd3\x15\x86\x6e\xe0\x2c\xbe\x8a\x3e\
\x58\x7c\x1a\x1e\x38\x0b\x0d\x25\x78\x2f\x0c\x5b\x2c\xf0\xfe\x0f\
\xa4\xa4\xa5\x79\xe8\x4b\xcf\x5e\x00\x00\x00\x00\x49\x45\x4e\x44\
\xae\x42\x60\x82\
\x00\x00\x10\xa4\
\x00\x00\x07\x3c\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x0a\x4d\x69\x43\x43\x50\x50\x68\x6f\
\x74\x6f\x73\x68\x6f\x70\x20\x49\x43\x43\x20\x70\x72\x6f\x66\x69\
\x6c\x65\x00\x00\x78\xda\x9d\x53\x77\x58\x93\xf7\x16\x3e\xdf\xf7\
\x65\x0f\x56\x42\xd8\xf0\xb1\x97\x6c\x81\x00\x22\x23\xac\x08\xc8\
\x10\x59\xa2\x10\x92\x00\x61\x84\x10\x12\x40\xc5\x85\x88\x0a\x56\
\x14\x15\x11\x9c\x48\x55\xc4\x82\xd5\x0a\x48\x9d\x88\xe2\xa0\x28\
\xb8\x67\x41\x8a\x88\x5a\x8b\x55\x5c\x38\xee\x1f\xdc\xa7\xb5\x7d\
\x7a\xef\xed\xed\xfb\xd7\xfb\xbc\xe7\x9c\xe7\xfc\xce\x79\xcf\x0f\
\x80\x11\x12\x26\x91\xe6\xa2\x6a\x00\x39\x52\x85\x3c\x3a\xd8\x1f\
\x8f\x4f\x48\xc4\xc9\xbd\x80\x02\x15\x48\xe0\x04\x20\x10\xe6\xcb\
\xc2\x67\x05\xc5\x00\x00\xf0\x03\x79\x78\x7e\x74\xb0\x3f\xfc\x01\
\xaf\x6f\x00\x02\x00\x70\xd5\x2e\x24\x12\xc7\xe1\xff\x83\xba\x50\
\x26\x57\x00\x20\x91\x00\xe0\x22\x12\xe7\x0b\x01\x90\x52\x00\xc8\
\x2e\x54\xc8\x14\x00\xc8\x18\x00\xb0\x53\xb3\x64\x0a\x00\x94\x00\
\x00\x6c\x79\x7c\x42\x22\x00\xaa\x0d\x00\xec\xf4\x49\x3e\x05\x00\
\xd8\xa9\x93\xdc\x17\x00\xd8\xa2\x1c\xa9\x08\x00\x8d\x01\x00\x99\
\x28\x47\x24\x02\x40\xbb\x00\x60\x55\x81\x52\x2c\x02\xc0\xc2\x00\
\xa0\xac\x40\x22\x2e\x04\xc0\xae\x01\x80\x59\xb6\x32\x47\x02\x80\
\xbd\x05\x00\x76\x8e\x58\x90\x0f\x40\x60\x00\x80\x99\x42\x2c\xcc\
\x00\x20\x38\x02\x00\x43\x1e\x13\xcd\x03\x20\x4c\x03\xa0\x30\xd2\
\xbf\xe0\xa9\x5f\x70\x85\xb8\x48\x01\x00\xc0\xcb\x95\xcd\x97\x4b\
\xd2\x33\x14\xb8\x95\xd0\x1a\x77\xf2\xf0\xe0\xe2\x21\xe2\xc2\x6c\
\xb1\x42\x61\x17\x29\x10\x66\x09\xe4\x22\x9c\x97\x9b\x23\x13\x48\
\xe7\x03\x4c\xce\x0c\x00\x00\x1a\xf9\xd1\xc1\xfe\x38\x3f\x90\xe7\
\xe6\xe4\xe1\xe6\x66\xe7\x6c\xef\xf4\xc5\xa2\xfe\x6b\xf0\x6f\x22\
\x3e\x21\xf1\xdf\xfe\xbc\x8c\x02\x04\x00\x10\x4e\xcf\xef\xda\x5f\
\xe5\xe5\xd6\x03\x70\xc7\x01\xb0\x75\xbf\x6b\xa9\x5b\x00\xda\x56\
\x00\x68\xdf\xf9\x5d\x33\xdb\x09\xa0\x5a\x0a\xd0\x7a\xf9\x8b\x79\
\x38\xfc\x40\x1e\x9e\xa1\x50\xc8\x3c\x1d\x1c\x0a\x0b\x0b\xed\x25\
\x62\xa1\xbd\x30\xe3\x8b\x3e\xff\x33\xe1\x6f\xe0\x8b\x7e\xf6\xfc\
\x40\x1e\xfe\xdb\x7a\xf0\x00\x71\x9a\x40\x99\xad\xc0\xa3\x83\xfd\
\x71\x61\x6e\x76\xae\x52\x8e\xe7\xcb\x04\x42\x31\x6e\xf7\xe7\x23\
\xfe\xc7\x85\x7f\xfd\x8e\x29\xd1\xe2\x34\xb1\x5c\x2c\x15\x8a\xf1\
\x58\x89\xb8\x50\x22\x4d\xc7\x79\xb9\x52\x91\x44\x21\xc9\x95\xe2\
\x12\xe9\x7f\x32\xf1\x1f\x96\xfd\x09\x93\x77\x0d\x00\xac\x86\x4f\
\xc0\x4e\xb6\x07\xb5\xcb\x6c\xc0\x7e\xee\x01\x02\x8b\x0e\x58\xd2\
\x76\x00\x40\x7e\xf3\x2d\x8c\x1a\x0b\x91\x00\x10\x67\x34\x32\x79\
\xf7\x00\x00\x93\xbf\xf9\x8f\x40\x2b\x01\x00\xcd\x97\xa4\xe3\x00\
\x00\xbc\xe8\x18\x5c\xa8\x94\x17\x4c\xc6\x08\x00\x00\x44\xa0\x81\
\x2a\xb0\x41\x07\x0c\xc1\x14\xac\xc0\x0e\x9c\xc1\x1d\xbc\xc0\x17\
\x02\x61\x06\x44\x40\x0c\x24\xc0\x3c\x10\x42\x06\xe4\x80\x1c\x0a\
\xa1\x18\x96\x41\x19\x54\xc0\x3a\xd8\x04\xb5\xb0\x03\x1a\xa0\x11\
\x9a\xe1\x10\xb4\xc1\x31\x38\x0d\xe7\xe0\x12\x5c\x81\xeb\x70\x17\
\x06\x60\x18\x9e\xc2\x18\xbc\x86\x09\x04\x41\xc8\x08\x13\x61\x21\
\x3a\x88\x11\x62\x8e\xd8\x22\xce\x08\x17\x99\x8e\x04\x22\x61\x48\
\x34\x92\x80\xa4\x20\xe9\x88\x14\x51\x22\xc5\xc8\x72\xa4\x02\xa9\
\x42\x6a\x91\x5d\x48\x23\xf2\x2d\x72\x14\x39\x8d\x5c\x40\xfa\x90\
\xdb\xc8\x20\x32\x8a\xfc\x8a\xbc\x47\x31\x94\x81\xb2\x51\x03\xd4\
\x02\x75\x40\xb9\xa8\x1f\x1a\x8a\xc6\xa0\x73\xd1\x74\x34\x0f\x5d\
\x80\x96\xa2\x6b\xd1\x1a\xb4\x1e\x3d\x80\xb6\xa2\xa7\xd1\x4b\xe8\
\x75\x74\x00\x7d\x8a\x8e\x63\x80\xd1\x31\x0e\x66\x8c\xd9\x61\x5c\
\x8c\x87\x45\x60\x89\x58\x1a\x26\xc7\x16\x63\xe5\x58\x35\x56\x8f\
\x35\x63\x1d\x58\x37\x76\x15\x1b\xc0\x9e\x61\xef\x08\x24\x02\x8b\
\x80\x13\xec\x08\x5e\x84\x10\xc2\x6c\x82\x90\x90\x47\x58\x4c\x58\
\x43\xa8\x25\xec\x23\xb4\x12\xba\x08\x57\x09\x83\x84\x31\xc2\x27\
\x22\x93\xa8\x4f\xb4\x25\x7a\x12\xf9\xc4\x78\x62\x3a\xb1\x90\x58\
\x46\xac\x26\xee\x21\x1e\x21\x9e\x25\x5e\x27\x0e\x13\x5f\x93\x48\
\x24\x0e\xc9\x92\xe4\x4e\x0a\x21\x25\x90\x32\x49\x0b\x49\x6b\x48\
\xdb\x48\x2d\xa4\x53\xa4\x3e\xd2\x10\x69\x9c\x4c\x26\xeb\x90\x6d\
\xc9\xde\xe4\x08\xb2\x80\xac\x20\x97\x91\xb7\x90\x0f\x90\x4f\x92\
\xfb\xc9\xc3\xe4\xb7\x14\x3a\xc5\x88\xe2\x4c\x09\xa2\x24\x52\xa4\
\x94\x12\x4a\x35\x65\x3f\xe5\x04\xa5\x9f\x32\x42\x99\xa0\xaa\x51\
\xcd\xa9\x9e\xd4\x08\xaa\x88\x3a\x9f\x5a\x49\x6d\xa0\x76\x50\x2f\
\x53\x87\xa9\x13\x34\x75\x9a\x25\xcd\x9b\x16\x43\xcb\xa4\x2d\xa3\
\xd5\xd0\x9a\x69\x67\x69\xf7\x68\x2f\xe9\x74\xba\x09\xdd\x83\x1e\
\x45\x97\xd0\x97\xd2\x6b\xe8\x07\xe9\xe7\xe9\x83\xf4\x77\x0c\x0d\
\x86\x0d\x83\xc7\x48\x62\x28\x19\x6b\x19\x7b\x19\xa7\x18\xb7\x19\
\x2f\x99\x4c\xa6\x05\xd3\x97\x99\xc8\x54\x30\xd7\x32\x1b\x99\x67\
\x98\x0f\x98\x6f\x55\x58\x2a\xf6\x2a\x7c\x15\x91\xca\x12\x95\x3a\
\x95\x56\x95\x7e\x95\xe7\xaa\x54\x55\x73\x55\x3f\xd5\x79\xaa\x0b\
\x54\xab\x55\x0f\xab\x5e\x56\x7d\xa6\x46\x55\xb3\x50\xe3\xa9\x09\
\xd4\x16\xab\xd5\xa9\x1d\x55\xbb\xa9\x36\xae\xce\x52\x77\x52\x8f\
\x50\xcf\x51\x5f\xa3\xbe\x5f\xfd\x82\xfa\x63\x0d\xb2\x86\x85\x46\
\xa0\x86\x48\xa3\x54\x63\xb7\xc6\x19\x8d\x21\x16\xc6\x32\x65\xf1\
\x58\x42\xd6\x72\x56\x03\xeb\x2c\x6b\x98\x4d\x62\x5b\xb2\xf9\xec\
\x4c\x76\x05\xfb\x1b\x76\x2f\x7b\x4c\x53\x43\x73\xaa\x66\xac\x66\
\x91\x66\x9d\xe6\x71\xcd\x01\x0e\xc6\xb1\xe0\xf0\x39\xd9\x9c\x4a\
\xce\x21\xce\x0d\xce\x7b\x2d\x03\x2d\x3f\x2d\xb1\xd6\x6a\xad\x66\
\xad\x7e\xad\x37\xda\x7a\xda\xbe\xda\x62\xed\x72\xed\x16\xed\xeb\
\xda\xef\x75\x70\x9d\x40\x9d\x2c\x9d\xf5\x3a\x6d\x3a\xf7\x75\x09\
\xba\x36\xba\x51\xba\x85\xba\xdb\x75\xcf\xea\x3e\xd3\x63\xeb\x79\
\xe9\x09\xf5\xca\xf5\x0e\xe9\xdd\xd1\x47\xf5\x6d\xf4\xa3\xf5\x17\
\xea\xef\xd6\xef\xd1\x1f\x37\x30\x34\x08\x36\x90\x19\x6c\x31\x38\
\x63\xf0\xcc\x90\x63\xe8\x6b\x98\x69\xb8\xd1\xf0\x84\xe1\xa8\x11\
\xcb\x68\xba\x91\xc4\x68\xa3\xd1\x49\xa3\x27\xb8\x26\xee\x87\x67\
\xe3\x35\x78\x17\x3e\x66\xac\x6f\x1c\x62\xac\x34\xde\x65\xdc\x6b\
\x3c\x61\x62\x69\x32\xdb\xa4\xc4\xa4\xc5\xe4\xbe\x29\xcd\x94\x6b\
\x9a\x66\xba\xd1\xb4\xd3\x74\xcc\xcc\xc8\x2c\xdc\xac\xd8\xac\xc9\
\xec\x8e\x39\xd5\x9c\x6b\x9e\x61\xbe\xd9\xbc\xdb\xfc\x8d\x85\xa5\
\x45\x9c\xc5\x4a\x8b\x36\x8b\xc7\x96\xda\x96\x7c\xcb\x05\x96\x4d\
\x96\xf7\xac\x98\x56\x3e\x56\x79\x56\xf5\x56\xd7\xac\x49\xd6\x5c\
\xeb\x2c\xeb\x6d\xd6\x57\x6c\x50\x1b\x57\x9b\x0c\x9b\x3a\x9b\xcb\
\xb6\xa8\xad\x9b\xad\xc4\x76\x9b\x6d\xdf\x14\xe2\x14\x8f\x29\xd2\
\x29\xf5\x53\x6e\xda\x31\xec\xfc\xec\x0a\xec\x9a\xec\x06\xed\x39\
\xf6\x61\xf6\x25\xf6\x6d\xf6\xcf\x1d\xcc\x1c\x12\x1d\xd6\x3b\x74\
\x3b\x7c\x72\x74\x75\xcc\x76\x6c\x70\xbc\xeb\xa4\xe1\x34\xc3\xa9\
\xc4\xa9\xc3\xe9\x57\x67\x1b\x67\xa1\x73\x9d\xf3\x35\x17\xa6\x4b\
\x90\xcb\x12\x97\x76\x97\x17\x53\x6d\xa7\x8a\xa7\x6e\x9f\x7a\xcb\
\x95\xe5\x1a\xee\xba\xd2\xb5\xd3\xf5\xa3\x9b\xbb\x9b\xdc\xad\xd9\
\x6d\xd4\xdd\xcc\x3d\xc5\x7d\xab\xfb\x4d\x2e\x9b\x1b\xc9\x5d\xc3\
\x3d\xef\x41\xf4\xf0\xf7\x58\xe2\x71\xcc\xe3\x9d\xa7\x9b\xa7\xc2\
\xf3\x90\xe7\x2f\x5e\x76\x5e\x59\x5e\xfb\xbd\x1e\x4f\xb3\x9c\x26\
\x9e\xd6\x30\x6d\xc8\xdb\xc4\x5b\xe0\xbd\xcb\x7b\x60\x3a\x3e\x3d\
\x65\xfa\xce\xe9\x03\x3e\xc6\x3e\x02\x9f\x7a\x9f\x87\xbe\xa6\xbe\
\x22\xdf\x3d\xbe\x23\x7e\xd6\x7e\x99\x7e\x07\xfc\x9e\xfb\x3b\xfa\
\xcb\xfd\x8f\xf8\xbf\xe1\x79\xf2\x16\xf1\x4e\x05\x60\x01\xc1\x01\
\xe5\x01\xbd\x81\x1a\x81\xb3\x03\x6b\x03\x1f\x04\x99\x04\xa5\x07\
\x35\x05\x8d\x05\xbb\x06\x2f\x0c\x3e\x15\x42\x0c\x09\x0d\x59\x1f\
\x72\x93\x6f\xc0\x17\xf2\x1b\xf9\x63\x33\xdc\x67\x2c\x9a\xd1\x15\
\xca\x08\x9d\x15\x5a\x1b\xfa\x30\xcc\x26\x4c\x1e\xd6\x11\x8e\x86\
\xcf\x08\xdf\x10\x7e\x6f\xa6\xf9\x4c\xe9\xcc\xb6\x08\x88\xe0\x47\
\x6c\x88\xb8\x1f\x69\x19\x99\x17\xf9\x7d\x14\x29\x2a\x32\xaa\x2e\
\xea\x51\xb4\x53\x74\x71\x74\xf7\x2c\xd6\xac\xe4\x59\xfb\x67\xbd\
\x8e\xf1\x8f\xa9\x8c\xb9\x3b\xdb\x6a\xb6\x72\x76\x67\xac\x6a\x6c\
\x52\x6c\x63\xec\x9b\xb8\x80\xb8\xaa\xb8\x81\x78\x87\xf8\x45\xf1\
\x97\x12\x74\x13\x24\x09\xed\x89\xe4\xc4\xd8\xc4\x3d\x89\xe3\x73\
\x02\xe7\x6c\x9a\x33\x9c\xe4\x9a\x54\x96\x74\x63\xae\xe5\xdc\xa2\
\xb9\x17\xe6\xe9\xce\xcb\x9e\x77\x3c\x59\x35\x59\x90\x7c\x38\x85\
\x98\x12\x97\xb2\x3f\xe5\x83\x20\x42\x50\x2f\x18\x4f\xe5\xa7\x6e\
\x4d\x1d\x13\xf2\x84\x9b\x85\x4f\x45\xbe\xa2\x8d\xa2\x51\xb1\xb7\
\xb8\x4a\x3c\x92\xe6\x9d\x56\x95\xf6\x38\xdd\x3b\x7d\x43\xfa\x68\
\x86\x4f\x46\x75\xc6\x33\x09\x4f\x52\x2b\x79\x91\x19\x92\xb9\x23\
\xf3\x4d\x56\x44\xd6\xde\xac\xcf\xd9\x71\xd9\x2d\x39\x94\x9c\x94\
\x9c\xa3\x52\x0d\x69\x96\xb4\x2b\xd7\x30\xb7\x28\xb7\x4f\x66\x2b\
\x2b\x93\x0d\xe4\x79\xe6\x6d\xca\x1b\x93\x87\xca\xf7\xe4\x23\xf9\
\x73\xf3\xdb\x15\x6c\x85\x4c\xd1\xa3\xb4\x52\xae\x50\x0e\x16\x4c\
\x2f\xa8\x2b\x78\x5b\x18\x5b\x78\xb8\x48\xbd\x48\x5a\xd4\x33\xdf\
\x66\xfe\xea\xf9\x23\x0b\x82\x16\x7c\xbd\x90\xb0\x50\xb8\xb0\xb3\
\xd8\xb8\x78\x59\xf1\xe0\x22\xbf\x45\xbb\x16\x23\x8b\x53\x17\x77\
\x2e\x31\x5d\x52\xba\x64\x78\x69\xf0\xd2\x7d\xcb\x68\xcb\xb2\x96\
\xfd\x50\xe2\x58\x52\x55\xf2\x6a\x79\xdc\xf2\x8e\x52\x83\xd2\xa5\
\xa5\x43\x2b\x82\x57\x34\x95\xa9\x94\xc9\xcb\x6e\xae\xf4\x5a\xb9\
\x63\x15\x61\x95\x64\x55\xef\x6a\x97\xd5\x5b\x56\x7f\x2a\x17\x95\
\x5f\xac\x70\xac\xa8\xae\xf8\xb0\x46\xb8\xe6\xe2\x57\x4e\x5f\xd5\
\x7c\xf5\x79\x6d\xda\xda\xde\x4a\xb7\xca\xed\xeb\x48\xeb\xa4\xeb\
\x6e\xac\xf7\x59\xbf\xaf\x4a\xbd\x6a\x41\xd5\xd0\x86\xf0\x0d\xad\
\x1b\xf1\x8d\xe5\x1b\x5f\x6d\x4a\xde\x74\xa1\x7a\x6a\xf5\x8e\xcd\
\xb4\xcd\xca\xcd\x03\x35\x61\x35\xed\x5b\xcc\xb6\xac\xdb\xf2\xa1\
\x36\xa3\xf6\x7a\x9d\x7f\x5d\xcb\x56\xfd\xad\xab\xb7\xbe\xd9\x26\
\xda\xd6\xbf\xdd\x77\x7b\xf3\x0e\x83\x1d\x15\x3b\xde\xef\x94\xec\
\xbc\xb5\x2b\x78\x57\x6b\xbd\x45\x7d\xf5\x6e\xd2\xee\x82\xdd\x8f\
\x1a\x62\x1b\xba\xbf\xe6\x7e\xdd\xb8\x47\x77\x4f\xc5\x9e\x8f\x7b\
\xa5\x7b\x07\xf6\x45\xef\xeb\x6a\x74\x6f\x6c\xdc\xaf\xbf\xbf\xb2\
\x09\x6d\x52\x36\x8d\x1e\x48\x3a\x70\xe5\x9b\x80\x6f\xda\x9b\xed\
\x9a\x77\xb5\x70\x5a\x2a\x0e\xc2\x41\xe5\xc1\x27\xdf\xa6\x7c\x7b\
\xe3\x50\xe8\xa1\xce\xc3\xdc\xc3\xcd\xdf\x99\x7f\xb7\xf5\x08\xeb\
\x48\x79\x2b\xd2\x3a\xbf\x75\xac\x2d\xa3\x6d\xa0\x3d\xa1\xbd\xef\
\xe8\x8c\xa3\x9d\x1d\x5e\x1d\x47\xbe\xb7\xff\x7e\xef\x31\xe3\x63\
\x75\xc7\x35\x8f\x57\x9e\xa0\x9d\x28\x3d\xf1\xf9\xe4\x82\x93\xe3\
\xa7\x64\xa7\x9e\x9d\x4e\x3f\x3d\xd4\x99\xdc\x79\xf7\x4c\xfc\x99\
\x6b\x5d\x51\x5d\xbd\x67\x43\xcf\x9e\x3f\x17\x74\xee\x4c\xb7\x5f\
\xf7\xc9\xf3\xde\xe7\x8f\x5d\xf0\xbc\x70\xf4\x22\xf7\x62\xdb\x25\
\xb7\x4b\xad\x3d\xae\x3d\x47\x7e\x70\xfd\xe1\x48\xaf\x5b\x6f\xeb\
\x65\xf7\xcb\xed\x57\x3c\xae\x74\xf4\x4d\xeb\x3b\xd1\xef\xd3\x7f\
\xfa\x6a\xc0\xd5\x73\xd7\xf8\xd7\x2e\x5d\x9f\x79\xbd\xef\xc6\xec\
\x1b\xb7\x6e\x26\xdd\x1c\xb8\x25\xba\xf5\xf8\x76\xf6\xed\x17\x77\
\x0a\xee\x4c\xdc\x5d\x7a\x8f\x78\xaf\xfc\xbe\xda\xfd\xea\x07\xfa\
\x0f\xea\x7f\xb4\xfe\xb1\x65\xc0\x6d\xe0\xf8\x60\xc0\x60\xcf\xc3\
\x59\x0f\xef\x0e\x09\x87\x9e\xfe\x94\xff\xd3\x87\xe1\xd2\x47\xcc\
\x47\xd5\x23\x46\x23\x8d\x8f\x9d\x1f\x1f\x1b\x0d\x1a\xbd\xf2\x64\
\xce\x93\xe1\xa7\xb2\xa7\x13\xcf\xca\x7e\x56\xff\x79\xeb\x73\xab\
\xe7\xdf\xfd\xe2\xfb\x4b\xcf\x58\xfc\xd8\xf0\x0b\xf9\x8b\xcf\xbf\
\xae\x79\xa9\xf3\x72\xef\xab\xa9\xaf\x3a\xc7\x23\xc7\x1f\xbc\xce\
\x79\x3d\xf1\xa6\xfc\xad\xce\xdb\x7d\xef\xb8\xef\xba\xdf\xc7\xbd\
\x1f\x99\x28\xfc\x40\xfe\x50\xf3\xd1\xfa\x63\xc7\xa7\xd0\x4f\xf7\
\x3e\xe7\x7c\xfe\xfc\x2f\xf7\x84\xf3\xfb\x25\xd2\x9f\x33\x00\x00\
\x00\x20\x63\x48\x52\x4d\x00\x00\x7a\x25\x00\x00\x80\x83\x00\x00\
\xf9\xff\x00\x00\x80\xe9\x00\x00\x75\x30\x00\x00\xea\x60\x00\x00\
\x3a\x98\x00\x00\x17\x6f\x92\x5f\xc5\x46\x00\x00\x05\xd1\x49\x44\
\x41\x54\x78\xda\x7c\x95\x4d\x6c\x5c\x57\x1d\xc5\x7f\xf7\xf3\x7d\
\xcd\x7b\x33\x1e\x4f\x9c\xc8\x4e\xed\xba\x81\xaa\xa1\x75\x58\xd4\
\x52\x25\x04\xa2\x6d\x40\x7c\xac\x68\x82\x22\xb1\x28\x2c\xa9\x10\
\xad\x08\x08\x04\xb4\x12\x2a\x15\xaa\x10\xd0\xd2\x6e\x41\x05\xc4\
\xa2\x05\x01\x8b\x82\x84\x14\x56\xa9\x40\x4a\x88\x90\x1a\xc7\x85\
\x36\x89\xab\x24\x76\x6c\x8f\xed\x71\x6d\x8f\xe7\xfb\xbd\x77\x59\
\x8c\x67\xec\x10\x89\xbf\x74\xf5\xde\xe2\xdd\x77\xee\xff\x9c\xff\
\x39\x57\x38\xe7\xc8\xb2\x8c\x41\x39\xe7\x10\x42\x0c\xdf\x07\x25\
\xa5\xa4\x56\xab\x3d\xf2\xde\x7b\xd7\x4e\xa5\x69\xf6\x48\xa9\x54\
\x5c\x2f\x8d\x14\x2f\x56\x0e\x55\xfe\x16\x85\xe1\xe5\x3c\xcb\x0f\
\x7e\x2f\x00\xa7\xb5\x46\xfc\x1f\x00\xe1\xf6\x76\x28\xa5\xd8\xd8\
\xa8\x7d\x6e\x6e\xee\xca\x1f\x77\x1b\x8d\x60\x74\xb4\xcc\x68\x65\
\x94\x42\x21\x42\x49\xd9\xd2\x4a\xff\x22\x08\x82\x97\xc3\x30\xbc\
\x01\x90\xe7\x0e\x70\x18\x63\x90\xdc\x5d\x02\xd0\x80\x14\x42\x20\
\x84\xc0\x39\x67\x56\x56\x57\x9f\x4b\xb3\x3c\x18\x1b\x3b\x4c\xa9\
\x54\x22\x08\x7d\xfc\x20\xa0\x52\x39\x14\x94\xcb\xe5\x67\x3a\x9d\
\xce\xa5\x5a\xad\xf6\x85\xfe\x1e\xe4\x1e\x09\x77\x02\x38\xe7\x34\
\x30\x01\x38\x20\x1b\x9c\xfe\xc6\xcd\x5b\x3f\x58\x5c\x5a\xfe\x58\
\xa1\x10\x11\x86\x01\xbe\xef\x23\x85\x04\xe7\xc8\xd2\x14\x29\x25\
\x95\x4a\xa5\xe2\xfb\xfe\x9f\x56\x56\x56\x7e\x2a\xa5\xcc\x95\x94\
\x77\x01\x08\x21\x84\x27\x84\xa8\x03\x99\x73\x0e\xa5\x14\xeb\x1b\
\xb5\x4f\xbe\xfb\xee\xd5\xef\x84\x81\x4f\x92\x24\x04\xa1\x87\xb1\
\x1a\x6b\x2d\x9e\xe7\xa1\xb5\x06\x20\x4d\x53\xe2\x38\x16\xb7\x96\
\x96\xbe\x75\xf5\xda\xf5\x6f\x08\xa9\xee\xee\x00\x68\x02\xdb\x03\
\x1d\xda\xed\x76\x3c\x7f\x65\xfe\x55\x29\x85\x29\x14\x0a\x08\x09\
\xc6\x18\x8c\x31\x7d\x00\x6b\x51\x4a\xe1\x9c\xa3\xd7\xeb\x71\xe3\
\xe6\x4d\xda\xed\x36\x0b\x0b\xef\x3f\xdb\x6a\xb5\x27\xff\x17\xc0\
\xed\x2d\x06\xd4\x5c\x5f\x78\xff\xf9\x9d\x7a\xfd\x44\xb1\x58\xc4\
\xf3\x3c\x3c\xcf\x0e\x01\x3c\xeb\x21\xa5\x42\x08\x41\x96\x65\x34\
\x9a\x0d\x56\xab\xab\xa4\x69\x86\x10\xb2\xb2\xbc\xbc\x7c\x92\x3d\
\x31\xef\x54\x58\x88\x3e\x35\xeb\x1b\x9f\xbd\x7e\x7d\xe1\x6c\xb9\
\x5c\x26\x8e\x63\x3c\xcf\xc3\x5a\x8d\xd2\x0a\x6b\x2d\x46\x2b\x94\
\x10\xe4\x79\x4e\xa7\xd3\xa1\xba\xb6\x46\xb3\xd9\x46\x20\x28\x14\
\x22\xea\xf5\xdd\xa9\x21\xc0\x60\xee\x07\x5c\x76\xba\xbd\x4f\xcc\
\xcf\xbf\xf3\x5b\x63\x0c\xc5\x62\x11\xa5\x15\xda\xc8\xe1\xc9\x3d\
\x63\x90\x52\x81\x10\x74\x7b\x5d\x6a\x9b\x35\xd6\xd6\xd6\xc1\xf5\
\x3b\x0f\xc3\x90\x4a\xa5\xb2\x38\x04\x58\xad\x56\x0f\xf0\xe4\xec\
\xad\x9b\x4b\xcf\x6e\xef\xec\x56\x8e\x1e\x1d\xc7\x9a\x3e\xd7\xc6\
\x1a\xac\x31\x78\xc6\xa2\x94\x46\x0a\x41\x96\xe7\x34\x1b\x4d\x56\
\x57\xd7\xc8\xb3\xbe\x9f\xb4\x56\x1c\x1a\xab\x2c\x1d\x39\x32\x76\
\x6e\x08\xb0\xb9\xb9\x3d\xa4\xa7\x97\x76\x7f\x52\xad\x56\x3f\x53\
\x2e\x97\x89\xc2\x10\x63\x35\xda\x28\x8c\x36\x18\x63\xd1\x4a\xf7\
\xbd\x01\xf4\xba\x5d\xaa\xd5\x2a\x3b\xf5\x1d\x04\x12\xad\x35\xa3\
\x95\x51\x4a\xa5\xe2\xd7\x1c\x2c\x0e\x45\xce\xb3\x94\x3c\x4b\x11\
\xb8\xd9\xda\x46\xed\x29\xdf\xf7\x29\x26\x45\x84\x92\x68\xa3\xd0\
\x5a\xa3\x8d\xc1\x18\x8d\x54\x72\x28\xec\xd6\xf6\x16\xd5\xea\x1a\
\xb8\xbe\x16\x61\x18\x62\xb4\x79\xab\xd5\x6a\xfd\x79\x73\x73\x93\
\x61\x07\x4e\x38\xc2\x20\xa0\xdb\xe9\x7e\x4f\x08\xec\xe4\xe4\x3d\
\x8c\x8c\x94\x10\x52\xe0\x5c\xdf\xf2\x56\x1b\xa4\x52\x43\xbd\xda\
\x9d\x36\x2b\xab\xab\xb4\xdb\x2d\x84\x90\x04\x41\x88\x94\xb2\x53\
\xaf\xef\x7c\xdf\x91\x93\x65\x19\x87\xc7\xc6\xfa\x00\x81\x17\xf0\
\x9f\x7f\x5f\xfd\xee\xf9\xf3\xe7\x4f\x65\x79\xce\xd4\xe4\x3d\xcc\
\x7c\xf4\x21\x66\x67\x1f\x26\x89\x13\x5c\xde\x0f\x32\xe7\x1c\x02\
\x41\xaf\xd7\x63\xbd\x56\x63\x7d\x6d\x03\x90\x78\x5e\x40\xb1\x58\
\x64\xa7\xbe\xfd\xf3\x3c\xcf\xfe\x51\xdf\xad\x13\x04\xc1\x7e\x07\
\x6f\xbf\x7d\xf9\xe9\x97\x7e\xf6\xca\x8b\x5b\x5b\x1f\xd0\x6a\xb7\
\x68\xb7\xdb\x18\x63\x79\xe0\xf8\x03\x7c\xe5\xcb\x4f\x72\xe6\xcc\
\x69\x3c\xcf\x02\xd0\xeb\xf5\xd8\xa9\xef\xb0\x78\x6b\x91\x6e\xb7\
\x87\xef\xfb\x44\x51\x48\xa7\xd3\x5a\x68\xb5\x9a\x2f\xe7\x79\x4e\
\x1c\xc7\x4c\x4f\x4f\xef\x3b\xf9\xda\xd5\x6b\x9f\x4e\xd3\x1e\x71\
\x1c\x93\xc4\x09\xa5\x52\x09\x63\x0d\x73\x73\x73\x7c\xfd\xe9\x67\
\x38\x75\xfa\x0c\x97\xe7\xae\xf4\x4f\xa4\x35\xd5\xea\x1a\x5b\x1f\
\x6c\x61\xad\x25\x49\x12\x3c\xdf\xb2\xdb\x68\xfc\x18\xa8\xfa\xbe\
\xcf\xd4\xd4\x14\x4a\x1d\x88\x8a\x24\x29\x5e\xd4\x5a\x0f\x5d\x6a\
\xf6\xc6\x31\x49\x12\x46\xcb\x65\x2e\x5e\xbc\xc4\x13\x4f\x7c\x91\
\xd7\x5f\xff\x1d\xad\x76\x9b\xdd\xc6\x2e\xbe\x1f\x50\x88\x63\xc2\
\xc8\xa7\xb1\xdb\x78\x2b\xcb\xf2\x5f\x0a\xa1\x98\x98\x38\x4a\x14\
\x85\xe4\x79\xbe\x0f\x30\x39\x35\xf9\x9b\x89\x89\xf1\x6a\x9e\xe7\
\x78\x9e\x87\xd1\x7b\x59\x63\x2c\x9e\xf5\xa8\x8c\x96\xc9\x1d\x9c\
\xfd\xe6\xb7\x79\xfe\x87\x2f\xe0\x1c\x7b\xd4\x04\x64\x59\x46\xab\
\xdd\xfa\x91\xd2\xca\x09\x29\x50\x5a\xed\xdd\x07\x07\xe2\x3a\x8a\
\xa3\xa5\x47\x1f\x7b\xf4\xc5\x41\x5b\xfd\x58\xb0\xc3\xa7\xd1\x96\
\x42\x18\x51\x4c\x12\x7e\xff\xc6\x1f\xf8\xe7\x85\x4b\xc4\x49\x81\
\x20\xf0\x69\xb5\x5a\xe7\x8c\xd1\xe7\xac\xd1\x58\xa3\xd8\xad\xd7\
\x87\x03\xb1\x1f\x76\xce\x71\xfc\xc1\xe3\xaf\x3c\xfe\xf8\x63\x2f\
\xa9\xbd\x00\xf3\x7d\xff\xc0\xf2\xf0\xac\x25\x0a\x22\x7c\xcf\xe7\
\xcd\x37\xff\x82\xd6\x9a\x3c\xcf\xbb\x69\x9a\xbe\xe0\xfb\x3e\xd6\
\x5a\xa2\xa8\x80\xef\xf9\xf8\x9e\x4f\x5c\x88\x0f\xf8\xc0\x39\x04\
\xf0\xf0\xec\xec\x73\x20\xa2\x0b\x17\x2e\x7c\xb5\xd9\x6c\xf6\xb5\
\xf0\x3c\xb2\x2c\x23\xcf\x32\xb2\x3c\xc7\x58\xc3\xc6\x7a\x8d\xf9\
\xb9\x79\x1e\x9c\xf9\xc8\xaf\x8d\x31\x7f\xcf\xb2\x0c\xa5\x14\xf7\
\x7f\xe8\xc3\x24\x71\xbc\x1f\xc9\xfb\x1d\x08\x5c\x0e\x61\x10\xb4\
\x66\x66\x1e\x7a\xea\xe4\xa7\x4e\x7e\x69\xfa\xbe\xe9\x45\x6b\xfb\
\xa3\x69\xad\x25\x08\x43\x82\x20\x20\x8a\x22\xc2\x30\xe4\xf6\xf2\
\x72\x5d\x6b\xfd\x6a\x14\x45\x58\x6b\x99\x18\x9f\x20\x49\x92\x7e\
\xe6\x1f\xa0\x48\x0f\x6f\x02\x40\x29\x29\xa3\x42\xe4\xee\x9d\xbe\
\xf7\x8d\x91\xf2\xc8\x5f\x6f\xdf\xbe\x7d\x7a\x79\x79\xf9\xc9\x5a\
\x6d\xf3\xe3\xcd\x66\x53\x23\x04\x38\xc7\xf4\xb1\xe9\xe6\x89\x13\
\x33\x67\x85\x10\xef\x00\x8c\x96\x47\x39\x72\xf8\xf0\x1d\x3f\x1e\
\x54\x3f\xae\xa5\x1b\x24\xa9\xb0\x56\x0b\xad\x75\x56\x2a\x95\xb6\
\x7d\xdf\x7f\x6d\x64\x64\xe4\xb5\x4e\xa7\x3b\xab\x94\xfc\xbc\x90\
\xdc\x5f\x2a\x96\xb6\x8e\x1d\xbb\xef\x57\xa5\x91\xe2\xbf\xd2\x2c\
\x45\x2b\xcd\xc4\xf8\x38\x4a\xa9\xe1\x68\x1e\xac\xff\x0e\x00\x68\
\xf0\x5f\xd8\xaf\x76\x9c\x4c\x00\x00\x00\x00\x49\x45\x4e\x44\xae\
\x42\x60\x82\
\x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x01\x97\x70\x0d\x6e\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\
\x0b\x13\x01\x00\x9a\x9c\x18\x00\x00\x06\xdc\x49\x44\x41\x54\x48\
\xc7\x55\x95\x59\x6c\x54\xd7\x19\xc7\xff\xe7\x2e\x73\x77\xcf\x6e\
\x7b\xc6\x0e\x60\x30\x13\xb1\x04\x12\x07\x95\x94\x90\x1a\xda\x4a\
\x49\x53\x35\x54\xb4\x52\x9a\x86\xb4\x4d\xe9\xf2\xd4\x28\x6d\x43\
\x15\xa9\x2f\x51\x93\x80\xd2\x2c\x28\x52\x15\xa9\x8d\x68\x95\xbc\
\x44\x6d\x1a\x51\xd2\x46\x4d\xd8\x8c\xed\xb8\x40\x69\x4b\xd8\xed\
\x19\xb0\xc7\x60\x7b\x6c\x33\x1e\xcc\xc0\x8c\x67\xee\xb9\xe7\x7c\
\x7d\x18\x6c\xc8\x79\x3c\xba\xff\xef\xf7\x2d\xff\xef\x1e\x46\x44\
\x08\x82\x00\x35\xbf\xbe\x16\x44\x84\xcf\x4e\x9d\xa1\x6a\x6d\x8e\
\x40\x44\xe8\xe8\xc8\xd0\xa9\x33\xa7\x09\x9c\x73\xf4\xf7\x0f\xbc\
\xc2\x39\x07\xab\xd7\xeb\xb8\x59\xad\xd0\xa9\xcf\xce\x40\x79\x60\
\xfd\x43\x64\x1a\x26\xda\xda\xd3\x0c\xb7\xa2\x85\xa7\xaf\x16\xbb\
\x87\x72\x59\xf2\x7d\x9f\xfe\x75\xec\x18\x29\x00\xd0\xdb\xd7\x3f\
\x1b\x08\x7e\x64\xe9\x92\x0e\x1c\x3c\x74\x08\xba\xa6\x6d\x54\x00\
\xa0\xe7\x50\xdf\xef\xbf\xfb\xf8\xf7\xf0\xe0\x86\x4d\x88\x44\x23\
\x6c\x5d\x57\xd7\x00\x82\x20\x40\x10\x04\x10\x42\xe0\xe4\xc9\x53\
\xef\x07\x41\x00\xce\x39\x10\x04\x01\xe3\x9c\xe3\x70\x4f\x2f\x15\
\xa6\x26\x89\x73\x4e\x44\x04\x85\x31\x46\xfd\xfd\x03\x57\x97\x74\
\x2c\x42\x22\x16\x47\xff\xc0\x00\xc6\xc6\x26\xb6\xb3\x6c\x2e\x07\
\xd7\x75\xc9\x75\x5d\x10\x49\x9c\x3c\x79\x1a\x89\x64\x8c\xb1\xf5\
\x5f\xd8\x48\xb3\xb3\xb3\xf0\x03\x1f\x6f\xbd\xf5\x3b\x28\xaa\xa2\
\xdc\x7b\xef\x1a\x52\x5e\xda\xf9\x1b\x16\x8f\xc7\x91\x6e\x49\x61\
\xa6\x58\x44\x24\xd2\x44\xc9\x78\x02\x8c\x88\x20\x84\x00\x11\x31\
\xc6\x98\x02\x40\x9c\x3b\x7f\x61\xa0\x52\x99\xdb\x90\x6a\x6b\x46\
\xba\x35\x8d\xf2\xf5\xeb\xc5\x58\x2c\x96\x94\x52\x40\xc1\xad\xc3\
\x18\x23\x55\x55\xc5\x3f\x3e\xfa\x27\x01\x6c\xc3\x5d\x8b\xd2\x48\
\xc6\x93\xd0\x35\x0d\x60\x48\x1c\xea\x39\x42\xa3\xa3\x57\x9e\x66\
\x44\x84\xb3\xe7\x06\x11\x08\xfe\x66\xf9\x7a\xf9\x99\x74\x3a\x05\
\xaf\xc9\x45\xc4\x0b\x43\xd3\x35\x0c\x65\xb3\x18\x1f\x2f\x20\x95\
\x6e\xc5\xdd\x99\x0c\x63\x44\x84\x07\xd6\x7f\x89\x0a\x93\x13\x10\
\x42\x62\xd7\xae\x97\xf1\xd4\x53\x4f\x80\x73\x8e\x81\xa3\x47\xe1\
\xd7\x39\xc2\x61\xef\x52\xe9\x5a\xa9\xb3\xab\xab\xab\x91\xd2\x93\
\xdb\x9e\x78\x36\x9d\x4a\xa3\xb5\xa5\x05\xaf\xbd\xfa\x3a\x56\xaf\
\xee\x42\x26\xb3\x0a\x9e\xe7\xc1\xf5\xec\xfd\x3e\xf7\x3b\xd3\xe9\
\x74\x23\x75\x22\xc2\x81\xfd\x3d\xf0\xb9\xcf\xc6\xc6\xc7\x9b\x4e\
\x9c\x38\xf1\xb7\x2b\x57\xc6\x36\xc9\x40\xe0\x97\x3b\x9e\xfd\x51\
\xba\x2d\xb5\x67\xd5\x8a\x95\x60\x8c\x35\x8a\x9d\x9f\xdd\xfc\xcc\
\x38\xe7\x98\x9e\x9e\x5e\xdf\xd3\xd3\x77\x64\x24\x9f\x7f\x4e\x92\
\x9c\xbf\x67\x44\x74\xbb\x4b\x00\x34\xc6\x18\x14\x45\xd1\xff\x77\
\xf2\xf4\xb1\x44\x32\xde\xed\x78\xee\xab\x22\x10\x54\x2a\x95\xbe\
\x09\x80\x01\x58\x10\x38\x00\x02\x55\x55\xf1\xf1\x27\x07\x2b\xf3\
\x9d\x32\x42\x21\x28\x8a\x82\x64\x32\xb9\xf7\xe2\xa5\xe1\x67\xee\
\x14\x54\x1a\xed\x3d\xff\x46\x34\x1a\xd1\x4d\x2b\x04\xdb\xb6\x61\
\x99\x16\x82\x20\xc0\xb1\x7f\x1f\xc7\xf0\x70\x7e\x37\x00\x28\x8c\
\x31\x30\xc6\x30\x57\xab\x3f\x34\x3a\x7a\xf9\xe7\x91\x68\x04\x8e\
\xe3\xc0\x73\x1c\xa8\x8a\x82\x89\xc2\x04\xaa\x95\x1a\x9a\x9b\x93\
\x8d\xbc\xcf\x5f\xc8\x82\x31\x86\x5c\x2e\xdb\x77\x77\x26\x03\xc7\
\xb1\xe0\xd8\x0e\x34\x4d\x47\xad\x56\x43\x36\x77\x11\x9a\xaa\x63\
\x79\x66\xd9\x63\x00\xa0\x08\xc9\x01\x12\x1f\x64\x32\xcb\x11\x8d\
\x47\x60\xdb\x36\x0c\xd3\x00\x63\x0c\x17\x86\x06\x21\x85\x84\xeb\
\xba\xf5\x42\xa1\xf0\x77\x00\x50\x86\x2e\x64\x7f\xf6\xad\xad\x8f\
\x6f\xdd\xbc\xe9\xab\xd8\xf6\xe4\xd3\xf0\x1c\x0f\x66\xc8\xc0\x4c\
\x69\x06\xe3\x63\x05\xc4\x62\x71\x5c\x9b\x9d\x59\x5c\x2c\x16\x01\
\x00\xca\xd4\xe4\x74\x53\x2c\x16\x43\x32\x99\x44\x3e\x9f\x47\x5b\
\x7b\x07\xde\x7b\xef\xcf\xb8\x34\x3c\x8c\x58\x3c\x8e\x20\xe0\x7d\
\x8c\xa9\x53\x2b\x57\xae\x68\x08\x56\xac\x5e\xf1\x32\x63\x0c\xae\
\xe3\xa2\xc9\xf5\x90\x6a\x69\xc5\x0b\x2f\xbc\x88\xe3\x47\x4f\x20\
\x91\x88\x22\x10\xbc\xdb\x30\x34\x08\x21\x1b\x02\x92\x12\x3b\x7e\
\xb5\xc3\xf6\x3c\x0f\x9e\xe7\x21\x1a\x8d\x20\x16\x8d\xe1\x8f\x7b\
\xde\x41\xad\x56\xfb\x83\xae\xeb\xb8\x6f\xed\x7d\x48\xc4\xe2\x0d\
\x01\x24\x83\xe7\x3a\xf5\xed\x3f\xde\xce\xba\x37\x77\x6f\x8f\x27\
\x13\x81\xeb\x79\x58\x75\xcf\xaa\xaa\xae\xeb\x3f\x4d\xb5\xa6\xe0\
\x79\x1e\x88\xe8\xb6\xf9\x84\x10\x0b\xfe\x20\xa2\x79\xa3\x31\xba\
\xf5\x95\xaa\xaa\x28\x16\x67\xbe\x76\xfa\xf4\x99\x0f\x6e\x56\x2a\
\x56\x3c\x1e\x43\x3c\x11\x87\xeb\x3a\x50\x15\x65\x4e\x53\xb5\xb7\
\x2d\xcb\xda\x6d\xdb\x76\x1e\x00\xa4\x24\x00\x04\x5d\xd7\x3f\x0f\
\x20\x22\x0d\x40\x2b\x63\xac\x00\x40\xcc\x07\x1f\x1e\xc9\xbf\x74\
\x61\x30\xfb\xeb\x48\xb8\x09\xae\xeb\xc2\x71\x6c\x84\x0c\x1d\x96\
\x65\xc1\xb5\x1d\x18\x86\x01\x45\x51\x50\x2e\x97\xe9\xc6\x8d\x1b\
\x6f\xa4\x52\xa9\xe7\x18\x08\x4c\x51\x3f\x07\x60\xb7\x8b\x68\x54\
\xc1\x39\xf7\x8e\x1e\x3d\xfe\x69\xdd\xf7\xd7\xc4\xe3\x71\x58\xb6\
\x09\xc7\xb1\x61\x18\x06\x4c\xd3\x84\x63\xdb\xd0\x35\x1d\x44\x04\
\xdf\xf7\x31\x39\x35\x85\xfc\xe8\x28\xaa\x95\xb9\xe2\x97\x37\x6f\
\xba\xdf\xb2\xcc\xcb\x77\x6e\x0f\x01\x20\xc6\x18\x34\x4d\x43\xa9\
\x74\xed\x91\x8f\x3f\x39\x50\x56\x35\x6d\x4d\x7b\x7b\x3b\x22\x91\
\x08\x3c\xcf\x85\x69\x99\x70\x1c\x07\xae\x6d\x43\x57\x35\x10\x11\
\xaa\xd5\x2a\x86\xf3\x23\x18\x1e\xc9\x43\x04\x12\x9e\xe7\x25\x86\
\x86\xb2\x3f\x04\x00\x0d\x00\xa6\xa6\xa7\xef\xa0\x50\xe8\xf2\xe8\
\xd8\x87\x53\x53\x57\x1f\x6e\x6f\x6f\x87\x63\x3b\x30\xcc\x10\x42\
\xa6\x0e\x33\x64\xc0\x32\x2d\x84\x42\x21\xa8\x8a\x02\x41\x84\x72\
\xb9\x8c\x5c\xee\x22\x2a\x95\x2a\x84\x10\x30\x8c\x10\x16\x2f\x59\
\x34\xd6\x96\x4a\xed\x59\x00\x14\xaf\xce\x34\x16\x49\xd3\xd6\x15\
\x26\x27\x07\x38\xe7\xa1\x8e\x25\x8b\x61\x58\x06\x4c\x33\x84\x50\
\x28\x04\xc3\x34\x61\x19\x06\x74\x4d\x87\xa2\x28\x08\x84\x40\x71\
\xa6\x88\xa1\xa1\x1c\x38\x0f\x40\x44\x08\x87\xc3\x88\x46\x23\x7d\
\x86\x11\xea\x9e\x29\x95\xd0\xd2\xdc\xdc\x00\x98\xa6\x89\xc1\xc1\
\xec\xf3\xbd\xbd\xbd\xbb\x84\x94\x58\xbc\xe8\x2e\x68\xba\x8a\x75\
\xeb\xee\x47\x93\xd7\x04\x92\x12\x44\x8d\x87\x4f\x61\x0a\x38\xe7\
\x18\x9f\x2c\x20\x37\x94\x03\x11\x60\x9a\x16\xa2\xd1\x08\xca\x37\
\xae\xbf\x52\x98\x9c\x78\x7e\xa2\x30\x0e\xcb\xb2\x6e\x03\xde\xff\
\xcb\x5f\x3f\xdc\xbb\x77\xdf\x37\x18\x63\xa8\xd5\x6a\xf0\xb9\x0f\
\x9f\x73\x54\x2a\x15\xd4\xeb\x75\x6c\xdc\xf8\x20\x76\xee\x7c\x11\
\x6b\xd7\xdc\x03\x22\x42\x6e\xf0\x22\x2e\x5d\x1a\x5e\x08\x6c\xd9\
\x26\x8a\xc5\xe2\x4f\x82\x80\xbf\x1d\x0a\x85\xd0\xd9\xd9\x09\xcb\
\xb2\x6e\xef\xc1\xbe\x7d\x1f\xb5\xbf\xfb\xce\xbb\xff\x19\x1f\x9f\
\x68\x99\x87\x08\x21\x20\x84\x80\x94\x12\x04\x42\xcd\xf7\x51\x9b\
\x9b\xc3\xf7\x7f\xb0\x0d\x5b\xb6\x3c\xd6\xf8\xfd\x47\x9a\x00\x10\
\x4a\xa5\x6b\x0f\x83\xb1\xfd\x52\x4a\x2c\x5d\xda\x81\x70\x53\x13\
\xa4\x94\x68\x4e\x24\x1b\x80\x83\x87\x7a\x00\xc6\xd0\x7b\xb8\xf7\
\xf5\x9e\xc3\x47\x7e\x21\xa4\x80\xaa\xaa\x90\x52\x2e\x40\xa4\x94\
\x20\x49\x98\xab\xcd\x21\x95\x4e\x61\xf7\x9b\xaf\x41\xd7\x35\xbf\
\x58\x2c\x7e\xc5\x34\xcd\x4f\x89\x08\xaa\xaa\xc2\x73\x3d\xa4\xd3\
\x69\xa8\xaa\x0a\xdb\xb2\x6e\x3d\x23\x07\x7a\x1a\x0e\x92\x84\xd9\
\xd9\x59\x0c\x8f\x8c\x7c\xe7\xec\xd9\xb3\xbf\x9d\x9a\x9c\xba\x2b\
\x08\x02\xa8\xaa\x0a\xc6\xd8\xc2\x42\x56\xab\x73\xd8\xfa\xed\x2d\
\x37\x1e\xfd\xfa\x23\x5f\x94\x52\x9e\xe3\x9c\xa3\xb5\xa5\x15\x6d\
\xe9\xf4\xc2\xac\x00\x40\x51\x94\x5b\x15\x1c\x3c\x3c\xef\x52\x95\
\x88\x70\xbd\x7c\x53\x08\x21\x50\xab\xd5\x50\x2a\x95\x50\xaf\xfb\
\xeb\x54\x55\x79\x94\x29\xc8\x44\xc2\x91\xd9\x65\xcb\x96\xfe\x29\
\x12\x0d\xff\x57\x51\x19\x34\x55\x43\xa6\x73\x39\x74\x5d\x87\x94\
\x12\x77\x1e\x45\x51\xf0\x7f\x60\x84\x69\x65\x48\xcf\xfa\x14\x00\
\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x03\x66\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@ -1540,214 +757,53 @@ qt_resource_data = "\
\xb6\x40\xfe\x0c\x85\x05\xff\x87\xac\xfd\x71\xf9\xc7\x5f\x02\x0c\
\x00\x00\x31\x44\x70\x94\xe4\x6d\xa8\x00\x00\x00\x00\x49\x45\x4e\
\x44\xae\x42\x60\x82\
\x00\x00\x0c\xdf\
\x00\x00\x02\xcc\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x0a\x4f\x69\x43\x43\x50\x50\x68\x6f\
\x74\x6f\x73\x68\x6f\x70\x20\x49\x43\x43\x20\x70\x72\x6f\x66\x69\
\x6c\x65\x00\x00\x78\xda\x9d\x53\x67\x54\x53\xe9\x16\x3d\xf7\xde\
\xf4\x42\x4b\x88\x80\x94\x4b\x6f\x52\x15\x08\x20\x52\x42\x8b\x80\
\x14\x91\x26\x2a\x21\x09\x10\x4a\x88\x21\xa1\xd9\x15\x51\xc1\x11\
\x45\x45\x04\x1b\xc8\xa0\x88\x03\x8e\x8e\x80\x8c\x15\x51\x2c\x0c\
\x8a\x0a\xd8\x07\xe4\x21\xa2\x8e\x83\xa3\x88\x8a\xca\xfb\xe1\x7b\
\xa3\x6b\xd6\xbc\xf7\xe6\xcd\xfe\xb5\xd7\x3e\xe7\xac\xf3\x9d\xb3\
\xcf\x07\xc0\x08\x0c\x96\x48\x33\x51\x35\x80\x0c\xa9\x42\x1e\x11\
\xe0\x83\xc7\xc4\xc6\xe1\xe4\x2e\x40\x81\x0a\x24\x70\x00\x10\x08\
\xb3\x64\x21\x73\xfd\x23\x01\x00\xf8\x7e\x3c\x3c\x2b\x22\xc0\x07\
\xbe\x00\x01\x78\xd3\x0b\x08\x00\xc0\x4d\x9b\xc0\x30\x1c\x87\xff\
\x0f\xea\x42\x99\x5c\x01\x80\x84\x01\xc0\x74\x91\x38\x4b\x08\x80\
\x14\x00\x40\x7a\x8e\x42\xa6\x00\x40\x46\x01\x80\x9d\x98\x26\x53\
\x00\xa0\x04\x00\x60\xcb\x63\x62\xe3\x00\x50\x2d\x00\x60\x27\x7f\
\xe6\xd3\x00\x80\x9d\xf8\x99\x7b\x01\x00\x5b\x94\x21\x15\x01\xa0\
\x91\x00\x20\x13\x65\x88\x44\x00\x68\x3b\x00\xac\xcf\x56\x8a\x45\
\x00\x58\x30\x00\x14\x66\x4b\xc4\x39\x00\xd8\x2d\x00\x30\x49\x57\
\x66\x48\x00\xb0\xb7\x00\xc0\xce\x10\x0b\xb2\x00\x08\x0c\x00\x30\
\x51\x88\x85\x29\x00\x04\x7b\x00\x60\xc8\x23\x23\x78\x00\x84\x99\
\x00\x14\x46\xf2\x57\x3c\xf1\x2b\xae\x10\xe7\x2a\x00\x00\x78\x99\
\xb2\x3c\xb9\x24\x39\x45\x81\x5b\x08\x2d\x71\x07\x57\x57\x2e\x1e\
\x28\xce\x49\x17\x2b\x14\x36\x61\x02\x61\x9a\x40\x2e\xc2\x79\x99\
\x19\x32\x81\x34\x0f\xe0\xf3\xcc\x00\x00\xa0\x91\x15\x11\xe0\x83\
\xf3\xfd\x78\xce\x0e\xae\xce\xce\x36\x8e\xb6\x0e\x5f\x2d\xea\xbf\
\x06\xff\x22\x62\x62\xe3\xfe\xe5\xcf\xab\x70\x40\x00\x00\xe1\x74\
\x7e\xd1\xfe\x2c\x2f\xb3\x1a\x80\x3b\x06\x80\x6d\xfe\xa2\x25\xee\
\x04\x68\x5e\x0b\xa0\x75\xf7\x8b\x66\xb2\x0f\x40\xb5\x00\xa0\xe9\
\xda\x57\xf3\x70\xf8\x7e\x3c\x3c\x45\xa1\x90\xb9\xd9\xd9\xe5\xe4\
\xe4\xd8\x4a\xc4\x42\x5b\x61\xca\x57\x7d\xfe\x67\xc2\x5f\xc0\x57\
\xfd\x6c\xf9\x7e\x3c\xfc\xf7\xf5\xe0\xbe\xe2\x24\x81\x32\x5d\x81\
\x47\x04\xf8\xe0\xc2\xcc\xf4\x4c\xa5\x1c\xcf\x92\x09\x84\x62\xdc\
\xe6\x8f\x47\xfc\xb7\x0b\xff\xfc\x1d\xd3\x22\xc4\x49\x62\xb9\x58\
\x2a\x14\xe3\x51\x12\x71\x8e\x44\x9a\x8c\xf3\x32\xa5\x22\x89\x42\
\x92\x29\xc5\x25\xd2\xff\x64\xe2\xdf\x2c\xfb\x03\x3e\xdf\x35\x00\
\xb0\x6a\x3e\x01\x7b\x91\x2d\xa8\x5d\x63\x03\xf6\x4b\x27\x10\x58\
\x74\xc0\xe2\xf7\x00\x00\xf2\xbb\x6f\xc1\xd4\x28\x08\x03\x80\x68\
\x83\xe1\xcf\x77\xff\xef\x3f\xfd\x47\xa0\x25\x00\x80\x66\x49\x92\
\x71\x00\x00\x5e\x44\x24\x2e\x54\xca\xb3\x3f\xc7\x08\x00\x00\x44\
\xa0\x81\x2a\xb0\x41\x1b\xf4\xc1\x18\x2c\xc0\x06\x1c\xc1\x05\xdc\
\xc1\x0b\xfc\x60\x36\x84\x42\x24\xc4\xc2\x42\x10\x42\x0a\x64\x80\
\x1c\x72\x60\x29\xac\x82\x42\x28\x86\xcd\xb0\x1d\x2a\x60\x2f\xd4\
\x40\x1d\x34\xc0\x51\x68\x86\x93\x70\x0e\x2e\xc2\x55\xb8\x0e\x3d\
\x70\x0f\xfa\x61\x08\x9e\xc1\x28\xbc\x81\x09\x04\x41\xc8\x08\x13\
\x61\x21\xda\x88\x01\x62\x8a\x58\x23\x8e\x08\x17\x99\x85\xf8\x21\
\xc1\x48\x04\x12\x8b\x24\x20\xc9\x88\x14\x51\x22\x4b\x91\x35\x48\
\x31\x52\x8a\x54\x20\x55\x48\x1d\xf2\x3d\x72\x02\x39\x87\x5c\x46\
\xba\x91\x3b\xc8\x00\x32\x82\xfc\x86\xbc\x47\x31\x94\x81\xb2\x51\
\x3d\xd4\x0c\xb5\x43\xb9\xa8\x37\x1a\x84\x46\xa2\x0b\xd0\x64\x74\
\x31\x9a\x8f\x16\xa0\x9b\xd0\x72\xb4\x1a\x3d\x8c\x36\xa1\xe7\xd0\
\xab\x68\x0f\xda\x8f\x3e\x43\xc7\x30\xc0\xe8\x18\x07\x33\xc4\x6c\
\x30\x2e\xc6\xc3\x42\xb1\x38\x2c\x09\x93\x63\xcb\xb1\x22\xac\x0c\
\xab\xc6\x1a\xb0\x56\xac\x03\xbb\x89\xf5\x63\xcf\xb1\x77\x04\x12\
\x81\x45\xc0\x09\x36\x04\x77\x42\x20\x61\x1e\x41\x48\x58\x4c\x58\
\x4e\xd8\x48\xa8\x20\x1c\x24\x34\x11\xda\x09\x37\x09\x03\x84\x51\
\xc2\x27\x22\x93\xa8\x4b\xb4\x26\xba\x11\xf9\xc4\x18\x62\x32\x31\
\x87\x58\x48\x2c\x23\xd6\x12\x8f\x13\x2f\x10\x7b\x88\x43\xc4\x37\
\x24\x12\x89\x43\x32\x27\xb9\x90\x02\x49\xb1\xa4\x54\xd2\x12\xd2\
\x46\xd2\x6e\x52\x23\xe9\x2c\xa9\x9b\x34\x48\x1a\x23\x93\xc9\xda\
\x64\x6b\xb2\x07\x39\x94\x2c\x20\x2b\xc8\x85\xe4\x9d\xe4\xc3\xe4\
\x33\xe4\x1b\xe4\x21\xf2\x5b\x0a\x9d\x62\x40\x71\xa4\xf8\x53\xe2\
\x28\x52\xca\x6a\x4a\x19\xe5\x10\xe5\x34\xe5\x06\x65\x98\x32\x41\
\x55\xa3\x9a\x52\xdd\xa8\xa1\x54\x11\x35\x8f\x5a\x42\xad\xa1\xb6\
\x52\xaf\x51\x87\xa8\x13\x34\x75\x9a\x39\xcd\x83\x16\x49\x4b\xa5\
\xad\xa2\x95\xd3\x1a\x68\x17\x68\xf7\x69\xaf\xe8\x74\xba\x11\xdd\
\x95\x1e\x4e\x97\xd0\x57\xd2\xcb\xe9\x47\xe8\x97\xe8\x03\xf4\x77\
\x0c\x0d\x86\x15\x83\xc7\x88\x67\x28\x19\x9b\x18\x07\x18\x67\x19\
\x77\x18\xaf\x98\x4c\xa6\x19\xd3\x8b\x19\xc7\x54\x30\x37\x31\xeb\
\x98\xe7\x99\x0f\x99\x6f\x55\x58\x2a\xb6\x2a\x7c\x15\x91\xca\x0a\
\x95\x4a\x95\x26\x95\x1b\x2a\x2f\x54\xa9\xaa\xa6\xaa\xde\xaa\x0b\
\x55\xf3\x55\xcb\x54\x8f\xa9\x5e\x53\x7d\xae\x46\x55\x33\x53\xe3\
\xa9\x09\xd4\x96\xab\x55\xaa\x9d\x50\xeb\x53\x1b\x53\x67\xa9\x3b\
\xa8\x87\xaa\x67\xa8\x6f\x54\x3f\xa4\x7e\x59\xfd\x89\x06\x59\xc3\
\x4c\xc3\x4f\x43\xa4\x51\xa0\xb1\x5f\xe3\xbc\xc6\x20\x0b\x63\x19\
\xb3\x78\x2c\x21\x6b\x0d\xab\x86\x75\x81\x35\xc4\x26\xb1\xcd\xd9\
\x7c\x76\x2a\xbb\x98\xfd\x1d\xbb\x8b\x3d\xaa\xa9\xa1\x39\x43\x33\
\x4a\x33\x57\xb3\x52\xf3\x94\x66\x3f\x07\xe3\x98\x71\xf8\x9c\x74\
\x4e\x09\xe7\x28\xa7\x97\xf3\x7e\x8a\xde\x14\xef\x29\xe2\x29\x1b\
\xa6\x34\x4c\xb9\x31\x65\x5c\x6b\xaa\x96\x97\x96\x58\xab\x48\xab\
\x51\xab\x47\xeb\xbd\x36\xae\xed\xa7\x9d\xa6\xbd\x45\xbb\x59\xfb\
\x81\x0e\x41\xc7\x4a\x27\x5c\x27\x47\x67\x8f\xce\x05\x9d\xe7\x53\
\xd9\x53\xdd\xa7\x0a\xa7\x16\x4d\x3d\x3a\xf5\xae\x2e\xaa\x6b\xa5\
\x1b\xa1\xbb\x44\x77\xbf\x6e\xa7\xee\x98\x9e\xbe\x5e\x80\x9e\x4c\
\x6f\xa7\xde\x79\xbd\xe7\xfa\x1c\x7d\x2f\xfd\x54\xfd\x6d\xfa\xa7\
\xf5\x47\x0c\x58\x06\xb3\x0c\x24\x06\xdb\x0c\xce\x18\x3c\xc5\x35\
\x71\x6f\x3c\x1d\x2f\xc7\xdb\xf1\x51\x43\x5d\xc3\x40\x43\xa5\x61\
\x95\x61\x97\xe1\x84\x91\xb9\xd1\x3c\xa3\xd5\x46\x8d\x46\x0f\x8c\
\x69\xc6\x5c\xe3\x24\xe3\x6d\xc6\x6d\xc6\xa3\x26\x06\x26\x21\x26\
\x4b\x4d\xea\x4d\xee\x9a\x52\x4d\xb9\xa6\x29\xa6\x3b\x4c\x3b\x4c\
\xc7\xcd\xcc\xcd\xa2\xcd\xd6\x99\x35\x9b\x3d\x31\xd7\x32\xe7\x9b\
\xe7\x9b\xd7\x9b\xdf\xb7\x60\x5a\x78\x5a\x2c\xb6\xa8\xb6\xb8\x65\
\x49\xb2\xe4\x5a\xa6\x59\xee\xb6\xbc\x6e\x85\x5a\x39\x59\xa5\x58\
\x55\x5a\x5d\xb3\x46\xad\x9d\xad\x25\xd6\xbb\xad\xbb\xa7\x11\xa7\
\xb9\x4e\x93\x4e\xab\x9e\xd6\x67\xc3\xb0\xf1\xb6\xc9\xb6\xa9\xb7\
\x19\xb0\xe5\xd8\x06\xdb\xae\xb6\x6d\xb6\x7d\x61\x67\x62\x17\x67\
\xb7\xc5\xae\xc3\xee\x93\xbd\x93\x7d\xba\x7d\x8d\xfd\x3d\x07\x0d\
\x87\xd9\x0e\xab\x1d\x5a\x1d\x7e\x73\xb4\x72\x14\x3a\x56\x3a\xde\
\x9a\xce\x9c\xee\x3f\x7d\xc5\xf4\x96\xe9\x2f\x67\x58\xcf\x10\xcf\
\xd8\x33\xe3\xb6\x13\xcb\x29\xc4\x69\x9d\x53\x9b\xd3\x47\x67\x17\
\x67\xb9\x73\x83\xf3\x88\x8b\x89\x4b\x82\xcb\x2e\x97\x3e\x2e\x9b\
\x1b\xc6\xdd\xc8\xbd\xe4\x4a\x74\xf5\x71\x5d\xe1\x7a\xd2\xf5\x9d\
\x9b\xb3\x9b\xc2\xed\xa8\xdb\xaf\xee\x36\xee\x69\xee\x87\xdc\x9f\
\xcc\x34\x9f\x29\x9e\x59\x33\x73\xd0\xc3\xc8\x43\xe0\x51\xe5\xd1\
\x3f\x0b\x9f\x95\x30\x6b\xdf\xac\x7e\x4f\x43\x4f\x81\x67\xb5\xe7\
\x23\x2f\x63\x2f\x91\x57\xad\xd7\xb0\xb7\xa5\x77\xaa\xf7\x61\xef\
\x17\x3e\xf6\x3e\x72\x9f\xe3\x3e\xe3\x3c\x37\xde\x32\xde\x59\x5f\
\xcc\x37\xc0\xb7\xc8\xb7\xcb\x4f\xc3\x6f\x9e\x5f\x85\xdf\x43\x7f\
\x23\xff\x64\xff\x7a\xff\xd1\x00\xa7\x80\x25\x01\x67\x03\x89\x81\
\x41\x81\x5b\x02\xfb\xf8\x7a\x7c\x21\xbf\x8e\x3f\x3a\xdb\x65\xf6\
\xb2\xd9\xed\x41\x8c\xa0\xb9\x41\x15\x41\x8f\x82\xad\x82\xe5\xc1\
\xad\x21\x68\xc8\xec\x90\xad\x21\xf7\xe7\x98\xce\x91\xce\x69\x0e\
\x85\x50\x7e\xe8\xd6\xd0\x07\x61\xe6\x61\x8b\xc3\x7e\x0c\x27\x85\
\x87\x85\x57\x86\x3f\x8e\x70\x88\x58\x1a\xd1\x31\x97\x35\x77\xd1\
\xdc\x43\x73\xdf\x44\xfa\x44\x96\x44\xde\x9b\x67\x31\x4f\x39\xaf\
\x2d\x4a\x35\x2a\x3e\xaa\x2e\x6a\x3c\xda\x37\xba\x34\xba\x3f\xc6\
\x2e\x66\x59\xcc\xd5\x58\x9d\x58\x49\x6c\x4b\x1c\x39\x2e\x2a\xae\
\x36\x6e\x6c\xbe\xdf\xfc\xed\xf3\x87\xe2\x9d\xe2\x0b\xe3\x7b\x17\
\x98\x2f\xc8\x5d\x70\x79\xa1\xce\xc2\xf4\x85\xa7\x16\xa9\x2e\x12\
\x2c\x3a\x96\x40\x4c\x88\x4e\x38\x94\xf0\x41\x10\x2a\xa8\x16\x8c\
\x25\xf2\x13\x77\x25\x8e\x0a\x79\xc2\x1d\xc2\x67\x22\x2f\xd1\x36\
\xd1\x88\xd8\x43\x5c\x2a\x1e\x4e\xf2\x48\x2a\x4d\x7a\x92\xec\x91\
\xbc\x35\x79\x24\xc5\x33\xa5\x2c\xe5\xb9\x84\x27\xa9\x90\xbc\x4c\
\x0d\x4c\xdd\x9b\x3a\x9e\x16\x9a\x76\x20\x6d\x32\x3d\x3a\xbd\x31\
\x83\x92\x91\x90\x71\x42\xaa\x21\x4d\x93\xb6\x67\xea\x67\xe6\x66\
\x76\xcb\xac\x65\x85\xb2\xfe\xc5\x6e\x8b\xb7\x2f\x1e\x95\x07\xc9\
\x6b\xb3\x90\xac\x05\x59\x2d\x0a\xb6\x42\xa6\xe8\x54\x5a\x28\xd7\
\x2a\x07\xb2\x67\x65\x57\x66\xbf\xcd\x89\xca\x39\x96\xab\x9e\x2b\
\xcd\xed\xcc\xb3\xca\xdb\x90\x37\x9c\xef\x9f\xff\xed\x12\xc2\x12\
\xe1\x92\xb6\xa5\x86\x4b\x57\x2d\x1d\x58\xe6\xbd\xac\x6a\x39\xb2\
\x3c\x71\x79\xdb\x0a\xe3\x15\x05\x2b\x86\x56\x06\xac\x3c\xb8\x8a\
\xb6\x2a\x6d\xd5\x4f\xab\xed\x57\x97\xae\x7e\xbd\x26\x7a\x4d\x6b\
\x81\x5e\xc1\xca\x82\xc1\xb5\x01\x6b\xeb\x0b\x55\x0a\xe5\x85\x7d\
\xeb\xdc\xd7\xed\x5d\x4f\x58\x2f\x59\xdf\xb5\x61\xfa\x86\x9d\x1b\
\x3e\x15\x89\x8a\xae\x14\xdb\x17\x97\x15\x7f\xd8\x28\xdc\x78\xe5\
\x1b\x87\x6f\xca\xbf\x99\xdc\x94\xb4\xa9\xab\xc4\xb9\x64\xcf\x66\
\xd2\x66\xe9\xe6\xde\x2d\x9e\x5b\x0e\x96\xaa\x97\xe6\x97\x0e\x6e\
\x0d\xd9\xda\xb4\x0d\xdf\x56\xb4\xed\xf5\xf6\x45\xdb\x2f\x97\xcd\
\x28\xdb\xbb\x83\xb6\x43\xb9\xa3\xbf\x3c\xb8\xbc\x65\xa7\xc9\xce\
\xcd\x3b\x3f\x54\xa4\x54\xf4\x54\xfa\x54\x36\xee\xd2\xdd\xb5\x61\
\xd7\xf8\x6e\xd1\xee\x1b\x7b\xbc\xf6\x34\xec\xd5\xdb\x5b\xbc\xf7\
\xfd\x3e\xc9\xbe\xdb\x55\x01\x55\x4d\xd5\x66\xd5\x65\xfb\x49\xfb\
\xb3\xf7\x3f\xae\x89\xaa\xe9\xf8\x96\xfb\x6d\x5d\xad\x4e\x6d\x71\
\xed\xc7\x03\xd2\x03\xfd\x07\x23\x0e\xb6\xd7\xb9\xd4\xd5\x1d\xd2\
\x3d\x54\x52\x8f\xd6\x2b\xeb\x47\x0e\xc7\x1f\xbe\xfe\x9d\xef\x77\
\x2d\x0d\x36\x0d\x55\x8d\x9c\xc6\xe2\x23\x70\x44\x79\xe4\xe9\xf7\
\x09\xdf\xf7\x1e\x0d\x3a\xda\x76\x8c\x7b\xac\xe1\x07\xd3\x1f\x76\
\x1d\x67\x1d\x2f\x6a\x42\x9a\xf2\x9a\x46\x9b\x53\x9a\xfb\x5b\x62\
\x5b\xba\x4f\xcc\x3e\xd1\xd6\xea\xde\x7a\xfc\x47\xdb\x1f\x0f\x9c\
\x34\x3c\x59\x79\x4a\xf3\x54\xc9\x69\xda\xe9\x82\xd3\x93\x67\xf2\
\xcf\x8c\x9d\x95\x9d\x7d\x7e\x2e\xf9\xdc\x60\xdb\xa2\xb6\x7b\xe7\
\x63\xce\xdf\x6a\x0f\x6f\xef\xba\x10\x74\xe1\xd2\x45\xff\x8b\xe7\
\x3b\xbc\x3b\xce\x5c\xf2\xb8\x74\xf2\xb2\xdb\xe5\x13\x57\xb8\x57\
\x9a\xaf\x3a\x5f\x6d\xea\x74\xea\x3c\xfe\x93\xd3\x4f\xc7\xbb\x9c\
\xbb\x9a\xae\xb9\x5c\x6b\xb9\xee\x7a\xbd\xb5\x7b\x66\xf7\xe9\x1b\
\x9e\x37\xce\xdd\xf4\xbd\x79\xf1\x16\xff\xd6\xd5\x9e\x39\x3d\xdd\
\xbd\xf3\x7a\x6f\xf7\xc5\xf7\xf5\xdf\x16\xdd\x7e\x72\x27\xfd\xce\
\xcb\xbb\xd9\x77\x27\xee\xad\xbc\x4f\xbc\x5f\xf4\x40\xed\x41\xd9\
\x43\xdd\x87\xd5\x3f\x5b\xfe\xdc\xd8\xef\xdc\x7f\x6a\xc0\x77\xa0\
\xf3\xd1\xdc\x47\xf7\x06\x85\x83\xcf\xfe\x91\xf5\x8f\x0f\x43\x05\
\x8f\x99\x8f\xcb\x86\x0d\x86\xeb\x9e\x38\x3e\x39\x39\xe2\x3f\x72\
\xfd\xe9\xfc\xa7\x43\xcf\x64\xcf\x26\x9e\x17\xfe\xa2\xfe\xcb\xae\
\x17\x16\x2f\x7e\xf8\xd5\xeb\xd7\xce\xd1\x98\xd1\xa1\x97\xf2\x97\
\x93\xbf\x6d\x7c\xa5\xfd\xea\xc0\xeb\x19\xaf\xdb\xc6\xc2\xc6\x1e\
\xbe\xc9\x78\x33\x31\x5e\xf4\x56\xfb\xed\xc1\x77\xdc\x77\x1d\xef\
\xa3\xdf\x0f\x4f\xe4\x7c\x20\x7f\x28\xff\x68\xf9\xb1\xf5\x53\xd0\
\xa7\xfb\x93\x19\x93\x93\xff\x04\x03\x98\xf3\xfc\x63\x33\x2d\xdb\
\x00\x00\x00\x20\x63\x48\x52\x4d\x00\x00\x7a\x25\x00\x00\x80\x83\
\x00\x00\xf9\xff\x00\x00\x80\xe9\x00\x00\x75\x30\x00\x00\xea\x60\
\x00\x00\x3a\x98\x00\x00\x17\x6f\x92\x5f\xc5\x46\x00\x00\x02\x0a\
\x49\x44\x41\x54\x78\xda\x64\xd1\x4d\xab\x1c\x45\x18\xc5\xf1\x5f\
\xdf\x69\x1a\xc6\x5c\xbc\x12\x74\x1b\x10\x84\x08\x92\xe0\x07\x30\
\xb8\x0a\x8c\x9b\x04\xfc\x0a\x42\xc4\x95\xa2\x5b\x97\x82\x2b\x05\
\x51\x70\xe5\x87\x88\x2b\xc1\x95\xe0\x3e\x82\x2b\x21\x20\x64\xe7\
\xdb\x9d\x3b\xd3\x3d\xfd\x52\xd5\x35\xed\xa2\x2a\xde\x01\x1b\x0e\
\x0f\x05\x7d\xce\xff\xd4\x53\xd5\x72\xf7\x2e\x37\x6f\x72\x71\xc1\
\x8d\x1b\x34\xcd\x6d\x55\xf5\x48\x4a\x6f\x0b\xe1\x4d\xd3\xc4\x30\
\xfc\xe2\x70\xf8\xc9\xe1\xf0\xad\xae\x7b\xaa\xef\xe9\x7b\xa6\x49\
\xb5\xdc\xbb\x97\x03\xce\xcf\x69\x9a\x8f\x55\xd5\x67\xe6\x79\x6d\
\x9a\x18\xc7\xac\x1c\x42\xdf\x0f\xfa\xfe\x53\x7d\xff\xa5\x61\x20\
\x04\xb5\xf3\x73\xd6\xeb\xc6\x6a\xf5\xd8\xf1\xb8\x31\xcf\xf9\xe7\
\xc3\x21\xcf\x69\x22\x46\x42\x60\x1c\xd7\xa6\xe9\x0b\xd3\x74\x5f\
\x08\x0f\x85\x10\x6a\x4d\x03\x5f\x9b\xe7\x8d\x18\xb3\xa9\x6d\xe9\
\xba\x4c\x0f\x81\x94\xb2\x72\x08\xc3\xb0\x59\xc6\xf1\xf3\xc8\x27\
\xd5\xf2\xe0\xc1\x1d\x75\xfd\x44\x4a\x2b\xc3\xc0\x6e\x97\xd5\x75\
\x99\x9e\x12\xcb\x92\x95\x12\xe3\x28\xc5\xa8\x27\x05\xde\xa8\x85\
\xf0\x48\x8c\x2b\xe3\x98\xc9\xdb\x2d\x57\x57\xb9\x49\x8c\xd9\x08\
\x55\xc5\x3c\x0b\xcb\x62\x40\xcf\x6a\xe2\x83\x5a\xdf\x6f\xa4\x74\
\x5d\xbd\x6d\xf3\x86\x43\xe0\x78\x74\xfa\xc5\x62\x3e\x14\x0d\xbc\
\x55\xeb\xba\x5b\xff\x5b\x5c\x8c\xd9\xfc\x9c\x8e\x05\x11\x53\xa6\
\x6b\xf3\xbc\x55\x6b\x5b\xe6\xd9\x7f\xcf\x16\xe3\xf5\xbd\x4f\xcc\
\x09\x73\xa6\x3a\x5c\x07\xa8\xb5\xed\x33\x31\xbe\x26\x46\xcf\xb5\
\x9c\x98\xe1\x58\xe8\x03\x3a\xec\x8b\x26\x9e\x9d\xd9\xef\x7f\xb0\
\xdb\xb1\xdf\x4b\xc3\x20\xa6\x24\x14\x5a\x3a\xa9\xdd\xe1\x0a\x97\
\x45\xfb\x1c\xf8\x73\x95\xb8\x33\xf2\x24\xb2\x9a\x4b\x5d\xa8\xca\
\x4c\x18\x4b\xe5\xbf\xf1\x0f\x76\x08\xa4\x86\xd7\xeb\x9e\x5f\x07\
\xbe\x19\xf9\x30\x16\xf2\xf1\xc4\x3c\x97\xbb\xee\xb1\x2d\xe6\x09\
\x67\x7c\xb5\xe6\x69\x75\x99\xeb\x35\x07\x1e\x0f\x6c\x42\x31\x9e\
\xd6\x1f\x4a\x40\x57\xce\xf8\xfe\x05\xde\x7d\x99\x74\x76\xcc\xc4\
\x10\x79\x67\xe4\xa3\x8e\x6e\x8b\xbf\xf0\x27\xfe\x28\xba\xcc\xdb\
\xef\x12\xef\x37\x3c\x7c\x91\xf4\x12\xaa\x6d\x79\x96\x7d\xa9\xb7\
\xe7\xd5\x8e\xf7\x3a\xee\x0f\xdc\x9e\x72\x93\xdf\x12\x3f\xae\xf8\
\x6e\xcd\xef\x17\x78\xa5\xe8\xdf\x01\x00\xd9\x09\x61\x5f\xc2\xb1\
\xaf\xf3\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x01\x68\xf4\xcf\xf7\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\
\x0b\x13\x01\x00\x9a\x9c\x18\x00\x00\x02\x6c\x49\x44\x41\x54\x38\
\xcb\x4d\xd2\xbd\x6b\xdd\x65\x14\x07\xf0\xcf\xaf\xb9\x49\x9a\x10\
\x69\x08\x06\x6a\x2c\x82\xf4\x25\x2e\xed\x50\x87\x4e\x85\x2e\x42\
\xb2\x34\xe0\xe4\x58\x10\xea\x58\x69\x57\x47\x57\x83\xd2\x49\xc1\
\xad\xfe\x01\xba\x28\xb8\xa8\x93\x83\xa0\x4b\x41\x89\x10\x1b\x43\
\x20\x37\x37\xf7\xe6\xbe\xfe\xee\xef\x2d\xc7\xe1\xb9\x6a\x1f\x38\
\x1c\x9e\xf3\x7c\xbf\xe7\x7c\x9f\x73\x4e\x16\xb7\x6e\x71\xf5\x6a\
\x2d\xae\x5f\x2f\x82\x10\x0f\x1e\x6c\xc6\x8d\x1b\xc4\xc5\x8b\xf1\
\x17\x21\xee\xdf\xbf\x19\x77\xee\x44\xac\xad\x45\xcc\xcf\x47\x36\
\xc4\x11\x91\xe3\x67\x64\xb1\xb3\xc3\xa5\x4b\xbf\xd8\xdf\xff\xd1\
\xf3\xe7\x4f\xc4\xce\x4e\xc4\x95\x2b\x11\xab\xab\x31\xa0\x16\x1b\
\x1b\x11\x44\x45\xfc\x40\x64\x07\xc4\x18\x2f\xb0\xc7\x6e\x16\xdb\
\xdb\xac\xaf\x7f\xab\x69\xb6\x74\x3a\x9c\x9d\x31\x1e\x27\xdf\xed\
\x2e\xb6\x8c\xc7\x7b\x8e\x8f\xaf\x39\x3c\xe4\xf4\x94\xf3\x73\xd0\
\x8f\xd0\xa6\x10\xcb\xcb\x4f\x83\x28\x67\x56\x10\x6d\xe2\x27\xe2\
\x19\x91\x75\x92\x6e\x6d\x86\x7d\x56\x06\xe8\xa2\xe6\x83\xd7\xf9\
\x22\x8b\x7b\xf7\xd8\xd8\x60\x71\xf1\x13\x79\xfe\xc8\xd9\xd9\x6f\
\xda\xed\xf7\xb4\xdb\x7f\xea\xf5\xb4\x5c\xbe\xbc\x60\x7e\xbe\xd0\
\xef\xd3\xe9\x30\x1a\xbd\x6d\x30\xd8\x33\x99\x7c\xa7\x28\xb6\x5b\
\xca\x72\xa2\xdb\xe5\xe0\x20\x89\xac\x6b\xea\x5a\x33\x1c\x6e\x9d\
\xb1\xd9\x72\x7c\x3c\xa7\xdd\xe6\xf0\x90\xe9\x14\x54\x11\x4e\xd0\
\xe1\xab\x96\xa3\x23\xfa\xfd\xf4\x18\x21\x90\xe3\x24\x89\x7f\x23\
\x8b\x56\x2b\x9a\xba\x56\x63\x0e\x25\xfe\xc6\xef\x18\xf0\x59\xd6\
\xe6\xd3\x21\x8f\x4a\x34\x29\xe8\x45\xfa\xb6\x55\xb2\xd6\x84\x0f\
\x8f\xd9\xef\x26\xa0\x5e\x02\x8d\x96\x79\xe5\x35\x64\x71\xf7\x2e\
\x6b\x6b\xac\xac\xb0\xb0\xf0\x58\x96\x7d\xac\xae\x97\x14\x45\xd2\
\x35\x9d\x52\x14\xe4\x39\x93\x49\x6e\x32\xf9\xc8\x64\xb2\x2b\xcf\
\x29\xcb\xd9\x42\x2c\x2d\x7d\xee\xc2\x85\x87\xaa\x2a\x01\x87\x43\
\x46\xa3\x44\x2e\x4b\x9a\x26\x59\x59\xa6\x58\x9e\x8b\xe9\x74\xb7\
\xe2\x49\x4b\x51\x3c\x55\x96\x0f\x4d\xa7\x89\xd8\xeb\xa5\x4d\xc8\
\x73\xaa\x8a\x08\x20\xcb\xa8\x6b\x65\x84\x1c\x13\x1e\x17\xcc\x65\
\x71\xfb\x76\xa1\xae\x17\xe4\x79\x5a\xa3\xe1\x30\x91\x9b\xe6\x7f\
\x32\xff\xb5\x77\x34\x6b\xd4\x20\x25\x39\x69\x39\x3a\x3a\x50\x55\
\xd7\x54\x55\xaa\x58\x96\xa2\x69\xbc\x7c\xce\x67\xed\x1f\xa6\xe1\
\xe9\xe2\x0c\x05\x07\x59\xc3\xcd\x29\xbf\x56\xcc\xd5\xb3\x4a\x90\
\xcd\x7c\x83\xe9\x4b\xe4\x53\xf4\x53\xc2\x66\x81\xb7\xb2\x6e\x92\
\xb5\x30\xe6\xeb\x9c\xad\x7f\xe7\xd9\xa0\x4a\x55\xe4\x33\xc9\xa3\
\xd9\x1d\xdf\x2c\xf3\xee\xab\x34\x59\x0f\xe3\x19\xa0\x9f\xfc\x9b\
\x23\xde\x1f\xf1\x4e\xce\x66\x91\x12\xfd\xd1\xf0\xfd\x1c\x5f\x2e\
\xb1\x7f\x09\xeb\x33\xfb\x07\x6a\x4f\x76\xe7\x35\x05\x41\x4b\x00\
\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x02\xf0\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@ -1839,492 +895,181 @@ qt_resource_data = "\
\x64\x43\xd7\x38\x7a\xa6\x48\xf1\x9f\xe6\x7f\xd6\x77\x01\x06\x00\
\xf9\x1f\x11\xa0\x42\x25\x9c\x34\x00\x00\x00\x00\x49\x45\x4e\x44\
\xae\x42\x60\x82\
\x00\x00\x10\xe6\
\x00\x00\x07\x6a\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x0a\x4d\x69\x43\x43\x50\x50\x68\x6f\
\x74\x6f\x73\x68\x6f\x70\x20\x49\x43\x43\x20\x70\x72\x6f\x66\x69\
\x6c\x65\x00\x00\x78\xda\x9d\x53\x77\x58\x93\xf7\x16\x3e\xdf\xf7\
\x65\x0f\x56\x42\xd8\xf0\xb1\x97\x6c\x81\x00\x22\x23\xac\x08\xc8\
\x10\x59\xa2\x10\x92\x00\x61\x84\x10\x12\x40\xc5\x85\x88\x0a\x56\
\x14\x15\x11\x9c\x48\x55\xc4\x82\xd5\x0a\x48\x9d\x88\xe2\xa0\x28\
\xb8\x67\x41\x8a\x88\x5a\x8b\x55\x5c\x38\xee\x1f\xdc\xa7\xb5\x7d\
\x7a\xef\xed\xed\xfb\xd7\xfb\xbc\xe7\x9c\xe7\xfc\xce\x79\xcf\x0f\
\x80\x11\x12\x26\x91\xe6\xa2\x6a\x00\x39\x52\x85\x3c\x3a\xd8\x1f\
\x8f\x4f\x48\xc4\xc9\xbd\x80\x02\x15\x48\xe0\x04\x20\x10\xe6\xcb\
\xc2\x67\x05\xc5\x00\x00\xf0\x03\x79\x78\x7e\x74\xb0\x3f\xfc\x01\
\xaf\x6f\x00\x02\x00\x70\xd5\x2e\x24\x12\xc7\xe1\xff\x83\xba\x50\
\x26\x57\x00\x20\x91\x00\xe0\x22\x12\xe7\x0b\x01\x90\x52\x00\xc8\
\x2e\x54\xc8\x14\x00\xc8\x18\x00\xb0\x53\xb3\x64\x0a\x00\x94\x00\
\x00\x6c\x79\x7c\x42\x22\x00\xaa\x0d\x00\xec\xf4\x49\x3e\x05\x00\
\xd8\xa9\x93\xdc\x17\x00\xd8\xa2\x1c\xa9\x08\x00\x8d\x01\x00\x99\
\x28\x47\x24\x02\x40\xbb\x00\x60\x55\x81\x52\x2c\x02\xc0\xc2\x00\
\xa0\xac\x40\x22\x2e\x04\xc0\xae\x01\x80\x59\xb6\x32\x47\x02\x80\
\xbd\x05\x00\x76\x8e\x58\x90\x0f\x40\x60\x00\x80\x99\x42\x2c\xcc\
\x00\x20\x38\x02\x00\x43\x1e\x13\xcd\x03\x20\x4c\x03\xa0\x30\xd2\
\xbf\xe0\xa9\x5f\x70\x85\xb8\x48\x01\x00\xc0\xcb\x95\xcd\x97\x4b\
\xd2\x33\x14\xb8\x95\xd0\x1a\x77\xf2\xf0\xe0\xe2\x21\xe2\xc2\x6c\
\xb1\x42\x61\x17\x29\x10\x66\x09\xe4\x22\x9c\x97\x9b\x23\x13\x48\
\xe7\x03\x4c\xce\x0c\x00\x00\x1a\xf9\xd1\xc1\xfe\x38\x3f\x90\xe7\
\xe6\xe4\xe1\xe6\x66\xe7\x6c\xef\xf4\xc5\xa2\xfe\x6b\xf0\x6f\x22\
\x3e\x21\xf1\xdf\xfe\xbc\x8c\x02\x04\x00\x10\x4e\xcf\xef\xda\x5f\
\xe5\xe5\xd6\x03\x70\xc7\x01\xb0\x75\xbf\x6b\xa9\x5b\x00\xda\x56\
\x00\x68\xdf\xf9\x5d\x33\xdb\x09\xa0\x5a\x0a\xd0\x7a\xf9\x8b\x79\
\x38\xfc\x40\x1e\x9e\xa1\x50\xc8\x3c\x1d\x1c\x0a\x0b\x0b\xed\x25\
\x62\xa1\xbd\x30\xe3\x8b\x3e\xff\x33\xe1\x6f\xe0\x8b\x7e\xf6\xfc\
\x40\x1e\xfe\xdb\x7a\xf0\x00\x71\x9a\x40\x99\xad\xc0\xa3\x83\xfd\
\x71\x61\x6e\x76\xae\x52\x8e\xe7\xcb\x04\x42\x31\x6e\xf7\xe7\x23\
\xfe\xc7\x85\x7f\xfd\x8e\x29\xd1\xe2\x34\xb1\x5c\x2c\x15\x8a\xf1\
\x58\x89\xb8\x50\x22\x4d\xc7\x79\xb9\x52\x91\x44\x21\xc9\x95\xe2\
\x12\xe9\x7f\x32\xf1\x1f\x96\xfd\x09\x93\x77\x0d\x00\xac\x86\x4f\
\xc0\x4e\xb6\x07\xb5\xcb\x6c\xc0\x7e\xee\x01\x02\x8b\x0e\x58\xd2\
\x76\x00\x40\x7e\xf3\x2d\x8c\x1a\x0b\x91\x00\x10\x67\x34\x32\x79\
\xf7\x00\x00\x93\xbf\xf9\x8f\x40\x2b\x01\x00\xcd\x97\xa4\xe3\x00\
\x00\xbc\xe8\x18\x5c\xa8\x94\x17\x4c\xc6\x08\x00\x00\x44\xa0\x81\
\x2a\xb0\x41\x07\x0c\xc1\x14\xac\xc0\x0e\x9c\xc1\x1d\xbc\xc0\x17\
\x02\x61\x06\x44\x40\x0c\x24\xc0\x3c\x10\x42\x06\xe4\x80\x1c\x0a\
\xa1\x18\x96\x41\x19\x54\xc0\x3a\xd8\x04\xb5\xb0\x03\x1a\xa0\x11\
\x9a\xe1\x10\xb4\xc1\x31\x38\x0d\xe7\xe0\x12\x5c\x81\xeb\x70\x17\
\x06\x60\x18\x9e\xc2\x18\xbc\x86\x09\x04\x41\xc8\x08\x13\x61\x21\
\x3a\x88\x11\x62\x8e\xd8\x22\xce\x08\x17\x99\x8e\x04\x22\x61\x48\
\x34\x92\x80\xa4\x20\xe9\x88\x14\x51\x22\xc5\xc8\x72\xa4\x02\xa9\
\x42\x6a\x91\x5d\x48\x23\xf2\x2d\x72\x14\x39\x8d\x5c\x40\xfa\x90\
\xdb\xc8\x20\x32\x8a\xfc\x8a\xbc\x47\x31\x94\x81\xb2\x51\x03\xd4\
\x02\x75\x40\xb9\xa8\x1f\x1a\x8a\xc6\xa0\x73\xd1\x74\x34\x0f\x5d\
\x80\x96\xa2\x6b\xd1\x1a\xb4\x1e\x3d\x80\xb6\xa2\xa7\xd1\x4b\xe8\
\x75\x74\x00\x7d\x8a\x8e\x63\x80\xd1\x31\x0e\x66\x8c\xd9\x61\x5c\
\x8c\x87\x45\x60\x89\x58\x1a\x26\xc7\x16\x63\xe5\x58\x35\x56\x8f\
\x35\x63\x1d\x58\x37\x76\x15\x1b\xc0\x9e\x61\xef\x08\x24\x02\x8b\
\x80\x13\xec\x08\x5e\x84\x10\xc2\x6c\x82\x90\x90\x47\x58\x4c\x58\
\x43\xa8\x25\xec\x23\xb4\x12\xba\x08\x57\x09\x83\x84\x31\xc2\x27\
\x22\x93\xa8\x4f\xb4\x25\x7a\x12\xf9\xc4\x78\x62\x3a\xb1\x90\x58\
\x46\xac\x26\xee\x21\x1e\x21\x9e\x25\x5e\x27\x0e\x13\x5f\x93\x48\
\x24\x0e\xc9\x92\xe4\x4e\x0a\x21\x25\x90\x32\x49\x0b\x49\x6b\x48\
\xdb\x48\x2d\xa4\x53\xa4\x3e\xd2\x10\x69\x9c\x4c\x26\xeb\x90\x6d\
\xc9\xde\xe4\x08\xb2\x80\xac\x20\x97\x91\xb7\x90\x0f\x90\x4f\x92\
\xfb\xc9\xc3\xe4\xb7\x14\x3a\xc5\x88\xe2\x4c\x09\xa2\x24\x52\xa4\
\x94\x12\x4a\x35\x65\x3f\xe5\x04\xa5\x9f\x32\x42\x99\xa0\xaa\x51\
\xcd\xa9\x9e\xd4\x08\xaa\x88\x3a\x9f\x5a\x49\x6d\xa0\x76\x50\x2f\
\x53\x87\xa9\x13\x34\x75\x9a\x25\xcd\x9b\x16\x43\xcb\xa4\x2d\xa3\
\xd5\xd0\x9a\x69\x67\x69\xf7\x68\x2f\xe9\x74\xba\x09\xdd\x83\x1e\
\x45\x97\xd0\x97\xd2\x6b\xe8\x07\xe9\xe7\xe9\x83\xf4\x77\x0c\x0d\
\x86\x0d\x83\xc7\x48\x62\x28\x19\x6b\x19\x7b\x19\xa7\x18\xb7\x19\
\x2f\x99\x4c\xa6\x05\xd3\x97\x99\xc8\x54\x30\xd7\x32\x1b\x99\x67\
\x98\x0f\x98\x6f\x55\x58\x2a\xf6\x2a\x7c\x15\x91\xca\x12\x95\x3a\
\x95\x56\x95\x7e\x95\xe7\xaa\x54\x55\x73\x55\x3f\xd5\x79\xaa\x0b\
\x54\xab\x55\x0f\xab\x5e\x56\x7d\xa6\x46\x55\xb3\x50\xe3\xa9\x09\
\xd4\x16\xab\xd5\xa9\x1d\x55\xbb\xa9\x36\xae\xce\x52\x77\x52\x8f\
\x50\xcf\x51\x5f\xa3\xbe\x5f\xfd\x82\xfa\x63\x0d\xb2\x86\x85\x46\
\xa0\x86\x48\xa3\x54\x63\xb7\xc6\x19\x8d\x21\x16\xc6\x32\x65\xf1\
\x58\x42\xd6\x72\x56\x03\xeb\x2c\x6b\x98\x4d\x62\x5b\xb2\xf9\xec\
\x4c\x76\x05\xfb\x1b\x76\x2f\x7b\x4c\x53\x43\x73\xaa\x66\xac\x66\
\x91\x66\x9d\xe6\x71\xcd\x01\x0e\xc6\xb1\xe0\xf0\x39\xd9\x9c\x4a\
\xce\x21\xce\x0d\xce\x7b\x2d\x03\x2d\x3f\x2d\xb1\xd6\x6a\xad\x66\
\xad\x7e\xad\x37\xda\x7a\xda\xbe\xda\x62\xed\x72\xed\x16\xed\xeb\
\xda\xef\x75\x70\x9d\x40\x9d\x2c\x9d\xf5\x3a\x6d\x3a\xf7\x75\x09\
\xba\x36\xba\x51\xba\x85\xba\xdb\x75\xcf\xea\x3e\xd3\x63\xeb\x79\
\xe9\x09\xf5\xca\xf5\x0e\xe9\xdd\xd1\x47\xf5\x6d\xf4\xa3\xf5\x17\
\xea\xef\xd6\xef\xd1\x1f\x37\x30\x34\x08\x36\x90\x19\x6c\x31\x38\
\x63\xf0\xcc\x90\x63\xe8\x6b\x98\x69\xb8\xd1\xf0\x84\xe1\xa8\x11\
\xcb\x68\xba\x91\xc4\x68\xa3\xd1\x49\xa3\x27\xb8\x26\xee\x87\x67\
\xe3\x35\x78\x17\x3e\x66\xac\x6f\x1c\x62\xac\x34\xde\x65\xdc\x6b\
\x3c\x61\x62\x69\x32\xdb\xa4\xc4\xa4\xc5\xe4\xbe\x29\xcd\x94\x6b\
\x9a\x66\xba\xd1\xb4\xd3\x74\xcc\xcc\xc8\x2c\xdc\xac\xd8\xac\xc9\
\xec\x8e\x39\xd5\x9c\x6b\x9e\x61\xbe\xd9\xbc\xdb\xfc\x8d\x85\xa5\
\x45\x9c\xc5\x4a\x8b\x36\x8b\xc7\x96\xda\x96\x7c\xcb\x05\x96\x4d\
\x96\xf7\xac\x98\x56\x3e\x56\x79\x56\xf5\x56\xd7\xac\x49\xd6\x5c\
\xeb\x2c\xeb\x6d\xd6\x57\x6c\x50\x1b\x57\x9b\x0c\x9b\x3a\x9b\xcb\
\xb6\xa8\xad\x9b\xad\xc4\x76\x9b\x6d\xdf\x14\xe2\x14\x8f\x29\xd2\
\x29\xf5\x53\x6e\xda\x31\xec\xfc\xec\x0a\xec\x9a\xec\x06\xed\x39\
\xf6\x61\xf6\x25\xf6\x6d\xf6\xcf\x1d\xcc\x1c\x12\x1d\xd6\x3b\x74\
\x3b\x7c\x72\x74\x75\xcc\x76\x6c\x70\xbc\xeb\xa4\xe1\x34\xc3\xa9\
\xc4\xa9\xc3\xe9\x57\x67\x1b\x67\xa1\x73\x9d\xf3\x35\x17\xa6\x4b\
\x90\xcb\x12\x97\x76\x97\x17\x53\x6d\xa7\x8a\xa7\x6e\x9f\x7a\xcb\
\x95\xe5\x1a\xee\xba\xd2\xb5\xd3\xf5\xa3\x9b\xbb\x9b\xdc\xad\xd9\
\x6d\xd4\xdd\xcc\x3d\xc5\x7d\xab\xfb\x4d\x2e\x9b\x1b\xc9\x5d\xc3\
\x3d\xef\x41\xf4\xf0\xf7\x58\xe2\x71\xcc\xe3\x9d\xa7\x9b\xa7\xc2\
\xf3\x90\xe7\x2f\x5e\x76\x5e\x59\x5e\xfb\xbd\x1e\x4f\xb3\x9c\x26\
\x9e\xd6\x30\x6d\xc8\xdb\xc4\x5b\xe0\xbd\xcb\x7b\x60\x3a\x3e\x3d\
\x65\xfa\xce\xe9\x03\x3e\xc6\x3e\x02\x9f\x7a\x9f\x87\xbe\xa6\xbe\
\x22\xdf\x3d\xbe\x23\x7e\xd6\x7e\x99\x7e\x07\xfc\x9e\xfb\x3b\xfa\
\xcb\xfd\x8f\xf8\xbf\xe1\x79\xf2\x16\xf1\x4e\x05\x60\x01\xc1\x01\
\xe5\x01\xbd\x81\x1a\x81\xb3\x03\x6b\x03\x1f\x04\x99\x04\xa5\x07\
\x35\x05\x8d\x05\xbb\x06\x2f\x0c\x3e\x15\x42\x0c\x09\x0d\x59\x1f\
\x72\x93\x6f\xc0\x17\xf2\x1b\xf9\x63\x33\xdc\x67\x2c\x9a\xd1\x15\
\xca\x08\x9d\x15\x5a\x1b\xfa\x30\xcc\x26\x4c\x1e\xd6\x11\x8e\x86\
\xcf\x08\xdf\x10\x7e\x6f\xa6\xf9\x4c\xe9\xcc\xb6\x08\x88\xe0\x47\
\x6c\x88\xb8\x1f\x69\x19\x99\x17\xf9\x7d\x14\x29\x2a\x32\xaa\x2e\
\xea\x51\xb4\x53\x74\x71\x74\xf7\x2c\xd6\xac\xe4\x59\xfb\x67\xbd\
\x8e\xf1\x8f\xa9\x8c\xb9\x3b\xdb\x6a\xb6\x72\x76\x67\xac\x6a\x6c\
\x52\x6c\x63\xec\x9b\xb8\x80\xb8\xaa\xb8\x81\x78\x87\xf8\x45\xf1\
\x97\x12\x74\x13\x24\x09\xed\x89\xe4\xc4\xd8\xc4\x3d\x89\xe3\x73\
\x02\xe7\x6c\x9a\x33\x9c\xe4\x9a\x54\x96\x74\x63\xae\xe5\xdc\xa2\
\xb9\x17\xe6\xe9\xce\xcb\x9e\x77\x3c\x59\x35\x59\x90\x7c\x38\x85\
\x98\x12\x97\xb2\x3f\xe5\x83\x20\x42\x50\x2f\x18\x4f\xe5\xa7\x6e\
\x4d\x1d\x13\xf2\x84\x9b\x85\x4f\x45\xbe\xa2\x8d\xa2\x51\xb1\xb7\
\xb8\x4a\x3c\x92\xe6\x9d\x56\x95\xf6\x38\xdd\x3b\x7d\x43\xfa\x68\
\x86\x4f\x46\x75\xc6\x33\x09\x4f\x52\x2b\x79\x91\x19\x92\xb9\x23\
\xf3\x4d\x56\x44\xd6\xde\xac\xcf\xd9\x71\xd9\x2d\x39\x94\x9c\x94\
\x9c\xa3\x52\x0d\x69\x96\xb4\x2b\xd7\x30\xb7\x28\xb7\x4f\x66\x2b\
\x2b\x93\x0d\xe4\x79\xe6\x6d\xca\x1b\x93\x87\xca\xf7\xe4\x23\xf9\
\x73\xf3\xdb\x15\x6c\x85\x4c\xd1\xa3\xb4\x52\xae\x50\x0e\x16\x4c\
\x2f\xa8\x2b\x78\x5b\x18\x5b\x78\xb8\x48\xbd\x48\x5a\xd4\x33\xdf\
\x66\xfe\xea\xf9\x23\x0b\x82\x16\x7c\xbd\x90\xb0\x50\xb8\xb0\xb3\
\xd8\xb8\x78\x59\xf1\xe0\x22\xbf\x45\xbb\x16\x23\x8b\x53\x17\x77\
\x2e\x31\x5d\x52\xba\x64\x78\x69\xf0\xd2\x7d\xcb\x68\xcb\xb2\x96\
\xfd\x50\xe2\x58\x52\x55\xf2\x6a\x79\xdc\xf2\x8e\x52\x83\xd2\xa5\
\xa5\x43\x2b\x82\x57\x34\x95\xa9\x94\xc9\xcb\x6e\xae\xf4\x5a\xb9\
\x63\x15\x61\x95\x64\x55\xef\x6a\x97\xd5\x5b\x56\x7f\x2a\x17\x95\
\x5f\xac\x70\xac\xa8\xae\xf8\xb0\x46\xb8\xe6\xe2\x57\x4e\x5f\xd5\
\x7c\xf5\x79\x6d\xda\xda\xde\x4a\xb7\xca\xed\xeb\x48\xeb\xa4\xeb\
\x6e\xac\xf7\x59\xbf\xaf\x4a\xbd\x6a\x41\xd5\xd0\x86\xf0\x0d\xad\
\x1b\xf1\x8d\xe5\x1b\x5f\x6d\x4a\xde\x74\xa1\x7a\x6a\xf5\x8e\xcd\
\xb4\xcd\xca\xcd\x03\x35\x61\x35\xed\x5b\xcc\xb6\xac\xdb\xf2\xa1\
\x36\xa3\xf6\x7a\x9d\x7f\x5d\xcb\x56\xfd\xad\xab\xb7\xbe\xd9\x26\
\xda\xd6\xbf\xdd\x77\x7b\xf3\x0e\x83\x1d\x15\x3b\xde\xef\x94\xec\
\xbc\xb5\x2b\x78\x57\x6b\xbd\x45\x7d\xf5\x6e\xd2\xee\x82\xdd\x8f\
\x1a\x62\x1b\xba\xbf\xe6\x7e\xdd\xb8\x47\x77\x4f\xc5\x9e\x8f\x7b\
\xa5\x7b\x07\xf6\x45\xef\xeb\x6a\x74\x6f\x6c\xdc\xaf\xbf\xbf\xb2\
\x09\x6d\x52\x36\x8d\x1e\x48\x3a\x70\xe5\x9b\x80\x6f\xda\x9b\xed\
\x9a\x77\xb5\x70\x5a\x2a\x0e\xc2\x41\xe5\xc1\x27\xdf\xa6\x7c\x7b\
\xe3\x50\xe8\xa1\xce\xc3\xdc\xc3\xcd\xdf\x99\x7f\xb7\xf5\x08\xeb\
\x48\x79\x2b\xd2\x3a\xbf\x75\xac\x2d\xa3\x6d\xa0\x3d\xa1\xbd\xef\
\xe8\x8c\xa3\x9d\x1d\x5e\x1d\x47\xbe\xb7\xff\x7e\xef\x31\xe3\x63\
\x75\xc7\x35\x8f\x57\x9e\xa0\x9d\x28\x3d\xf1\xf9\xe4\x82\x93\xe3\
\xa7\x64\xa7\x9e\x9d\x4e\x3f\x3d\xd4\x99\xdc\x79\xf7\x4c\xfc\x99\
\x6b\x5d\x51\x5d\xbd\x67\x43\xcf\x9e\x3f\x17\x74\xee\x4c\xb7\x5f\
\xf7\xc9\xf3\xde\xe7\x8f\x5d\xf0\xbc\x70\xf4\x22\xf7\x62\xdb\x25\
\xb7\x4b\xad\x3d\xae\x3d\x47\x7e\x70\xfd\xe1\x48\xaf\x5b\x6f\xeb\
\x65\xf7\xcb\xed\x57\x3c\xae\x74\xf4\x4d\xeb\x3b\xd1\xef\xd3\x7f\
\xfa\x6a\xc0\xd5\x73\xd7\xf8\xd7\x2e\x5d\x9f\x79\xbd\xef\xc6\xec\
\x1b\xb7\x6e\x26\xdd\x1c\xb8\x25\xba\xf5\xf8\x76\xf6\xed\x17\x77\
\x0a\xee\x4c\xdc\x5d\x7a\x8f\x78\xaf\xfc\xbe\xda\xfd\xea\x07\xfa\
\x0f\xea\x7f\xb4\xfe\xb1\x65\xc0\x6d\xe0\xf8\x60\xc0\x60\xcf\xc3\
\x59\x0f\xef\x0e\x09\x87\x9e\xfe\x94\xff\xd3\x87\xe1\xd2\x47\xcc\
\x47\xd5\x23\x46\x23\x8d\x8f\x9d\x1f\x1f\x1b\x0d\x1a\xbd\xf2\x64\
\xce\x93\xe1\xa7\xb2\xa7\x13\xcf\xca\x7e\x56\xff\x79\xeb\x73\xab\
\xe7\xdf\xfd\xe2\xfb\x4b\xcf\x58\xfc\xd8\xf0\x0b\xf9\x8b\xcf\xbf\
\xae\x79\xa9\xf3\x72\xef\xab\xa9\xaf\x3a\xc7\x23\xc7\x1f\xbc\xce\
\x79\x3d\xf1\xa6\xfc\xad\xce\xdb\x7d\xef\xb8\xef\xba\xdf\xc7\xbd\
\x1f\x99\x28\xfc\x40\xfe\x50\xf3\xd1\xfa\x63\xc7\xa7\xd0\x4f\xf7\
\x3e\xe7\x7c\xfe\xfc\x2f\xf7\x84\xf3\xfb\x25\xd2\x9f\x33\x00\x00\
\x00\x20\x63\x48\x52\x4d\x00\x00\x7a\x25\x00\x00\x80\x83\x00\x00\
\xf9\xff\x00\x00\x80\xe9\x00\x00\x75\x30\x00\x00\xea\x60\x00\x00\
\x3a\x98\x00\x00\x17\x6f\x92\x5f\xc5\x46\x00\x00\x06\x13\x49\x44\
\x41\x54\x78\xda\x7c\x95\x5b\x6c\x5c\x57\x19\x85\xbf\x7d\x3b\xb7\
\xb9\x7a\x3c\x71\xaa\x26\xb1\x6b\xc2\xa5\xa1\x4d\x2a\x54\x4b\x95\
\x10\x08\x51\x84\x28\x7d\xa0\x34\x41\x7e\x2b\x3c\x52\x21\x52\x11\
\x10\x15\xb4\x95\x08\xe2\x01\x41\xa1\xa5\x7d\xe4\x52\x40\x3c\x04\
\x90\x0a\x52\x40\x02\xb5\x2f\xa4\xa2\x28\xa1\x42\x4a\x1c\x27\x6d\
\x73\xa9\x62\xc7\x1e\xcf\xd8\x33\xbe\xcc\x78\xae\xe7\xec\xb3\x79\
\x18\x7b\x92\x12\x89\x2d\x6d\xe9\x3c\x9c\xad\xf5\xff\x6b\xfd\x6b\
\xfd\xc2\x39\x87\xb5\x96\xdd\xe3\x9c\x43\x08\x31\xfa\xde\x3d\x52\
\x4a\x1a\x8d\xc6\x43\xef\xbe\x7b\xf5\x68\x92\xd8\x87\x8a\xc5\xc2\
\x5a\x71\xac\x70\xae\xbc\xa7\xfc\x7a\x26\x8a\x2e\xa4\x36\xbd\xfd\
\x7f\x01\x38\xad\x35\xe2\xff\x00\x08\xb7\xf3\x42\x29\x45\xbd\xde\
\xf8\xfc\xdc\xdc\xc5\x57\xb7\xdb\xed\x70\x7c\xbc\xc4\x78\x79\x9c\
\x6c\x36\x83\x92\xb2\xab\x95\xfe\x45\x18\x86\x2f\x46\x51\x74\x03\
\x20\x4d\x1d\xe0\x30\xc6\x20\xb9\xf3\x08\x40\x03\x52\x08\x81\x10\
\x02\xe7\x9c\x59\xa9\x56\x9f\x4b\x6c\x1a\x4e\x4c\xec\xa5\x58\x2c\
\x12\x46\x01\x41\x18\x52\x2e\xef\x09\x4b\xa5\xd2\x53\xfd\x7e\xff\
\xad\x46\xa3\xf1\xc5\xe1\x1b\xe4\x0e\x09\xef\x07\x70\xce\x69\x60\
\x1f\xe0\x00\xbb\x5b\xfd\x8d\x85\xc5\xef\xdd\x5c\xaa\x7c\x3c\x9b\
\xcd\x10\x45\x21\x41\x10\x20\x85\x04\xe7\xb0\x49\x82\x94\x92\x72\
\xb9\x5c\x0e\x82\xe0\x4f\x2b\x2b\x2b\x3f\x91\x52\xa6\x4a\xca\x3b\
\x00\x84\x10\xc2\x17\x42\xb4\x00\xeb\x9c\x43\x29\xc5\x5a\xbd\xf1\
\xa9\x77\xde\xb9\xf2\x74\x14\x06\xe4\xf3\x79\xc2\xc8\xc7\x78\x1a\
\xcf\xf3\xf0\x7d\x1f\xad\x35\x00\x49\x92\x90\xcb\xe5\xc4\xe2\xd2\
\xd2\xb7\xae\x5c\xbd\xf6\x0d\x21\xd5\x9d\x1d\x00\x1d\x60\x6b\x57\
\x87\x5e\xaf\x97\x9b\xbf\x38\xff\xb2\x94\xc2\x64\xb3\x59\x84\x04\
\x63\x0c\xc6\x98\x21\x80\xe7\xa1\x94\xc2\x39\x47\x1c\xc7\xdc\x58\
\x58\xa0\xd7\xeb\x71\xfd\xfa\x7b\xcf\x76\xbb\xbd\xc9\xff\x05\x70\
\x3b\x97\x5d\x6a\xae\x5d\x7f\xef\xfb\xcd\x56\xeb\x48\xa1\x50\xc0\
\xf7\x7d\x7c\xdf\x1b\x01\xf8\x9e\x8f\x94\x0a\x21\x04\xd6\x5a\xda\
\x9d\x36\xd5\x5a\x95\x24\xb1\x08\x21\xcb\x95\x4a\xe5\x33\xec\x88\
\xf9\x7e\x85\x85\x18\x52\xb3\x56\x7f\xe4\xda\xb5\xeb\x27\x4a\xa5\
\x12\xb9\x5c\x0e\xdf\xf7\xf1\x3c\x8d\xd2\x0a\xcf\xf3\x30\x5a\xa1\
\x84\x20\x4d\x53\xfa\xfd\x3e\xb5\xd5\x55\x3a\x9d\x1e\x02\x41\x36\
\x9b\xa1\xd5\xda\x9e\x1a\x01\xec\xce\xfd\x2e\x97\xfd\x41\xfc\xc9\
\xf9\xf9\x4b\xbf\x33\xc6\x50\x28\x14\x50\x5a\xa1\x8d\x1c\x55\xee\
\x1b\x83\x94\x0a\x84\x60\x10\x0f\x68\xac\x37\x58\x5d\x5d\x03\x37\
\xec\x3c\x8a\x22\xca\xe5\xf2\xcd\x11\x40\xb5\x56\xbb\x8d\x27\xe7\
\x2d\x2e\x2c\x3d\xbb\xd5\xdc\x2e\xef\xdf\x7f\x37\x9e\x19\x72\x6d\
\x3c\x83\x67\x0c\xbe\xf1\x50\x4a\x23\x85\xc0\xa6\x29\x9d\x76\x87\
\x6a\x75\x95\xd4\x0e\xfd\xa4\xb5\x62\xcf\x44\x79\xe9\xae\xbb\x26\
\x5e\x1b\x01\xac\xaf\x6f\x8d\xe8\x89\x93\xc1\xf3\xb5\x5a\xed\x73\
\xa5\x52\x89\x4c\x14\x61\x3c\x8d\x36\x0a\xa3\x0d\xc6\x78\x68\xa5\
\x87\xde\x00\xe2\xc1\x80\x5a\xad\x46\xb3\xd5\x44\x20\xd1\x5a\x33\
\x5e\x1e\xa7\x58\x2c\x7c\xcd\xc1\xcd\x91\xc8\xa9\x4d\x48\x6d\x82\
\xc0\xcd\x34\xea\x8d\x27\x83\x20\xa0\x90\x2f\x20\x94\x44\x1b\x85\
\xd6\x1a\x6d\x0c\xc6\x68\xa4\x92\x23\x61\x37\xb7\x36\xa9\xd5\x56\
\xc1\x0d\xb5\x88\xa2\x08\xa3\xcd\x1b\xdd\x6e\xf7\x2f\xeb\xeb\xeb\
\x8c\x3a\x70\xc2\x11\x85\x21\x83\xfe\xe0\xbb\x42\xe0\x4d\x4e\x1e\
\x60\x6c\xac\x88\x90\x02\xe7\x86\x96\xf7\xb4\x41\x2a\x35\xd2\xab\
\xd7\xef\xb1\x52\xad\xd2\xeb\x75\x11\x42\x12\x86\x11\x52\xca\x7e\
\xab\xd5\x7c\xc6\x91\x62\xad\x65\xef\xc4\xc4\x10\x20\xf4\x43\xde\
\xbe\x7c\xe5\x3b\x67\xce\x9c\x39\x6a\xd3\x94\xa9\xc9\x03\x1c\x7e\
\xe0\x7e\x66\x66\x1e\x24\x9f\xcb\xe3\xd2\x61\x90\x39\xe7\x10\x08\
\xe2\x38\x66\xad\xd1\x60\x6d\xb5\x0e\x48\x7c\x3f\xa4\x50\x28\xd0\
\x6c\x6d\xfd\x2c\x4d\xed\x9b\xad\xed\x16\x61\x18\xde\xea\xe0\xfc\
\xf9\x0b\xc7\x5f\xf8\xe9\x4b\x3f\xdc\xdc\xdc\xa0\xdb\xeb\xd2\xeb\
\xf5\x30\xc6\xe3\xde\x43\xf7\xf2\x95\x2f\x3f\xc1\xec\xec\x31\x7c\
\xdf\x03\x20\x8e\x63\x9a\xad\x26\x37\x17\x6f\x32\x18\xc4\x04\x41\
\x40\x26\x13\xd1\xef\x77\xaf\x77\xbb\x9d\x17\xd3\x34\x25\x97\xcb\
\x31\x3d\x3d\x7d\xcb\xc9\x57\xaf\x5c\xfd\x6c\x92\xc4\xe4\x72\x39\
\xf2\xb9\x3c\xc5\x62\x11\xe3\x19\xe6\xe6\xe6\xf8\xfa\xf1\xa7\x38\
\x7a\x6c\x96\x0b\x73\x17\x87\x15\x69\x4d\xad\xb6\xca\xe6\xc6\x26\
\x9e\xe7\x91\xcf\xe7\xf1\x03\x8f\xed\x76\xfb\x47\x40\x2d\x08\x02\
\xa6\xa6\xa6\x50\xea\xb6\xa8\xc8\xe7\x0b\xe7\xb4\xd6\x23\x97\x9a\
\x9d\x71\xcc\xe7\xf3\x8c\x97\x4a\x9c\x3b\xf7\x16\x8f\x3f\xfe\x25\
\x4e\x9d\xfa\x03\xdd\x5e\x8f\xed\xf6\x36\x41\x10\x92\xcd\xe5\x88\
\x32\x01\xed\xed\xf6\x1b\xd6\xa6\xbf\x14\x42\xb1\x6f\xdf\x7e\x32\
\x99\x88\x34\x4d\x6f\x51\x34\x39\x35\xf9\xdb\x7d\xfb\xee\x3e\xbe\
\xbc\x5c\xd9\xeb\xfb\x3e\xce\x39\xa4\x90\x28\x6b\x49\x55\x4a\x79\
\xdc\xa3\x37\x18\x70\xe2\x9b\xdf\xe6\xfc\xdc\x05\x1e\x7b\xec\x0b\
\x3b\xd4\x84\x58\x6b\xf9\xfb\xd8\xbf\xff\x75\x63\x72\xb5\xd6\xb0\
\x5b\x7b\x36\x92\x26\x9b\xf5\xe6\xe6\x4a\x52\x7f\xba\x5b\xeb\xfd\
\x4a\x9d\x3c\x79\x92\xa5\x4a\xa5\x99\xcd\x64\xe3\xcb\x97\x2e\x3f\
\xb2\x9b\xa2\xbb\x91\x21\xa5\x44\x0a\x85\xb7\x33\xa6\x73\x17\x2e\
\x72\x60\xff\x7e\x3e\xf4\x91\x0f\x12\x45\x21\xad\x56\xeb\xb5\x3f\
\x97\xde\x9c\x5d\x88\x57\x0a\x57\x06\x37\xa8\x26\x75\x36\xd2\x56\
\xb0\xdd\x6b\x3f\x9a\xb4\x06\x6f\xcb\x9d\x45\xc0\xa1\xfb\x0e\xbd\
\xf4\xf0\xc3\x9f\x7e\x41\xed\x04\x58\x10\x04\xb7\x5d\x1f\xdf\xf3\
\xc8\x84\x19\x02\x3f\xe0\xf4\xe9\xbf\xa2\xb5\x26\x4d\xd3\x41\x92\
\x24\x3f\x58\x8c\xab\xe1\xb5\xc1\x22\x95\x78\x8d\x8d\xb4\xc9\x76\
\x7f\x9b\xb4\x3e\x50\x54\xe3\xa3\x7a\xb4\x26\x81\x07\x67\x66\x9e\
\x03\x91\x39\x7b\xf6\xec\x57\x3b\x9d\xce\x50\x0b\xdf\xc7\x5a\x4b\
\x6a\x2d\x36\x4d\x31\x9e\xa1\xbe\xd6\x60\x7e\x6e\x9e\xfb\x0e\x7f\
\xf4\x37\xc6\x98\x7f\x2e\xda\x15\xb6\x5c\x7b\xb8\x0b\x01\x3a\x29\
\x54\x63\xd8\xb0\x6a\x98\xa6\x4e\xe0\x1c\x44\x61\xd8\x3d\x7c\xf8\
\xfe\x27\x33\xd9\xcc\x3f\xe6\xe7\xe7\x7f\x5c\xab\xd6\x0e\x24\x49\
\x82\xe7\x79\x23\xf7\x0e\x23\x45\xb2\x5c\xa9\xb4\x1e\xf8\xd8\x91\
\x97\x33\x99\x0c\xf5\x66\x63\xc0\xc0\x79\x08\x01\xb1\x83\xa5\x3e\
\x2c\xf4\xc1\x72\x5a\x8f\x36\x01\xa0\x94\x94\x99\x6c\xc6\xdd\x33\
\x7d\xcf\xef\xc7\x4a\x63\x7f\x5b\x5e\x5e\x3e\x56\xa9\x54\x9e\x68\
\x34\xd6\x3f\xd1\xe9\x74\x34\x42\x80\x73\x4c\x1f\x9c\xee\x1c\x39\
\x72\xf8\x84\x10\xe2\x12\x00\xf5\xe4\x38\xeb\xf6\x79\x7a\x69\x9e\
\x96\x85\x5a\xdc\x21\x71\xcf\x10\xc8\x53\xc3\xb8\x96\x6e\x37\x49\
\x85\xe7\x69\xa1\xb5\xb6\xc5\x62\x71\x2b\x08\x82\x57\xc6\xc6\xc6\
\x5e\xe9\xf7\x07\x33\x4a\xc9\x47\x85\xe4\xc3\xc5\x42\x71\xf3\xe0\
\xc1\x0f\xfc\xba\x38\x56\xf8\x4f\x62\x13\xb4\xd2\x60\xf9\x39\x6d\
\xbb\xca\x5a\x3c\x4b\xd3\x2a\xfa\xee\x55\x3c\xf1\x47\x80\xff\x0e\
\x00\x69\xa1\xc1\x0e\x0c\xfa\xb2\x23\x00\x00\x00\x00\x49\x45\x4e\
\x44\xae\x42\x60\x82\
\x00\x00\x0d\x2a\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x0a\x4f\x69\x43\x43\x50\x50\x68\x6f\
\x74\x6f\x73\x68\x6f\x70\x20\x49\x43\x43\x20\x70\x72\x6f\x66\x69\
\x6c\x65\x00\x00\x78\xda\x9d\x53\x67\x54\x53\xe9\x16\x3d\xf7\xde\
\xf4\x42\x4b\x88\x80\x94\x4b\x6f\x52\x15\x08\x20\x52\x42\x8b\x80\
\x14\x91\x26\x2a\x21\x09\x10\x4a\x88\x21\xa1\xd9\x15\x51\xc1\x11\
\x45\x45\x04\x1b\xc8\xa0\x88\x03\x8e\x8e\x80\x8c\x15\x51\x2c\x0c\
\x8a\x0a\xd8\x07\xe4\x21\xa2\x8e\x83\xa3\x88\x8a\xca\xfb\xe1\x7b\
\xa3\x6b\xd6\xbc\xf7\xe6\xcd\xfe\xb5\xd7\x3e\xe7\xac\xf3\x9d\xb3\
\xcf\x07\xc0\x08\x0c\x96\x48\x33\x51\x35\x80\x0c\xa9\x42\x1e\x11\
\xe0\x83\xc7\xc4\xc6\xe1\xe4\x2e\x40\x81\x0a\x24\x70\x00\x10\x08\
\xb3\x64\x21\x73\xfd\x23\x01\x00\xf8\x7e\x3c\x3c\x2b\x22\xc0\x07\
\xbe\x00\x01\x78\xd3\x0b\x08\x00\xc0\x4d\x9b\xc0\x30\x1c\x87\xff\
\x0f\xea\x42\x99\x5c\x01\x80\x84\x01\xc0\x74\x91\x38\x4b\x08\x80\
\x14\x00\x40\x7a\x8e\x42\xa6\x00\x40\x46\x01\x80\x9d\x98\x26\x53\
\x00\xa0\x04\x00\x60\xcb\x63\x62\xe3\x00\x50\x2d\x00\x60\x27\x7f\
\xe6\xd3\x00\x80\x9d\xf8\x99\x7b\x01\x00\x5b\x94\x21\x15\x01\xa0\
\x91\x00\x20\x13\x65\x88\x44\x00\x68\x3b\x00\xac\xcf\x56\x8a\x45\
\x00\x58\x30\x00\x14\x66\x4b\xc4\x39\x00\xd8\x2d\x00\x30\x49\x57\
\x66\x48\x00\xb0\xb7\x00\xc0\xce\x10\x0b\xb2\x00\x08\x0c\x00\x30\
\x51\x88\x85\x29\x00\x04\x7b\x00\x60\xc8\x23\x23\x78\x00\x84\x99\
\x00\x14\x46\xf2\x57\x3c\xf1\x2b\xae\x10\xe7\x2a\x00\x00\x78\x99\
\xb2\x3c\xb9\x24\x39\x45\x81\x5b\x08\x2d\x71\x07\x57\x57\x2e\x1e\
\x28\xce\x49\x17\x2b\x14\x36\x61\x02\x61\x9a\x40\x2e\xc2\x79\x99\
\x19\x32\x81\x34\x0f\xe0\xf3\xcc\x00\x00\xa0\x91\x15\x11\xe0\x83\
\xf3\xfd\x78\xce\x0e\xae\xce\xce\x36\x8e\xb6\x0e\x5f\x2d\xea\xbf\
\x06\xff\x22\x62\x62\xe3\xfe\xe5\xcf\xab\x70\x40\x00\x00\xe1\x74\
\x7e\xd1\xfe\x2c\x2f\xb3\x1a\x80\x3b\x06\x80\x6d\xfe\xa2\x25\xee\
\x04\x68\x5e\x0b\xa0\x75\xf7\x8b\x66\xb2\x0f\x40\xb5\x00\xa0\xe9\
\xda\x57\xf3\x70\xf8\x7e\x3c\x3c\x45\xa1\x90\xb9\xd9\xd9\xe5\xe4\
\xe4\xd8\x4a\xc4\x42\x5b\x61\xca\x57\x7d\xfe\x67\xc2\x5f\xc0\x57\
\xfd\x6c\xf9\x7e\x3c\xfc\xf7\xf5\xe0\xbe\xe2\x24\x81\x32\x5d\x81\
\x47\x04\xf8\xe0\xc2\xcc\xf4\x4c\xa5\x1c\xcf\x92\x09\x84\x62\xdc\
\xe6\x8f\x47\xfc\xb7\x0b\xff\xfc\x1d\xd3\x22\xc4\x49\x62\xb9\x58\
\x2a\x14\xe3\x51\x12\x71\x8e\x44\x9a\x8c\xf3\x32\xa5\x22\x89\x42\
\x92\x29\xc5\x25\xd2\xff\x64\xe2\xdf\x2c\xfb\x03\x3e\xdf\x35\x00\
\xb0\x6a\x3e\x01\x7b\x91\x2d\xa8\x5d\x63\x03\xf6\x4b\x27\x10\x58\
\x74\xc0\xe2\xf7\x00\x00\xf2\xbb\x6f\xc1\xd4\x28\x08\x03\x80\x68\
\x83\xe1\xcf\x77\xff\xef\x3f\xfd\x47\xa0\x25\x00\x80\x66\x49\x92\
\x71\x00\x00\x5e\x44\x24\x2e\x54\xca\xb3\x3f\xc7\x08\x00\x00\x44\
\xa0\x81\x2a\xb0\x41\x1b\xf4\xc1\x18\x2c\xc0\x06\x1c\xc1\x05\xdc\
\xc1\x0b\xfc\x60\x36\x84\x42\x24\xc4\xc2\x42\x10\x42\x0a\x64\x80\
\x1c\x72\x60\x29\xac\x82\x42\x28\x86\xcd\xb0\x1d\x2a\x60\x2f\xd4\
\x40\x1d\x34\xc0\x51\x68\x86\x93\x70\x0e\x2e\xc2\x55\xb8\x0e\x3d\
\x70\x0f\xfa\x61\x08\x9e\xc1\x28\xbc\x81\x09\x04\x41\xc8\x08\x13\
\x61\x21\xda\x88\x01\x62\x8a\x58\x23\x8e\x08\x17\x99\x85\xf8\x21\
\xc1\x48\x04\x12\x8b\x24\x20\xc9\x88\x14\x51\x22\x4b\x91\x35\x48\
\x31\x52\x8a\x54\x20\x55\x48\x1d\xf2\x3d\x72\x02\x39\x87\x5c\x46\
\xba\x91\x3b\xc8\x00\x32\x82\xfc\x86\xbc\x47\x31\x94\x81\xb2\x51\
\x3d\xd4\x0c\xb5\x43\xb9\xa8\x37\x1a\x84\x46\xa2\x0b\xd0\x64\x74\
\x31\x9a\x8f\x16\xa0\x9b\xd0\x72\xb4\x1a\x3d\x8c\x36\xa1\xe7\xd0\
\xab\x68\x0f\xda\x8f\x3e\x43\xc7\x30\xc0\xe8\x18\x07\x33\xc4\x6c\
\x30\x2e\xc6\xc3\x42\xb1\x38\x2c\x09\x93\x63\xcb\xb1\x22\xac\x0c\
\xab\xc6\x1a\xb0\x56\xac\x03\xbb\x89\xf5\x63\xcf\xb1\x77\x04\x12\
\x81\x45\xc0\x09\x36\x04\x77\x42\x20\x61\x1e\x41\x48\x58\x4c\x58\
\x4e\xd8\x48\xa8\x20\x1c\x24\x34\x11\xda\x09\x37\x09\x03\x84\x51\
\xc2\x27\x22\x93\xa8\x4b\xb4\x26\xba\x11\xf9\xc4\x18\x62\x32\x31\
\x87\x58\x48\x2c\x23\xd6\x12\x8f\x13\x2f\x10\x7b\x88\x43\xc4\x37\
\x24\x12\x89\x43\x32\x27\xb9\x90\x02\x49\xb1\xa4\x54\xd2\x12\xd2\
\x46\xd2\x6e\x52\x23\xe9\x2c\xa9\x9b\x34\x48\x1a\x23\x93\xc9\xda\
\x64\x6b\xb2\x07\x39\x94\x2c\x20\x2b\xc8\x85\xe4\x9d\xe4\xc3\xe4\
\x33\xe4\x1b\xe4\x21\xf2\x5b\x0a\x9d\x62\x40\x71\xa4\xf8\x53\xe2\
\x28\x52\xca\x6a\x4a\x19\xe5\x10\xe5\x34\xe5\x06\x65\x98\x32\x41\
\x55\xa3\x9a\x52\xdd\xa8\xa1\x54\x11\x35\x8f\x5a\x42\xad\xa1\xb6\
\x52\xaf\x51\x87\xa8\x13\x34\x75\x9a\x39\xcd\x83\x16\x49\x4b\xa5\
\xad\xa2\x95\xd3\x1a\x68\x17\x68\xf7\x69\xaf\xe8\x74\xba\x11\xdd\
\x95\x1e\x4e\x97\xd0\x57\xd2\xcb\xe9\x47\xe8\x97\xe8\x03\xf4\x77\
\x0c\x0d\x86\x15\x83\xc7\x88\x67\x28\x19\x9b\x18\x07\x18\x67\x19\
\x77\x18\xaf\x98\x4c\xa6\x19\xd3\x8b\x19\xc7\x54\x30\x37\x31\xeb\
\x98\xe7\x99\x0f\x99\x6f\x55\x58\x2a\xb6\x2a\x7c\x15\x91\xca\x0a\
\x95\x4a\x95\x26\x95\x1b\x2a\x2f\x54\xa9\xaa\xa6\xaa\xde\xaa\x0b\
\x55\xf3\x55\xcb\x54\x8f\xa9\x5e\x53\x7d\xae\x46\x55\x33\x53\xe3\
\xa9\x09\xd4\x96\xab\x55\xaa\x9d\x50\xeb\x53\x1b\x53\x67\xa9\x3b\
\xa8\x87\xaa\x67\xa8\x6f\x54\x3f\xa4\x7e\x59\xfd\x89\x06\x59\xc3\
\x4c\xc3\x4f\x43\xa4\x51\xa0\xb1\x5f\xe3\xbc\xc6\x20\x0b\x63\x19\
\xb3\x78\x2c\x21\x6b\x0d\xab\x86\x75\x81\x35\xc4\x26\xb1\xcd\xd9\
\x7c\x76\x2a\xbb\x98\xfd\x1d\xbb\x8b\x3d\xaa\xa9\xa1\x39\x43\x33\
\x4a\x33\x57\xb3\x52\xf3\x94\x66\x3f\x07\xe3\x98\x71\xf8\x9c\x74\
\x4e\x09\xe7\x28\xa7\x97\xf3\x7e\x8a\xde\x14\xef\x29\xe2\x29\x1b\
\xa6\x34\x4c\xb9\x31\x65\x5c\x6b\xaa\x96\x97\x96\x58\xab\x48\xab\
\x51\xab\x47\xeb\xbd\x36\xae\xed\xa7\x9d\xa6\xbd\x45\xbb\x59\xfb\
\x81\x0e\x41\xc7\x4a\x27\x5c\x27\x47\x67\x8f\xce\x05\x9d\xe7\x53\
\xd9\x53\xdd\xa7\x0a\xa7\x16\x4d\x3d\x3a\xf5\xae\x2e\xaa\x6b\xa5\
\x1b\xa1\xbb\x44\x77\xbf\x6e\xa7\xee\x98\x9e\xbe\x5e\x80\x9e\x4c\
\x6f\xa7\xde\x79\xbd\xe7\xfa\x1c\x7d\x2f\xfd\x54\xfd\x6d\xfa\xa7\
\xf5\x47\x0c\x58\x06\xb3\x0c\x24\x06\xdb\x0c\xce\x18\x3c\xc5\x35\
\x71\x6f\x3c\x1d\x2f\xc7\xdb\xf1\x51\x43\x5d\xc3\x40\x43\xa5\x61\
\x95\x61\x97\xe1\x84\x91\xb9\xd1\x3c\xa3\xd5\x46\x8d\x46\x0f\x8c\
\x69\xc6\x5c\xe3\x24\xe3\x6d\xc6\x6d\xc6\xa3\x26\x06\x26\x21\x26\
\x4b\x4d\xea\x4d\xee\x9a\x52\x4d\xb9\xa6\x29\xa6\x3b\x4c\x3b\x4c\
\xc7\xcd\xcc\xcd\xa2\xcd\xd6\x99\x35\x9b\x3d\x31\xd7\x32\xe7\x9b\
\xe7\x9b\xd7\x9b\xdf\xb7\x60\x5a\x78\x5a\x2c\xb6\xa8\xb6\xb8\x65\
\x49\xb2\xe4\x5a\xa6\x59\xee\xb6\xbc\x6e\x85\x5a\x39\x59\xa5\x58\
\x55\x5a\x5d\xb3\x46\xad\x9d\xad\x25\xd6\xbb\xad\xbb\xa7\x11\xa7\
\xb9\x4e\x93\x4e\xab\x9e\xd6\x67\xc3\xb0\xf1\xb6\xc9\xb6\xa9\xb7\
\x19\xb0\xe5\xd8\x06\xdb\xae\xb6\x6d\xb6\x7d\x61\x67\x62\x17\x67\
\xb7\xc5\xae\xc3\xee\x93\xbd\x93\x7d\xba\x7d\x8d\xfd\x3d\x07\x0d\
\x87\xd9\x0e\xab\x1d\x5a\x1d\x7e\x73\xb4\x72\x14\x3a\x56\x3a\xde\
\x9a\xce\x9c\xee\x3f\x7d\xc5\xf4\x96\xe9\x2f\x67\x58\xcf\x10\xcf\
\xd8\x33\xe3\xb6\x13\xcb\x29\xc4\x69\x9d\x53\x9b\xd3\x47\x67\x17\
\x67\xb9\x73\x83\xf3\x88\x8b\x89\x4b\x82\xcb\x2e\x97\x3e\x2e\x9b\
\x1b\xc6\xdd\xc8\xbd\xe4\x4a\x74\xf5\x71\x5d\xe1\x7a\xd2\xf5\x9d\
\x9b\xb3\x9b\xc2\xed\xa8\xdb\xaf\xee\x36\xee\x69\xee\x87\xdc\x9f\
\xcc\x34\x9f\x29\x9e\x59\x33\x73\xd0\xc3\xc8\x43\xe0\x51\xe5\xd1\
\x3f\x0b\x9f\x95\x30\x6b\xdf\xac\x7e\x4f\x43\x4f\x81\x67\xb5\xe7\
\x23\x2f\x63\x2f\x91\x57\xad\xd7\xb0\xb7\xa5\x77\xaa\xf7\x61\xef\
\x17\x3e\xf6\x3e\x72\x9f\xe3\x3e\xe3\x3c\x37\xde\x32\xde\x59\x5f\
\xcc\x37\xc0\xb7\xc8\xb7\xcb\x4f\xc3\x6f\x9e\x5f\x85\xdf\x43\x7f\
\x23\xff\x64\xff\x7a\xff\xd1\x00\xa7\x80\x25\x01\x67\x03\x89\x81\
\x41\x81\x5b\x02\xfb\xf8\x7a\x7c\x21\xbf\x8e\x3f\x3a\xdb\x65\xf6\
\xb2\xd9\xed\x41\x8c\xa0\xb9\x41\x15\x41\x8f\x82\xad\x82\xe5\xc1\
\xad\x21\x68\xc8\xec\x90\xad\x21\xf7\xe7\x98\xce\x91\xce\x69\x0e\
\x85\x50\x7e\xe8\xd6\xd0\x07\x61\xe6\x61\x8b\xc3\x7e\x0c\x27\x85\
\x87\x85\x57\x86\x3f\x8e\x70\x88\x58\x1a\xd1\x31\x97\x35\x77\xd1\
\xdc\x43\x73\xdf\x44\xfa\x44\x96\x44\xde\x9b\x67\x31\x4f\x39\xaf\
\x2d\x4a\x35\x2a\x3e\xaa\x2e\x6a\x3c\xda\x37\xba\x34\xba\x3f\xc6\
\x2e\x66\x59\xcc\xd5\x58\x9d\x58\x49\x6c\x4b\x1c\x39\x2e\x2a\xae\
\x36\x6e\x6c\xbe\xdf\xfc\xed\xf3\x87\xe2\x9d\xe2\x0b\xe3\x7b\x17\
\x98\x2f\xc8\x5d\x70\x79\xa1\xce\xc2\xf4\x85\xa7\x16\xa9\x2e\x12\
\x2c\x3a\x96\x40\x4c\x88\x4e\x38\x94\xf0\x41\x10\x2a\xa8\x16\x8c\
\x25\xf2\x13\x77\x25\x8e\x0a\x79\xc2\x1d\xc2\x67\x22\x2f\xd1\x36\
\xd1\x88\xd8\x43\x5c\x2a\x1e\x4e\xf2\x48\x2a\x4d\x7a\x92\xec\x91\
\xbc\x35\x79\x24\xc5\x33\xa5\x2c\xe5\xb9\x84\x27\xa9\x90\xbc\x4c\
\x0d\x4c\xdd\x9b\x3a\x9e\x16\x9a\x76\x20\x6d\x32\x3d\x3a\xbd\x31\
\x83\x92\x91\x90\x71\x42\xaa\x21\x4d\x93\xb6\x67\xea\x67\xe6\x66\
\x76\xcb\xac\x65\x85\xb2\xfe\xc5\x6e\x8b\xb7\x2f\x1e\x95\x07\xc9\
\x6b\xb3\x90\xac\x05\x59\x2d\x0a\xb6\x42\xa6\xe8\x54\x5a\x28\xd7\
\x2a\x07\xb2\x67\x65\x57\x66\xbf\xcd\x89\xca\x39\x96\xab\x9e\x2b\
\xcd\xed\xcc\xb3\xca\xdb\x90\x37\x9c\xef\x9f\xff\xed\x12\xc2\x12\
\xe1\x92\xb6\xa5\x86\x4b\x57\x2d\x1d\x58\xe6\xbd\xac\x6a\x39\xb2\
\x3c\x71\x79\xdb\x0a\xe3\x15\x05\x2b\x86\x56\x06\xac\x3c\xb8\x8a\
\xb6\x2a\x6d\xd5\x4f\xab\xed\x57\x97\xae\x7e\xbd\x26\x7a\x4d\x6b\
\x81\x5e\xc1\xca\x82\xc1\xb5\x01\x6b\xeb\x0b\x55\x0a\xe5\x85\x7d\
\xeb\xdc\xd7\xed\x5d\x4f\x58\x2f\x59\xdf\xb5\x61\xfa\x86\x9d\x1b\
\x3e\x15\x89\x8a\xae\x14\xdb\x17\x97\x15\x7f\xd8\x28\xdc\x78\xe5\
\x1b\x87\x6f\xca\xbf\x99\xdc\x94\xb4\xa9\xab\xc4\xb9\x64\xcf\x66\
\xd2\x66\xe9\xe6\xde\x2d\x9e\x5b\x0e\x96\xaa\x97\xe6\x97\x0e\x6e\
\x0d\xd9\xda\xb4\x0d\xdf\x56\xb4\xed\xf5\xf6\x45\xdb\x2f\x97\xcd\
\x28\xdb\xbb\x83\xb6\x43\xb9\xa3\xbf\x3c\xb8\xbc\x65\xa7\xc9\xce\
\xcd\x3b\x3f\x54\xa4\x54\xf4\x54\xfa\x54\x36\xee\xd2\xdd\xb5\x61\
\xd7\xf8\x6e\xd1\xee\x1b\x7b\xbc\xf6\x34\xec\xd5\xdb\x5b\xbc\xf7\
\xfd\x3e\xc9\xbe\xdb\x55\x01\x55\x4d\xd5\x66\xd5\x65\xfb\x49\xfb\
\xb3\xf7\x3f\xae\x89\xaa\xe9\xf8\x96\xfb\x6d\x5d\xad\x4e\x6d\x71\
\xed\xc7\x03\xd2\x03\xfd\x07\x23\x0e\xb6\xd7\xb9\xd4\xd5\x1d\xd2\
\x3d\x54\x52\x8f\xd6\x2b\xeb\x47\x0e\xc7\x1f\xbe\xfe\x9d\xef\x77\
\x2d\x0d\x36\x0d\x55\x8d\x9c\xc6\xe2\x23\x70\x44\x79\xe4\xe9\xf7\
\x09\xdf\xf7\x1e\x0d\x3a\xda\x76\x8c\x7b\xac\xe1\x07\xd3\x1f\x76\
\x1d\x67\x1d\x2f\x6a\x42\x9a\xf2\x9a\x46\x9b\x53\x9a\xfb\x5b\x62\
\x5b\xba\x4f\xcc\x3e\xd1\xd6\xea\xde\x7a\xfc\x47\xdb\x1f\x0f\x9c\
\x34\x3c\x59\x79\x4a\xf3\x54\xc9\x69\xda\xe9\x82\xd3\x93\x67\xf2\
\xcf\x8c\x9d\x95\x9d\x7d\x7e\x2e\xf9\xdc\x60\xdb\xa2\xb6\x7b\xe7\
\x63\xce\xdf\x6a\x0f\x6f\xef\xba\x10\x74\xe1\xd2\x45\xff\x8b\xe7\
\x3b\xbc\x3b\xce\x5c\xf2\xb8\x74\xf2\xb2\xdb\xe5\x13\x57\xb8\x57\
\x9a\xaf\x3a\x5f\x6d\xea\x74\xea\x3c\xfe\x93\xd3\x4f\xc7\xbb\x9c\
\xbb\x9a\xae\xb9\x5c\x6b\xb9\xee\x7a\xbd\xb5\x7b\x66\xf7\xe9\x1b\
\x9e\x37\xce\xdd\xf4\xbd\x79\xf1\x16\xff\xd6\xd5\x9e\x39\x3d\xdd\
\xbd\xf3\x7a\x6f\xf7\xc5\xf7\xf5\xdf\x16\xdd\x7e\x72\x27\xfd\xce\
\xcb\xbb\xd9\x77\x27\xee\xad\xbc\x4f\xbc\x5f\xf4\x40\xed\x41\xd9\
\x43\xdd\x87\xd5\x3f\x5b\xfe\xdc\xd8\xef\xdc\x7f\x6a\xc0\x77\xa0\
\xf3\xd1\xdc\x47\xf7\x06\x85\x83\xcf\xfe\x91\xf5\x8f\x0f\x43\x05\
\x8f\x99\x8f\xcb\x86\x0d\x86\xeb\x9e\x38\x3e\x39\x39\xe2\x3f\x72\
\xfd\xe9\xfc\xa7\x43\xcf\x64\xcf\x26\x9e\x17\xfe\xa2\xfe\xcb\xae\
\x17\x16\x2f\x7e\xf8\xd5\xeb\xd7\xce\xd1\x98\xd1\xa1\x97\xf2\x97\
\x93\xbf\x6d\x7c\xa5\xfd\xea\xc0\xeb\x19\xaf\xdb\xc6\xc2\xc6\x1e\
\xbe\xc9\x78\x33\x31\x5e\xf4\x56\xfb\xed\xc1\x77\xdc\x77\x1d\xef\
\xa3\xdf\x0f\x4f\xe4\x7c\x20\x7f\x28\xff\x68\xf9\xb1\xf5\x53\xd0\
\xa7\xfb\x93\x19\x93\x93\xff\x04\x03\x98\xf3\xfc\x63\x33\x2d\xdb\
\x00\x00\x00\x20\x63\x48\x52\x4d\x00\x00\x7a\x25\x00\x00\x80\x83\
\x00\x00\xf9\xff\x00\x00\x80\xe9\x00\x00\x75\x30\x00\x00\xea\x60\
\x00\x00\x3a\x98\x00\x00\x17\x6f\x92\x5f\xc5\x46\x00\x00\x02\x55\
\x49\x44\x41\x54\x78\xda\x5c\x91\xcd\x8a\x1d\x55\x14\x85\xbf\x53\
\x55\xdd\xe9\x4e\x2e\x69\xcc\x03\x04\x04\xa1\x1d\x18\x15\x32\x15\
\x1c\x05\xae\xa3\x8c\x7c\x82\x40\xc4\x51\xa4\x85\xbc\x82\x23\x07\
\xa2\x20\x08\x3e\x84\x8e\x04\x47\x82\xe0\x30\x12\x47\x81\x06\x21\
\xf3\x98\xee\x7b\xab\xea\xfc\xee\xbd\x1c\x54\x75\xfb\x73\xe0\x70\
\xd8\x83\xb5\xd6\xb7\xd7\x09\xef\x9e\x7f\xcc\x9d\xfe\x36\x27\xdd\
\x86\x5b\xdd\x31\x87\xe1\xe0\x34\x10\x1e\x1b\xfe\x61\x51\x7d\x3f\
\xab\x10\x3d\xff\x3e\x79\xfc\x65\xf2\xf8\xed\xe8\xf3\xf9\xac\xc4\
\xec\x89\xac\x42\x77\xd2\x6d\x38\xe9\x36\x6c\xba\x9b\xdc\x08\x87\
\x67\x5d\xe8\x9e\x19\x7e\x96\x55\xee\x47\x4f\xfd\xec\xa9\x4f\xca\
\xf7\x8b\xea\x59\xa5\x3d\x37\xfc\xcc\x64\x38\x8e\x10\xc3\xa6\xbb\
\xc9\x71\x77\x74\xd8\x87\xfe\x07\xc7\xb7\xcd\x8d\xa8\xcc\xe4\x91\
\xe8\x99\xac\x42\x55\xa3\xa8\x92\x94\x8f\xb3\xca\x97\x59\xf5\x41\
\x51\x7d\x58\x54\xcb\x70\x18\x06\x80\xaf\x9b\xda\xb6\xaa\x11\x95\
\xd9\xfb\xc4\xe8\x91\xe4\x99\xa2\x8a\xe1\x98\x6c\x35\x29\x44\xcf\
\xdb\xe4\xf9\x0b\x9a\x3e\x1f\x04\xf7\x8a\xea\x23\xd3\x92\x7c\x69\
\x23\x97\x3e\x32\xfa\x4c\x56\xc1\xb4\xa0\x0a\x61\x72\x92\x32\xd5\
\x2a\x44\x3d\xa1\xfa\x77\x43\x51\x7d\x5c\xd5\xfa\xb4\x26\xbf\xb6\
\x3d\x17\xb6\x23\x2a\x53\xd5\x10\x02\x20\x10\x68\x32\x54\x1d\xb2\
\x43\xf4\x9e\xa2\x4f\x87\xd9\xd3\xd6\x30\xa2\x2f\x06\x7b\x9f\x98\
\x95\x28\xaa\xb8\x16\xf1\xd5\x51\x5b\xc5\xb3\x43\x74\xc8\xfa\x60\
\x18\x7d\xbe\xdb\x30\xa2\xa7\xeb\xe2\xaa\x1a\x2e\x5d\xa7\x2f\x6a\
\xa0\x09\x8a\x20\x39\x4c\x0e\xc9\xef\x0e\x7b\x9f\x68\x18\xd9\x0b\
\x69\x6d\xfc\x6a\xef\xff\x88\x5d\x8b\x41\x5a\xd3\x67\x83\x28\x86\
\xbd\xcf\x2f\xab\xea\x5b\x55\x8d\x4a\xa3\x52\xd1\xff\xd0\xd1\x2a\
\xce\x5a\xf0\xc7\xf5\x16\xbd\xec\x76\x3e\xfe\x74\xe9\x23\x3b\x9f\
\x88\x2d\x61\xd5\xa0\x0a\x4c\xff\xa4\x96\x55\xb8\x37\xb8\x34\xb8\
\x6c\x30\x1a\x64\xff\x35\xf0\xfc\xbd\x7b\x14\x7f\x46\x53\x4f\x13\
\xd7\xe4\x61\x7d\x9d\xa5\xb8\xc9\xe1\xa2\xc1\x85\x2d\x46\x55\xc6\
\x41\x78\x7b\x20\xf9\x1f\x64\xff\x86\xac\x27\xb4\x35\xf1\xca\xc4\
\x56\x92\xb4\x22\xef\xae\xc5\x10\xf8\x8a\xa3\xee\x7c\x58\x77\x7b\
\x4a\xf4\x53\x92\x6f\xa9\x2b\xba\xfd\xab\xf5\xec\x0b\xf2\xec\xcb\
\x0c\x3f\x72\xdc\x3d\xe5\x46\xa0\xc3\x05\xae\x42\xd3\x47\x14\xff\
\x8c\xd9\x47\x76\x06\xaf\x1b\xfc\xd5\xe0\x55\x85\x57\x6d\xd9\x3d\
\xfa\x88\xeb\x13\x0e\xc2\x43\x6e\x75\xc6\xed\x9e\xc0\x6f\xef\x2c\
\xdf\x32\x1a\xec\x1d\x26\x7b\x93\xd9\x1f\x31\xfb\x03\x92\x9f\x52\
\x05\x55\x2f\x70\xfd\x4c\x17\xbe\xe7\x28\xfc\xc9\xa6\x87\x3b\x03\
\xbc\x31\xf0\xf7\x00\x1f\xdf\x11\x08\xaa\x52\x16\x46\x00\x00\x00\
\x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x01\x97\x70\x0d\x6e\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\
\x0b\x13\x01\x00\x9a\x9c\x18\x00\x00\x07\x0a\x49\x44\x41\x54\x48\
\xc7\x55\x95\x6b\x70\x5c\x65\x19\xc7\x7f\xef\x39\x67\xf7\x9c\xb3\
\x97\x64\x2f\xd9\x96\x4d\x43\x2f\x50\xc2\x08\xd2\x32\x50\x2d\x96\
\x62\x5b\x75\x10\x61\x04\x06\x54\x04\x01\xc5\xaa\x0c\x1f\x44\x40\
\x40\x1c\x9d\xd1\x51\x04\xf1\x02\x32\x38\xf5\xc2\x54\x07\x66\xb4\
\x53\x2e\x56\x40\x46\xa0\x97\x34\x09\xb1\x05\x94\xd2\x0b\xb4\x49\
\xda\x5c\x20\xc9\xe6\xb2\xd9\x26\xdb\xec\x66\xf7\xbc\xe7\x9c\xc7\
\x0f\x21\x01\x9e\x8f\xef\xcc\xfb\xfc\xde\xe7\x79\xfe\xff\xf7\x51\
\x22\x82\xef\xfb\xd4\xbc\xfa\x6a\x44\x84\xb7\x0e\x1e\x96\x6a\x6d\
\x56\x10\x11\x56\xac\x68\x95\x83\x87\x0f\x09\x5a\x6b\x3a\x3b\xbb\
\x1e\xd2\x5a\xa3\xea\xf5\x3a\x33\xd5\x8a\x1c\x7c\xeb\x30\xc6\x45\
\x6b\x2f\x11\xc7\x76\x58\xd2\xd2\xac\x78\x3f\x5b\xe3\xf8\x44\x71\
\x43\x77\x6f\x8f\x78\x9e\x27\xff\xd9\xbf\x5f\x0c\x80\xf6\x8e\xce\
\x29\x3f\xd0\x7b\xcf\x58\xbe\x82\x5d\xbb\x77\x13\xb1\xac\xf5\x06\
\x40\xdb\xee\x8e\x3f\xdd\x70\xdd\xcd\x5c\xbc\x6e\x23\xa9\x74\x4a\
\x7d\xc2\xdd\xfc\x2a\xbe\xef\xe3\xfb\x3e\x41\x10\x70\xe0\xc0\xc1\
\xa7\x7d\xdf\x47\x6b\x0d\xbe\xef\x2b\xad\x35\x7b\xda\xda\xa5\x30\
\x36\x2a\x5a\x6b\x11\x11\x0c\xa5\x94\x74\x76\x76\x4d\x2c\x5f\xb1\
\x94\xa6\x4c\x96\xce\xae\x2e\x86\x86\x46\x36\xab\x9e\xde\x5e\x12\
\x89\x84\x24\x12\x09\x44\x42\x0e\x1c\x38\x44\x53\x2e\xa3\xd4\xda\
\x4f\xae\x97\xa9\xa9\x29\x3c\xdf\x63\xcb\x96\xdf\x63\x98\x86\x71\
\xfe\xf9\xab\xc4\xb8\xff\x81\x9f\xa9\x6c\x36\x4b\xf3\xe2\x3c\x93\
\xc5\x22\x57\x2c\xf9\x41\xb8\xf8\xa5\x75\xa2\x44\x84\x20\x08\x10\
\x11\xa5\x94\x32\x80\xe0\xed\x77\x8e\x76\x55\x2a\xb3\xeb\xf2\x4b\
\x16\xd1\x7c\x5a\x33\xe5\xe9\xe9\x62\x26\x93\xc9\x85\x61\x80\xc1\
\xfb\xa1\x94\x12\xd3\x34\x83\x7f\xbd\xf8\x6f\x01\xb5\xee\xf4\xa5\
\xcd\xe4\xb2\x39\x22\x96\x05\x8a\xa6\xdd\x6d\x7b\x65\x70\xf0\xbd\
\x5b\x94\x88\x70\xe4\xed\x63\xf8\x81\x7e\xb4\x3c\x5d\xbe\xbd\xb9\
\x39\x4f\xb2\x21\x41\x2a\xd9\x88\x15\xb1\xe8\xee\xe9\x61\x78\xb8\
\x40\xbe\xf9\x34\xce\x6e\x6d\x55\x4a\x44\xb8\x68\xed\xa7\xa5\x30\
\x3a\x42\x10\x84\x3c\xf8\xe0\x2f\xb8\xe9\xa6\xeb\xd1\x5a\xd3\xb5\
\x6f\x1f\x5e\x5d\xd3\xd8\x98\x3c\x51\x3a\x59\x5a\x79\xc1\x05\x17\
\xa0\x44\x84\xc7\x1e\xfb\xc3\xf7\xfe\xfe\xb7\x6d\xbf\xd3\x5a\xa3\
\xb5\x26\x08\x43\x2a\x95\x19\x9e\xf9\xc7\x76\xea\xf5\xda\x2b\x77\
\x2d\xda\x72\x69\x8f\x37\xc8\x74\xad\x1c\x28\x11\x61\xe7\x2b\x6d\
\x78\xda\x53\x43\xc3\xc3\x0d\x6f\xbc\xf1\xc6\x3f\xdf\x7b\x6f\x68\
\x63\xe8\x07\x7c\xff\x9e\x3b\xbe\xd5\xbc\x24\xbf\x75\xf5\xa1\x6b\
\xa7\x99\xd0\x0d\x0c\x7b\x77\x2c\xcc\x6e\x7e\x66\x5a\x6b\xc6\xc7\
\xc7\xd7\xb6\xb5\x75\xec\xed\x1f\x18\xb8\x3b\x94\x70\xfe\x5c\x89\
\xc8\x07\x5d\x02\x2c\xa5\x14\x86\x61\x44\xde\x3c\x70\x68\x7f\x53\
\x2e\xbb\x21\x9e\x4c\xfc\x3a\xf0\x03\x29\x95\x4a\x57\x03\x0a\x58\
\xb8\x10\x07\x7c\xd3\x34\x79\xe9\xe5\x5d\x95\xf9\x4e\xd9\xd1\x28\
\x86\x61\x90\xcb\xe5\x76\x1c\x3f\xd1\x77\xfb\x87\x2f\x54\xe6\xda\
\xfb\xce\xc3\xe9\x74\x2a\xe2\xb8\x51\x62\xb1\x18\xae\xe3\xe2\xfb\
\x3e\xfb\x5f\x7f\x8d\xbe\xbe\x81\x47\x00\x0c\xa5\x14\x4a\x29\x66\
\x6b\xf5\x4b\x06\x07\xdf\xbd\x33\x95\x4e\x11\x8f\xc7\x49\xc6\xe3\
\x98\x86\xc1\x48\x61\x84\x6a\xa5\xc6\xa2\x45\xb9\xb9\x77\xbf\x73\
\xb4\x07\xa5\x14\xbd\xbd\x3d\x1d\x67\xb7\xb6\x12\x8f\xbb\xc4\x63\
\x71\x2c\x2b\x42\xad\x56\xa3\xa7\xf7\x38\x96\x19\xe1\xac\xd6\x33\
\xaf\x04\x30\x82\x50\x83\x04\xcf\xb6\xb6\x9e\x45\x3a\x9b\x22\x16\
\x8b\x61\x3b\x36\x4a\x29\x8e\x76\x1f\x23\x0c\x42\x12\x89\x44\xbd\
\x50\x28\xbc\x00\x60\x74\x1f\xed\xf9\xee\xb5\xd7\x5c\x77\xcd\xa6\
\x8d\x9f\xe3\xc6\xaf\xdd\x42\x32\x9e\xc4\x89\xda\x4c\x96\x26\x19\
\x1e\x2a\x90\xc9\x64\x39\x39\x35\xb9\xac\x58\x2c\x02\x60\x8c\x8d\
\x8e\x37\x64\x32\x19\x72\xb9\x1c\x03\x03\x03\x2c\x69\x59\xc1\xb6\
\x6d\xdb\x39\xd1\xd7\x47\x26\x9b\xc5\xf7\x75\x87\x52\xe6\xd8\x39\
\xe7\x7c\x6c\x4e\xa4\x3b\x77\xb7\xf1\x93\x1f\xff\x54\x82\x20\xc0\
\xf3\x3c\xb4\xf6\xf1\x74\x9d\xdb\x6e\xbb\x95\xcb\x2e\xbf\x94\x1f\
\x3a\x7f\x9c\x7d\xbd\x76\xc4\x2d\x87\x15\x66\x26\xcb\xd7\x19\x12\
\x86\xdc\x73\xef\x3d\xb1\x64\x32\x49\x32\x99\x24\x9d\x4e\x91\x49\
\x67\xf8\xcb\xd6\x27\xa8\xd5\x6a\x7f\x7e\xb5\x76\xc0\x1d\xf1\x27\
\x98\x39\x59\x86\x37\xab\x5f\x36\x08\x15\xc9\x44\xbc\xbe\xf9\xdb\
\x9b\xd5\x86\x4d\x1b\x36\x67\x73\x4d\x7e\x22\x99\xe4\xdc\xf3\xce\
\xad\x46\x22\x91\x5b\x8b\x7d\x63\xb7\xb2\x7f\x06\x5e\x98\xaa\x32\
\xa1\xaf\x5f\x70\xdc\x7c\x88\x08\x4a\x29\x00\x25\x22\x02\x60\x9a\
\x26\xc5\xe2\xe4\x17\x0e\x1d\x3a\xfc\xec\x4c\xa5\xe2\x66\xb3\x19\
\xb2\x4d\x59\x12\x89\x38\xa6\x61\xcc\x5a\xa6\xf5\xb8\xeb\xba\x8f\
\xc4\x62\xb1\x01\x80\x30\x14\x40\x88\x44\x22\x7c\x04\x20\x22\x16\
\x70\x9a\x52\xaa\x00\x04\xf3\xc9\xfb\xfa\x07\xee\x3f\x7a\xac\xe7\
\x47\xa9\xc6\x06\x12\x89\x04\xf1\x78\x8c\xa8\x1d\xc1\x75\x5d\x12\
\xb1\x38\xb6\x6d\x63\x18\x06\xe5\x72\x59\x4e\x9d\x3a\xf5\x70\x3e\
\x9f\xbf\x5b\x21\x28\xc3\xfc\x08\x40\x7d\x50\xc4\x5c\x15\x5a\xeb\
\xe4\xbe\x7d\xaf\xbd\x5a\xf7\xbc\x55\xd9\x6c\x16\x37\xe6\x10\x8f\
\xc7\xb0\x6d\x1b\xc7\x71\x88\xc7\x62\x44\xac\x08\x22\x82\xe7\x79\
\x8c\x8e\x8d\x31\x30\x38\x48\xb5\x32\x5b\xfc\xcc\xa6\x8d\x17\xba\
\xae\xf3\xee\x87\xdd\x23\x80\x28\xa5\xb0\x2c\x8b\x52\xe9\xe4\x65\
\x2f\xbd\xbc\xb3\x6c\x5a\xd6\xaa\x96\x96\x16\x52\xa9\x14\xc9\x64\
\x02\xc7\x75\x88\xc7\xe3\x24\x62\x31\x22\xa6\x85\x88\x50\xad\x56\
\xe9\x1b\xe8\xa7\xaf\x7f\x80\xc0\x0f\x49\x26\x93\x4d\xdd\xdd\x3d\
\xdf\x04\xb0\x00\xc6\xc6\xc7\x3f\x44\x91\xe8\xbb\x83\x43\xcf\x8f\
\x8d\x4d\x7c\xbe\xa5\xa5\x85\x78\x2c\x8e\xed\x44\x89\x3a\x11\x9c\
\xa8\x8d\xeb\xb8\x44\xa3\x51\x4c\xc3\x20\x10\xa1\x5c\x2e\xd3\xdb\
\x7b\x9c\x4a\xa5\x4a\x10\x04\xd8\x76\x94\x65\xcb\x97\x0e\x2d\xc9\
\xe7\xb7\x2e\x00\x8a\x13\x93\x73\x46\xb2\xac\x35\x85\xd1\xd1\x2e\
\xad\x75\x74\xc5\xf2\x65\xd8\xae\x8d\xe3\x44\x89\x46\xa3\xd8\x8e\
\x83\x6b\xdb\x44\xac\x08\x86\x61\xe0\x07\x01\xc5\xc9\x22\xdd\xdd\
\xbd\x68\xed\x23\x22\x34\x36\x36\x92\x4e\xa7\x3a\x6c\x3b\xba\x61\
\xb2\x54\x62\xf1\xa2\x45\x73\x00\xc7\x71\x38\x76\xac\xe7\xbe\xf6\
\xf6\xf6\x07\x83\x30\x64\xd9\xd2\xd3\xb1\x22\x26\x6b\xd6\x5c\x48\
\x43\xb2\x01\x09\x43\x44\xe6\x16\x9f\xa1\x0c\xb4\xd6\x0c\x8f\x16\
\xe8\xed\xee\x45\x04\x1c\xc7\x25\x9d\x4e\x51\x3e\x35\xfd\x50\x61\
\x74\xe4\xbe\x91\xc2\x30\xae\xeb\x7e\x00\x78\xfa\xa9\x67\x9e\xdf\
\xb1\xe3\xb9\x2f\x2a\xa5\xa8\xd5\x6a\x78\xda\xc3\xd3\x9a\x4a\xa5\
\x42\xbd\x5e\x67\xfd\xfa\x8b\x79\xe0\x81\x9f\xb3\x7a\xd5\x79\x88\
\x08\xbd\xc7\x8e\x73\xe2\x44\xdf\x42\x62\x37\xe6\x50\x2c\x16\xbf\
\xe3\xfb\xfa\xf1\x68\x34\xca\xca\x95\x2b\x71\x5d\x97\x79\xad\xf3\
\xdc\x73\x2f\xb6\x3c\xf9\xc4\x93\xff\x1d\x1e\x1e\x59\x3c\x0f\x09\
\x82\x80\x20\x08\x08\xc3\x10\x41\xa8\x79\x1e\xb5\xd9\x59\xbe\xfe\
\x8d\x1b\xb9\xea\xaa\x2b\xe7\xbe\xff\x54\x03\x20\xec\xb0\x3b\x7e\
\x39\x90\x1c\xdf\x3c\x19\x4c\xe7\x4e\xfa\x65\xa6\xc2\xf2\x54\xc1\
\x2f\xde\x3b\x1b\xd4\xb6\x2a\x11\x61\xd7\xee\x36\x50\x8a\xf6\x3d\
\xed\xbf\x6d\xdb\xb3\xf7\xae\x20\x0c\x30\x4d\x93\x30\x0c\x17\x20\
\x61\x18\x22\xa1\x30\x5b\x9b\x25\xdf\x9c\xe7\x91\x47\x7f\x43\x24\
\x62\x79\xc5\x62\xf1\xb3\x77\xe6\xb7\x74\x0e\xea\x11\x26\x83\xe9\
\x39\xb1\xeb\x10\x26\x7c\x98\x0e\xb6\xcf\xad\x91\x9d\x6d\x73\x0a\
\x0a\x85\xa9\xa9\x29\xfa\xfa\xfb\xbf\x7a\xe4\xc8\x91\x5f\x8d\x8d\
\x8e\x9d\xee\xfb\x3e\xa6\x69\xa2\x94\x5a\x30\x64\xb5\x3a\xcb\x35\
\x5f\xba\xea\xd4\xe5\x57\x5c\xf6\xa9\x30\x0c\xdf\x5e\x5d\xbb\xa1\
\x8e\x27\x51\x94\x02\x2d\x30\x54\x87\xfe\x3a\x04\xdc\x3c\x57\xc1\
\xae\x3d\xf3\x2a\x35\x45\x84\xe9\xf2\x4c\x10\x04\x01\xb5\x5a\x8d\
\x52\xa9\x44\xbd\xee\xad\x31\x4d\xe3\x72\x65\xd0\x9a\x6a\x4c\x4d\
\x9d\x79\xe6\x19\x7f\x4d\xa5\x1b\xff\x67\x98\x0a\xcb\xb4\xf8\x78\
\xdf\xb5\x30\xe2\x5d\xcd\x84\xfe\x0a\xe5\xc0\xa4\x2e\xcf\x12\x55\
\x4f\x61\x1b\xfc\x1f\x0b\x03\xc8\x05\x59\x65\x3b\x42\x00\x00\x00\
\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x03\x34\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x01\x68\xf4\xcf\xf7\
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\
\x0b\x13\x01\x00\x9a\x9c\x18\x00\x00\x02\xd4\x49\x44\x41\x54\x38\
\xcb\x55\x92\x4f\x68\x5d\x65\x10\xc5\x7f\xdf\xbb\x37\xaf\x49\x48\
\xd5\x04\x23\x22\x22\x88\x85\x08\x12\x05\x0b\xa2\x0b\xc1\x8d\x90\
\x6c\x14\x04\xa1\xee\x94\x42\x15\x14\x22\xed\x56\x77\x6e\x0d\x82\
\x2b\x05\x97\xba\x15\xdd\x58\x10\x0a\x82\xab\x5a\x50\x2b\x41\x24\
\xb1\x31\x31\x79\x6d\xfe\xbc\x97\xfb\xde\xfd\xf7\xdd\xef\x7e\x33\
\xe3\xe2\x3e\x0a\xce\x76\xe6\x9c\x39\x67\xe6\xb8\x67\x77\xde\xe4\
\xa9\xfe\xe3\xb1\x57\xab\x6f\xbe\x9d\xdc\x48\x92\xb7\x0f\x3e\x5e\
\xa9\xde\x7b\x68\xe8\x66\xb7\x5e\x30\x7f\x98\xe3\x5e\xdb\xdb\x58\
\x3d\x8a\xc3\xdb\xdb\x61\x9f\x5c\x4b\x1c\x37\x57\xe1\xb8\x35\x1a\
\x85\xdf\x2b\xdc\xeb\x7b\x1b\x3c\x98\x9c\xbf\xb5\x1b\x0e\x7f\xda\
\x6a\xfe\xbe\x96\x02\x76\xa3\xbc\x49\xa1\xd5\xc5\x6c\x32\xde\x48\
\x7f\xa9\xb7\x18\xc4\x13\x10\x83\x3f\xab\x24\x1d\x1c\x0c\xa0\x56\
\x18\x04\xd8\x6b\x36\xdd\xfa\x3f\xef\xb3\x9c\x2e\xfe\x20\x26\x6b\
\xa7\x92\x91\x49\x4e\xa9\x35\x99\xe6\x8c\x64\x7c\x2e\x2d\xb5\xde\
\x3e\xf2\xc3\x0b\x07\xf1\x88\xa1\x64\xa8\x19\x00\x56\x44\x18\xc6\
\x26\xbd\xe5\xb7\xae\x57\xea\x3f\x20\x76\x0d\x0c\x28\x04\xee\x34\
\x70\x37\xe0\xf8\xf9\x19\x38\x89\x30\x8c\x39\x85\x2c\x50\x08\x8c\
\x05\xc4\xde\xe5\x91\x99\x2f\xdd\x2b\xbb\x97\x79\x2c\x5d\xe6\x9c\
\xeb\x7f\x5a\x5b\xb3\x91\x49\xfe\xdb\x71\x1c\x5d\x3a\x96\xd1\xce\
\x99\x4c\x48\x1f\x4d\x1f\xee\xcf\xb8\xb4\x19\x6b\xc1\x69\xcc\x28\
\xb4\xba\x38\xd1\x62\xbb\x52\x7f\xbd\xb1\xb0\x9e\x06\x6b\xab\x91\
\x8c\xd9\x6f\xef\x31\x94\x8c\x68\x42\x34\x21\x8f\xc5\x1a\x13\x59\
\x49\x8f\xe2\x30\x39\x8e\x23\x0e\xe2\x11\x5e\x43\xa7\x33\x2a\x8c\
\x22\x64\xf2\x75\x3a\x88\x27\x8c\xa5\xc0\x6b\xc0\xb0\xce\x85\x57\
\x38\x8b\x70\x1c\x9f\x48\xff\x6d\xef\x11\x25\x42\x04\x12\xa0\x35\
\x38\x8d\x70\x18\xa0\xd4\x6f\x12\x7d\x6b\x69\x91\x91\xbc\x48\x26\
\x1d\xed\xdd\x00\xbb\x4d\x67\xbd\xdf\x7b\x29\xa5\xd6\x0f\x19\xb6\
\xbb\x8c\xe5\x33\x4a\x85\x89\x40\x21\x05\xb3\xbd\xf3\x2c\xa7\xb8\
\x97\xef\xbc\xc3\x52\xf2\x00\x0b\xbd\x79\xfa\x6e\xe6\xaa\x73\xee\
\x93\x68\x32\xd7\x58\xc0\x6b\x83\xb7\x40\x63\x81\x5a\x1b\x2a\xf3\
\x75\xa5\xfe\xa3\x4a\xeb\xcd\xda\x1a\x82\xb5\x5d\x20\xe6\x7a\xb3\
\x5f\xf4\x70\x57\x5a\x8b\xd4\xd6\x90\x6b\x49\xa1\x35\x5e\xbb\x21\
\x41\x11\x13\x82\xb5\xf8\x29\x99\xd7\x66\x93\x68\xd7\xd2\xc6\xda\
\xcf\x83\xc4\x2b\x7e\x0a\x3c\x93\x9c\x4c\x26\xd4\xd6\xd0\x5a\xec\
\x2e\x03\x38\x1c\xd1\x04\x6b\x15\x1a\x85\x5a\xaf\x12\x2c\x71\xcf\
\xef\x5c\x6a\x22\xd2\xaf\xd5\x53\x6a\x4d\xae\x15\xb5\x79\xc4\xf4\
\x3e\xf8\x7e\x48\x1a\x85\x4a\xbb\xb0\x14\x0a\x5e\x4f\xd2\x41\x3c\
\xd9\x6f\xad\xbd\xd0\x5a\xa4\x25\x76\x92\x55\xf9\x5f\x99\x75\xe7\
\x2f\xa7\xff\x19\x0b\xe4\x02\xc1\xf6\x1d\xb7\x9f\x5b\x25\xe8\xaf\
\x44\x4b\x88\xd3\x47\x76\x9a\xbb\xd2\xe9\xe6\x52\x21\x8b\x90\x4d\
\xc1\xad\x09\x33\xee\xe9\x94\x42\xfe\xa0\xd2\x79\x6a\xfd\x0e\xaf\
\x6b\xb4\x06\x6a\x20\x40\x34\x08\xd6\x11\x14\xd2\xc9\x0f\x06\xf0\
\x3d\x73\xbd\x37\x98\xef\x49\x8a\x03\x7a\x04\xcc\xd6\x09\x06\xa5\
\x3c\x49\xa5\x97\xa9\xf4\x55\xbc\xae\xd0\x1a\xb4\xf6\x17\x6a\x3f\
\xd2\x73\x5f\x31\xeb\x76\x59\x48\x60\x29\x85\xc5\x94\xff\x00\xe1\
\x78\x1f\x4c\x73\x1c\xbc\x8b\x00\x00\x00\x00\x49\x45\x4e\x44\xae\
\x42\x60\x82\
"
qt_resource_name = "\
@ -2413,22 +1158,22 @@ qt_resource_struct = "\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x18\x00\x02\x00\x00\x00\x10\x00\x00\x00\x03\
\x00\x00\x02\x18\x00\x00\x00\x00\x00\x01\x00\x00\x70\x57\
\x00\x00\x00\x76\x00\x00\x00\x00\x00\x01\x00\x00\x13\x07\
\x00\x00\x02\x18\x00\x00\x00\x00\x00\x01\x00\x00\x35\x5d\
\x00\x00\x00\x76\x00\x00\x00\x00\x00\x01\x00\x00\x09\x8e\
\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x01\x12\x00\x00\x00\x00\x00\x01\x00\x00\x36\x91\
\x00\x00\x01\xd0\x00\x00\x00\x00\x00\x01\x00\x00\x6a\xea\
\x00\x00\x00\xd2\x00\x00\x00\x00\x00\x01\x00\x00\x25\xc8\
\x00\x00\x00\xae\x00\x00\x00\x00\x00\x01\x00\x00\x23\x23\
\x00\x00\x01\x6a\x00\x00\x00\x00\x00\x01\x00\x00\x49\xf5\
\x00\x00\x01\xf0\x00\x00\x00\x00\x00\x01\x00\x00\x6d\xde\
\x00\x00\x02\x4c\x00\x00\x00\x00\x00\x01\x00\x00\x81\x41\
\x00\x00\x00\xfa\x00\x00\x00\x00\x00\x01\x00\x00\x33\xde\
\x00\x00\x01\x92\x00\x00\x00\x00\x00\x01\x00\x00\x5a\x9d\
\x00\x00\x01\xb4\x00\x00\x00\x00\x00\x01\x00\x00\x5e\x07\
\x00\x00\x00\x98\x00\x00\x00\x00\x00\x01\x00\x00\x1f\xe8\
\x00\x00\x00\x60\x00\x00\x00\x00\x00\x01\x00\x00\x10\xdf\
\x00\x00\x01\x3a\x00\x00\x00\x00\x00\x01\x00\x00\x39\x0c\
\x00\x00\x01\x12\x00\x00\x00\x00\x00\x01\x00\x00\x18\x92\
\x00\x00\x01\xd0\x00\x00\x00\x00\x00\x01\x00\x00\x2f\xf0\
\x00\x00\x00\xd2\x00\x00\x00\x00\x00\x01\x00\x00\x11\xec\
\x00\x00\x00\xae\x00\x00\x00\x00\x00\x01\x00\x00\x0f\x47\
\x00\x00\x01\x6a\x00\x00\x00\x00\x00\x01\x00\x00\x22\x76\
\x00\x00\x01\xf0\x00\x00\x00\x00\x00\x01\x00\x00\x32\xe4\
\x00\x00\x02\x4c\x00\x00\x00\x00\x00\x01\x00\x00\x3c\xcb\
\x00\x00\x00\xfa\x00\x00\x00\x00\x00\x01\x00\x00\x15\xdf\
\x00\x00\x01\x92\x00\x00\x00\x00\x00\x01\x00\x00\x29\xb6\
\x00\x00\x01\xb4\x00\x00\x00\x00\x00\x01\x00\x00\x2d\x20\
\x00\x00\x00\x98\x00\x00\x00\x00\x00\x01\x00\x00\x0c\x0c\
\x00\x00\x00\x60\x00\x00\x00\x00\x00\x01\x00\x00\x07\x66\
\x00\x00\x01\x3a\x00\x00\x00\x00\x00\x01\x00\x00\x1b\x0d\
"
def qInitResources():

View File

@ -4,17 +4,18 @@
# Distributed under the MIT/X11 software license. See the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#Right now, PyBitmessage only support connecting to stream 1. It doesn't yet contain logic to expand into further streams.
# Right now, PyBitmessage only support connecting to stream 1. It doesn't
# yet contain logic to expand into further streams.
#The software version variable is now held in shared.py
# The software version variable is now held in shared.py
verbose = 1
maximumAgeOfAnObjectThatIAmWillingToAccept = 216000 #Equals two days and 12 hours.
lengthOfTimeToLeaveObjectsInInventory = 237600 #Equals two days and 18 hours. This should be longer than maximumAgeOfAnObjectThatIAmWillingToAccept so that we don't process messages twice.
lengthOfTimeToHoldOnToAllPubkeys = 2419200 #Equals 4 weeks. You could make this longer if you want but making it shorter would not be advisable because there is a very small possibility that it could keep you from obtaining a needed pubkey for a period of time.
maximumAgeOfObjectsThatIAdvertiseToOthers = 216000 #Equals two days and 12 hours
maximumAgeOfNodesThatIAdvertiseToOthers = 10800 #Equals three hours
storeConfigFilesInSameDirectoryAsProgramByDefault = False #The user may de-select Portable Mode in the settings if they want the config files to stay in the application data folder.
useVeryEasyProofOfWorkForTesting = False #If you set this to True while on the normal network, you won't be able to send or sometimes receive messages.
maximumAgeOfAnObjectThatIAmWillingToAccept = 216000 # Equals two days and 12 hours.
lengthOfTimeToLeaveObjectsInInventory = 237600 # Equals two days and 18 hours. This should be longer than maximumAgeOfAnObjectThatIAmWillingToAccept so that we don't process messages twice.
lengthOfTimeToHoldOnToAllPubkeys = 2419200 # Equals 4 weeks. You could make this longer if you want but making it shorter would not be advisable because there is a very small possibility that it could keep you from obtaining a needed pubkey for a period of time.
maximumAgeOfObjectsThatIAdvertiseToOthers = 216000 # Equals two days and 12 hours
maximumAgeOfNodesThatIAdvertiseToOthers = 10800 # Equals three hours
storeConfigFilesInSameDirectoryAsProgramByDefault = False # The user may de-select Portable Mode in the settings if they want the config files to stay in the application data folder.
useVeryEasyProofOfWorkForTesting = False # If you set this to True while on the normal network, you won't be able to send or sometimes receive messages.
encryptedBroadcastSwitchoverTime = 1369735200
import sys
@ -33,174 +34,222 @@ import random
import sqlite3
import threading
from time import strftime, localtime, gmtime
import shutil #used for moving the messages.dat file
import shutil # used for moving the messages.dat file
import string
import socks
import highlevelcrypto
from pyelliptic.openssl import OpenSSL
import ctypes
from pyelliptic import arithmetic
import signal #Used to capture a Ctrl-C keypress so that Bitmessage can shutdown gracefully.
#The next 3 are used for the API
import signal # Used to capture a Ctrl-C keypress so that Bitmessage can shutdown gracefully.
# The next 3 are used for the API
from SimpleXMLRPCServer import *
import json
from subprocess import call #used when the API must execute an outside program
from subprocess import call # used when the API must execute an outside program
import singleton
import proofofwork
#For each stream to which we connect, several outgoingSynSender threads will exist and will collectively create 8 connections with peers.
# For each stream to which we connect, several outgoingSynSender threads
# will exist and will collectively create 8 connections with peers.
try:
from PyQt4 import QtCore, QtGui
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text):
return QtGui.QApplication.translate(context, text)
except AttributeError:
print 'Error message:', err
class outgoingSynSender(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def setup(self,streamNumber):
def setup(self, streamNumber):
self.streamNumber = streamNumber
def run(self):
time.sleep(1)
global alreadyAttemptedConnectionsListResetTime
while True:
if len(selfInitiatedConnections[self.streamNumber]) >= 8: #maximum number of outgoing connections = 8
if len(selfInitiatedConnections[self.streamNumber]) >= 8: # maximum number of outgoing connections = 8
time.sleep(10)
else:
random.seed()
HOST, = random.sample(shared.knownNodes[self.streamNumber], 1)
HOST, = random.sample(shared.knownNodes[self.streamNumber], 1)
alreadyAttemptedConnectionsListLock.acquire()
while HOST in alreadyAttemptedConnectionsList or HOST in shared.connectedHostsList:
alreadyAttemptedConnectionsListLock.release()
#print 'choosing new sample'
# print 'choosing new sample'
random.seed()
HOST, = random.sample(shared.knownNodes[self.streamNumber], 1)
HOST, = random.sample(shared.knownNodes[
self.streamNumber], 1)
time.sleep(1)
#Clear out the alreadyAttemptedConnectionsList every half hour so that this program will again attempt a connection to any nodes, even ones it has already tried.
# Clear out the alreadyAttemptedConnectionsList every half
# hour so that this program will again attempt a connection
# to any nodes, even ones it has already tried.
if (time.time() - alreadyAttemptedConnectionsListResetTime) > 1800:
alreadyAttemptedConnectionsList.clear()
alreadyAttemptedConnectionsListResetTime = int(time.time())
alreadyAttemptedConnectionsListResetTime = int(
time.time())
alreadyAttemptedConnectionsListLock.acquire()
alreadyAttemptedConnectionsList[HOST] = 0
alreadyAttemptedConnectionsListLock.release()
PORT, timeNodeLastSeen = shared.knownNodes[self.streamNumber][HOST]
PORT, timeNodeLastSeen = shared.knownNodes[
self.streamNumber][HOST]
sock = socks.socksocket(socket.AF_INET, socket.SOCK_STREAM)
#This option apparently avoids the TIME_WAIT state so that we can rebind faster
# This option apparently avoids the TIME_WAIT state so that we
# can rebind faster
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock.settimeout(20)
if shared.config.get('bitmessagesettings', 'socksproxytype') == 'none' and verbose >= 2:
shared.printLock.acquire()
print 'Trying an outgoing connection to', HOST, ':', PORT
shared.printLock.release()
#sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
elif shared.config.get('bitmessagesettings', 'socksproxytype') == 'SOCKS4a':
if verbose >= 2:
shared.printLock.acquire()
print '(Using SOCKS4a) Trying an outgoing connection to', HOST, ':', PORT
shared.printLock.release()
proxytype = socks.PROXY_TYPE_SOCKS4
sockshostname = shared.config.get('bitmessagesettings', 'sockshostname')
socksport = shared.config.getint('bitmessagesettings', 'socksport')
rdns = True #Do domain name lookups through the proxy; though this setting doesn't really matter since we won't be doing any domain name lookups anyway.
sockshostname = shared.config.get(
'bitmessagesettings', 'sockshostname')
socksport = shared.config.getint(
'bitmessagesettings', 'socksport')
rdns = True # Do domain name lookups through the proxy; though this setting doesn't really matter since we won't be doing any domain name lookups anyway.
if shared.config.getboolean('bitmessagesettings', 'socksauthentication'):
socksusername = shared.config.get('bitmessagesettings', 'socksusername')
sockspassword = shared.config.get('bitmessagesettings', 'sockspassword')
sock.setproxy(proxytype, sockshostname, socksport, rdns, socksusername, sockspassword)
socksusername = shared.config.get(
'bitmessagesettings', 'socksusername')
sockspassword = shared.config.get(
'bitmessagesettings', 'sockspassword')
sock.setproxy(
proxytype, sockshostname, socksport, rdns, socksusername, sockspassword)
else:
sock.setproxy(proxytype, sockshostname, socksport, rdns)
sock.setproxy(
proxytype, sockshostname, socksport, rdns)
elif shared.config.get('bitmessagesettings', 'socksproxytype') == 'SOCKS5':
if verbose >= 2:
shared.printLock.acquire()
print '(Using SOCKS5) Trying an outgoing connection to', HOST, ':', PORT
shared.printLock.release()
proxytype = socks.PROXY_TYPE_SOCKS5
sockshostname = shared.config.get('bitmessagesettings', 'sockshostname')
socksport = shared.config.getint('bitmessagesettings', 'socksport')
rdns = True #Do domain name lookups through the proxy; though this setting doesn't really matter since we won't be doing any domain name lookups anyway.
sockshostname = shared.config.get(
'bitmessagesettings', 'sockshostname')
socksport = shared.config.getint(
'bitmessagesettings', 'socksport')
rdns = True # Do domain name lookups through the proxy; though this setting doesn't really matter since we won't be doing any domain name lookups anyway.
if shared.config.getboolean('bitmessagesettings', 'socksauthentication'):
socksusername = shared.config.get('bitmessagesettings', 'socksusername')
sockspassword = shared.config.get('bitmessagesettings', 'sockspassword')
sock.setproxy(proxytype, sockshostname, socksport, rdns, socksusername, sockspassword)
socksusername = shared.config.get(
'bitmessagesettings', 'socksusername')
sockspassword = shared.config.get(
'bitmessagesettings', 'sockspassword')
sock.setproxy(
proxytype, sockshostname, socksport, rdns, socksusername, sockspassword)
else:
sock.setproxy(proxytype, sockshostname, socksport, rdns)
sock.setproxy(
proxytype, sockshostname, socksport, rdns)
try:
sock.connect((HOST, PORT))
rd = receiveDataThread()
rd.daemon = True # close the main program even if there are threads left
rd.daemon = True # close the main program even if there are threads left
objectsOfWhichThisRemoteNodeIsAlreadyAware = {}
rd.setup(sock,HOST,PORT,self.streamNumber,objectsOfWhichThisRemoteNodeIsAlreadyAware)
rd.setup(sock, HOST, PORT, self.streamNumber,
objectsOfWhichThisRemoteNodeIsAlreadyAware)
rd.start()
shared.printLock.acquire()
print self, 'connected to', HOST, 'during an outgoing attempt.'
shared.printLock.release()
sd = sendDataThread()
sd.setup(sock,HOST,PORT,self.streamNumber,objectsOfWhichThisRemoteNodeIsAlreadyAware)
sd.setup(sock, HOST, PORT, self.streamNumber,
objectsOfWhichThisRemoteNodeIsAlreadyAware)
sd.start()
sd.sendVersionMessage()
except socks.GeneralProxyError, err:
except socks.GeneralProxyError as err:
if verbose >= 2:
shared.printLock.acquire()
print 'Could NOT connect to', HOST, 'during outgoing attempt.', err
shared.printLock.release()
PORT, timeLastSeen = shared.knownNodes[self.streamNumber][HOST]
if (int(time.time())-timeLastSeen) > 172800 and len(shared.knownNodes[self.streamNumber]) > 1000: # for nodes older than 48 hours old if we have more than 1000 hosts in our list, delete from the shared.knownNodes data-structure.
PORT, timeLastSeen = shared.knownNodes[
self.streamNumber][HOST]
if (int(time.time()) - timeLastSeen) > 172800 and len(shared.knownNodes[self.streamNumber]) > 1000: # for nodes older than 48 hours old if we have more than 1000 hosts in our list, delete from the shared.knownNodes data-structure.
shared.knownNodesLock.acquire()
del shared.knownNodes[self.streamNumber][HOST]
shared.knownNodesLock.release()
shared.printLock.acquire()
print 'deleting ', HOST, 'from shared.knownNodes because it is more than 48 hours old and we could not connect to it.'
shared.printLock.release()
except socks.Socks5AuthError, err:
shared.UISignalQueue.put(('updateStatusBar',"SOCKS5 Authentication problem: "+str(err)))
except socks.Socks5Error, err:
except socks.Socks5AuthError as err:
shared.UISignalQueue.put((
'updateStatusBar', _translate(
"MainWindow", "SOCKS5 Authentication problem: %1").arg(str(err))))
except socks.Socks5Error as err:
pass
print 'SOCKS5 error. (It is possible that the server wants authentication).)' ,str(err)
except socks.Socks4Error, err:
print 'SOCKS5 error. (It is possible that the server wants authentication).)', str(err)
except socks.Socks4Error as err:
print 'Socks4Error:', err
except socket.error, err:
except socket.error as err:
if shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS':
print 'Bitmessage MIGHT be having trouble connecting to the SOCKS server. '+str(err)
print 'Bitmessage MIGHT be having trouble connecting to the SOCKS server. ' + str(err)
else:
if verbose >= 1:
shared.printLock.acquire()
print 'Could NOT connect to', HOST, 'during outgoing attempt.', err
shared.printLock.release()
PORT, timeLastSeen = shared.knownNodes[self.streamNumber][HOST]
if (int(time.time())-timeLastSeen) > 172800 and len(shared.knownNodes[self.streamNumber]) > 1000: # for nodes older than 48 hours old if we have more than 1000 hosts in our list, delete from the knownNodes data-structure.
PORT, timeLastSeen = shared.knownNodes[
self.streamNumber][HOST]
if (int(time.time()) - timeLastSeen) > 172800 and len(shared.knownNodes[self.streamNumber]) > 1000: # for nodes older than 48 hours old if we have more than 1000 hosts in our list, delete from the knownNodes data-structure.
shared.knownNodesLock.acquire()
del shared.knownNodes[self.streamNumber][HOST]
shared.knownNodesLock.release()
shared.printLock.acquire()
print 'deleting ', HOST, 'from knownNodes because it is more than 48 hours old and we could not connect to it.'
shared.printLock.release()
except Exception, err:
sys.stderr.write('An exception has occurred in the outgoingSynSender thread that was not caught by other exception types: %s\n' % err)
except Exception as err:
sys.stderr.write(
'An exception has occurred in the outgoingSynSender thread that was not caught by other exception types: %s\n' % err)
time.sleep(0.1)
#Only one singleListener thread will ever exist. It creates the receiveDataThread and sendDataThread for each incoming connection. Note that it cannot set the stream number because it is not known yet- the other node will have to tell us its stream number in a version message. If we don't care about their stream, we will close the connection (within the recversion function of the recieveData thread)
# Only one singleListener thread will ever exist. It creates the
# receiveDataThread and sendDataThread for each incoming connection. Note
# that it cannot set the stream number because it is not known yet- the
# other node will have to tell us its stream number in a version message.
# If we don't care about their stream, we will close the connection
# (within the recversion function of the recieveData thread)
class singleListener(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
#We don't want to accept incoming connections if the user is using a SOCKS proxy. If they eventually select proxy 'none' then this will start listening for connections.
# We don't want to accept incoming connections if the user is using a
# SOCKS proxy. If they eventually select proxy 'none' then this will
# start listening for connections.
while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS':
time.sleep(300)
shared.printLock.acquire()
print 'Listening for incoming connections.'
shared.printLock.release()
HOST = '' # Symbolic name meaning all available interfaces
HOST = '' # Symbolic name meaning all available interfaces
PORT = shared.config.getint('bitmessagesettings', 'port')
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#This option apparently avoids the TIME_WAIT state so that we can rebind faster
# This option apparently avoids the TIME_WAIT state so that we can
# rebind faster
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock.bind((HOST, PORT))
sock.listen(2)
while True:
#We don't want to accept incoming connections if the user is using a SOCKS proxy. If the user eventually select proxy 'none' then this will start listening for connections.
# We don't want to accept incoming connections if the user is using
# a SOCKS proxy. If the user eventually select proxy 'none' then
# this will start listening for connections.
while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS':
time.sleep(10)
while len(shared.connectedHostsList) > 220:
@ -208,85 +257,99 @@ class singleListener(threading.Thread):
print 'We are connected to too many people. Not accepting further incoming connections for ten seconds.'
shared.printLock.release()
time.sleep(10)
a,(HOST,PORT) = sock.accept()
a, (HOST, PORT) = sock.accept()
#The following code will, unfortunately, block an incoming connection if someone else on the same LAN is already connected because the two computers will share the same external IP. This is here to prevent connection flooding.
# The following code will, unfortunately, block an incoming
# connection if someone else on the same LAN is already connected
# because the two computers will share the same external IP. This
# is here to prevent connection flooding.
while HOST in shared.connectedHostsList:
shared.printLock.acquire()
print 'We are already connected to', HOST+'. Ignoring connection.'
print 'We are already connected to', HOST + '. Ignoring connection.'
shared.printLock.release()
a.close()
a,(HOST,PORT) = sock.accept()
a, (HOST, PORT) = sock.accept()
objectsOfWhichThisRemoteNodeIsAlreadyAware = {}
a.settimeout(20)
sd = sendDataThread()
sd.setup(a,HOST,PORT,-1,objectsOfWhichThisRemoteNodeIsAlreadyAware)
sd.setup(
a, HOST, PORT, -1, objectsOfWhichThisRemoteNodeIsAlreadyAware)
sd.start()
rd = receiveDataThread()
rd.daemon = True # close the main program even if there are threads left
rd.setup(a,HOST,PORT,-1,objectsOfWhichThisRemoteNodeIsAlreadyAware)
rd.daemon = True # close the main program even if there are threads left
rd.setup(
a, HOST, PORT, -1, objectsOfWhichThisRemoteNodeIsAlreadyAware)
rd.start()
shared.printLock.acquire()
print self, 'connected to', HOST,'during INCOMING request.'
print self, 'connected to', HOST, 'during INCOMING request.'
shared.printLock.release()
#This thread is created either by the synSenderThread(for outgoing connections) or the singleListenerThread(for incoming connectiosn).
# This thread is created either by the synSenderThread(for outgoing
# connections) or the singleListenerThread(for incoming connectiosn).
class receiveDataThread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.data = ''
self.verackSent = False
self.verackReceived = False
def setup(self,sock,HOST,port,streamNumber,objectsOfWhichThisRemoteNodeIsAlreadyAware):
def setup(
self,
sock,
HOST,
port,
streamNumber,
objectsOfWhichThisRemoteNodeIsAlreadyAware):
self.sock = sock
self.HOST = HOST
self.PORT = port
self.streamNumber = streamNumber
self.payloadLength = 0 #This is the protocol payload length thus it doesn't include the 24 byte message header
self.payloadLength = 0 # This is the protocol payload length thus it doesn't include the 24 byte message header
self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave = {}
shared.connectedHostsList[self.HOST] = 0 #The very fact that this receiveData thread exists shows that we are connected to the remote host. Let's add it to this list so that an outgoingSynSender thread doesn't try to connect to it.
self.connectionIsOrWasFullyEstablished = False #set to true after the remote node and I accept each other's version messages. This is needed to allow the user interface to accurately reflect the current number of connections.
if self.streamNumber == -1: #This was an incoming connection. Send out a version message if we accept the other node's version message.
shared.connectedHostsList[
self.HOST] = 0 # The very fact that this receiveData thread exists shows that we are connected to the remote host. Let's add it to this list so that an outgoingSynSender thread doesn't try to connect to it.
self.connectionIsOrWasFullyEstablished = False # set to true after the remote node and I accept each other's version messages. This is needed to allow the user interface to accurately reflect the current number of connections.
if self.streamNumber == -1: # This was an incoming connection. Send out a version message if we accept the other node's version message.
self.initiatedConnection = False
else:
self.initiatedConnection = True
selfInitiatedConnections[streamNumber][self] = 0
self.ackDataThatWeHaveYetToSend = [] #When we receive a message bound for us, we store the acknowledgement that we need to send (the ackdata) here until we are done processing all other data received from this peer.
self.ackDataThatWeHaveYetToSend = [
] # When we receive a message bound for us, we store the acknowledgement that we need to send (the ackdata) here until we are done processing all other data received from this peer.
self.objectsOfWhichThisRemoteNodeIsAlreadyAware = objectsOfWhichThisRemoteNodeIsAlreadyAware
def run(self):
shared.printLock.acquire()
print 'ID of the receiveDataThread is', str(id(self))+'. The size of the shared.connectedHostsList is now', len(shared.connectedHostsList)
print 'ID of the receiveDataThread is', str(id(self)) + '. The size of the shared.connectedHostsList is now', len(shared.connectedHostsList)
shared.printLock.release()
while True:
try:
self.data += self.sock.recv(4096)
except socket.timeout:
shared.printLock.acquire()
print 'Timeout occurred waiting for data from', self.HOST + '. Closing receiveData thread. (ID:',str(id(self))+ ')'
print 'Timeout occurred waiting for data from', self.HOST + '. Closing receiveData thread. (ID:', str(id(self)) + ')'
shared.printLock.release()
break
except Exception, err:
except Exception as err:
shared.printLock.acquire()
print 'sock.recv error. Closing receiveData thread (HOST:', self.HOST, 'ID:',str(id(self))+ ').', err
print 'sock.recv error. Closing receiveData thread (HOST:', self.HOST, 'ID:', str(id(self)) + ').', err
shared.printLock.release()
break
#print 'Received', repr(self.data)
# print 'Received', repr(self.data)
if self.data == "":
shared.printLock.acquire()
print 'Connection to', self.HOST, 'closed. Closing receiveData thread. (ID:',str(id(self))+ ')'
print 'Connection to', self.HOST, 'closed. Closing receiveData thread. (ID:', str(id(self)) + ')'
shared.printLock.release()
break
else:
self.processData()
try:
del selfInitiatedConnections[self.streamNumber][self]
shared.printLock.acquire()
@ -297,70 +360,74 @@ class receiveDataThread(threading.Thread):
shared.broadcastToSendDataQueues((0, 'shutdown', self.HOST))
try:
del shared.connectedHostsList[self.HOST]
except Exception, err:
except Exception as err:
shared.printLock.acquire()
print 'Could not delete', self.HOST, 'from shared.connectedHostsList.', err
shared.printLock.release()
try:
del numberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHavePerPeer[self.HOST]
del numberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHavePerPeer[
self.HOST]
except:
pass
shared.UISignalQueue.put(('updateNetworkStatusTab','no data'))
shared.UISignalQueue.put(('updateNetworkStatusTab', 'no data'))
shared.printLock.acquire()
print 'The size of the connectedHostsList is now:', len(shared.connectedHostsList)
shared.printLock.release()
def processData(self):
global verbose
#if verbose >= 3:
#shared.printLock.acquire()
#print 'self.data is currently ', repr(self.data)
#shared.printLock.release()
if len(self.data) < 20: #if so little of the data has arrived that we can't even unpack the payload length
# if verbose >= 3:
# shared.printLock.acquire()
# print 'self.data is currently ', repr(self.data)
# shared.printLock.release()
if len(self.data) < 20: # if so little of the data has arrived that we can't even unpack the payload length
return
if self.data[0:4] != '\xe9\xbe\xb4\xd9':
if verbose >= 1:
shared.printLock.acquire()
print 'The magic bytes were not correct. First 40 bytes of data: '+ repr(self.data[0:40])
print 'The magic bytes were not correct. First 40 bytes of data: ' + repr(self.data[0:40])
shared.printLock.release()
self.data = ""
return
self.payloadLength, = unpack('>L',self.data[16:20])
if len(self.data) < self.payloadLength+24: #check if the whole message has arrived yet.
self.payloadLength, = unpack('>L', self.data[16:20])
if len(self.data) < self.payloadLength + 24: # check if the whole message has arrived yet.
return
if self.data[20:24] != hashlib.sha512(self.data[24:self.payloadLength+24]).digest()[0:4]:#test the checksum in the message. If it is correct...
if self.data[20:24] != hashlib.sha512(self.data[24:self.payloadLength + 24]).digest()[0:4]: # test the checksum in the message. If it is correct...
print 'Checksum incorrect. Clearing this message.'
self.data = self.data[self.payloadLength+24:]
self.data = self.data[self.payloadLength + 24:]
self.processData()
return
#The time we've last seen this node is obviously right now since we just received valid data from it. So update the knownNodes list so that other peers can be made aware of its existance.
if self.initiatedConnection and self.connectionIsOrWasFullyEstablished: #The remote port is only something we should share with others if it is the remote node's incoming port (rather than some random operating-system-assigned outgoing port).
# The time we've last seen this node is obviously right now since we
# just received valid data from it. So update the knownNodes list so
# that other peers can be made aware of its existance.
if self.initiatedConnection and self.connectionIsOrWasFullyEstablished: # The remote port is only something we should share with others if it is the remote node's incoming port (rather than some random operating-system-assigned outgoing port).
shared.knownNodesLock.acquire()
shared.knownNodes[self.streamNumber][self.HOST] = (self.PORT,int(time.time()))
shared.knownNodes[self.streamNumber][
self.HOST] = (self.PORT, int(time.time()))
shared.knownNodesLock.release()
if self.payloadLength <= 180000000: #If the size of the message is greater than 180MB, ignore it. (I get memory errors when processing messages much larger than this though it is concievable that this value will have to be lowered if some systems are less tolarant of large messages.)
if self.payloadLength <= 180000000: # If the size of the message is greater than 180MB, ignore it. (I get memory errors when processing messages much larger than this though it is concievable that this value will have to be lowered if some systems are less tolarant of large messages.)
remoteCommand = self.data[4:16]
shared.printLock.acquire()
print 'remoteCommand', repr(remoteCommand.replace('\x00','')), ' from', self.HOST
print 'remoteCommand', repr(remoteCommand.replace('\x00', '')), ' from', self.HOST
shared.printLock.release()
if remoteCommand == 'version\x00\x00\x00\x00\x00':
self.recversion(self.data[24:self.payloadLength+24])
self.recversion(self.data[24:self.payloadLength + 24])
elif remoteCommand == 'verack\x00\x00\x00\x00\x00\x00':
self.recverack()
elif remoteCommand == 'addr\x00\x00\x00\x00\x00\x00\x00\x00' and self.connectionIsOrWasFullyEstablished:
self.recaddr(self.data[24:self.payloadLength+24])
self.recaddr(self.data[24:self.payloadLength + 24])
elif remoteCommand == 'getpubkey\x00\x00\x00' and self.connectionIsOrWasFullyEstablished:
self.recgetpubkey(self.data[24:self.payloadLength+24])
self.recgetpubkey(self.data[24:self.payloadLength + 24])
elif remoteCommand == 'pubkey\x00\x00\x00\x00\x00\x00' and self.connectionIsOrWasFullyEstablished:
self.recpubkey(self.data[24:self.payloadLength+24])
self.recpubkey(self.data[24:self.payloadLength + 24])
elif remoteCommand == 'inv\x00\x00\x00\x00\x00\x00\x00\x00\x00' and self.connectionIsOrWasFullyEstablished:
self.recinv(self.data[24:self.payloadLength+24])
self.recinv(self.data[24:self.payloadLength + 24])
elif remoteCommand == 'getdata\x00\x00\x00\x00\x00' and self.connectionIsOrWasFullyEstablished:
self.recgetdata(self.data[24:self.payloadLength+24])
self.recgetdata(self.data[24:self.payloadLength + 24])
elif remoteCommand == 'msg\x00\x00\x00\x00\x00\x00\x00\x00\x00' and self.connectionIsOrWasFullyEstablished:
self.recmsg(self.data[24:self.payloadLength+24])
self.recmsg(self.data[24:self.payloadLength + 24])
elif remoteCommand == 'broadcast\x00\x00\x00' and self.connectionIsOrWasFullyEstablished:
self.recbroadcast(self.data[24:self.payloadLength+24])
self.recbroadcast(self.data[24:self.payloadLength + 24])
elif remoteCommand == 'ping\x00\x00\x00\x00\x00\x00\x00\x00' and self.connectionIsOrWasFullyEstablished:
self.sendpong()
elif remoteCommand == 'pong\x00\x00\x00\x00\x00\x00\x00\x00' and self.connectionIsOrWasFullyEstablished:
@ -368,31 +435,37 @@ class receiveDataThread(threading.Thread):
elif remoteCommand == 'alert\x00\x00\x00\x00\x00\x00\x00' and self.connectionIsOrWasFullyEstablished:
pass
self.data = self.data[self.payloadLength+24:]#take this message out and then process the next message
self.data = self.data[
self.payloadLength + 24:] # take this message out and then process the next message
if self.data == '':
while len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) > 0:
random.seed()
objectHash, = random.sample(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave, 1)
objectHash, = random.sample(
self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave, 1)
if objectHash in shared.inventory:
shared.printLock.acquire()
print 'Inventory (in memory) already has object listed in inv message.'
shared.printLock.release()
del self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave[objectHash]
del self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave[
objectHash]
elif isInSqlInventory(objectHash):
if verbose >= 3:
shared.printLock.acquire()
print 'Inventory (SQL on disk) already has object listed in inv message.'
shared.printLock.release()
del self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave[objectHash]
del self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave[
objectHash]
else:
self.sendgetdata(objectHash)
del self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave[objectHash] #It is possible that the remote node doesn't respond with the object. In that case, we'll very likely get it from someone else anyway.
del self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave[
objectHash] # It is possible that the remote node doesn't respond with the object. In that case, we'll very likely get it from someone else anyway.
if len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) == 0:
shared.printLock.acquire()
print '(concerning', self.HOST + ')', 'number of objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave is now', len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave)
shared.printLock.release()
try:
del numberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHavePerPeer[self.HOST] #this data structure is maintained so that we can keep track of how many total objects, across all connections, are currently outstanding. If it goes too high it can indicate that we are under attack by multiple nodes working together.
del numberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHavePerPeer[
self.HOST] # this data structure is maintained so that we can keep track of how many total objects, across all connections, are currently outstanding. If it goes too high it can indicate that we are under attack by multiple nodes working together.
except:
pass
break
@ -401,35 +474,41 @@ class receiveDataThread(threading.Thread):
print '(concerning', self.HOST + ')', 'number of objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave is now', len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave)
shared.printLock.release()
try:
del numberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHavePerPeer[self.HOST] #this data structure is maintained so that we can keep track of how many total objects, across all connections, are currently outstanding. If it goes too high it can indicate that we are under attack by multiple nodes working together.
del numberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHavePerPeer[
self.HOST] # this data structure is maintained so that we can keep track of how many total objects, across all connections, are currently outstanding. If it goes too high it can indicate that we are under attack by multiple nodes working together.
except:
pass
if len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) > 0:
shared.printLock.acquire()
print '(concerning', self.HOST + ')', 'number of objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave is now', len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave)
shared.printLock.release()
numberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHavePerPeer[self.HOST] = len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) #this data structure is maintained so that we can keep track of how many total objects, across all connections, are currently outstanding. If it goes too high it can indicate that we are under attack by multiple nodes working together.
numberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHavePerPeer[self.HOST] = len(
self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) # this data structure is maintained so that we can keep track of how many total objects, across all connections, are currently outstanding. If it goes too high it can indicate that we are under attack by multiple nodes working together.
if len(self.ackDataThatWeHaveYetToSend) > 0:
self.data = self.ackDataThatWeHaveYetToSend.pop()
self.processData()
def isProofOfWorkSufficient(self,data,nonceTrialsPerByte=0,payloadLengthExtraBytes=0):
def isProofOfWorkSufficient(
self,
data,
nonceTrialsPerByte=0,
payloadLengthExtraBytes=0):
if nonceTrialsPerByte < shared.networkDefaultProofOfWorkNonceTrialsPerByte:
nonceTrialsPerByte = shared.networkDefaultProofOfWorkNonceTrialsPerByte
if payloadLengthExtraBytes < shared.networkDefaultPayloadLengthExtraBytes:
payloadLengthExtraBytes = shared.networkDefaultPayloadLengthExtraBytes
POW, = unpack('>Q',hashlib.sha512(hashlib.sha512(data[:8]+ hashlib.sha512(data[8:]).digest()).digest()).digest()[0:8])
#print 'POW:', POW
return POW <= 2**64 / ((len(data)+payloadLengthExtraBytes) * (nonceTrialsPerByte))
POW, = unpack('>Q', hashlib.sha512(hashlib.sha512(data[
:8] + hashlib.sha512(data[8:]).digest()).digest()).digest()[0:8])
# print 'POW:', POW
return POW <= 2 ** 64 / ((len(data) + payloadLengthExtraBytes) * (nonceTrialsPerByte))
def sendpong(self):
print 'Sending pong'
try:
self.sock.sendall('\xE9\xBE\xB4\xD9\x70\x6F\x6E\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\x83\xe1\x35')
except Exception, err:
#if not 'Bad file descriptor' in err:
self.sock.sendall(
'\xE9\xBE\xB4\xD9\x70\x6F\x6E\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\x83\xe1\x35')
except Exception as err:
# if not 'Bad file descriptor' in err:
shared.printLock.acquire()
sys.stderr.write('sock.sendall error: %s\n' % err)
shared.printLock.release()
@ -437,25 +516,28 @@ class receiveDataThread(threading.Thread):
def recverack(self):
print 'verack received'
self.verackReceived = True
if self.verackSent == True:
#We have thus both sent and received a verack.
if self.verackSent:
# We have thus both sent and received a verack.
self.connectionFullyEstablished()
def connectionFullyEstablished(self):
self.connectionIsOrWasFullyEstablished = True
if not self.initiatedConnection:
shared.UISignalQueue.put(('setStatusIcon','green'))
self.sock.settimeout(600) #We'll send out a pong every 5 minutes to make sure the connection stays alive if there has been no other traffic to send lately.
shared.UISignalQueue.put(('updateNetworkStatusTab','no data'))
remoteNodeIncomingPort, remoteNodeSeenTime = shared.knownNodes[self.streamNumber][self.HOST]
shared.UISignalQueue.put(('setStatusIcon', 'green'))
self.sock.settimeout(
600) # We'll send out a pong every 5 minutes to make sure the connection stays alive if there has been no other traffic to send lately.
shared.UISignalQueue.put(('updateNetworkStatusTab', 'no data'))
remoteNodeIncomingPort, remoteNodeSeenTime = shared.knownNodes[
self.streamNumber][self.HOST]
shared.printLock.acquire()
print 'Connection fully established with', self.HOST, remoteNodeIncomingPort
print 'The size of the connectedHostsList is now', len(shared.connectedHostsList)
print 'The length of sendDataQueues is now:', len(shared.sendDataQueues)
print 'broadcasting addr from within connectionFullyEstablished function.'
shared.printLock.release()
self.broadcastaddr([(int(time.time()), self.streamNumber, 1, self.HOST, remoteNodeIncomingPort)]) #This lets all of our peers know about this new node.
self.sendaddr() #This is one large addr message to this one peer.
self.broadcastaddr([(int(time.time()), self.streamNumber, 1, self.HOST,
remoteNodeIncomingPort)]) # This lets all of our peers know about this new node.
self.sendaddr() # This is one large addr message to this one peer.
if not self.initiatedConnection and len(shared.connectedHostsList) > 200:
shared.printLock.acquire()
print 'We are connected to too many people. Closing connection.'
@ -466,9 +548,12 @@ class receiveDataThread(threading.Thread):
def sendBigInv(self):
shared.sqlLock.acquire()
#Select all hashes which are younger than two days old and in this stream.
t = (int(time.time())-maximumAgeOfObjectsThatIAdvertiseToOthers,int(time.time())-lengthOfTimeToHoldOnToAllPubkeys,self.streamNumber)
shared.sqlSubmitQueue.put('''SELECT hash FROM inventory WHERE ((receivedtime>? and objecttype<>'pubkey') or (receivedtime>? and objecttype='pubkey')) and streamnumber=?''')
# Select all hashes which are younger than two days old and in this
# stream.
t = (int(time.time()) - maximumAgeOfObjectsThatIAdvertiseToOthers, int(
time.time()) - lengthOfTimeToHoldOnToAllPubkeys, self.streamNumber)
shared.sqlSubmitQueue.put(
'''SELECT hash FROM inventory WHERE ((receivedtime>? and objecttype<>'pubkey') or (receivedtime>? and objecttype='pubkey')) and streamnumber=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
@ -477,73 +562,83 @@ class receiveDataThread(threading.Thread):
hash, = row
if hash not in self.objectsOfWhichThisRemoteNodeIsAlreadyAware:
bigInvList[hash] = 0
#We also have messages in our inventory in memory (which is a python dictionary). Let's fetch those too.
# We also have messages in our inventory in memory (which is a python
# dictionary). Let's fetch those too.
for hash, storedValue in shared.inventory.items():
if hash not in self.objectsOfWhichThisRemoteNodeIsAlreadyAware:
objectType, streamNumber, payload, receivedTime = storedValue
if streamNumber == self.streamNumber and receivedTime > int(time.time())-maximumAgeOfObjectsThatIAdvertiseToOthers:
if streamNumber == self.streamNumber and receivedTime > int(time.time()) - maximumAgeOfObjectsThatIAdvertiseToOthers:
bigInvList[hash] = 0
numberOfObjectsInInvMessage = 0
payload = ''
#Now let us start appending all of these hashes together. They will be sent out in a big inv message to our new peer.
# Now let us start appending all of these hashes together. They will be
# sent out in a big inv message to our new peer.
for hash, storedValue in bigInvList.items():
payload += hash
numberOfObjectsInInvMessage += 1
if numberOfObjectsInInvMessage >= 50000: #We can only send a max of 50000 items per inv message but we may have more objects to advertise. They must be split up into multiple inv messages.
self.sendinvMessageToJustThisOnePeer(numberOfObjectsInInvMessage,payload)
if numberOfObjectsInInvMessage >= 50000: # We can only send a max of 50000 items per inv message but we may have more objects to advertise. They must be split up into multiple inv messages.
self.sendinvMessageToJustThisOnePeer(
numberOfObjectsInInvMessage, payload)
payload = ''
numberOfObjectsInInvMessage = 0
if numberOfObjectsInInvMessage > 0:
self.sendinvMessageToJustThisOnePeer(numberOfObjectsInInvMessage,payload)
self.sendinvMessageToJustThisOnePeer(
numberOfObjectsInInvMessage, payload)
#Self explanatory. Notice that there is also a broadcastinv function for broadcasting invs to everyone in our stream.
def sendinvMessageToJustThisOnePeer(self,numberOfObjects,payload):
# Self explanatory. Notice that there is also a broadcastinv function for
# broadcasting invs to everyone in our stream.
def sendinvMessageToJustThisOnePeer(self, numberOfObjects, payload):
payload = encodeVarint(numberOfObjects) + payload
headerData = '\xe9\xbe\xb4\xd9' #magic bits, slighly different from Bitcoin's magic bits.
headerData = '\xe9\xbe\xb4\xd9' # magic bits, slighly different from Bitcoin's magic bits.
headerData += 'inv\x00\x00\x00\x00\x00\x00\x00\x00\x00'
headerData += pack('>L',len(payload))
headerData += pack('>L', len(payload))
headerData += hashlib.sha512(payload).digest()[:4]
shared.printLock.acquire()
print 'Sending huge inv message with', numberOfObjects, 'objects to just this one peer'
shared.printLock.release()
try:
self.sock.sendall(headerData + payload)
except Exception, err:
#if not 'Bad file descriptor' in err:
except Exception as err:
# if not 'Bad file descriptor' in err:
shared.printLock.acquire()
sys.stderr.write('sock.sendall error: %s\n' % err)
shared.printLock.release()
#We have received a broadcast message
def recbroadcast(self,data):
# We have received a broadcast message
def recbroadcast(self, data):
self.messageProcessingStartTime = time.time()
#First we must check to make sure the proof of work is sufficient.
# First we must check to make sure the proof of work is sufficient.
if not self.isProofOfWorkSufficient(data):
print 'Proof of work in broadcast message insufficient.'
return
readPosition = 8 #bypass the nonce
embeddedTime, = unpack('>I',data[readPosition:readPosition+4])
readPosition = 8 # bypass the nonce
embeddedTime, = unpack('>I', data[readPosition:readPosition + 4])
#This section is used for the transition from 32 bit time to 64 bit time in the protocol.
# This section is used for the transition from 32 bit time to 64 bit
# time in the protocol.
if embeddedTime == 0:
embeddedTime, = unpack('>Q',data[readPosition:readPosition+8])
embeddedTime, = unpack('>Q', data[readPosition:readPosition + 8])
readPosition += 8
else:
readPosition += 4
if embeddedTime > (int(time.time())+10800): #prevent funny business
if embeddedTime > (int(time.time()) + 10800): # prevent funny business
print 'The embedded time in this broadcast message is more than three hours in the future. That doesn\'t make sense. Ignoring message.'
return
if embeddedTime < (int(time.time())-maximumAgeOfAnObjectThatIAmWillingToAccept):
if embeddedTime < (int(time.time()) - maximumAgeOfAnObjectThatIAmWillingToAccept):
print 'The embedded time in this broadcast message is too old. Ignoring message.'
return
if len(data) < 180:
print 'The payload length of this broadcast packet is unreasonably low. Someone is probably trying funny business. Ignoring message.'
return
#Let us check to make sure the stream number is correct (thus preventing an individual from sending broadcasts out on the wrong streams or all streams).
broadcastVersion, broadcastVersionLength = decodeVarint(data[readPosition:readPosition+10])
# Let us check to make sure the stream number is correct (thus
# preventing an individual from sending broadcasts out on the wrong
# streams or all streams).
broadcastVersion, broadcastVersionLength = decodeVarint(
data[readPosition:readPosition + 10])
if broadcastVersion >= 2:
streamNumber, streamNumberLength = decodeVarint(data[readPosition+broadcastVersionLength:readPosition+broadcastVersionLength+10])
streamNumber, streamNumberLength = decodeVarint(data[
readPosition + broadcastVersionLength:readPosition + broadcastVersionLength + 10])
if streamNumber != self.streamNumber:
print 'The stream number encoded in this broadcast message (' + str(streamNumber) + ') does not match the stream number on which it was received. Ignoring it.'
return
@ -558,121 +653,150 @@ class receiveDataThread(threading.Thread):
print 'We have already received this broadcast object (it is stored on disk in the SQL inventory). Ignoring it.'
shared.inventoryLock.release()
return
#It is valid so far. Let's let our peers know about it.
# It is valid so far. Let's let our peers know about it.
objectType = 'broadcast'
shared.inventory[self.inventoryHash] = (objectType, self.streamNumber, data, embeddedTime)
shared.inventory[self.inventoryHash] = (
objectType, self.streamNumber, data, embeddedTime)
shared.inventoryLock.release()
self.broadcastinv(self.inventoryHash)
shared.UISignalQueue.put(('incrementNumberOfBroadcastsProcessed','no data'))
shared.UISignalQueue.put((
'incrementNumberOfBroadcastsProcessed', 'no data'))
self.processbroadcast(
readPosition, data) # When this function returns, we will have either successfully processed this broadcast because we are interested in it, ignored it because we aren't interested in it, or found problem with the broadcast that warranted ignoring it.
self.processbroadcast(readPosition,data)#When this function returns, we will have either successfully processed this broadcast because we are interested in it, ignored it because we aren't interested in it, or found problem with the broadcast that warranted ignoring it.
# Let us now set lengthOfTimeWeShouldUseToProcessThisMessage. If we
# haven't used the specified amount of time, we shall sleep. These
# values are mostly the same values used for msg messages although
# broadcast messages are processed faster.
if len(data) > 100000000: # Size is greater than 100 megabytes
lengthOfTimeWeShouldUseToProcessThisMessage = 100 # seconds.
elif len(data) > 10000000: # Between 100 and 10 megabytes
lengthOfTimeWeShouldUseToProcessThisMessage = 20 # seconds.
elif len(data) > 1000000: # Between 10 and 1 megabyte
lengthOfTimeWeShouldUseToProcessThisMessage = 3 # seconds.
else: # Less than 1 megabyte
lengthOfTimeWeShouldUseToProcessThisMessage = .6 # seconds.
# Let us now set lengthOfTimeWeShouldUseToProcessThisMessage. If we haven't used the specified amount of time, we shall sleep. These values are mostly the same values used for msg messages although broadcast messages are processed faster.
if len(data) > 100000000: #Size is greater than 100 megabytes
lengthOfTimeWeShouldUseToProcessThisMessage = 100 #seconds.
elif len(data) > 10000000: #Between 100 and 10 megabytes
lengthOfTimeWeShouldUseToProcessThisMessage = 20 #seconds.
elif len(data) > 1000000: #Between 10 and 1 megabyte
lengthOfTimeWeShouldUseToProcessThisMessage = 3 #seconds.
else: #Less than 1 megabyte
lengthOfTimeWeShouldUseToProcessThisMessage = .6 #seconds.
sleepTime = lengthOfTimeWeShouldUseToProcessThisMessage - (time.time()- self.messageProcessingStartTime)
sleepTime = lengthOfTimeWeShouldUseToProcessThisMessage - \
(time.time() - self.messageProcessingStartTime)
if sleepTime > 0:
shared.printLock.acquire()
print 'Timing attack mitigation: Sleeping for', sleepTime ,'seconds.'
print 'Timing attack mitigation: Sleeping for', sleepTime, 'seconds.'
shared.printLock.release()
time.sleep(sleepTime)
shared.printLock.acquire()
print 'Total message processing time:', time.time()- self.messageProcessingStartTime, 'seconds.'
print 'Total message processing time:', time.time() - self.messageProcessingStartTime, 'seconds.'
shared.printLock.release()
#A broadcast message has a valid time and POW and requires processing. The recbroadcast function calls this one.
def processbroadcast(self,readPosition,data):
broadcastVersion, broadcastVersionLength = decodeVarint(data[readPosition:readPosition+9])
# A broadcast message has a valid time and POW and requires processing.
# The recbroadcast function calls this one.
def processbroadcast(self, readPosition, data):
broadcastVersion, broadcastVersionLength = decodeVarint(
data[readPosition:readPosition + 9])
readPosition += broadcastVersionLength
if broadcastVersion < 1 or broadcastVersion > 2:
print 'Cannot decode incoming broadcast versions higher than 2. Assuming the sender isn\' being silly, you should upgrade Bitmessage because this message shall be ignored.'
print 'Cannot decode incoming broadcast versions higher than 2. Assuming the sender isn\'t being silly, you should upgrade Bitmessage because this message shall be ignored.'
return
if broadcastVersion == 1:
beginningOfPubkeyPosition = readPosition #used when we add the pubkey to our pubkey table
sendersAddressVersion, sendersAddressVersionLength = decodeVarint(data[readPosition:readPosition+9])
if sendersAddressVersion <= 1 or sendersAddressVersion >=3:
#Cannot decode senderAddressVersion higher than 2. Assuming the sender isn\' being silly, you should upgrade Bitmessage because this message shall be ignored.
beginningOfPubkeyPosition = readPosition # used when we add the pubkey to our pubkey table
sendersAddressVersion, sendersAddressVersionLength = decodeVarint(
data[readPosition:readPosition + 9])
if sendersAddressVersion <= 1 or sendersAddressVersion >= 3:
# Cannot decode senderAddressVersion higher than 2. Assuming
# the sender isn\'t being silly, you should upgrade Bitmessage
# because this message shall be ignored.
return
readPosition += sendersAddressVersionLength
if sendersAddressVersion == 2:
sendersStream, sendersStreamLength = decodeVarint(data[readPosition:readPosition+9])
sendersStream, sendersStreamLength = decodeVarint(
data[readPosition:readPosition + 9])
readPosition += sendersStreamLength
behaviorBitfield = data[readPosition:readPosition+4]
behaviorBitfield = data[readPosition:readPosition + 4]
readPosition += 4
sendersPubSigningKey = '\x04' + data[readPosition:readPosition+64]
sendersPubSigningKey = '\x04' + \
data[readPosition:readPosition + 64]
readPosition += 64
sendersPubEncryptionKey = '\x04' + data[readPosition:readPosition+64]
sendersPubEncryptionKey = '\x04' + \
data[readPosition:readPosition + 64]
readPosition += 64
endOfPubkeyPosition = readPosition
sendersHash = data[readPosition:readPosition+20]
sendersHash = data[readPosition:readPosition + 20]
if sendersHash not in shared.broadcastSendersForWhichImWatching:
#Display timing data
# Display timing data
shared.printLock.acquire()
print 'Time spent deciding that we are not interested in this v1 broadcast:', time.time()- self.messageProcessingStartTime
print 'Time spent deciding that we are not interested in this v1 broadcast:', time.time() - self.messageProcessingStartTime
shared.printLock.release()
return
#At this point, this message claims to be from sendersHash and we are interested in it. We still have to hash the public key to make sure it is truly the key that matches the hash, and also check the signiture.
# At this point, this message claims to be from sendersHash and
# we are interested in it. We still have to hash the public key
# to make sure it is truly the key that matches the hash, and
# also check the signiture.
readPosition += 20
sha = hashlib.new('sha512')
sha.update(sendersPubSigningKey+sendersPubEncryptionKey)
sha.update(sendersPubSigningKey + sendersPubEncryptionKey)
ripe = hashlib.new('ripemd160')
ripe.update(sha.digest())
if ripe.digest() != sendersHash:
#The sender of this message lied.
# The sender of this message lied.
return
messageEncodingType, messageEncodingTypeLength = decodeVarint(data[readPosition:readPosition+9])
messageEncodingType, messageEncodingTypeLength = decodeVarint(
data[readPosition:readPosition + 9])
if messageEncodingType == 0:
return
readPosition += messageEncodingTypeLength
messageLength, messageLengthLength = decodeVarint(data[readPosition:readPosition+9])
messageLength, messageLengthLength = decodeVarint(
data[readPosition:readPosition + 9])
readPosition += messageLengthLength
message = data[readPosition:readPosition+messageLength]
message = data[readPosition:readPosition + messageLength]
readPosition += messageLength
readPositionAtBottomOfMessage = readPosition
signatureLength, signatureLengthLength = decodeVarint(data[readPosition:readPosition+9])
signatureLength, signatureLengthLength = decodeVarint(
data[readPosition:readPosition + 9])
readPosition += signatureLengthLength
signature = data[readPosition:readPosition+signatureLength]
signature = data[readPosition:readPosition + signatureLength]
try:
if not highlevelcrypto.verify(data[12:readPositionAtBottomOfMessage],signature,sendersPubSigningKey.encode('hex')):
if not highlevelcrypto.verify(data[12:readPositionAtBottomOfMessage], signature, sendersPubSigningKey.encode('hex')):
print 'ECDSA verify failed'
return
print 'ECDSA verify passed'
except Exception, err:
except Exception as err:
print 'ECDSA verify failed', err
return
#verify passed
# verify passed
#Let's store the public key in case we want to reply to this person.
#We don't have the correct nonce or time (which would let us send out a pubkey message) so we'll just fill it with 1's. We won't be able to send this pubkey to others (without doing the proof of work ourselves, which this program is programmed to not do.)
t = (ripe.digest(),'\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF'+'\xFF\xFF\xFF\xFF'+data[beginningOfPubkeyPosition:endOfPubkeyPosition],int(time.time()),'yes')
# Let's store the public key in case we want to reply to this person.
# We don't have the correct nonce or time (which would let us
# send out a pubkey message) so we'll just fill it with 1's. We
# won't be able to send this pubkey to others (without doing
# the proof of work ourselves, which this program is programmed
# to not do.)
t = (ripe.digest(), '\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF' + '\xFF\xFF\xFF\xFF' + data[
beginningOfPubkeyPosition:endOfPubkeyPosition], int(time.time()), 'yes')
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''INSERT INTO pubkeys VALUES (?,?,?,?)''')
shared.sqlSubmitQueue.put(
'''INSERT INTO pubkeys VALUES (?,?,?,?)''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
#shared.workerQueue.put(('newpubkey',(sendersAddressVersion,sendersStream,ripe.digest()))) #This will check to see whether we happen to be awaiting this pubkey in order to send a message. If we are, it will do the POW and send it.
# shared.workerQueue.put(('newpubkey',(sendersAddressVersion,sendersStream,ripe.digest())))
# This will check to see whether we happen to be awaiting this
# pubkey in order to send a message. If we are, it will do the
# POW and send it.
self.possibleNewPubkey(ripe.digest())
fromAddress = encodeAddress(sendersAddressVersion,sendersStream,ripe.digest())
fromAddress = encodeAddress(
sendersAddressVersion, sendersStream, ripe.digest())
shared.printLock.acquire()
print 'fromAddress:', fromAddress
shared.printLock.release()
if messageEncodingType == 2:
bodyPositionIndex = string.find(message,'\nBody:')
bodyPositionIndex = string.find(message, '\nBody:')
if bodyPositionIndex > 1:
subject = message[8:bodyPositionIndex]
body = message[bodyPositionIndex+6:]
body = message[bodyPositionIndex + 6:]
else:
subject = ''
body = message
@ -686,127 +810,153 @@ class receiveDataThread(threading.Thread):
subject = ''
toAddress = '[Broadcast subscribers]'
if messageEncodingType <> 0:
if messageEncodingType != 0:
shared.sqlLock.acquire()
t = (self.inventoryHash,toAddress,fromAddress,subject,int(time.time()),body,'inbox',messageEncodingType,0)
shared.sqlSubmitQueue.put('''INSERT INTO inbox VALUES (?,?,?,?,?,?,?,?,?)''')
t = (self.inventoryHash, toAddress, fromAddress, subject, int(
time.time()), body, 'inbox', messageEncodingType, 0)
shared.sqlSubmitQueue.put(
'''INSERT INTO inbox VALUES (?,?,?,?,?,?,?,?,?)''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.UISignalQueue.put(('displayNewInboxMessage',(self.inventoryHash,toAddress,fromAddress,subject,body)))
shared.UISignalQueue.put(('displayNewInboxMessage', (
self.inventoryHash, toAddress, fromAddress, subject, body)))
#If we are behaving as an API then we might need to run an outside command to let some program know that a new message has arrived.
if shared.safeConfigGetBoolean('bitmessagesettings','apienabled'):
# If we are behaving as an API then we might need to run an
# outside command to let some program know that a new
# message has arrived.
if shared.safeConfigGetBoolean('bitmessagesettings', 'apienabled'):
try:
apiNotifyPath = shared.config.get('bitmessagesettings','apinotifypath')
apiNotifyPath = shared.config.get(
'bitmessagesettings', 'apinotifypath')
except:
apiNotifyPath = ''
if apiNotifyPath != '':
call([apiNotifyPath, "newBroadcast"])
#Display timing data
# Display timing data
shared.printLock.acquire()
print 'Time spent processing this interesting broadcast:', time.time()- self.messageProcessingStartTime
print 'Time spent processing this interesting broadcast:', time.time() - self.messageProcessingStartTime
shared.printLock.release()
if broadcastVersion == 2:
cleartextStreamNumber, cleartextStreamNumberLength = decodeVarint(data[readPosition:readPosition+10])
cleartextStreamNumber, cleartextStreamNumberLength = decodeVarint(
data[readPosition:readPosition + 10])
readPosition += cleartextStreamNumberLength
initialDecryptionSuccessful = False
for key, cryptorObject in shared.MyECSubscriptionCryptorObjects.items():
try:
decryptedData = cryptorObject.decrypt(data[readPosition:])
toRipe = key #This is the RIPE hash of the sender's pubkey. We need this below to compare to the RIPE hash of the sender's address to verify that it was encrypted by with their key rather than some other key.
toRipe = key # This is the RIPE hash of the sender's pubkey. We need this below to compare to the RIPE hash of the sender's address to verify that it was encrypted by with their key rather than some other key.
initialDecryptionSuccessful = True
print 'EC decryption successful using key associated with ripe hash:', key.encode('hex')
break
except Exception, err:
except Exception as err:
pass
#print 'cryptorObject.decrypt Exception:', err
# print 'cryptorObject.decrypt Exception:', err
if not initialDecryptionSuccessful:
#This is not a broadcast I am interested in.
# This is not a broadcast I am interested in.
shared.printLock.acquire()
print 'Length of time program spent failing to decrypt this v2 broadcast:', time.time()- self.messageProcessingStartTime, 'seconds.'
print 'Length of time program spent failing to decrypt this v2 broadcast:', time.time() - self.messageProcessingStartTime, 'seconds.'
shared.printLock.release()
return
#At this point this is a broadcast I have decrypted and thus am interested in.
signedBroadcastVersion, readPosition = decodeVarint(decryptedData[:10])
beginningOfPubkeyPosition = readPosition #used when we add the pubkey to our pubkey table
sendersAddressVersion, sendersAddressVersionLength = decodeVarint(decryptedData[readPosition:readPosition+9])
# At this point this is a broadcast I have decrypted and thus am
# interested in.
signedBroadcastVersion, readPosition = decodeVarint(
decryptedData[:10])
beginningOfPubkeyPosition = readPosition # used when we add the pubkey to our pubkey table
sendersAddressVersion, sendersAddressVersionLength = decodeVarint(
decryptedData[readPosition:readPosition + 9])
if sendersAddressVersion < 2 or sendersAddressVersion > 3:
print 'Cannot decode senderAddressVersion other than 2 or 3. Assuming the sender isn\' being silly, you should upgrade Bitmessage because this message shall be ignored.'
print 'Cannot decode senderAddressVersion other than 2 or 3. Assuming the sender isn\'t being silly, you should upgrade Bitmessage because this message shall be ignored.'
return
readPosition += sendersAddressVersionLength
sendersStream, sendersStreamLength = decodeVarint(decryptedData[readPosition:readPosition+9])
sendersStream, sendersStreamLength = decodeVarint(
decryptedData[readPosition:readPosition + 9])
if sendersStream != cleartextStreamNumber:
print 'The stream number outside of the encryption on which the POW was completed doesn\'t match the stream number inside the encryption. Ignoring broadcast.'
return
readPosition += sendersStreamLength
behaviorBitfield = decryptedData[readPosition:readPosition+4]
behaviorBitfield = decryptedData[readPosition:readPosition + 4]
readPosition += 4
sendersPubSigningKey = '\x04' + decryptedData[readPosition:readPosition+64]
sendersPubSigningKey = '\x04' + \
decryptedData[readPosition:readPosition + 64]
readPosition += 64
sendersPubEncryptionKey = '\x04' + decryptedData[readPosition:readPosition+64]
sendersPubEncryptionKey = '\x04' + \
decryptedData[readPosition:readPosition + 64]
readPosition += 64
if sendersAddressVersion >= 3:
requiredAverageProofOfWorkNonceTrialsPerByte, varintLength = decodeVarint(decryptedData[readPosition:readPosition+10])
requiredAverageProofOfWorkNonceTrialsPerByte, varintLength = decodeVarint(
decryptedData[readPosition:readPosition + 10])
readPosition += varintLength
print 'sender\'s requiredAverageProofOfWorkNonceTrialsPerByte is', requiredAverageProofOfWorkNonceTrialsPerByte
requiredPayloadLengthExtraBytes, varintLength = decodeVarint(decryptedData[readPosition:readPosition+10])
requiredPayloadLengthExtraBytes, varintLength = decodeVarint(
decryptedData[readPosition:readPosition + 10])
readPosition += varintLength
print 'sender\'s requiredPayloadLengthExtraBytes is', requiredPayloadLengthExtraBytes
endOfPubkeyPosition = readPosition
sha = hashlib.new('sha512')
sha.update(sendersPubSigningKey+sendersPubEncryptionKey)
sha.update(sendersPubSigningKey + sendersPubEncryptionKey)
ripe = hashlib.new('ripemd160')
ripe.update(sha.digest())
if toRipe != ripe.digest():
print 'The encryption key used to encrypt this message doesn\'t match the keys inbedded in the message itself. Ignoring message.'
return
messageEncodingType, messageEncodingTypeLength = decodeVarint(decryptedData[readPosition:readPosition+9])
messageEncodingType, messageEncodingTypeLength = decodeVarint(
decryptedData[readPosition:readPosition + 9])
if messageEncodingType == 0:
return
readPosition += messageEncodingTypeLength
messageLength, messageLengthLength = decodeVarint(decryptedData[readPosition:readPosition+9])
messageLength, messageLengthLength = decodeVarint(
decryptedData[readPosition:readPosition + 9])
readPosition += messageLengthLength
message = decryptedData[readPosition:readPosition+messageLength]
message = decryptedData[readPosition:readPosition + messageLength]
readPosition += messageLength
readPositionAtBottomOfMessage = readPosition
signatureLength, signatureLengthLength = decodeVarint(decryptedData[readPosition:readPosition+9])
signatureLength, signatureLengthLength = decodeVarint(
decryptedData[readPosition:readPosition + 9])
readPosition += signatureLengthLength
signature = decryptedData[readPosition:readPosition+signatureLength]
signature = decryptedData[
readPosition:readPosition + signatureLength]
try:
if not highlevelcrypto.verify(decryptedData[:readPositionAtBottomOfMessage],signature,sendersPubSigningKey.encode('hex')):
if not highlevelcrypto.verify(decryptedData[:readPositionAtBottomOfMessage], signature, sendersPubSigningKey.encode('hex')):
print 'ECDSA verify failed'
return
print 'ECDSA verify passed'
except Exception, err:
except Exception as err:
print 'ECDSA verify failed', err
return
#verify passed
# verify passed
#Let's store the public key in case we want to reply to this person.
t = (ripe.digest(),'\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF'+'\xFF\xFF\xFF\xFF'+decryptedData[beginningOfPubkeyPosition:endOfPubkeyPosition],int(time.time()),'yes')
# Let's store the public key in case we want to reply to this
# person.
t = (ripe.digest(), '\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF' + '\xFF\xFF\xFF\xFF' + decryptedData[
beginningOfPubkeyPosition:endOfPubkeyPosition], int(time.time()), 'yes')
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''INSERT INTO pubkeys VALUES (?,?,?,?)''')
shared.sqlSubmitQueue.put(
'''INSERT INTO pubkeys VALUES (?,?,?,?)''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
#shared.workerQueue.put(('newpubkey',(sendersAddressVersion,sendersStream,ripe.digest()))) #This will check to see whether we happen to be awaiting this pubkey in order to send a message. If we are, it will do the POW and send it.
# shared.workerQueue.put(('newpubkey',(sendersAddressVersion,sendersStream,ripe.digest())))
# This will check to see whether we happen to be awaiting this
# pubkey in order to send a message. If we are, it will do the POW
# and send it.
self.possibleNewPubkey(ripe.digest())
fromAddress = encodeAddress(sendersAddressVersion,sendersStream,ripe.digest())
fromAddress = encodeAddress(
sendersAddressVersion, sendersStream, ripe.digest())
shared.printLock.acquire()
print 'fromAddress:', fromAddress
shared.printLock.release()
if messageEncodingType == 2:
bodyPositionIndex = string.find(message,'\nBody:')
bodyPositionIndex = string.find(message, '\nBody:')
if bodyPositionIndex > 1:
subject = message[8:bodyPositionIndex]
body = message[bodyPositionIndex+6:]
body = message[bodyPositionIndex + 6:]
else:
subject = ''
body = message
@ -820,56 +970,63 @@ class receiveDataThread(threading.Thread):
subject = ''
toAddress = '[Broadcast subscribers]'
if messageEncodingType <> 0:
if messageEncodingType != 0:
shared.sqlLock.acquire()
t = (self.inventoryHash,toAddress,fromAddress,subject,int(time.time()),body,'inbox',messageEncodingType,0)
shared.sqlSubmitQueue.put('''INSERT INTO inbox VALUES (?,?,?,?,?,?,?,?,?)''')
t = (self.inventoryHash, toAddress, fromAddress, subject, int(
time.time()), body, 'inbox', messageEncodingType, 0)
shared.sqlSubmitQueue.put(
'''INSERT INTO inbox VALUES (?,?,?,?,?,?,?,?,?)''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.UISignalQueue.put(('displayNewInboxMessage',(self.inventoryHash,toAddress,fromAddress,subject,body)))
shared.UISignalQueue.put(('displayNewInboxMessage', (
self.inventoryHash, toAddress, fromAddress, subject, body)))
#If we are behaving as an API then we might need to run an outside command to let some program know that a new message has arrived.
if shared.safeConfigGetBoolean('bitmessagesettings','apienabled'):
# If we are behaving as an API then we might need to run an
# outside command to let some program know that a new message
# has arrived.
if shared.safeConfigGetBoolean('bitmessagesettings', 'apienabled'):
try:
apiNotifyPath = shared.config.get('bitmessagesettings','apinotifypath')
apiNotifyPath = shared.config.get(
'bitmessagesettings', 'apinotifypath')
except:
apiNotifyPath = ''
if apiNotifyPath != '':
call([apiNotifyPath, "newBroadcast"])
#Display timing data
# Display timing data
shared.printLock.acquire()
print 'Time spent processing this interesting broadcast:', time.time()- self.messageProcessingStartTime
print 'Time spent processing this interesting broadcast:', time.time() - self.messageProcessingStartTime
shared.printLock.release()
#We have received a msg message.
def recmsg(self,data):
# We have received a msg message.
def recmsg(self, data):
self.messageProcessingStartTime = time.time()
#First we must check to make sure the proof of work is sufficient.
# First we must check to make sure the proof of work is sufficient.
if not self.isProofOfWorkSufficient(data):
print 'Proof of work in msg message insufficient.'
return
readPosition = 8
embeddedTime, = unpack('>I',data[readPosition:readPosition+4])
embeddedTime, = unpack('>I', data[readPosition:readPosition + 4])
#This section is used for the transition from 32 bit time to 64 bit time in the protocol.
# This section is used for the transition from 32 bit time to 64 bit
# time in the protocol.
if embeddedTime == 0:
embeddedTime, = unpack('>Q',data[readPosition:readPosition+8])
embeddedTime, = unpack('>Q', data[readPosition:readPosition + 8])
readPosition += 8
else:
readPosition += 4
if embeddedTime > int(time.time())+10800:
if embeddedTime > int(time.time()) + 10800:
print 'The time in the msg message is too new. Ignoring it. Time:', embeddedTime
return
if embeddedTime < int(time.time())-maximumAgeOfAnObjectThatIAmWillingToAccept:
if embeddedTime < int(time.time()) - maximumAgeOfAnObjectThatIAmWillingToAccept:
print 'The time in the msg message is too old. Ignoring it. Time:', embeddedTime
return
streamNumberAsClaimedByMsg, streamNumberAsClaimedByMsgLength = decodeVarint(data[readPosition:readPosition+9])
streamNumberAsClaimedByMsg, streamNumberAsClaimedByMsgLength = decodeVarint(
data[readPosition:readPosition + 9])
if streamNumberAsClaimedByMsg != self.streamNumber:
print 'The stream number encoded in this msg (' + str(streamNumberAsClaimedByMsg) + ') message does not match the stream number on which it was received. Ignoring it.'
return
@ -884,88 +1041,99 @@ class receiveDataThread(threading.Thread):
print 'We have already received this msg message (it is stored on disk in the SQL inventory). Ignoring it.'
shared.inventoryLock.release()
return
#This msg message is valid. Let's let our peers know about it.
# This msg message is valid. Let's let our peers know about it.
objectType = 'msg'
shared.inventory[self.inventoryHash] = (objectType, self.streamNumber, data, embeddedTime)
shared.inventory[self.inventoryHash] = (
objectType, self.streamNumber, data, embeddedTime)
shared.inventoryLock.release()
self.broadcastinv(self.inventoryHash)
shared.UISignalQueue.put(('incrementNumberOfMessagesProcessed','no data'))
shared.UISignalQueue.put((
'incrementNumberOfMessagesProcessed', 'no data'))
self.processmsg(
readPosition, data) # When this function returns, we will have either successfully processed the message bound for us, ignored it because it isn't bound for us, or found problem with the message that warranted ignoring it.
self.processmsg(readPosition,data) #When this function returns, we will have either successfully processed the message bound for us, ignored it because it isn't bound for us, or found problem with the message that warranted ignoring it.
# Let us now set lengthOfTimeWeShouldUseToProcessThisMessage. If we
# haven't used the specified amount of time, we shall sleep. These
# values are based on test timings and you may change them at-will.
if len(data) > 100000000: # Size is greater than 100 megabytes
lengthOfTimeWeShouldUseToProcessThisMessage = 100 # seconds. Actual length of time it took my computer to decrypt and verify the signature of a 100 MB message: 3.7 seconds.
elif len(data) > 10000000: # Between 100 and 10 megabytes
lengthOfTimeWeShouldUseToProcessThisMessage = 20 # seconds. Actual length of time it took my computer to decrypt and verify the signature of a 10 MB message: 0.53 seconds. Actual length of time it takes in practice when processing a real message: 1.44 seconds.
elif len(data) > 1000000: # Between 10 and 1 megabyte
lengthOfTimeWeShouldUseToProcessThisMessage = 3 # seconds. Actual length of time it took my computer to decrypt and verify the signature of a 1 MB message: 0.18 seconds. Actual length of time it takes in practice when processing a real message: 0.30 seconds.
else: # Less than 1 megabyte
lengthOfTimeWeShouldUseToProcessThisMessage = .6 # seconds. Actual length of time it took my computer to decrypt and verify the signature of a 100 KB message: 0.15 seconds. Actual length of time it takes in practice when processing a real message: 0.25 seconds.
# Let us now set lengthOfTimeWeShouldUseToProcessThisMessage. If we haven't used the specified amount of time, we shall sleep. These values are based on test timings and you may change them at-will.
if len(data) > 100000000: #Size is greater than 100 megabytes
lengthOfTimeWeShouldUseToProcessThisMessage = 100 #seconds. Actual length of time it took my computer to decrypt and verify the signature of a 100 MB message: 3.7 seconds.
elif len(data) > 10000000: #Between 100 and 10 megabytes
lengthOfTimeWeShouldUseToProcessThisMessage = 20 #seconds. Actual length of time it took my computer to decrypt and verify the signature of a 10 MB message: 0.53 seconds. Actual length of time it takes in practice when processing a real message: 1.44 seconds.
elif len(data) > 1000000: #Between 10 and 1 megabyte
lengthOfTimeWeShouldUseToProcessThisMessage = 3 #seconds. Actual length of time it took my computer to decrypt and verify the signature of a 1 MB message: 0.18 seconds. Actual length of time it takes in practice when processing a real message: 0.30 seconds.
else: #Less than 1 megabyte
lengthOfTimeWeShouldUseToProcessThisMessage = .6 #seconds. Actual length of time it took my computer to decrypt and verify the signature of a 100 KB message: 0.15 seconds. Actual length of time it takes in practice when processing a real message: 0.25 seconds.
sleepTime = lengthOfTimeWeShouldUseToProcessThisMessage - (time.time()- self.messageProcessingStartTime)
sleepTime = lengthOfTimeWeShouldUseToProcessThisMessage - \
(time.time() - self.messageProcessingStartTime)
if sleepTime > 0:
shared.printLock.acquire()
print 'Timing attack mitigation: Sleeping for', sleepTime ,'seconds.'
print 'Timing attack mitigation: Sleeping for', sleepTime, 'seconds.'
shared.printLock.release()
time.sleep(sleepTime)
shared.printLock.acquire()
print 'Total message processing time:', time.time()- self.messageProcessingStartTime, 'seconds.'
print 'Total message processing time:', time.time() - self.messageProcessingStartTime, 'seconds.'
shared.printLock.release()
#A msg message has a valid time and POW and requires processing. The recmsg function calls this one.
def processmsg(self,readPosition, encryptedData):
# A msg message has a valid time and POW and requires processing. The
# recmsg function calls this one.
def processmsg(self, readPosition, encryptedData):
initialDecryptionSuccessful = False
#Let's check whether this is a message acknowledgement bound for us.
# Let's check whether this is a message acknowledgement bound for us.
if encryptedData[readPosition:] in ackdataForWhichImWatching:
shared.printLock.acquire()
print 'This msg IS an acknowledgement bound for me.'
shared.printLock.release()
del ackdataForWhichImWatching[encryptedData[readPosition:]]
t = ('ackreceived',encryptedData[readPosition:])
t = ('ackreceived', encryptedData[readPosition:])
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('UPDATE sent SET status=? WHERE ackdata=?')
shared.sqlSubmitQueue.put(
'UPDATE sent SET status=? WHERE ackdata=?')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(encryptedData[readPosition:],'Acknowledgement of the message received just now. '+ unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time()))),'utf-8'))))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (encryptedData[readPosition:], 'Acknowledgement of the message received just now. ' + unicode(
strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(time.time()))), 'utf-8'))))
return
else:
shared.printLock.acquire()
print 'This was NOT an acknowledgement bound for me.'
#print 'ackdataForWhichImWatching', ackdataForWhichImWatching
print 'This was NOT an acknowledgement bound for me.'
# print 'ackdataForWhichImWatching', ackdataForWhichImWatching
shared.printLock.release()
#This is not an acknowledgement bound for me. See if it is a message bound for me by trying to decrypt it with my private keys.
# This is not an acknowledgement bound for me. See if it is a message
# bound for me by trying to decrypt it with my private keys.
for key, cryptorObject in shared.myECCryptorObjects.items():
try:
decryptedData = cryptorObject.decrypt(encryptedData[readPosition:])
toRipe = key #This is the RIPE hash of my pubkeys. We need this below to compare to the destination_ripe included in the encrypted data.
decryptedData = cryptorObject.decrypt(
encryptedData[readPosition:])
toRipe = key # This is the RIPE hash of my pubkeys. We need this below to compare to the destination_ripe included in the encrypted data.
initialDecryptionSuccessful = True
print 'EC decryption successful using key associated with ripe hash:', key.encode('hex')
break
except Exception, err:
except Exception as err:
pass
#print 'cryptorObject.decrypt Exception:', err
# print 'cryptorObject.decrypt Exception:', err
if not initialDecryptionSuccessful:
#This is not a message bound for me.
# This is not a message bound for me.
shared.printLock.acquire()
print 'Length of time program spent failing to decrypt this message:', time.time()- self.messageProcessingStartTime, 'seconds.'
print 'Length of time program spent failing to decrypt this message:', time.time() - self.messageProcessingStartTime, 'seconds.'
shared.printLock.release()
else:
#This is a message bound for me.
toAddress = shared.myAddressesByHash[toRipe] #Look up my address based on the RIPE hash.
# This is a message bound for me.
toAddress = shared.myAddressesByHash[
toRipe] # Look up my address based on the RIPE hash.
readPosition = 0
messageVersion, messageVersionLength = decodeVarint(decryptedData[readPosition:readPosition+10])
messageVersion, messageVersionLength = decodeVarint(
decryptedData[readPosition:readPosition + 10])
readPosition += messageVersionLength
if messageVersion != 1:
print 'Cannot understand message versions other than one. Ignoring message.'
return
sendersAddressVersionNumber, sendersAddressVersionNumberLength = decodeVarint(decryptedData[readPosition:readPosition+10])
sendersAddressVersionNumber, sendersAddressVersionNumberLength = decodeVarint(
decryptedData[readPosition:readPosition + 10])
readPosition += sendersAddressVersionNumberLength
if sendersAddressVersionNumber == 0:
print 'Cannot understand sendersAddressVersionNumber = 0. Ignoring message.'
@ -976,89 +1144,111 @@ class receiveDataThread(threading.Thread):
if len(decryptedData) < 170:
print 'Length of the unencrypted data is unreasonably short. Sanity check failed. Ignoring message.'
return
sendersStreamNumber, sendersStreamNumberLength = decodeVarint(decryptedData[readPosition:readPosition+10])
sendersStreamNumber, sendersStreamNumberLength = decodeVarint(
decryptedData[readPosition:readPosition + 10])
if sendersStreamNumber == 0:
print 'sender\'s stream number is 0. Ignoring message.'
return
readPosition += sendersStreamNumberLength
behaviorBitfield = decryptedData[readPosition:readPosition+4]
behaviorBitfield = decryptedData[readPosition:readPosition + 4]
readPosition += 4
pubSigningKey = '\x04' + decryptedData[readPosition:readPosition+64]
pubSigningKey = '\x04' + decryptedData[
readPosition:readPosition + 64]
readPosition += 64
pubEncryptionKey = '\x04' + decryptedData[readPosition:readPosition+64]
pubEncryptionKey = '\x04' + decryptedData[
readPosition:readPosition + 64]
readPosition += 64
if sendersAddressVersionNumber >= 3:
requiredAverageProofOfWorkNonceTrialsPerByte, varintLength = decodeVarint(decryptedData[readPosition:readPosition+10])
requiredAverageProofOfWorkNonceTrialsPerByte, varintLength = decodeVarint(
decryptedData[readPosition:readPosition + 10])
readPosition += varintLength
print 'sender\'s requiredAverageProofOfWorkNonceTrialsPerByte is', requiredAverageProofOfWorkNonceTrialsPerByte
requiredPayloadLengthExtraBytes, varintLength = decodeVarint(decryptedData[readPosition:readPosition+10])
requiredPayloadLengthExtraBytes, varintLength = decodeVarint(
decryptedData[readPosition:readPosition + 10])
readPosition += varintLength
print 'sender\'s requiredPayloadLengthExtraBytes is', requiredPayloadLengthExtraBytes
endOfThePublicKeyPosition = readPosition #needed for when we store the pubkey in our database of pubkeys for later use.
if toRipe != decryptedData[readPosition:readPosition+20]:
endOfThePublicKeyPosition = readPosition # needed for when we store the pubkey in our database of pubkeys for later use.
if toRipe != decryptedData[readPosition:readPosition + 20]:
shared.printLock.acquire()
print 'The original sender of this message did not send it to you. Someone is attempting a Surreptitious Forwarding Attack.'
print 'See: http://world.std.com/~dtd/sign_encrypt/sign_encrypt7.html'
print 'your toRipe:', toRipe.encode('hex')
print 'embedded destination toRipe:', decryptedData[readPosition:readPosition+20].encode('hex')
print 'embedded destination toRipe:', decryptedData[readPosition:readPosition + 20].encode('hex')
shared.printLock.release()
return
readPosition += 20
messageEncodingType, messageEncodingTypeLength = decodeVarint(decryptedData[readPosition:readPosition+10])
messageEncodingType, messageEncodingTypeLength = decodeVarint(
decryptedData[readPosition:readPosition + 10])
readPosition += messageEncodingTypeLength
messageLength, messageLengthLength = decodeVarint(decryptedData[readPosition:readPosition+10])
messageLength, messageLengthLength = decodeVarint(
decryptedData[readPosition:readPosition + 10])
readPosition += messageLengthLength
message = decryptedData[readPosition:readPosition+messageLength]
#print 'First 150 characters of message:', repr(message[:150])
message = decryptedData[readPosition:readPosition + messageLength]
# print 'First 150 characters of message:', repr(message[:150])
readPosition += messageLength
ackLength, ackLengthLength = decodeVarint(decryptedData[readPosition:readPosition+10])
ackLength, ackLengthLength = decodeVarint(
decryptedData[readPosition:readPosition + 10])
readPosition += ackLengthLength
ackData = decryptedData[readPosition:readPosition+ackLength]
ackData = decryptedData[readPosition:readPosition + ackLength]
readPosition += ackLength
positionOfBottomOfAckData = readPosition #needed to mark the end of what is covered by the signature
signatureLength, signatureLengthLength = decodeVarint(decryptedData[readPosition:readPosition+10])
positionOfBottomOfAckData = readPosition # needed to mark the end of what is covered by the signature
signatureLength, signatureLengthLength = decodeVarint(
decryptedData[readPosition:readPosition + 10])
readPosition += signatureLengthLength
signature = decryptedData[readPosition:readPosition+signatureLength]
signature = decryptedData[
readPosition:readPosition + signatureLength]
try:
if not highlevelcrypto.verify(decryptedData[:positionOfBottomOfAckData],signature,pubSigningKey.encode('hex')):
if not highlevelcrypto.verify(decryptedData[:positionOfBottomOfAckData], signature, pubSigningKey.encode('hex')):
print 'ECDSA verify failed'
return
print 'ECDSA verify passed'
except Exception, err:
except Exception as err:
print 'ECDSA verify failed', err
return
shared.printLock.acquire()
print 'As a matter of intellectual curiosity, here is the Bitcoin address associated with the keys owned by the other person:', calculateBitcoinAddressFromPubkey(pubSigningKey), ' ..and here is the testnet address:',calculateTestnetAddressFromPubkey(pubSigningKey),'. The other person must take their private signing key from Bitmessage and import it into Bitcoin (or a service like Blockchain.info) for it to be of any use. Do not use this unless you know what you are doing.'
print 'As a matter of intellectual curiosity, here is the Bitcoin address associated with the keys owned by the other person:', calculateBitcoinAddressFromPubkey(pubSigningKey), ' ..and here is the testnet address:', calculateTestnetAddressFromPubkey(pubSigningKey), '. The other person must take their private signing key from Bitmessage and import it into Bitcoin (or a service like Blockchain.info) for it to be of any use. Do not use this unless you know what you are doing.'
shared.printLock.release()
#calculate the fromRipe.
# calculate the fromRipe.
sha = hashlib.new('sha512')
sha.update(pubSigningKey+pubEncryptionKey)
sha.update(pubSigningKey + pubEncryptionKey)
ripe = hashlib.new('ripemd160')
ripe.update(sha.digest())
#Let's store the public key in case we want to reply to this person.
t = (ripe.digest(),'\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF'+'\xFF\xFF\xFF\xFF'+decryptedData[messageVersionLength:endOfThePublicKeyPosition],int(time.time()),'yes')
# Let's store the public key in case we want to reply to this
# person.
t = (ripe.digest(), '\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF' + '\xFF\xFF\xFF\xFF' + decryptedData[
messageVersionLength:endOfThePublicKeyPosition], int(time.time()), 'yes')
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''INSERT INTO pubkeys VALUES (?,?,?,?)''')
shared.sqlSubmitQueue.put(
'''INSERT INTO pubkeys VALUES (?,?,?,?)''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
#shared.workerQueue.put(('newpubkey',(sendersAddressVersionNumber,sendersStreamNumber,ripe.digest()))) #This will check to see whether we happen to be awaiting this pubkey in order to send a message. If we are, it will do the POW and send it.
# shared.workerQueue.put(('newpubkey',(sendersAddressVersionNumber,sendersStreamNumber,ripe.digest())))
# This will check to see whether we happen to be awaiting this
# pubkey in order to send a message. If we are, it will do the POW
# and send it.
self.possibleNewPubkey(ripe.digest())
fromAddress = encodeAddress(sendersAddressVersionNumber,sendersStreamNumber,ripe.digest())
#If this message is bound for one of my version 3 addresses (or higher), then we must check to make sure it meets our demanded proof of work requirement.
if decodeAddress(toAddress)[1] >= 3:#If the toAddress version number is 3 or higher:
if not shared.isAddressInMyAddressBookSubscriptionsListOrWhitelist(fromAddress): #If I'm not friendly with this person:
requiredNonceTrialsPerByte = shared.config.getint(toAddress,'noncetrialsperbyte')
requiredPayloadLengthExtraBytes = shared.config.getint(toAddress,'payloadlengthextrabytes')
if not self.isProofOfWorkSufficient(encryptedData,requiredNonceTrialsPerByte,requiredPayloadLengthExtraBytes):
fromAddress = encodeAddress(
sendersAddressVersionNumber, sendersStreamNumber, ripe.digest())
# If this message is bound for one of my version 3 addresses (or
# higher), then we must check to make sure it meets our demanded
# proof of work requirement.
if decodeAddress(toAddress)[1] >= 3: # If the toAddress version number is 3 or higher:
if not shared.isAddressInMyAddressBookSubscriptionsListOrWhitelist(fromAddress): # If I'm not friendly with this person:
requiredNonceTrialsPerByte = shared.config.getint(
toAddress, 'noncetrialsperbyte')
requiredPayloadLengthExtraBytes = shared.config.getint(
toAddress, 'payloadlengthextrabytes')
if not self.isProofOfWorkSufficient(encryptedData, requiredNonceTrialsPerByte, requiredPayloadLengthExtraBytes):
print 'Proof of work in msg message insufficient only because it does not meet our higher requirement.'
return
blockMessage = False #Gets set to True if the user shouldn't see the message according to black or white lists.
if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'black': #If we are using a blacklist
blockMessage = False # Gets set to True if the user shouldn't see the message according to black or white lists.
if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'black': # If we are using a blacklist
t = (fromAddress,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT label FROM blacklist where address=? and enabled='1' ''')
shared.sqlSubmitQueue.put(
'''SELECT label FROM blacklist where address=? and enabled='1' ''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
@ -1067,10 +1257,11 @@ class receiveDataThread(threading.Thread):
print 'Message ignored because address is in blacklist.'
shared.printLock.release()
blockMessage = True
else: #We're using a whitelist
else: # We're using a whitelist
t = (fromAddress,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT label FROM whitelist where address=? and enabled='1' ''')
shared.sqlSubmitQueue.put(
'''SELECT label FROM whitelist where address=? and enabled='1' ''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
@ -1086,11 +1277,12 @@ class receiveDataThread(threading.Thread):
toLabel = toAddress
if messageEncodingType == 2:
bodyPositionIndex = string.find(message,'\nBody:')
bodyPositionIndex = string.find(message, '\nBody:')
if bodyPositionIndex > 1:
subject = message[8:bodyPositionIndex]
subject = subject[:500] #Only save and show the first 500 characters of the subject. Any more is probably an attak.
body = message[bodyPositionIndex+6:]
subject = subject[
:500] # Only save and show the first 500 characters of the subject. Any more is probably an attak.
body = message[bodyPositionIndex + 6:]
else:
subject = ''
body = message
@ -1102,56 +1294,73 @@ class receiveDataThread(threading.Thread):
else:
body = 'Unknown encoding type.\n\n' + repr(message)
subject = ''
if messageEncodingType <> 0:
if messageEncodingType != 0:
shared.sqlLock.acquire()
t = (self.inventoryHash,toAddress,fromAddress,subject,int(time.time()),body,'inbox',messageEncodingType,0)
shared.sqlSubmitQueue.put('''INSERT INTO inbox VALUES (?,?,?,?,?,?,?,?,?)''')
t = (self.inventoryHash, toAddress, fromAddress, subject, int(
time.time()), body, 'inbox', messageEncodingType, 0)
shared.sqlSubmitQueue.put(
'''INSERT INTO inbox VALUES (?,?,?,?,?,?,?,?,?)''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.UISignalQueue.put(('displayNewInboxMessage',(self.inventoryHash,toAddress,fromAddress,subject,body)))
shared.UISignalQueue.put(('displayNewInboxMessage', (
self.inventoryHash, toAddress, fromAddress, subject, body)))
#If we are behaving as an API then we might need to run an outside command to let some program know that a new message has arrived.
if shared.safeConfigGetBoolean('bitmessagesettings','apienabled'):
# If we are behaving as an API then we might need to run an
# outside command to let some program know that a new message
# has arrived.
if shared.safeConfigGetBoolean('bitmessagesettings', 'apienabled'):
try:
apiNotifyPath = shared.config.get('bitmessagesettings','apinotifypath')
apiNotifyPath = shared.config.get(
'bitmessagesettings', 'apinotifypath')
except:
apiNotifyPath = ''
if apiNotifyPath != '':
call([apiNotifyPath, "newMessage"])
#Let us now check and see whether our receiving address is behaving as a mailing list
if shared.safeConfigGetBoolean(toAddress,'mailinglist'):
# Let us now check and see whether our receiving address is
# behaving as a mailing list
if shared.safeConfigGetBoolean(toAddress, 'mailinglist'):
try:
mailingListName = shared.config.get(toAddress, 'mailinglistname')
mailingListName = shared.config.get(
toAddress, 'mailinglistname')
except:
mailingListName = ''
#Let us send out this message as a broadcast
subject = self.addMailingListNameToSubject(subject,mailingListName)
#Let us now send this message out as a broadcast
message = strftime("%a, %Y-%m-%d %H:%M:%S UTC",gmtime()) + ' Message ostensibly from ' + fromAddress + ':\n\n' + body
fromAddress = toAddress #The fromAddress for the broadcast that we are about to send is the toAddress (my address) for the msg message we are currently processing.
ackdata = OpenSSL.rand(32) #We don't actually need the ackdata for acknowledgement since this is a broadcast message but we can use it to update the user interface when the POW is done generating.
# Let us send out this message as a broadcast
subject = self.addMailingListNameToSubject(
subject, mailingListName)
# Let us now send this message out as a broadcast
message = strftime("%a, %Y-%m-%d %H:%M:%S UTC", gmtime(
)) + ' Message ostensibly from ' + fromAddress + ':\n\n' + body
fromAddress = toAddress # The fromAddress for the broadcast that we are about to send is the toAddress (my address) for the msg message we are currently processing.
ackdata = OpenSSL.rand(
32) # We don't actually need the ackdata for acknowledgement since this is a broadcast message but we can use it to update the user interface when the POW is done generating.
toAddress = '[Broadcast subscribers]'
ripe = ''
shared.sqlLock.acquire()
t = ('',toAddress,ripe,fromAddress,subject,message,ackdata,int(time.time()),'broadcastqueued',1,1,'sent',2)
shared.sqlSubmitQueue.put('''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)''')
t = ('', toAddress, ripe, fromAddress, subject, message, ackdata, int(
time.time()), 'broadcastqueued', 1, 1, 'sent', 2)
shared.sqlSubmitQueue.put(
'''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.UISignalQueue.put(('displayNewSentMessage',(toAddress,'[Broadcast subscribers]',fromAddress,subject,message,ackdata)))
shared.workerQueue.put(('sendbroadcast',''))
shared.UISignalQueue.put(('displayNewSentMessage', (
toAddress, '[Broadcast subscribers]', fromAddress, subject, message, ackdata)))
shared.workerQueue.put(('sendbroadcast', ''))
if self.isAckDataValid(ackData):
print 'ackData is valid. Will process it.'
self.ackDataThatWeHaveYetToSend.append(ackData) #When we have processed all data, the processData function will pop the ackData out and process it as if it is a message received from our peer.
#Display timing data
timeRequiredToAttemptToDecryptMessage = time.time()- self.messageProcessingStartTime
successfullyDecryptMessageTimings.append(timeRequiredToAttemptToDecryptMessage)
self.ackDataThatWeHaveYetToSend.append(
ackData) # When we have processed all data, the processData function will pop the ackData out and process it as if it is a message received from our peer.
# Display timing data
timeRequiredToAttemptToDecryptMessage = time.time(
) - self.messageProcessingStartTime
successfullyDecryptMessageTimings.append(
timeRequiredToAttemptToDecryptMessage)
sum = 0
for item in successfullyDecryptMessageTimings:
sum += item
@ -1160,68 +1369,70 @@ class receiveDataThread(threading.Thread):
print 'Average time for all message decryption successes since startup:', sum / len(successfullyDecryptMessageTimings)
shared.printLock.release()
def isAckDataValid(self,ackData):
def isAckDataValid(self, ackData):
if len(ackData) < 24:
print 'The length of ackData is unreasonably short. Not sending ackData.'
return False
if ackData[0:4] != '\xe9\xbe\xb4\xd9':
print 'Ackdata magic bytes were wrong. Not sending ackData.'
return False
ackDataPayloadLength, = unpack('>L',ackData[16:20])
if len(ackData)-24 != ackDataPayloadLength:
ackDataPayloadLength, = unpack('>L', ackData[16:20])
if len(ackData) - 24 != ackDataPayloadLength:
print 'ackData payload length doesn\'t match the payload length specified in the header. Not sending ackdata.'
return False
if ackData[4:16] != 'getpubkey\x00\x00\x00' and ackData[4:16] != 'pubkey\x00\x00\x00\x00\x00\x00' and ackData[4:16] != 'msg\x00\x00\x00\x00\x00\x00\x00\x00\x00' and ackData[4:16] != 'broadcast\x00\x00\x00' :
if ackData[4:16] != 'getpubkey\x00\x00\x00' and ackData[4:16] != 'pubkey\x00\x00\x00\x00\x00\x00' and ackData[4:16] != 'msg\x00\x00\x00\x00\x00\x00\x00\x00\x00' and ackData[4:16] != 'broadcast\x00\x00\x00':
return False
return True
def addMailingListNameToSubject(self,subject,mailingListName):
def addMailingListNameToSubject(self, subject, mailingListName):
subject = subject.strip()
if subject[:3] == 'Re:' or subject[:3] == 'RE:':
subject = subject[3:].strip()
if '['+mailingListName+']' in subject:
if '[' + mailingListName + ']' in subject:
return subject
else:
return '['+mailingListName+'] ' + subject
return '[' + mailingListName + '] ' + subject
def possibleNewPubkey(self,toRipe):
def possibleNewPubkey(self, toRipe):
if toRipe in neededPubkeys:
print 'We have been awaiting the arrival of this pubkey.'
del neededPubkeys[toRipe]
t = (toRipe,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''UPDATE sent SET status='doingmsgpow' WHERE toripe=? AND status='awaitingpubkey' and folder='sent' ''')
shared.sqlSubmitQueue.put(
'''UPDATE sent SET status='doingmsgpow' WHERE toripe=? AND status='awaitingpubkey' and folder='sent' ''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.workerQueue.put(('sendmessage',''))
shared.workerQueue.put(('sendmessage', ''))
else:
shared.printLock.acquire()
print 'We don\'t need this pub key. We didn\'t ask for it. Pubkey hash:', toRipe.encode('hex')
shared.printLock.release()
#We have received a pubkey
def recpubkey(self,data):
# We have received a pubkey
def recpubkey(self, data):
self.pubkeyProcessingStartTime = time.time()
if len(data) < 146 or len(data) >600: #sanity check
if len(data) < 146 or len(data) > 600: # sanity check
return
#We must check to make sure the proof of work is sufficient.
# We must check to make sure the proof of work is sufficient.
if not self.isProofOfWorkSufficient(data):
print 'Proof of work in pubkey message insufficient.'
return
readPosition = 8 #for the nonce
embeddedTime, = unpack('>I',data[readPosition:readPosition+4])
readPosition = 8 # for the nonce
embeddedTime, = unpack('>I', data[readPosition:readPosition + 4])
#This section is used for the transition from 32 bit time to 64 bit time in the protocol.
# This section is used for the transition from 32 bit time to 64 bit
# time in the protocol.
if embeddedTime == 0:
embeddedTime, = unpack('>Q',data[readPosition:readPosition+8])
embeddedTime, = unpack('>Q', data[readPosition:readPosition + 8])
readPosition += 8
else:
readPosition += 4
if embeddedTime < int(time.time())-lengthOfTimeToHoldOnToAllPubkeys:
if embeddedTime < int(time.time()) - lengthOfTimeToHoldOnToAllPubkeys:
shared.printLock.acquire()
print 'The embedded time in this pubkey message is too old. Ignoring. Embedded time is:', embeddedTime
shared.printLock.release()
@ -1231,9 +1442,11 @@ class receiveDataThread(threading.Thread):
print 'The embedded time in this pubkey message more than several hours in the future. This is irrational. Ignoring message.'
shared.printLock.release()
return
addressVersion, varintLength = decodeVarint(data[readPosition:readPosition+10])
addressVersion, varintLength = decodeVarint(
data[readPosition:readPosition + 10])
readPosition += varintLength
streamNumber, varintLength = decodeVarint(data[readPosition:readPosition+10])
streamNumber, varintLength = decodeVarint(
data[readPosition:readPosition + 10])
readPosition += varintLength
if self.streamNumber != streamNumber:
print 'stream number embedded in this pubkey doesn\'t match our stream number. Ignoring.'
@ -1250,62 +1463,71 @@ class receiveDataThread(threading.Thread):
shared.inventoryLock.release()
return
objectType = 'pubkey'
shared.inventory[inventoryHash] = (objectType, self.streamNumber, data, embeddedTime)
shared.inventory[inventoryHash] = (
objectType, self.streamNumber, data, embeddedTime)
shared.inventoryLock.release()
self.broadcastinv(inventoryHash)
shared.UISignalQueue.put(('incrementNumberOfPubkeysProcessed','no data'))
shared.UISignalQueue.put((
'incrementNumberOfPubkeysProcessed', 'no data'))
self.processpubkey(data)
lengthOfTimeWeShouldUseToProcessThisMessage = .2
sleepTime = lengthOfTimeWeShouldUseToProcessThisMessage - (time.time()- self.pubkeyProcessingStartTime)
sleepTime = lengthOfTimeWeShouldUseToProcessThisMessage - \
(time.time() - self.pubkeyProcessingStartTime)
if sleepTime > 0:
shared.printLock.acquire()
print 'Timing attack mitigation: Sleeping for', sleepTime ,'seconds.'
print 'Timing attack mitigation: Sleeping for', sleepTime, 'seconds.'
shared.printLock.release()
time.sleep(sleepTime)
shared.printLock.acquire()
print 'Total pubkey processing time:', time.time()- self.pubkeyProcessingStartTime, 'seconds.'
print 'Total pubkey processing time:', time.time() - self.pubkeyProcessingStartTime, 'seconds.'
shared.printLock.release()
def processpubkey(self,data):
readPosition = 8 #for the nonce
embeddedTime, = unpack('>I',data[readPosition:readPosition+4])
def processpubkey(self, data):
readPosition = 8 # for the nonce
embeddedTime, = unpack('>I', data[readPosition:readPosition + 4])
#This section is used for the transition from 32 bit time to 64 bit time in the protocol.
# This section is used for the transition from 32 bit time to 64 bit
# time in the protocol.
if embeddedTime == 0:
embeddedTime, = unpack('>Q',data[readPosition:readPosition+8])
embeddedTime, = unpack('>Q', data[readPosition:readPosition + 8])
readPosition += 8
else:
readPosition += 4
addressVersion, varintLength = decodeVarint(data[readPosition:readPosition+10])
addressVersion, varintLength = decodeVarint(
data[readPosition:readPosition + 10])
readPosition += varintLength
streamNumber, varintLength = decodeVarint(data[readPosition:readPosition+10])
streamNumber, varintLength = decodeVarint(
data[readPosition:readPosition + 10])
readPosition += varintLength
if addressVersion == 0:
print '(Within processpubkey) addressVersion of 0 doesn\'t make sense.'
return
if addressVersion >= 4 or addressVersion == 1:
shared.printLock.acquire()
print 'This version of Bitmessage cannot handle version', addressVersion,'addresses.'
print 'This version of Bitmessage cannot handle version', addressVersion, 'addresses.'
shared.printLock.release()
return
if addressVersion == 2:
if len(data) < 146: #sanity check. This is the minimum possible length.
if len(data) < 146: # sanity check. This is the minimum possible length.
print '(within processpubkey) payloadLength less than 146. Sanity check failed.'
return
bitfieldBehaviors = data[readPosition:readPosition+4]
bitfieldBehaviors = data[readPosition:readPosition + 4]
readPosition += 4
publicSigningKey = data[readPosition:readPosition+64]
#Is it possible for a public key to be invalid such that trying to encrypt or sign with it will cause an error? If it is, we should probably test these keys here.
publicSigningKey = data[readPosition:readPosition + 64]
# Is it possible for a public key to be invalid such that trying to
# encrypt or sign with it will cause an error? If it is, we should
# probably test these keys here.
readPosition += 64
publicEncryptionKey = data[readPosition:readPosition+64]
publicEncryptionKey = data[readPosition:readPosition + 64]
if len(publicEncryptionKey) < 64:
print 'publicEncryptionKey length less than 64. Sanity check failed.'
return
sha = hashlib.new('sha512')
sha.update('\x04'+publicSigningKey+'\x04'+publicEncryptionKey)
sha.update(
'\x04' + publicSigningKey + '\x04' + publicEncryptionKey)
ripeHasher = hashlib.new('ripemd160')
ripeHasher.update(sha.digest())
ripe = ripeHasher.digest()
@ -1319,54 +1541,62 @@ class receiveDataThread(threading.Thread):
t = (ripe,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT usedpersonally FROM pubkeys WHERE hash=? AND usedpersonally='yes' ''')
shared.sqlSubmitQueue.put(
'''SELECT usedpersonally FROM pubkeys WHERE hash=? AND usedpersonally='yes' ''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn != []: #if this pubkey is already in our database and if we have used it personally:
if queryreturn != []: # if this pubkey is already in our database and if we have used it personally:
print 'We HAVE used this pubkey personally. Updating time.'
t = (ripe,data,embeddedTime,'yes')
t = (ripe, data, embeddedTime, 'yes')
else:
print 'We have NOT used this pubkey personally. Inserting in database.'
t = (ripe,data,embeddedTime,'no') #This will also update the embeddedTime.
t = (ripe, data, embeddedTime, 'no')
# This will also update the embeddedTime.
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''INSERT INTO pubkeys VALUES (?,?,?,?)''')
shared.sqlSubmitQueue.put(
'''INSERT INTO pubkeys VALUES (?,?,?,?)''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
#shared.workerQueue.put(('newpubkey',(addressVersion,streamNumber,ripe)))
# shared.workerQueue.put(('newpubkey',(addressVersion,streamNumber,ripe)))
self.possibleNewPubkey(ripe)
if addressVersion == 3:
if len(data) < 170: #sanity check.
if len(data) < 170: # sanity check.
print '(within processpubkey) payloadLength less than 170. Sanity check failed.'
return
bitfieldBehaviors = data[readPosition:readPosition+4]
bitfieldBehaviors = data[readPosition:readPosition + 4]
readPosition += 4
publicSigningKey = '\x04'+data[readPosition:readPosition+64]
#Is it possible for a public key to be invalid such that trying to encrypt or sign with it will cause an error? If it is, we should probably test these keys here.
publicSigningKey = '\x04' + data[readPosition:readPosition + 64]
# Is it possible for a public key to be invalid such that trying to
# encrypt or sign with it will cause an error? If it is, we should
# probably test these keys here.
readPosition += 64
publicEncryptionKey = '\x04'+data[readPosition:readPosition+64]
publicEncryptionKey = '\x04' + data[readPosition:readPosition + 64]
readPosition += 64
specifiedNonceTrialsPerByte, specifiedNonceTrialsPerByteLength = decodeVarint(data[readPosition:readPosition+10])
specifiedNonceTrialsPerByte, specifiedNonceTrialsPerByteLength = decodeVarint(
data[readPosition:readPosition + 10])
readPosition += specifiedNonceTrialsPerByteLength
specifiedPayloadLengthExtraBytes, specifiedPayloadLengthExtraBytesLength = decodeVarint(data[readPosition:readPosition+10])
specifiedPayloadLengthExtraBytes, specifiedPayloadLengthExtraBytesLength = decodeVarint(
data[readPosition:readPosition + 10])
readPosition += specifiedPayloadLengthExtraBytesLength
endOfSignedDataPosition = readPosition
signatureLength, signatureLengthLength = decodeVarint(data[readPosition:readPosition+10])
signatureLength, signatureLengthLength = decodeVarint(
data[readPosition:readPosition + 10])
readPosition += signatureLengthLength
signature = data[readPosition:readPosition+signatureLength]
signature = data[readPosition:readPosition + signatureLength]
try:
if not highlevelcrypto.verify(data[8:endOfSignedDataPosition],signature,publicSigningKey.encode('hex')):
if not highlevelcrypto.verify(data[8:endOfSignedDataPosition], signature, publicSigningKey.encode('hex')):
print 'ECDSA verify failed (within processpubkey)'
return
print 'ECDSA verify passed (within processpubkey)'
except Exception, err:
except Exception as err:
print 'ECDSA verify failed (within processpubkey)', err
return
sha = hashlib.new('sha512')
sha.update(publicSigningKey+publicEncryptionKey)
sha.update(publicSigningKey + publicEncryptionKey)
ripeHasher = hashlib.new('ripemd160')
ripeHasher.update(sha.digest())
ripe = ripeHasher.digest()
@ -1380,54 +1610,59 @@ class receiveDataThread(threading.Thread):
t = (ripe,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT usedpersonally FROM pubkeys WHERE hash=? AND usedpersonally='yes' ''')
shared.sqlSubmitQueue.put(
'''SELECT usedpersonally FROM pubkeys WHERE hash=? AND usedpersonally='yes' ''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn != []: #if this pubkey is already in our database and if we have used it personally:
if queryreturn != []: # if this pubkey is already in our database and if we have used it personally:
print 'We HAVE used this pubkey personally. Updating time.'
t = (ripe,data,embeddedTime,'yes')
t = (ripe, data, embeddedTime, 'yes')
else:
print 'We have NOT used this pubkey personally. Inserting in database.'
t = (ripe,data,embeddedTime,'no') #This will also update the embeddedTime.
t = (ripe, data, embeddedTime, 'no')
# This will also update the embeddedTime.
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''INSERT INTO pubkeys VALUES (?,?,?,?)''')
shared.sqlSubmitQueue.put(
'''INSERT INTO pubkeys VALUES (?,?,?,?)''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
#shared.workerQueue.put(('newpubkey',(addressVersion,streamNumber,ripe)))
# shared.workerQueue.put(('newpubkey',(addressVersion,streamNumber,ripe)))
self.possibleNewPubkey(ripe)
#We have received a getpubkey message
def recgetpubkey(self,data):
# We have received a getpubkey message
def recgetpubkey(self, data):
if not self.isProofOfWorkSufficient(data):
print 'Proof of work in getpubkey message insufficient.'
return
if len(data) < 34:
print 'getpubkey message doesn\'t contain enough data. Ignoring.'
return
readPosition = 8 #bypass the nonce
embeddedTime, = unpack('>I',data[readPosition:readPosition+4])
readPosition = 8 # bypass the nonce
embeddedTime, = unpack('>I', data[readPosition:readPosition + 4])
#This section is used for the transition from 32 bit time to 64 bit time in the protocol.
# This section is used for the transition from 32 bit time to 64 bit
# time in the protocol.
if embeddedTime == 0:
embeddedTime, = unpack('>Q',data[readPosition:readPosition+8])
embeddedTime, = unpack('>Q', data[readPosition:readPosition + 8])
readPosition += 8
else:
readPosition += 4
if embeddedTime > int(time.time())+10800:
if embeddedTime > int(time.time()) + 10800:
print 'The time in this getpubkey message is too new. Ignoring it. Time:', embeddedTime
return
if embeddedTime < int(time.time())-maximumAgeOfAnObjectThatIAmWillingToAccept:
if embeddedTime < int(time.time()) - maximumAgeOfAnObjectThatIAmWillingToAccept:
print 'The time in this getpubkey message is too old. Ignoring it. Time:', embeddedTime
return
requestedAddressVersionNumber, addressVersionLength = decodeVarint(data[readPosition:readPosition+10])
requestedAddressVersionNumber, addressVersionLength = decodeVarint(
data[readPosition:readPosition + 10])
readPosition += addressVersionLength
streamNumber, streamNumberLength = decodeVarint(data[readPosition:readPosition+10])
if streamNumber <> self.streamNumber:
streamNumber, streamNumberLength = decodeVarint(
data[readPosition:readPosition + 10])
if streamNumber != self.streamNumber:
print 'The streamNumber', streamNumber, 'doesn\'t match our stream number:', self.streamNumber
return
readPosition += streamNumberLength
@ -1444,9 +1679,10 @@ class receiveDataThread(threading.Thread):
return
objectType = 'getpubkey'
shared.inventory[inventoryHash] = (objectType, self.streamNumber, data, embeddedTime)
shared.inventory[inventoryHash] = (
objectType, self.streamNumber, data, embeddedTime)
shared.inventoryLock.release()
#This getpubkey request is valid so far. Forward to peers.
# This getpubkey request is valid so far. Forward to peers.
self.broadcastinv(inventoryHash)
if requestedAddressVersionNumber == 0:
@ -1459,43 +1695,46 @@ class receiveDataThread(threading.Thread):
print 'The requestedAddressVersionNumber of the pubkey request is too high. Can\'t understand. Ignoring it.'
return
requestedHash = data[readPosition:readPosition+20]
requestedHash = data[readPosition:readPosition + 20]
if len(requestedHash) != 20:
print 'The length of the requested hash is not 20 bytes. Something is wrong. Ignoring.'
return
print 'the hash requested in this getpubkey request is:', requestedHash.encode('hex')
if requestedHash in shared.myAddressesByHash: #if this address hash is one of mine
if requestedHash in shared.myAddressesByHash: # if this address hash is one of mine
if decodeAddress(shared.myAddressesByHash[requestedHash])[1] != requestedAddressVersionNumber:
shared.printLock.acquire()
sys.stderr.write('(Within the recgetpubkey function) Someone requested one of my pubkeys but the requestedAddressVersionNumber doesn\'t match my actual address version number. That shouldn\'t have happened. Ignoring.\n')
sys.stderr.write(
'(Within the recgetpubkey function) Someone requested one of my pubkeys but the requestedAddressVersionNumber doesn\'t match my actual address version number. That shouldn\'t have happened. Ignoring.\n')
shared.printLock.release()
return
try:
lastPubkeySendTime = int(shared.config.get(shared.myAddressesByHash[requestedHash],'lastpubkeysendtime'))
lastPubkeySendTime = int(shared.config.get(
shared.myAddressesByHash[requestedHash], 'lastpubkeysendtime'))
except:
lastPubkeySendTime = 0
if lastPubkeySendTime < time.time()-lengthOfTimeToHoldOnToAllPubkeys: #If the last time we sent our pubkey was 28 days ago
if lastPubkeySendTime < time.time() - lengthOfTimeToHoldOnToAllPubkeys: # If the last time we sent our pubkey was 28 days ago
shared.printLock.acquire()
print 'Found getpubkey-requested-hash in my list of EC hashes. Telling Worker thread to do the POW for a pubkey message and send it out.'
shared.printLock.release()
if requestedAddressVersionNumber == 2:
shared.workerQueue.put(('doPOWForMyV2Pubkey',requestedHash))
shared.workerQueue.put((
'doPOWForMyV2Pubkey', requestedHash))
elif requestedAddressVersionNumber == 3:
shared.workerQueue.put(('doPOWForMyV3Pubkey',requestedHash))
shared.workerQueue.put((
'doPOWForMyV3Pubkey', requestedHash))
else:
shared.printLock.acquire()
print 'Found getpubkey-requested-hash in my list of EC hashes BUT we already sent it recently. Ignoring request. The lastPubkeySendTime is:',lastPubkeySendTime
print 'Found getpubkey-requested-hash in my list of EC hashes BUT we already sent it recently. Ignoring request. The lastPubkeySendTime is:', lastPubkeySendTime
shared.printLock.release()
else:
shared.printLock.acquire()
print 'This getpubkey request is not for any of my keys.'
shared.printLock.release()
#We have received an inv message
def recinv(self,data):
totalNumberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave = 0 # ..from all peers, counting duplicates seperately (because they take up memory)
# We have received an inv message
def recinv(self, data):
totalNumberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave = 0 # ..from all peers, counting duplicates seperately (because they take up memory)
if len(numberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHavePerPeer) > 0:
for key, value in numberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHavePerPeer.items():
totalNumberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave += value
@ -1510,85 +1749,94 @@ class receiveDataThread(threading.Thread):
if len(data) < lengthOfVarint + (numberOfItemsInInv * 32):
print 'inv message doesn\'t contain enough data. Ignoring.'
return
if numberOfItemsInInv == 1: #we'll just request this data from the person who advertised the object.
if totalNumberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave > 200000 and len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) > 1000: #inv flooding attack mitigation
if numberOfItemsInInv == 1: # we'll just request this data from the person who advertised the object.
if totalNumberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave > 200000 and len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) > 1000: # inv flooding attack mitigation
shared.printLock.acquire()
print 'We already have', totalNumberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave, 'items yet to retrieve from peers and over 1000 from this node in particular. Ignoring this inv message.'
shared.printLock.release()
shared.printLock.release()
return
self.objectsOfWhichThisRemoteNodeIsAlreadyAware[data[lengthOfVarint:32+lengthOfVarint]] = 0
if data[lengthOfVarint:32+lengthOfVarint] in shared.inventory:
self.objectsOfWhichThisRemoteNodeIsAlreadyAware[
data[lengthOfVarint:32 + lengthOfVarint]] = 0
if data[lengthOfVarint:32 + lengthOfVarint] in shared.inventory:
shared.printLock.acquire()
print 'Inventory (in memory) has inventory item already.'
shared.printLock.release()
elif isInSqlInventory(data[lengthOfVarint:32+lengthOfVarint]):
elif isInSqlInventory(data[lengthOfVarint:32 + lengthOfVarint]):
print 'Inventory (SQL on disk) has inventory item already.'
else:
self.sendgetdata(data[lengthOfVarint:32+lengthOfVarint])
self.sendgetdata(data[lengthOfVarint:32 + lengthOfVarint])
else:
print 'inv message lists', numberOfItemsInInv, 'objects.'
for i in range(numberOfItemsInInv): #upon finishing dealing with an incoming message, the receiveDataThread will request a random object from the peer. This way if we get multiple inv messages from multiple peers which list mostly the same objects, we will make getdata requests for different random objects from the various peers.
if len(data[lengthOfVarint+(32*i):32+lengthOfVarint+(32*i)]) == 32: #The length of an inventory hash should be 32. If it isn't 32 then the remote node is either badly programmed or behaving nefariously.
if totalNumberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave > 200000 and len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) > 1000: #inv flooding attack mitigation
for i in range(numberOfItemsInInv): # upon finishing dealing with an incoming message, the receiveDataThread will request a random object from the peer. This way if we get multiple inv messages from multiple peers which list mostly the same objects, we will make getdata requests for different random objects from the various peers.
if len(data[lengthOfVarint + (32 * i):32 + lengthOfVarint + (32 * i)]) == 32: # The length of an inventory hash should be 32. If it isn't 32 then the remote node is either badly programmed or behaving nefariously.
if totalNumberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave > 200000 and len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave) > 1000: # inv flooding attack mitigation
shared.printLock.acquire()
print 'We already have', totalNumberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave, 'items yet to retrieve from peers and over',len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave),'from this node in particular. Ignoring the rest of this inv message.'
print 'We already have', totalNumberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave, 'items yet to retrieve from peers and over', len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave), 'from this node in particular. Ignoring the rest of this inv message.'
shared.printLock.release()
break
self.objectsOfWhichThisRemoteNodeIsAlreadyAware[data[lengthOfVarint+(32*i):32+lengthOfVarint+(32*i)]] = 0
self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave[data[lengthOfVarint+(32*i):32+lengthOfVarint+(32*i)]] = 0
numberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHavePerPeer[self.HOST] = len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave)
self.objectsOfWhichThisRemoteNodeIsAlreadyAware[data[
lengthOfVarint + (32 * i):32 + lengthOfVarint + (32 * i)]] = 0
self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave[
data[lengthOfVarint + (32 * i):32 + lengthOfVarint + (32 * i)]] = 0
numberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHavePerPeer[
self.HOST] = len(self.objectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHave)
#Send a getdata message to our peer to request the object with the given hash
def sendgetdata(self,hash):
# Send a getdata message to our peer to request the object with the given
# hash
def sendgetdata(self, hash):
shared.printLock.acquire()
print 'sending getdata to retrieve object with hash:', hash.encode('hex')
shared.printLock.release()
payload = '\x01' + hash
headerData = '\xe9\xbe\xb4\xd9' #magic bits, slighly different from Bitcoin's magic bits.
headerData = '\xe9\xbe\xb4\xd9' # magic bits, slighly different from Bitcoin's magic bits.
headerData += 'getdata\x00\x00\x00\x00\x00'
headerData += pack('>L',len(payload)) #payload length. Note that we add an extra 8 for the nonce.
headerData += pack('>L', len(
payload)) # payload length. Note that we add an extra 8 for the nonce.
headerData += hashlib.sha512(payload).digest()[:4]
try:
self.sock.sendall(headerData + payload)
except Exception, err:
#if not 'Bad file descriptor' in err:
except Exception as err:
# if not 'Bad file descriptor' in err:
shared.printLock.acquire()
sys.stderr.write('sock.sendall error: %s\n' % err)
shared.printLock.release()
#We have received a getdata request from our peer
# We have received a getdata request from our peer
def recgetdata(self, data):
numberOfRequestedInventoryItems, lengthOfVarint = decodeVarint(data[:10])
numberOfRequestedInventoryItems, lengthOfVarint = decodeVarint(
data[:10])
if len(data) < lengthOfVarint + (32 * numberOfRequestedInventoryItems):
print 'getdata message does not contain enough data. Ignoring.'
return
for i in xrange(numberOfRequestedInventoryItems):
hash = data[lengthOfVarint+(i*32):32+lengthOfVarint+(i*32)]
hash = data[lengthOfVarint + (
i * 32):32 + lengthOfVarint + (i * 32)]
shared.printLock.acquire()
print 'received getdata request for item:', hash.encode('hex')
shared.printLock.release()
#print 'inventory is', shared.inventory
# print 'inventory is', shared.inventory
if hash in shared.inventory:
objectType, streamNumber, payload, receivedTime = shared.inventory[hash]
self.sendData(objectType,payload)
objectType, streamNumber, payload, receivedTime = shared.inventory[
hash]
self.sendData(objectType, payload)
else:
t = (hash,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''select objecttype, payload from inventory where hash=?''')
shared.sqlSubmitQueue.put(
'''select objecttype, payload from inventory where hash=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn <> []:
if queryreturn != []:
for row in queryreturn:
objectType, payload = row
self.sendData(objectType,payload)
self.sendData(objectType, payload)
else:
print 'Someone asked for an object with a getdata which is not in either our memory inventory or our SQL inventory. That shouldn\'t have happened.'
#Our peer has requested (in a getdata message) that we send an object.
def sendData(self,objectType,payload):
headerData = '\xe9\xbe\xb4\xd9' #magic bits, slighly different from Bitcoin's magic bits.
# Our peer has requested (in a getdata message) that we send an object.
def sendData(self, objectType, payload):
headerData = '\xe9\xbe\xb4\xd9' # magic bits, slighly different from Bitcoin's magic bits.
if objectType == 'pubkey':
shared.printLock.acquire()
print 'sending pubkey'
@ -1610,31 +1858,32 @@ class receiveDataThread(threading.Thread):
shared.printLock.release()
headerData += 'broadcast\x00\x00\x00'
else:
sys.stderr.write('Error: sendData has been asked to send a strange objectType: %s\n' % str(objectType))
sys.stderr.write(
'Error: sendData has been asked to send a strange objectType: %s\n' % str(objectType))
return
headerData += pack('>L',len(payload)) #payload length.
headerData += pack('>L', len(payload)) # payload length.
headerData += hashlib.sha512(payload).digest()[:4]
try:
self.sock.sendall(headerData + payload)
except Exception, err:
#if not 'Bad file descriptor' in err:
except Exception as err:
# if not 'Bad file descriptor' in err:
shared.printLock.acquire()
sys.stderr.write('sock.sendall error: %s\n' % err)
shared.printLock.release()
#Send an inv message with just one hash to all of our peers
def broadcastinv(self,hash):
# Send an inv message with just one hash to all of our peers
def broadcastinv(self, hash):
shared.printLock.acquire()
print 'broadcasting inv with hash:', hash.encode('hex')
shared.printLock.release()
shared.broadcastToSendDataQueues((self.streamNumber, 'sendinv', hash))
#We have received an addr message.
def recaddr(self,data):
# We have received an addr message.
def recaddr(self, data):
listOfAddressDetailsToBroadcastToPeers = []
numberOfAddressesIncluded = 0
numberOfAddressesIncluded, lengthOfNumberOfAddresses = decodeVarint(data[:10])
numberOfAddressesIncluded, lengthOfNumberOfAddresses = decodeVarint(
data[:10])
if verbose >= 1:
shared.printLock.acquire()
@ -1649,86 +1898,103 @@ class receiveDataThread(threading.Thread):
return
needToWriteKnownNodesToDisk = False
for i in range(0,numberOfAddressesIncluded):
for i in range(0, numberOfAddressesIncluded):
try:
if data[16+lengthOfNumberOfAddresses+(34*i):28+lengthOfNumberOfAddresses+(34*i)] != '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF':
if data[16 + lengthOfNumberOfAddresses + (34 * i):28 + lengthOfNumberOfAddresses + (34 * i)] != '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF':
shared.printLock.acquire()
print 'Skipping IPv6 address.', repr(data[16+lengthOfNumberOfAddresses+(34*i):28+lengthOfNumberOfAddresses+(34*i)])
print 'Skipping IPv6 address.', repr(data[16 + lengthOfNumberOfAddresses + (34 * i):28 + lengthOfNumberOfAddresses + (34 * i)])
shared.printLock.release()
continue
except Exception, err:
except Exception as err:
shared.printLock.acquire()
sys.stderr.write('ERROR TRYING TO UNPACK recaddr (to test for an IPv6 address). Message: %s\n' % str(err))
sys.stderr.write(
'ERROR TRYING TO UNPACK recaddr (to test for an IPv6 address). Message: %s\n' % str(err))
shared.printLock.release()
break #giving up on unpacking any more. We should still be connected however.
break # giving up on unpacking any more. We should still be connected however.
try:
recaddrStream, = unpack('>I',data[4+lengthOfNumberOfAddresses+(34*i):8+lengthOfNumberOfAddresses+(34*i)])
except Exception, err:
recaddrStream, = unpack('>I', data[4 + lengthOfNumberOfAddresses + (
34 * i):8 + lengthOfNumberOfAddresses + (34 * i)])
except Exception as err:
shared.printLock.acquire()
sys.stderr.write('ERROR TRYING TO UNPACK recaddr (recaddrStream). Message: %s\n' % str(err))
sys.stderr.write(
'ERROR TRYING TO UNPACK recaddr (recaddrStream). Message: %s\n' % str(err))
shared.printLock.release()
break #giving up on unpacking any more. We should still be connected however.
break # giving up on unpacking any more. We should still be connected however.
if recaddrStream == 0:
continue
if recaddrStream != self.streamNumber and recaddrStream != (self.streamNumber * 2) and recaddrStream != ((self.streamNumber * 2) + 1): #if the embedded stream number is not in my stream or either of my child streams then ignore it. Someone might be trying funny business.
if recaddrStream != self.streamNumber and recaddrStream != (self.streamNumber * 2) and recaddrStream != ((self.streamNumber * 2) + 1): # if the embedded stream number is not in my stream or either of my child streams then ignore it. Someone might be trying funny business.
continue
try:
recaddrServices, = unpack('>Q',data[8+lengthOfNumberOfAddresses+(34*i):16+lengthOfNumberOfAddresses+(34*i)])
except Exception, err:
recaddrServices, = unpack('>Q', data[8 + lengthOfNumberOfAddresses + (
34 * i):16 + lengthOfNumberOfAddresses + (34 * i)])
except Exception as err:
shared.printLock.acquire()
sys.stderr.write('ERROR TRYING TO UNPACK recaddr (recaddrServices). Message: %s\n' % str(err))
sys.stderr.write(
'ERROR TRYING TO UNPACK recaddr (recaddrServices). Message: %s\n' % str(err))
shared.printLock.release()
break #giving up on unpacking any more. We should still be connected however.
break # giving up on unpacking any more. We should still be connected however.
try:
recaddrPort, = unpack('>H',data[32+lengthOfNumberOfAddresses+(34*i):34+lengthOfNumberOfAddresses+(34*i)])
except Exception, err:
recaddrPort, = unpack('>H', data[32 + lengthOfNumberOfAddresses + (
34 * i):34 + lengthOfNumberOfAddresses + (34 * i)])
except Exception as err:
shared.printLock.acquire()
sys.stderr.write('ERROR TRYING TO UNPACK recaddr (recaddrPort). Message: %s\n' % str(err))
sys.stderr.write(
'ERROR TRYING TO UNPACK recaddr (recaddrPort). Message: %s\n' % str(err))
shared.printLock.release()
break #giving up on unpacking any more. We should still be connected however.
#print 'Within recaddr(): IP', recaddrIP, ', Port', recaddrPort, ', i', i
hostFromAddrMessage = socket.inet_ntoa(data[28+lengthOfNumberOfAddresses+(34*i):32+lengthOfNumberOfAddresses+(34*i)])
#print 'hostFromAddrMessage', hostFromAddrMessage
if data[28+lengthOfNumberOfAddresses+(34*i)] == '\x7F':
break # giving up on unpacking any more. We should still be connected however.
# print 'Within recaddr(): IP', recaddrIP, ', Port',
# recaddrPort, ', i', i
hostFromAddrMessage = socket.inet_ntoa(data[
28 + lengthOfNumberOfAddresses + (34 * i):32 + lengthOfNumberOfAddresses + (34 * i)])
# print 'hostFromAddrMessage', hostFromAddrMessage
if data[28 + lengthOfNumberOfAddresses + (34 * i)] == '\x7F':
print 'Ignoring IP address in loopback range:', hostFromAddrMessage
continue
if isHostInPrivateIPRange(hostFromAddrMessage):
print 'Ignoring IP address in private range:', hostFromAddrMessage
continue
timeSomeoneElseReceivedMessageFromThisNode, = unpack('>I',data[lengthOfNumberOfAddresses+(34*i):4+lengthOfNumberOfAddresses+(34*i)]) #This is the 'time' value in the received addr message.
if recaddrStream not in shared.knownNodes: #knownNodes is a dictionary of dictionaries with one outer dictionary for each stream. If the outer stream dictionary doesn't exist yet then we must make it.
timeSomeoneElseReceivedMessageFromThisNode, = unpack('>I', data[lengthOfNumberOfAddresses + (
34 * i):4 + lengthOfNumberOfAddresses + (34 * i)]) # This is the 'time' value in the received addr message.
if recaddrStream not in shared.knownNodes: # knownNodes is a dictionary of dictionaries with one outer dictionary for each stream. If the outer stream dictionary doesn't exist yet then we must make it.
shared.knownNodesLock.acquire()
shared.knownNodes[recaddrStream] = {}
shared.knownNodesLock.release()
if hostFromAddrMessage not in shared.knownNodes[recaddrStream]:
if len(shared.knownNodes[recaddrStream]) < 20000 and timeSomeoneElseReceivedMessageFromThisNode > (int(time.time())-10800) and timeSomeoneElseReceivedMessageFromThisNode < (int(time.time()) + 10800): #If we have more than 20000 nodes in our list already then just forget about adding more. Also, make sure that the time that someone else received a message from this node is within three hours from now.
if len(shared.knownNodes[recaddrStream]) < 20000 and timeSomeoneElseReceivedMessageFromThisNode > (int(time.time()) - 10800) and timeSomeoneElseReceivedMessageFromThisNode < (int(time.time()) + 10800): # If we have more than 20000 nodes in our list already then just forget about adding more. Also, make sure that the time that someone else received a message from this node is within three hours from now.
shared.knownNodesLock.acquire()
shared.knownNodes[recaddrStream][hostFromAddrMessage] = (recaddrPort, timeSomeoneElseReceivedMessageFromThisNode)
shared.knownNodes[recaddrStream][hostFromAddrMessage] = (
recaddrPort, timeSomeoneElseReceivedMessageFromThisNode)
shared.knownNodesLock.release()
needToWriteKnownNodesToDisk = True
hostDetails = (timeSomeoneElseReceivedMessageFromThisNode, recaddrStream, recaddrServices, hostFromAddrMessage, recaddrPort)
listOfAddressDetailsToBroadcastToPeers.append(hostDetails)
hostDetails = (
timeSomeoneElseReceivedMessageFromThisNode,
recaddrStream, recaddrServices, hostFromAddrMessage, recaddrPort)
listOfAddressDetailsToBroadcastToPeers.append(
hostDetails)
else:
PORT, timeLastReceivedMessageFromThisNode = shared.knownNodes[recaddrStream][hostFromAddrMessage]#PORT in this case is either the port we used to connect to the remote node, or the port that was specified by someone else in a past addr message.
PORT, timeLastReceivedMessageFromThisNode = shared.knownNodes[recaddrStream][
hostFromAddrMessage] # PORT in this case is either the port we used to connect to the remote node, or the port that was specified by someone else in a past addr message.
if (timeLastReceivedMessageFromThisNode < timeSomeoneElseReceivedMessageFromThisNode) and (timeSomeoneElseReceivedMessageFromThisNode < int(time.time())):
shared.knownNodesLock.acquire()
shared.knownNodes[recaddrStream][hostFromAddrMessage] = (PORT, timeSomeoneElseReceivedMessageFromThisNode)
shared.knownNodes[recaddrStream][hostFromAddrMessage] = (
PORT, timeSomeoneElseReceivedMessageFromThisNode)
shared.knownNodesLock.release()
if PORT != recaddrPort:
print 'Strange occurance: The port specified in an addr message', str(recaddrPort),'does not match the port',str(PORT),'that this program (or some other peer) used to connect to it',str(hostFromAddrMessage),'. Perhaps they changed their port or are using a strange NAT configuration.'
if needToWriteKnownNodesToDisk: #Runs if any nodes were new to us. Also, share those nodes with our peers.
print 'Strange occurance: The port specified in an addr message', str(recaddrPort), 'does not match the port', str(PORT), 'that this program (or some other peer) used to connect to it', str(hostFromAddrMessage), '. Perhaps they changed their port or are using a strange NAT configuration.'
if needToWriteKnownNodesToDisk: # Runs if any nodes were new to us. Also, share those nodes with our peers.
shared.knownNodesLock.acquire()
output = open(shared.appdata + 'knownnodes.dat', 'wb')
pickle.dump(shared.knownNodes, output)
output.close()
shared.knownNodesLock.release()
self.broadcastaddr(listOfAddressDetailsToBroadcastToPeers) #no longer broadcast
self.broadcastaddr(
listOfAddressDetailsToBroadcastToPeers) # no longer broadcast
shared.printLock.acquire()
print 'knownNodes currently has', len(shared.knownNodes[self.streamNumber]), 'nodes for this stream.'
shared.printLock.release()
elif self.remoteProtocolVersion >= 2: #The difference is that in protocol version 2, network addresses use 64 bit times rather than 32 bit times.
elif self.remoteProtocolVersion >= 2: # The difference is that in protocol version 2, network addresses use 64 bit times rather than 32 bit times.
if numberOfAddressesIncluded > 1000 or numberOfAddressesIncluded == 0:
return
if len(data) != lengthOfNumberOfAddresses + (38 * numberOfAddressesIncluded):
@ -1736,82 +2002,98 @@ class receiveDataThread(threading.Thread):
return
needToWriteKnownNodesToDisk = False
for i in range(0,numberOfAddressesIncluded):
for i in range(0, numberOfAddressesIncluded):
try:
if data[20+lengthOfNumberOfAddresses+(38*i):32+lengthOfNumberOfAddresses+(38*i)] != '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF':
if data[20 + lengthOfNumberOfAddresses + (38 * i):32 + lengthOfNumberOfAddresses + (38 * i)] != '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF':
shared.printLock.acquire()
print 'Skipping IPv6 address.', repr(data[20+lengthOfNumberOfAddresses+(38*i):32+lengthOfNumberOfAddresses+(38*i)])
print 'Skipping IPv6 address.', repr(data[20 + lengthOfNumberOfAddresses + (38 * i):32 + lengthOfNumberOfAddresses + (38 * i)])
shared.printLock.release()
continue
except Exception, err:
except Exception as err:
shared.printLock.acquire()
sys.stderr.write('ERROR TRYING TO UNPACK recaddr (to test for an IPv6 address). Message: %s\n' % str(err))
sys.stderr.write(
'ERROR TRYING TO UNPACK recaddr (to test for an IPv6 address). Message: %s\n' % str(err))
shared.printLock.release()
break #giving up on unpacking any more. We should still be connected however.
break # giving up on unpacking any more. We should still be connected however.
try:
recaddrStream, = unpack('>I',data[8+lengthOfNumberOfAddresses+(38*i):12+lengthOfNumberOfAddresses+(38*i)])
except Exception, err:
recaddrStream, = unpack('>I', data[8 + lengthOfNumberOfAddresses + (
38 * i):12 + lengthOfNumberOfAddresses + (38 * i)])
except Exception as err:
shared.printLock.acquire()
sys.stderr.write('ERROR TRYING TO UNPACK recaddr (recaddrStream). Message: %s\n' % str(err))
sys.stderr.write(
'ERROR TRYING TO UNPACK recaddr (recaddrStream). Message: %s\n' % str(err))
shared.printLock.release()
break #giving up on unpacking any more. We should still be connected however.
break # giving up on unpacking any more. We should still be connected however.
if recaddrStream == 0:
continue
if recaddrStream != self.streamNumber and recaddrStream != (self.streamNumber * 2) and recaddrStream != ((self.streamNumber * 2) + 1): #if the embedded stream number is not in my stream or either of my child streams then ignore it. Someone might be trying funny business.
if recaddrStream != self.streamNumber and recaddrStream != (self.streamNumber * 2) and recaddrStream != ((self.streamNumber * 2) + 1): # if the embedded stream number is not in my stream or either of my child streams then ignore it. Someone might be trying funny business.
continue
try:
recaddrServices, = unpack('>Q',data[12+lengthOfNumberOfAddresses+(38*i):20+lengthOfNumberOfAddresses+(38*i)])
except Exception, err:
recaddrServices, = unpack('>Q', data[12 + lengthOfNumberOfAddresses + (
38 * i):20 + lengthOfNumberOfAddresses + (38 * i)])
except Exception as err:
shared.printLock.acquire()
sys.stderr.write('ERROR TRYING TO UNPACK recaddr (recaddrServices). Message: %s\n' % str(err))
sys.stderr.write(
'ERROR TRYING TO UNPACK recaddr (recaddrServices). Message: %s\n' % str(err))
shared.printLock.release()
break #giving up on unpacking any more. We should still be connected however.
break # giving up on unpacking any more. We should still be connected however.
try:
recaddrPort, = unpack('>H',data[36+lengthOfNumberOfAddresses+(38*i):38+lengthOfNumberOfAddresses+(38*i)])
except Exception, err:
recaddrPort, = unpack('>H', data[36 + lengthOfNumberOfAddresses + (
38 * i):38 + lengthOfNumberOfAddresses + (38 * i)])
except Exception as err:
shared.printLock.acquire()
sys.stderr.write('ERROR TRYING TO UNPACK recaddr (recaddrPort). Message: %s\n' % str(err))
sys.stderr.write(
'ERROR TRYING TO UNPACK recaddr (recaddrPort). Message: %s\n' % str(err))
shared.printLock.release()
break #giving up on unpacking any more. We should still be connected however.
#print 'Within recaddr(): IP', recaddrIP, ', Port', recaddrPort, ', i', i
hostFromAddrMessage = socket.inet_ntoa(data[32+lengthOfNumberOfAddresses+(38*i):36+lengthOfNumberOfAddresses+(38*i)])
#print 'hostFromAddrMessage', hostFromAddrMessage
if data[32+lengthOfNumberOfAddresses+(38*i)] == '\x7F':
break # giving up on unpacking any more. We should still be connected however.
# print 'Within recaddr(): IP', recaddrIP, ', Port',
# recaddrPort, ', i', i
hostFromAddrMessage = socket.inet_ntoa(data[
32 + lengthOfNumberOfAddresses + (38 * i):36 + lengthOfNumberOfAddresses + (38 * i)])
# print 'hostFromAddrMessage', hostFromAddrMessage
if data[32 + lengthOfNumberOfAddresses + (38 * i)] == '\x7F':
print 'Ignoring IP address in loopback range:', hostFromAddrMessage
continue
if data[32+lengthOfNumberOfAddresses+(38*i)] == '\x0A':
if data[32 + lengthOfNumberOfAddresses + (38 * i)] == '\x0A':
print 'Ignoring IP address in private range:', hostFromAddrMessage
continue
if data[32+lengthOfNumberOfAddresses+(38*i):34+lengthOfNumberOfAddresses+(38*i)] == '\xC0A8':
if data[32 + lengthOfNumberOfAddresses + (38 * i):34 + lengthOfNumberOfAddresses + (38 * i)] == '\xC0A8':
print 'Ignoring IP address in private range:', hostFromAddrMessage
continue
timeSomeoneElseReceivedMessageFromThisNode, = unpack('>Q',data[lengthOfNumberOfAddresses+(38*i):8+lengthOfNumberOfAddresses+(38*i)]) #This is the 'time' value in the received addr message. 64-bit.
if recaddrStream not in shared.knownNodes: #knownNodes is a dictionary of dictionaries with one outer dictionary for each stream. If the outer stream dictionary doesn't exist yet then we must make it.
timeSomeoneElseReceivedMessageFromThisNode, = unpack('>Q', data[lengthOfNumberOfAddresses + (
38 * i):8 + lengthOfNumberOfAddresses + (38 * i)]) # This is the 'time' value in the received addr message. 64-bit.
if recaddrStream not in shared.knownNodes: # knownNodes is a dictionary of dictionaries with one outer dictionary for each stream. If the outer stream dictionary doesn't exist yet then we must make it.
shared.knownNodesLock.acquire()
shared.knownNodes[recaddrStream] = {}
shared.knownNodesLock.release()
if hostFromAddrMessage not in shared.knownNodes[recaddrStream]:
if len(shared.knownNodes[recaddrStream]) < 20000 and timeSomeoneElseReceivedMessageFromThisNode > (int(time.time())-10800) and timeSomeoneElseReceivedMessageFromThisNode < (int(time.time()) + 10800): #If we have more than 20000 nodes in our list already then just forget about adding more. Also, make sure that the time that someone else received a message from this node is within three hours from now.
if len(shared.knownNodes[recaddrStream]) < 20000 and timeSomeoneElseReceivedMessageFromThisNode > (int(time.time()) - 10800) and timeSomeoneElseReceivedMessageFromThisNode < (int(time.time()) + 10800): # If we have more than 20000 nodes in our list already then just forget about adding more. Also, make sure that the time that someone else received a message from this node is within three hours from now.
shared.knownNodesLock.acquire()
shared.knownNodes[recaddrStream][hostFromAddrMessage] = (recaddrPort, timeSomeoneElseReceivedMessageFromThisNode)
shared.knownNodes[recaddrStream][hostFromAddrMessage] = (
recaddrPort, timeSomeoneElseReceivedMessageFromThisNode)
shared.knownNodesLock.release()
shared.printLock.acquire()
print 'added new node', hostFromAddrMessage, 'to knownNodes in stream', recaddrStream
shared.printLock.release()
needToWriteKnownNodesToDisk = True
hostDetails = (timeSomeoneElseReceivedMessageFromThisNode, recaddrStream, recaddrServices, hostFromAddrMessage, recaddrPort)
listOfAddressDetailsToBroadcastToPeers.append(hostDetails)
hostDetails = (
timeSomeoneElseReceivedMessageFromThisNode,
recaddrStream, recaddrServices, hostFromAddrMessage, recaddrPort)
listOfAddressDetailsToBroadcastToPeers.append(
hostDetails)
else:
PORT, timeLastReceivedMessageFromThisNode = shared.knownNodes[recaddrStream][hostFromAddrMessage]#PORT in this case is either the port we used to connect to the remote node, or the port that was specified by someone else in a past addr message.
PORT, timeLastReceivedMessageFromThisNode = shared.knownNodes[recaddrStream][
hostFromAddrMessage] # PORT in this case is either the port we used to connect to the remote node, or the port that was specified by someone else in a past addr message.
if (timeLastReceivedMessageFromThisNode < timeSomeoneElseReceivedMessageFromThisNode) and (timeSomeoneElseReceivedMessageFromThisNode < int(time.time())):
shared.knownNodesLock.acquire()
shared.knownNodes[recaddrStream][hostFromAddrMessage] = (PORT, timeSomeoneElseReceivedMessageFromThisNode)
shared.knownNodes[recaddrStream][hostFromAddrMessage] = (
PORT, timeSomeoneElseReceivedMessageFromThisNode)
shared.knownNodesLock.release()
if PORT != recaddrPort:
print 'Strange occurance: The port specified in an addr message', str(recaddrPort),'does not match the port',str(PORT),'that this program (or some other peer) used to connect to it',str(hostFromAddrMessage),'. Perhaps they changed their port or are using a strange NAT configuration.'
if needToWriteKnownNodesToDisk: #Runs if any nodes were new to us. Also, share those nodes with our peers.
print 'Strange occurance: The port specified in an addr message', str(recaddrPort), 'does not match the port', str(PORT), 'that this program (or some other peer) used to connect to it', str(hostFromAddrMessage), '. Perhaps they changed their port or are using a strange NAT configuration.'
if needToWriteKnownNodesToDisk: # Runs if any nodes were new to us. Also, share those nodes with our peers.
shared.knownNodesLock.acquire()
output = open(shared.appdata + 'knownnodes.dat', 'wb')
pickle.dump(shared.knownNodes, output)
@ -1821,23 +2103,28 @@ class receiveDataThread(threading.Thread):
shared.printLock.acquire()
print 'knownNodes currently has', len(shared.knownNodes[self.streamNumber]), 'nodes for this stream.'
shared.printLock.release()
#Function runs when we want to broadcast an addr message to all of our peers. Runs when we learn of nodes that we didn't previously know about and want to share them with our peers.
def broadcastaddr(self,listOfAddressDetailsToBroadcastToPeers):
numberOfAddressesInAddrMessage = len(listOfAddressDetailsToBroadcastToPeers)
# Function runs when we want to broadcast an addr message to all of our
# peers. Runs when we learn of nodes that we didn't previously know about
# and want to share them with our peers.
def broadcastaddr(self, listOfAddressDetailsToBroadcastToPeers):
numberOfAddressesInAddrMessage = len(
listOfAddressDetailsToBroadcastToPeers)
payload = ''
for hostDetails in listOfAddressDetailsToBroadcastToPeers:
timeLastReceivedMessageFromThisNode, streamNumber, services, host, port = hostDetails
payload += pack('>Q',timeLastReceivedMessageFromThisNode) #now uses 64-bit time
payload += pack('>I',streamNumber)
payload += pack('>q',services) #service bit flags offered by this node
payload += '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF' + socket.inet_aton(host)
payload += pack('>H',port)#remote port
payload += pack(
'>Q', timeLastReceivedMessageFromThisNode) # now uses 64-bit time
payload += pack('>I', streamNumber)
payload += pack(
'>q', services) # service bit flags offered by this node
payload += '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF' + \
socket.inet_aton(host)
payload += pack('>H', port) # remote port
payload = encodeVarint(numberOfAddressesInAddrMessage) + payload
datatosend = '\xE9\xBE\xB4\xD9addr\x00\x00\x00\x00\x00\x00\x00\x00'
datatosend = datatosend + pack('>L',len(payload)) #payload length
datatosend = datatosend + pack('>L', len(payload)) # payload length
datatosend = datatosend + hashlib.sha512(payload).digest()[0:4]
datatosend = datatosend + payload
@ -1845,73 +2132,90 @@ class receiveDataThread(threading.Thread):
shared.printLock.acquire()
print 'Broadcasting addr with', numberOfAddressesInAddrMessage, 'entries.'
shared.printLock.release()
shared.broadcastToSendDataQueues((self.streamNumber, 'sendaddr', datatosend))
shared.broadcastToSendDataQueues((
self.streamNumber, 'sendaddr', datatosend))
#Send a big addr message to our peer
# Send a big addr message to our peer
def sendaddr(self):
addrsInMyStream = {}
addrsInChildStreamLeft = {}
addrsInChildStreamRight = {}
#print 'knownNodes', shared.knownNodes
# print 'knownNodes', shared.knownNodes
#We are going to share a maximum number of 1000 addrs with our peer. 500 from this stream, 250 from the left child stream, and 250 from the right child stream.
# We are going to share a maximum number of 1000 addrs with our peer.
# 500 from this stream, 250 from the left child stream, and 250 from
# the right child stream.
shared.knownNodesLock.acquire()
if len(shared.knownNodes[self.streamNumber]) > 0:
for i in range(500):
random.seed()
HOST, = random.sample(shared.knownNodes[self.streamNumber], 1)
HOST, = random.sample(shared.knownNodes[self.streamNumber], 1)
if isHostInPrivateIPRange(HOST):
continue
addrsInMyStream[HOST] = shared.knownNodes[self.streamNumber][HOST]
if len(shared.knownNodes[self.streamNumber*2]) > 0:
addrsInMyStream[HOST] = shared.knownNodes[
self.streamNumber][HOST]
if len(shared.knownNodes[self.streamNumber * 2]) > 0:
for i in range(250):
random.seed()
HOST, = random.sample(shared.knownNodes[self.streamNumber*2], 1)
HOST, = random.sample(shared.knownNodes[
self.streamNumber * 2], 1)
if isHostInPrivateIPRange(HOST):
continue
addrsInChildStreamLeft[HOST] = shared.knownNodes[self.streamNumber*2][HOST]
if len(shared.knownNodes[(self.streamNumber*2)+1]) > 0:
addrsInChildStreamLeft[HOST] = shared.knownNodes[
self.streamNumber * 2][HOST]
if len(shared.knownNodes[(self.streamNumber * 2) + 1]) > 0:
for i in range(250):
random.seed()
HOST, = random.sample(shared.knownNodes[(self.streamNumber*2)+1], 1)
HOST, = random.sample(shared.knownNodes[
(self.streamNumber * 2) + 1], 1)
if isHostInPrivateIPRange(HOST):
continue
addrsInChildStreamRight[HOST] = shared.knownNodes[(self.streamNumber*2)+1][HOST]
addrsInChildStreamRight[HOST] = shared.knownNodes[
(self.streamNumber * 2) + 1][HOST]
shared.knownNodesLock.release()
numberOfAddressesInAddrMessage = 0
payload = ''
#print 'addrsInMyStream.items()', addrsInMyStream.items()
# print 'addrsInMyStream.items()', addrsInMyStream.items()
for HOST, value in addrsInMyStream.items():
PORT, timeLastReceivedMessageFromThisNode = value
if timeLastReceivedMessageFromThisNode > (int(time.time())- maximumAgeOfNodesThatIAdvertiseToOthers): #If it is younger than 3 hours old..
if timeLastReceivedMessageFromThisNode > (int(time.time()) - maximumAgeOfNodesThatIAdvertiseToOthers): # If it is younger than 3 hours old..
numberOfAddressesInAddrMessage += 1
payload += pack('>Q',timeLastReceivedMessageFromThisNode) #64-bit time
payload += pack('>I',self.streamNumber)
payload += pack('>q',1) #service bit flags offered by this node
payload += '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF' + socket.inet_aton(HOST)
payload += pack('>H',PORT)#remote port
payload += pack(
'>Q', timeLastReceivedMessageFromThisNode) # 64-bit time
payload += pack('>I', self.streamNumber)
payload += pack(
'>q', 1) # service bit flags offered by this node
payload += '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF' + \
socket.inet_aton(HOST)
payload += pack('>H', PORT) # remote port
for HOST, value in addrsInChildStreamLeft.items():
PORT, timeLastReceivedMessageFromThisNode = value
if timeLastReceivedMessageFromThisNode > (int(time.time())- maximumAgeOfNodesThatIAdvertiseToOthers): #If it is younger than 3 hours old..
if timeLastReceivedMessageFromThisNode > (int(time.time()) - maximumAgeOfNodesThatIAdvertiseToOthers): # If it is younger than 3 hours old..
numberOfAddressesInAddrMessage += 1
payload += pack('>Q',timeLastReceivedMessageFromThisNode) #64-bit time
payload += pack('>I',self.streamNumber*2)
payload += pack('>q',1) #service bit flags offered by this node
payload += '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF' + socket.inet_aton(HOST)
payload += pack('>H',PORT)#remote port
payload += pack(
'>Q', timeLastReceivedMessageFromThisNode) # 64-bit time
payload += pack('>I', self.streamNumber * 2)
payload += pack(
'>q', 1) # service bit flags offered by this node
payload += '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF' + \
socket.inet_aton(HOST)
payload += pack('>H', PORT) # remote port
for HOST, value in addrsInChildStreamRight.items():
PORT, timeLastReceivedMessageFromThisNode = value
if timeLastReceivedMessageFromThisNode > (int(time.time())- maximumAgeOfNodesThatIAdvertiseToOthers): #If it is younger than 3 hours old..
if timeLastReceivedMessageFromThisNode > (int(time.time()) - maximumAgeOfNodesThatIAdvertiseToOthers): # If it is younger than 3 hours old..
numberOfAddressesInAddrMessage += 1
payload += pack('>Q',timeLastReceivedMessageFromThisNode) #64-bit time
payload += pack('>I',(self.streamNumber*2)+1)
payload += pack('>q',1) #service bit flags offered by this node
payload += '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF' + socket.inet_aton(HOST)
payload += pack('>H',PORT)#remote port
payload += pack(
'>Q', timeLastReceivedMessageFromThisNode) # 64-bit time
payload += pack('>I', (self.streamNumber * 2) + 1)
payload += pack(
'>q', 1) # service bit flags offered by this node
payload += '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF' + \
socket.inet_aton(HOST)
payload += pack('>H', PORT) # remote port
payload = encodeVarint(numberOfAddressesInAddrMessage) + payload
datatosend = '\xE9\xBE\xB4\xD9addr\x00\x00\x00\x00\x00\x00\x00\x00'
datatosend = datatosend + pack('>L',len(payload)) #payload length
datatosend = datatosend + pack('>L', len(payload)) # payload length
datatosend = datatosend + hashlib.sha512(payload).digest()[0:4]
datatosend = datatosend + payload
try:
@ -1920,60 +2224,68 @@ class receiveDataThread(threading.Thread):
shared.printLock.acquire()
print 'Sending addr with', numberOfAddressesInAddrMessage, 'entries.'
shared.printLock.release()
except Exception, err:
#if not 'Bad file descriptor' in err:
except Exception as err:
# if not 'Bad file descriptor' in err:
shared.printLock.acquire()
sys.stderr.write('sock.sendall error: %s\n' % err)
shared.printLock.release()
#We have received a version message
def recversion(self,data):
# We have received a version message
def recversion(self, data):
if len(data) < 83:
#This version message is unreasonably short. Forget it.
# This version message is unreasonably short. Forget it.
return
elif not self.verackSent:
self.remoteProtocolVersion, = unpack('>L',data[:4])
elif not self.verackSent:
self.remoteProtocolVersion, = unpack('>L', data[:4])
if self.remoteProtocolVersion <= 1:
shared.broadcastToSendDataQueues((0, 'shutdown', self.HOST))
shared.printLock.acquire()
print 'Closing connection to old protocol version 1 node: ', self.HOST
shared.printLock.release()
return
#print 'remoteProtocolVersion', self.remoteProtocolVersion
# print 'remoteProtocolVersion', self.remoteProtocolVersion
self.myExternalIP = socket.inet_ntoa(data[40:44])
#print 'myExternalIP', self.myExternalIP
self.remoteNodeIncomingPort, = unpack('>H',data[70:72])
#print 'remoteNodeIncomingPort', self.remoteNodeIncomingPort
useragentLength, lengthOfUseragentVarint = decodeVarint(data[80:84])
# print 'myExternalIP', self.myExternalIP
self.remoteNodeIncomingPort, = unpack('>H', data[70:72])
# print 'remoteNodeIncomingPort', self.remoteNodeIncomingPort
useragentLength, lengthOfUseragentVarint = decodeVarint(
data[80:84])
readPosition = 80 + lengthOfUseragentVarint
useragent = data[readPosition:readPosition+useragentLength]
useragent = data[readPosition:readPosition + useragentLength]
readPosition += useragentLength
numberOfStreamsInVersionMessage, lengthOfNumberOfStreamsInVersionMessage = decodeVarint(data[readPosition:])
numberOfStreamsInVersionMessage, lengthOfNumberOfStreamsInVersionMessage = decodeVarint(
data[readPosition:])
readPosition += lengthOfNumberOfStreamsInVersionMessage
self.streamNumber, lengthOfRemoteStreamNumber = decodeVarint(data[readPosition:])
self.streamNumber, lengthOfRemoteStreamNumber = decodeVarint(
data[readPosition:])
shared.printLock.acquire()
print 'Remote node useragent:', useragent, ' stream number:', self.streamNumber
shared.printLock.release()
if self.streamNumber != 1:
shared.broadcastToSendDataQueues((0, 'shutdown', self.HOST))
shared.printLock.acquire()
print 'Closed connection to', self.HOST, 'because they are interested in stream', self.streamNumber,'.'
print 'Closed connection to', self.HOST, 'because they are interested in stream', self.streamNumber, '.'
shared.printLock.release()
return
shared.connectedHostsList[self.HOST] = 1 #We use this data structure to not only keep track of what hosts we are connected to so that we don't try to connect to them again, but also to list the connections count on the Network Status tab.
#If this was an incoming connection, then the sendData thread doesn't know the stream. We have to set it.
shared.connectedHostsList[
self.HOST] = 1 # We use this data structure to not only keep track of what hosts we are connected to so that we don't try to connect to them again, but also to list the connections count on the Network Status tab.
# If this was an incoming connection, then the sendData thread
# doesn't know the stream. We have to set it.
if not self.initiatedConnection:
shared.broadcastToSendDataQueues((0,'setStreamNumber',(self.HOST,self.streamNumber)))
shared.broadcastToSendDataQueues((
0, 'setStreamNumber', (self.HOST, self.streamNumber)))
if data[72:80] == eightBytesOfRandomDataUsedToDetectConnectionsToSelf:
shared.broadcastToSendDataQueues((0, 'shutdown', self.HOST))
shared.printLock.acquire()
print 'Closing connection to myself: ', self.HOST
shared.printLock.release()
return
shared.broadcastToSendDataQueues((0,'setRemoteProtocolVersion',(self.HOST,self.remoteProtocolVersion)))
shared.broadcastToSendDataQueues((0, 'setRemoteProtocolVersion', (
self.HOST, self.remoteProtocolVersion)))
shared.knownNodesLock.acquire()
shared.knownNodes[self.streamNumber][self.HOST] = (self.remoteNodeIncomingPort, int(time.time()))
shared.knownNodes[self.streamNumber][self.HOST] = (
self.remoteNodeIncomingPort, int(time.time()))
output = open(shared.appdata + 'knownnodes.dat', 'wb')
pickle.dump(shared.knownNodes, output)
output.close()
@ -1983,40 +2295,46 @@ class receiveDataThread(threading.Thread):
if self.initiatedConnection == False:
self.sendversion()
#Sends a version message
# Sends a version message
def sendversion(self):
shared.printLock.acquire()
print 'Sending version message'
shared.printLock.release()
try:
self.sock.sendall(assembleVersionMessage(self.HOST,self.PORT,self.streamNumber))
except Exception, err:
#if not 'Bad file descriptor' in err:
self.sock.sendall(assembleVersionMessage(
self.HOST, self.PORT, self.streamNumber))
except Exception as err:
# if not 'Bad file descriptor' in err:
shared.printLock.acquire()
sys.stderr.write('sock.sendall error: %s\n' % err)
shared.printLock.release()
#Sends a verack message
# Sends a verack message
def sendverack(self):
shared.printLock.acquire()
print 'Sending verack'
shared.printLock.release()
try:
self.sock.sendall('\xE9\xBE\xB4\xD9\x76\x65\x72\x61\x63\x6B\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\x83\xe1\x35')
except Exception, err:
#if not 'Bad file descriptor' in err:
self.sock.sendall(
'\xE9\xBE\xB4\xD9\x76\x65\x72\x61\x63\x6B\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\x83\xe1\x35')
except Exception as err:
# if not 'Bad file descriptor' in err:
shared.printLock.acquire()
sys.stderr.write('sock.sendall error: %s\n' % err)
shared.printLock.release()
#cf 83 e1 35
# cf
# 83
# e1
# 35
self.verackSent = True
if self.verackReceived == True:
if self.verackReceived:
self.connectionFullyEstablished()
#Every connection to a peer has a sendDataThread (and also a receiveDataThread).
# Every connection to a peer has a sendDataThread (and also a
# receiveDataThread).
class sendDataThread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.mailbox = Queue.Queue()
@ -2026,28 +2344,37 @@ class sendDataThread(threading.Thread):
shared.printLock.release()
self.data = ''
def setup(self,sock,HOST,PORT,streamNumber,objectsOfWhichThisRemoteNodeIsAlreadyAware):
def setup(
self,
sock,
HOST,
PORT,
streamNumber,
objectsOfWhichThisRemoteNodeIsAlreadyAware):
self.sock = sock
self.HOST = HOST
self.PORT = PORT
self.streamNumber = streamNumber
self.remoteProtocolVersion = -1 #This must be set using setRemoteProtocolVersion command which is sent through the self.mailbox queue.
self.lastTimeISentData = int(time.time()) #If this value increases beyond five minutes ago, we'll send a pong message to keep the connection alive.
self.remoteProtocolVersion = - \
1 # This must be set using setRemoteProtocolVersion command which is sent through the self.mailbox queue.
self.lastTimeISentData = int(
time.time()) # If this value increases beyond five minutes ago, we'll send a pong message to keep the connection alive.
self.objectsOfWhichThisRemoteNodeIsAlreadyAware = objectsOfWhichThisRemoteNodeIsAlreadyAware
shared.printLock.acquire()
print 'The streamNumber of this sendDataThread (ID:', str(id(self))+') at setup() is', self.streamNumber
print 'The streamNumber of this sendDataThread (ID:', str(id(self)) + ') at setup() is', self.streamNumber
shared.printLock.release()
def sendVersionMessage(self):
datatosend = assembleVersionMessage(self.HOST,self.PORT,self.streamNumber)#the IP and port of the remote host, and my streamNumber.
datatosend = assembleVersionMessage(
self.HOST, self.PORT, self.streamNumber) # the IP and port of the remote host, and my streamNumber.
shared.printLock.acquire()
print 'Sending version packet: ', repr(datatosend)
shared.printLock.release()
try:
self.sock.sendall(datatosend)
except Exception, err:
#if not 'Bad file descriptor' in err:
except Exception as err:
# if not 'Bad file descriptor' in err:
shared.printLock.acquire()
sys.stderr.write('sock.sendall error: %s\n' % err)
shared.printLock.release()
@ -2055,16 +2382,16 @@ class sendDataThread(threading.Thread):
def run(self):
while True:
deststream,command,data = self.mailbox.get()
#shared.printLock.acquire()
#print 'sendDataThread, destream:', deststream, ', Command:', command, ', ID:',id(self), ', HOST:', self.HOST
#shared.printLock.release()
deststream, command, data = self.mailbox.get()
# shared.printLock.acquire()
# print 'sendDataThread, destream:', deststream, ', Command:', command, ', ID:',id(self), ', HOST:', self.HOST
# shared.printLock.release()
if deststream == self.streamNumber or deststream == 0:
if command == 'shutdown':
if data == self.HOST or data == 'all':
shared.printLock.acquire()
print 'sendDataThread (associated with', self.HOST,') ID:',id(self), 'shutting down now.'
print 'sendDataThread (associated with', self.HOST, ') ID:', id(self), 'shutting down now.'
shared.printLock.release()
try:
self.sock.shutdown(socket.SHUT_RDWR)
@ -2076,24 +2403,32 @@ class sendDataThread(threading.Thread):
print 'len of sendDataQueues', len(shared.sendDataQueues)
shared.printLock.release()
break
#When you receive an incoming connection, a sendDataThread is created even though you don't yet know what stream number the remote peer is interested in. They will tell you in a version message and if you too are interested in that stream then you will continue on with the connection and will set the streamNumber of this send data thread here:
# When you receive an incoming connection, a sendDataThread is
# created even though you don't yet know what stream number the
# remote peer is interested in. They will tell you in a version
# message and if you too are interested in that stream then you
# will continue on with the connection and will set the
# streamNumber of this send data thread here:
elif command == 'setStreamNumber':
hostInMessage, specifiedStreamNumber = data
if hostInMessage == self.HOST:
shared.printLock.acquire()
print 'setting the stream number in the sendData thread (ID:',id(self), ') to', specifiedStreamNumber
print 'setting the stream number in the sendData thread (ID:', id(self), ') to', specifiedStreamNumber
shared.printLock.release()
self.streamNumber = specifiedStreamNumber
elif command == 'setRemoteProtocolVersion':
hostInMessage, specifiedRemoteProtocolVersion = data
if hostInMessage == self.HOST:
shared.printLock.acquire()
print 'setting the remote node\'s protocol version in the sendData thread (ID:',id(self), ') to', specifiedRemoteProtocolVersion
print 'setting the remote node\'s protocol version in the sendData thread (ID:', id(self), ') to', specifiedRemoteProtocolVersion
shared.printLock.release()
self.remoteProtocolVersion = specifiedRemoteProtocolVersion
elif command == 'sendaddr':
try:
#To prevent some network analysis, 'leak' the data out to our peer after waiting a random amount of time unless we have a long list of messages in our queue to send.
# To prevent some network analysis, 'leak' the data out
# to our peer after waiting a random amount of time
# unless we have a long list of messages in our queue
# to send.
random.seed()
time.sleep(random.randrange(0, 10))
self.sock.sendall(data)
@ -2106,16 +2441,17 @@ class sendDataThread(threading.Thread):
except:
pass
shared.sendDataQueues.remove(self.mailbox)
print 'sendDataThread thread (ID:',str(id(self))+') ending now. Was connected to', self.HOST
print 'sendDataThread thread (ID:', str(id(self)) + ') ending now. Was connected to', self.HOST
break
elif command == 'sendinv':
if data not in self.objectsOfWhichThisRemoteNodeIsAlreadyAware:
payload = '\x01' + data
headerData = '\xe9\xbe\xb4\xd9' #magic bits, slighly different from Bitcoin's magic bits.
headerData = '\xe9\xbe\xb4\xd9' # magic bits, slighly different from Bitcoin's magic bits.
headerData += 'inv\x00\x00\x00\x00\x00\x00\x00\x00\x00'
headerData += pack('>L',len(payload))
headerData += pack('>L', len(payload))
headerData += hashlib.sha512(payload).digest()[:4]
#To prevent some network analysis, 'leak' the data out to our peer after waiting a random amount of time
# To prevent some network analysis, 'leak' the data out
# to our peer after waiting a random amount of time
random.seed()
time.sleep(random.randrange(0, 10))
try:
@ -2129,16 +2465,17 @@ class sendDataThread(threading.Thread):
except:
pass
shared.sendDataQueues.remove(self.mailbox)
print 'sendDataThread thread (ID:',str(id(self))+') ending now. Was connected to', self.HOST
print 'sendDataThread thread (ID:', str(id(self)) + ') ending now. Was connected to', self.HOST
break
elif command == 'pong':
if self.lastTimeISentData < (int(time.time()) - 298):
#Send out a pong message to keep the connection alive.
# Send out a pong message to keep the connection alive.
shared.printLock.acquire()
print 'Sending pong to', self.HOST, 'to keep connection alive.'
shared.printLock.release()
try:
self.sock.sendall('\xE9\xBE\xB4\xD9\x70\x6F\x6E\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\x83\xe1\x35')
self.sock.sendall(
'\xE9\xBE\xB4\xD9\x70\x6F\x6E\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\x83\xe1\x35')
self.lastTimeISentData = int(time.time())
except:
print 'send pong failed'
@ -2152,11 +2489,10 @@ class sendDataThread(threading.Thread):
break
else:
shared.printLock.acquire()
print 'sendDataThread ID:',id(self),'ignoring command', command,'because the thread is not in stream',deststream
print 'sendDataThread ID:', id(self), 'ignoring command', command, 'because the thread is not in stream', deststream
shared.printLock.release()
def isInSqlInventory(hash):
t = (hash,)
shared.sqlLock.acquire()
@ -2169,6 +2505,7 @@ def isInSqlInventory(hash):
else:
return True
def convertIntToString(n):
a = __builtins__.hex(n)
if a[-1:] == 'L':
@ -2176,17 +2513,17 @@ def convertIntToString(n):
if (len(a) % 2) == 0:
return a[2:].decode('hex')
else:
return ('0'+a[2:]).decode('hex')
return ('0' + a[2:]).decode('hex')
def convertStringToInt(s):
return int(s.encode('hex'), 16)
#This function expects that pubkey begin with \x04
# This function expects that pubkey begin with \x04
def calculateBitcoinAddressFromPubkey(pubkey):
if len(pubkey)!= 65:
print 'Could not calculate Bitcoin address from pubkey because function was passed a pubkey that was', len(pubkey),'bytes long rather than 65.'
if len(pubkey) != 65:
print 'Could not calculate Bitcoin address from pubkey because function was passed a pubkey that was', len(pubkey), 'bytes long rather than 65.'
return "error"
ripe = hashlib.new('ripemd160')
sha = hashlib.new('sha256')
@ -2194,18 +2531,20 @@ def calculateBitcoinAddressFromPubkey(pubkey):
ripe.update(sha.digest())
ripeWithProdnetPrefix = '\x00' + ripe.digest()
checksum = hashlib.sha256(hashlib.sha256(ripeWithProdnetPrefix).digest()).digest()[:4]
checksum = hashlib.sha256(hashlib.sha256(
ripeWithProdnetPrefix).digest()).digest()[:4]
binaryBitcoinAddress = ripeWithProdnetPrefix + checksum
numberOfZeroBytesOnBinaryBitcoinAddress = 0
while binaryBitcoinAddress[0] == '\x00':
numberOfZeroBytesOnBinaryBitcoinAddress += 1
binaryBitcoinAddress = binaryBitcoinAddress[1:]
base58encoded = arithmetic.changebase(binaryBitcoinAddress,256,58)
return "1"*numberOfZeroBytesOnBinaryBitcoinAddress + base58encoded
base58encoded = arithmetic.changebase(binaryBitcoinAddress, 256, 58)
return "1" * numberOfZeroBytesOnBinaryBitcoinAddress + base58encoded
def calculateTestnetAddressFromPubkey(pubkey):
if len(pubkey)!= 65:
print 'Could not calculate Bitcoin address from pubkey because function was passed a pubkey that was', len(pubkey),'bytes long rather than 65.'
if len(pubkey) != 65:
print 'Could not calculate Bitcoin address from pubkey because function was passed a pubkey that was', len(pubkey), 'bytes long rather than 65.'
return "error"
ripe = hashlib.new('ripemd160')
sha = hashlib.new('sha256')
@ -2213,26 +2552,25 @@ def calculateTestnetAddressFromPubkey(pubkey):
ripe.update(sha.digest())
ripeWithProdnetPrefix = '\x6F' + ripe.digest()
checksum = hashlib.sha256(hashlib.sha256(ripeWithProdnetPrefix).digest()).digest()[:4]
checksum = hashlib.sha256(hashlib.sha256(
ripeWithProdnetPrefix).digest()).digest()[:4]
binaryBitcoinAddress = ripeWithProdnetPrefix + checksum
numberOfZeroBytesOnBinaryBitcoinAddress = 0
while binaryBitcoinAddress[0] == '\x00':
numberOfZeroBytesOnBinaryBitcoinAddress += 1
binaryBitcoinAddress = binaryBitcoinAddress[1:]
base58encoded = arithmetic.changebase(binaryBitcoinAddress,256,58)
return "1"*numberOfZeroBytesOnBinaryBitcoinAddress + base58encoded
base58encoded = arithmetic.changebase(binaryBitcoinAddress, 256, 58)
return "1" * numberOfZeroBytesOnBinaryBitcoinAddress + base58encoded
def signal_handler(signal, frame):
if shared.safeConfigGetBoolean('bitmessagesettings','daemon'):
if shared.safeConfigGetBoolean('bitmessagesettings', 'daemon'):
shared.doCleanShutdown()
sys.exit(0)
else:
print 'Unfortunately you cannot use Ctrl+C when running the UI because the UI captures the signal.'
def connectToStream(streamNumber):
selfInitiatedConnections[streamNumber] = {}
if sys.platform[0:3] == 'win':
@ -2244,9 +2582,12 @@ def connectToStream(streamNumber):
a.setup(streamNumber)
a.start()
#Does an EC point multiplication; turns a private key into a public key.
# Does an EC point multiplication; turns a private key into a public key.
def pointMult(secret):
#ctx = OpenSSL.BN_CTX_new() #This value proved to cause Seg Faults on Linux. It turns out that it really didn't speed up EC_POINT_mul anyway.
# ctx = OpenSSL.BN_CTX_new() #This value proved to cause Seg Faults on
# Linux. It turns out that it really didn't speed up EC_POINT_mul anyway.
k = OpenSSL.EC_KEY_new_by_curve_name(OpenSSL.get_curve('secp256k1'))
priv_key = OpenSSL.BN_bin2bn(secret, 32, 0)
group = OpenSSL.EC_KEY_get0_group(k)
@ -2255,52 +2596,59 @@ def pointMult(secret):
OpenSSL.EC_POINT_mul(group, pub_key, priv_key, None, None, None)
OpenSSL.EC_KEY_set_private_key(k, priv_key)
OpenSSL.EC_KEY_set_public_key(k, pub_key)
#print 'priv_key',priv_key
#print 'pub_key',pub_key
# print 'priv_key',priv_key
# print 'pub_key',pub_key
size = OpenSSL.i2o_ECPublicKey(k, 0)
mb = ctypes.create_string_buffer(size)
OpenSSL.i2o_ECPublicKey(k, ctypes.byref(ctypes.pointer(mb)))
#print 'mb.raw', mb.raw.encode('hex'), 'length:', len(mb.raw)
#print 'mb.raw', mb.raw, 'length:', len(mb.raw)
# print 'mb.raw', mb.raw.encode('hex'), 'length:', len(mb.raw)
# print 'mb.raw', mb.raw, 'length:', len(mb.raw)
OpenSSL.EC_POINT_free(pub_key)
#OpenSSL.BN_CTX_free(ctx)
# OpenSSL.BN_CTX_free(ctx)
OpenSSL.BN_free(priv_key)
OpenSSL.EC_KEY_free(k)
return mb.raw
def assembleVersionMessage(remoteHost,remotePort,myStreamNumber):
def assembleVersionMessage(remoteHost, remotePort, myStreamNumber):
shared.softwareVersion
payload = ''
payload += pack('>L',2) #protocol version.
payload += pack('>q',1) #bitflags of the services I offer.
payload += pack('>q',int(time.time()))
payload += pack('>L', 2) # protocol version.
payload += pack('>q', 1) # bitflags of the services I offer.
payload += pack('>q', int(time.time()))
payload += pack('>q',1) #boolservices of remote connection. How can I even know this for sure? This is probably ignored by the remote host.
payload += '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF' + socket.inet_aton(remoteHost)
payload += pack('>H',remotePort)#remote IPv6 and port
payload += pack(
'>q', 1) # boolservices of remote connection. How can I even know this for sure? This is probably ignored by the remote host.
payload += '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF' + \
socket.inet_aton(remoteHost)
payload += pack('>H', remotePort) # remote IPv6 and port
payload += pack('>q',1) #bitflags of the services I offer.
payload += '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF' + pack('>L',2130706433) # = 127.0.0.1. This will be ignored by the remote host. The actual remote connected IP will be used.
payload += pack('>H',shared.config.getint('bitmessagesettings', 'port'))#my external IPv6 and port
payload += pack('>q', 1) # bitflags of the services I offer.
payload += '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF' + pack(
'>L', 2130706433) # = 127.0.0.1. This will be ignored by the remote host. The actual remote connected IP will be used.
payload += pack('>H', shared.config.getint(
'bitmessagesettings', 'port')) # my external IPv6 and port
random.seed()
payload += eightBytesOfRandomDataUsedToDetectConnectionsToSelf
userAgent = '/PyBitmessage:' + shared.softwareVersion + '/' #Length of userAgent must be less than 253.
payload += pack('>B',len(userAgent)) #user agent string length. If the user agent is more than 252 bytes long, this code isn't going to work.
userAgent = '/PyBitmessage:' + shared.softwareVersion + \
'/' # Length of userAgent must be less than 253.
payload += pack('>B', len(
userAgent)) # user agent string length. If the user agent is more than 252 bytes long, this code isn't going to work.
payload += userAgent
payload += encodeVarint(1) #The number of streams about which I care. PyBitmessage currently only supports 1 per connection.
payload += encodeVarint(
1) # The number of streams about which I care. PyBitmessage currently only supports 1 per connection.
payload += encodeVarint(myStreamNumber)
datatosend = '\xe9\xbe\xb4\xd9' #magic bits, slighly different from Bitcoin's magic bits.
datatosend = datatosend + 'version\x00\x00\x00\x00\x00' #version command
datatosend = datatosend + pack('>L',len(payload)) #payload length
datatosend = '\xe9\xbe\xb4\xd9' # magic bits, slighly different from Bitcoin's magic bits.
datatosend = datatosend + 'version\x00\x00\x00\x00\x00' # version command
datatosend = datatosend + pack('>L', len(payload)) # payload length
datatosend = datatosend + hashlib.sha512(payload).digest()[0:4]
return datatosend + payload
def isHostInPrivateIPRange(host):
if host[:3] == '10.':
return True
@ -2312,58 +2660,85 @@ def isHostInPrivateIPRange(host):
return True
return False
#This thread exists because SQLITE3 is so un-threadsafe that we must submit queries to it and it puts results back in a different queue. They won't let us just use locks.
# This thread exists because SQLITE3 is so un-threadsafe that we must
# submit queries to it and it puts results back in a different queue. They
# won't let us just use locks.
class sqlThread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
self.conn = sqlite3.connect(shared.appdata + 'messages.dat' )
self.conn = sqlite3.connect(shared.appdata + 'messages.dat')
self.conn.text_factory = str
self.cur = self.conn.cursor()
try:
self.cur.execute( '''CREATE TABLE inbox (msgid blob, toaddress text, fromaddress text, subject text, received text, message text, folder text, encodingtype int, read bool, UNIQUE(msgid) ON CONFLICT REPLACE)''' )
self.cur.execute( '''CREATE TABLE sent (msgid blob, toaddress text, toripe blob, fromaddress text, subject text, message text, ackdata blob, lastactiontime integer, status text, pubkeyretrynumber integer, msgretrynumber integer, folder text, encodingtype int)''' )
self.cur.execute( '''CREATE TABLE subscriptions (label text, address text, enabled bool)''' )
self.cur.execute( '''CREATE TABLE addressbook (label text, address text)''' )
self.cur.execute( '''CREATE TABLE blacklist (label text, address text, enabled bool)''' )
self.cur.execute( '''CREATE TABLE whitelist (label text, address text, enabled bool)''' )
#Explanation of what is in the pubkeys table:
self.cur.execute(
'''CREATE TABLE inbox (msgid blob, toaddress text, fromaddress text, subject text, received text, message text, folder text, encodingtype int, read bool, UNIQUE(msgid) ON CONFLICT REPLACE)''' )
self.cur.execute(
'''CREATE TABLE sent (msgid blob, toaddress text, toripe blob, fromaddress text, subject text, message text, ackdata blob, lastactiontime integer, status text, pubkeyretrynumber integer, msgretrynumber integer, folder text, encodingtype int)''' )
self.cur.execute(
'''CREATE TABLE subscriptions (label text, address text, enabled bool)''' )
self.cur.execute(
'''CREATE TABLE addressbook (label text, address text)''' )
self.cur.execute(
'''CREATE TABLE blacklist (label text, address text, enabled bool)''' )
self.cur.execute(
'''CREATE TABLE whitelist (label text, address text, enabled bool)''' )
# Explanation of what is in the pubkeys table:
# The hash is the RIPEMD160 hash that is encoded in the Bitmessage address.
# transmitdata is literally the data that was included in the Bitmessage pubkey message when it arrived, except for the 24 byte protocol header- ie, it starts with the POW nonce.
# time is the time that the pubkey was broadcast on the network same as with every other type of Bitmessage object.
# usedpersonally is set to "yes" if we have used the key personally. This keeps us from deleting it because we may want to reply to a message in the future. This field is not a bool because we may need more flexability in the future and it doesn't take up much more space anyway.
self.cur.execute( '''CREATE TABLE pubkeys (hash blob, transmitdata blob, time int, usedpersonally text, UNIQUE(hash) ON CONFLICT REPLACE)''' )
self.cur.execute( '''CREATE TABLE inventory (hash blob, objecttype text, streamnumber int, payload blob, receivedtime integer, UNIQUE(hash) ON CONFLICT REPLACE)''' )
self.cur.execute( '''CREATE TABLE knownnodes (timelastseen int, stream int, services blob, host blob, port blob, UNIQUE(host, stream, port) ON CONFLICT REPLACE)''' ) #This table isn't used in the program yet but I have a feeling that we'll need it.
self.cur.execute( '''INSERT INTO subscriptions VALUES('Bitmessage new releases/announcements','BM-GtovgYdgs7qXPkoYaRgrLFuFKz1SFpsw',1)''')
self.cur.execute( '''CREATE TABLE settings (key blob, value blob, UNIQUE(key) ON CONFLICT REPLACE)''' )
# usedpersonally is set to "yes" if we have used the key
# personally. This keeps us from deleting it because we may want to
# reply to a message in the future. This field is not a bool
# because we may need more flexability in the future and it doesn't
# take up much more space anyway.
self.cur.execute(
'''CREATE TABLE pubkeys (hash blob, transmitdata blob, time int, usedpersonally text, UNIQUE(hash) ON CONFLICT REPLACE)''' )
self.cur.execute(
'''CREATE TABLE inventory (hash blob, objecttype text, streamnumber int, payload blob, receivedtime integer, UNIQUE(hash) ON CONFLICT REPLACE)''' )
self.cur.execute(
'''CREATE TABLE knownnodes (timelastseen int, stream int, services blob, host blob, port blob, UNIQUE(host, stream, port) ON CONFLICT REPLACE)''' )
# This table isn't used in the program yet but I
# have a feeling that we'll need it.
self.cur.execute(
'''INSERT INTO subscriptions VALUES('Bitmessage new releases/announcements','BM-GtovgYdgs7qXPkoYaRgrLFuFKz1SFpsw',1)''')
self.cur.execute(
'''CREATE TABLE settings (key blob, value blob, UNIQUE(key) ON CONFLICT REPLACE)''' )
self.cur.execute( '''INSERT INTO settings VALUES('version','1')''')
self.cur.execute( '''INSERT INTO settings VALUES('lastvacuumtime',?)''',(int(time.time()),))
self.cur.execute( '''INSERT INTO settings VALUES('lastvacuumtime',?)''', (
int(time.time()),))
self.conn.commit()
print 'Created messages database file'
except Exception, err:
except Exception as err:
if str(err) == 'table inbox already exists':
shared.printLock.acquire()
print 'Database file already exists.'
shared.printLock.release()
else:
sys.stderr.write('ERROR trying to create database file (message.dat). Error message: %s\n' % str(err))
sys.stderr.write(
'ERROR trying to create database file (message.dat). Error message: %s\n' % str(err))
os._exit(0)
#People running earlier versions of PyBitmessage do not have the usedpersonally field in their pubkeys table. Let's add it.
if shared.config.getint('bitmessagesettings','settingsversion') == 2:
# People running earlier versions of PyBitmessage do not have the
# usedpersonally field in their pubkeys table. Let's add it.
if shared.config.getint('bitmessagesettings', 'settingsversion') == 2:
item = '''ALTER TABLE pubkeys ADD usedpersonally text DEFAULT 'no' '''
parameters = ''
self.cur.execute(item, parameters)
self.conn.commit()
shared.config.set('bitmessagesettings','settingsversion','3')
shared.config.set('bitmessagesettings', 'settingsversion', '3')
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
#People running earlier versions of PyBitmessage do not have the encodingtype field in their inbox and sent tables or the read field in the inbox table. Let's add them.
if shared.config.getint('bitmessagesettings','settingsversion') == 3:
# People running earlier versions of PyBitmessage do not have the
# encodingtype field in their inbox and sent tables or the read field
# in the inbox table. Let's add them.
if shared.config.getint('bitmessagesettings', 'settingsversion') == 3:
item = '''ALTER TABLE inbox ADD encodingtype int DEFAULT '2' '''
parameters = ''
self.cur.execute(item, parameters)
@ -2377,62 +2752,84 @@ class sqlThread(threading.Thread):
self.cur.execute(item, parameters)
self.conn.commit()
shared.config.set('bitmessagesettings','settingsversion','4')
shared.config.set('bitmessagesettings', 'settingsversion', '4')
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
if shared.config.getint('bitmessagesettings','settingsversion') == 4:
shared.config.set('bitmessagesettings','defaultnoncetrialsperbyte',str(shared.networkDefaultProofOfWorkNonceTrialsPerByte))
shared.config.set('bitmessagesettings','defaultpayloadlengthextrabytes',str(shared.networkDefaultPayloadLengthExtraBytes))
shared.config.set('bitmessagesettings','settingsversion','5')
if shared.config.getint('bitmessagesettings', 'settingsversion') == 4:
shared.config.set('bitmessagesettings', 'defaultnoncetrialsperbyte', str(
shared.networkDefaultProofOfWorkNonceTrialsPerByte))
shared.config.set('bitmessagesettings', 'defaultpayloadlengthextrabytes', str(
shared.networkDefaultPayloadLengthExtraBytes))
shared.config.set('bitmessagesettings', 'settingsversion', '5')
if shared.config.getint('bitmessagesettings','settingsversion') == 5:
shared.config.set('bitmessagesettings','maxacceptablenoncetrialsperbyte','0')
shared.config.set('bitmessagesettings','maxacceptablepayloadlengthextrabytes','0')
shared.config.set('bitmessagesettings','settingsversion','6')
if shared.config.getint('bitmessagesettings', 'settingsversion') == 5:
shared.config.set(
'bitmessagesettings', 'maxacceptablenoncetrialsperbyte', '0')
shared.config.set(
'bitmessagesettings', 'maxacceptablepayloadlengthextrabytes', '0')
shared.config.set('bitmessagesettings', 'settingsversion', '6')
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
#From now on, let us keep a 'version' embedded in the messages.dat file so that when we make changes to the database, the database version we are on can stay embedded in the messages.dat file. Let us check to see if the settings table exists yet.
# From now on, let us keep a 'version' embedded in the messages.dat
# file so that when we make changes to the database, the database
# version we are on can stay embedded in the messages.dat file. Let us
# check to see if the settings table exists yet.
item = '''SELECT name FROM sqlite_master WHERE type='table' AND name='settings';'''
parameters = ''
self.cur.execute(item, parameters)
if self.cur.fetchall() == []:
#The settings table doesn't exist. We need to make it.
# The settings table doesn't exist. We need to make it.
print 'In messages.dat database, creating new \'settings\' table.'
self.cur.execute( '''CREATE TABLE settings (key text, value blob, UNIQUE(key) ON CONFLICT REPLACE)''' )
self.cur.execute(
'''CREATE TABLE settings (key text, value blob, UNIQUE(key) ON CONFLICT REPLACE)''' )
self.cur.execute( '''INSERT INTO settings VALUES('version','1')''')
self.cur.execute( '''INSERT INTO settings VALUES('lastvacuumtime',?)''',(int(time.time()),))
self.cur.execute( '''INSERT INTO settings VALUES('lastvacuumtime',?)''', (
int(time.time()),))
print 'In messages.dat database, removing an obsolete field from the pubkeys table.'
self.cur.execute( '''CREATE TEMPORARY TABLE pubkeys_backup(hash blob, transmitdata blob, time int, usedpersonally text, UNIQUE(hash) ON CONFLICT REPLACE);''')
self.cur.execute( '''INSERT INTO pubkeys_backup SELECT hash, transmitdata, time, usedpersonally FROM pubkeys;''')
self.cur.execute(
'''CREATE TEMPORARY TABLE pubkeys_backup(hash blob, transmitdata blob, time int, usedpersonally text, UNIQUE(hash) ON CONFLICT REPLACE);''')
self.cur.execute(
'''INSERT INTO pubkeys_backup SELECT hash, transmitdata, time, usedpersonally FROM pubkeys;''')
self.cur.execute( '''DROP TABLE pubkeys''')
self.cur.execute( '''CREATE TABLE pubkeys (hash blob, transmitdata blob, time int, usedpersonally text, UNIQUE(hash) ON CONFLICT REPLACE)''' )
self.cur.execute( '''INSERT INTO pubkeys SELECT hash, transmitdata, time, usedpersonally FROM pubkeys_backup;''')
self.cur.execute(
'''CREATE TABLE pubkeys (hash blob, transmitdata blob, time int, usedpersonally text, UNIQUE(hash) ON CONFLICT REPLACE)''' )
self.cur.execute(
'''INSERT INTO pubkeys SELECT hash, transmitdata, time, usedpersonally FROM pubkeys_backup;''')
self.cur.execute( '''DROP TABLE pubkeys_backup;''')
print 'Deleting all pubkeys from inventory. They will be redownloaded and then saved with the correct times.'
self.cur.execute( '''delete from inventory where objecttype = 'pubkey';''')
self.cur.execute(
'''delete from inventory where objecttype = 'pubkey';''')
print 'replacing Bitmessage announcements mailing list with a new one.'
self.cur.execute( '''delete from subscriptions where address='BM-BbkPSZbzPwpVcYZpU4yHwf9ZPEapN5Zx' ''')
self.cur.execute( '''INSERT INTO subscriptions VALUES('Bitmessage new releases/announcements','BM-GtovgYdgs7qXPkoYaRgrLFuFKz1SFpsw',1)''')
self.cur.execute(
'''delete from subscriptions where address='BM-BbkPSZbzPwpVcYZpU4yHwf9ZPEapN5Zx' ''')
self.cur.execute(
'''INSERT INTO subscriptions VALUES('Bitmessage new releases/announcements','BM-GtovgYdgs7qXPkoYaRgrLFuFKz1SFpsw',1)''')
print 'Commiting.'
self.conn.commit()
print 'Vacuuming message.dat. You might notice that the file size gets much smaller.'
self.cur.execute( ''' VACUUM ''')
#After code refactoring, the possible status values for sent messages as changed.
self.cur.execute( '''update sent set status='doingmsgpow' where status='doingpow' ''')
self.cur.execute( '''update sent set status='msgsent' where status='sentmessage' ''')
self.cur.execute( '''update sent set status='doingpubkeypow' where status='findingpubkey' ''')
self.cur.execute( '''update sent set status='broadcastqueued' where status='broadcastpending' ''')
# After code refactoring, the possible status values for sent messages
# as changed.
self.cur.execute(
'''update sent set status='doingmsgpow' where status='doingpow' ''')
self.cur.execute(
'''update sent set status='msgsent' where status='sentmessage' ''')
self.cur.execute(
'''update sent set status='doingpubkeypow' where status='findingpubkey' ''')
self.cur.execute(
'''update sent set status='broadcastqueued' where status='broadcastpending' ''')
self.conn.commit()
try:
testpayload = '\x00\x00'
t = ('1234',testpayload,'12345678','no')
self.cur.execute( '''INSERT INTO pubkeys VALUES(?,?,?,?)''',t)
t = ('1234', testpayload, '12345678', 'no')
self.cur.execute( '''INSERT INTO pubkeys VALUES(?,?,?,?)''', t)
self.conn.commit()
self.cur.execute('''SELECT transmitdata FROM pubkeys WHERE hash='1234' ''')
self.cur.execute(
'''SELECT transmitdata FROM pubkeys WHERE hash='1234' ''')
queryreturn = self.cur.fetchall()
for row in queryreturn:
transmitdata, = row
@ -2442,10 +2839,11 @@ class sqlThread(threading.Thread):
sys.stderr.write('Problem: The version of SQLite you have cannot store Null values. Please download and install the latest revision of your version of Python (for example, the latest Python 2.7 revision) and try again.\n')
sys.stderr.write('PyBitmessage will now exit very abruptly. You may now see threading errors related to this abrupt exit but the problem you need to solve is related to SQLite.\n\n')
os._exit(0)
except Exception, err:
except Exception as err:
print err
#Let us check to see the last time we vaccumed the messages.dat file. If it has been more than a month let's do it now.
# Let us check to see the last time we vaccumed the messages.dat file.
# If it has been more than a month let's do it now.
item = '''SELECT value FROM settings WHERE key='lastvacuumtime';'''
parameters = ''
self.cur.execute(item, parameters)
@ -2475,8 +2873,9 @@ class sqlThread(threading.Thread):
shared.printLock.release()
self.conn.commit()
self.conn.close()
shutil.move(shared.lookupAppdataFolder()+'messages.dat','messages.dat')
self.conn = sqlite3.connect('messages.dat' )
shutil.move(
shared.lookupAppdataFolder() + 'messages.dat', 'messages.dat')
self.conn = sqlite3.connect('messages.dat')
self.conn.text_factory = str
self.cur = self.conn.cursor()
elif item == 'movemessagstoappdata':
@ -2485,8 +2884,9 @@ class sqlThread(threading.Thread):
shared.printLock.release()
self.conn.commit()
self.conn.close()
shutil.move('messages.dat',shared.lookupAppdataFolder()+'messages.dat')
self.conn = sqlite3.connect(shared.appdata + 'messages.dat' )
shutil.move(
'messages.dat', shared.lookupAppdataFolder() + 'messages.dat')
self.conn = sqlite3.connect(shared.appdata + 'messages.dat')
self.conn.text_factory = str
self.cur = self.conn.cursor()
elif item == 'deleteandvacuume':
@ -2496,19 +2896,20 @@ class sqlThread(threading.Thread):
self.cur.execute( ''' VACUUM ''')
else:
parameters = shared.sqlSubmitQueue.get()
#print 'item', item
#print 'parameters', parameters
# print 'item', item
# print 'parameters', parameters
try:
self.cur.execute(item, parameters)
except Exception, err:
except Exception as err:
shared.printLock.acquire()
sys.stderr.write('\nMajor error occurred when trying to execute a SQL statement within the sqlThread. Please tell Atheros about this error message or post it in the forum! Error occurred while trying to execute statement: "'+str(item) + '" Here are the parameters; you might want to censor this data with asterisks (***) as it can contain private information: '+str(repr(parameters))+'\nHere is the actual error message thrown by the sqlThread: '+ str(err)+'\n')
sys.stderr.write('\nMajor error occurred when trying to execute a SQL statement within the sqlThread. Please tell Atheros about this error message or post it in the forum! Error occurred while trying to execute statement: "' + str(
item) + '" Here are the parameters; you might want to censor this data with asterisks (***) as it can contain private information: ' + str(repr(parameters)) + '\nHere is the actual error message thrown by the sqlThread: ' + str(err) + '\n')
sys.stderr.write('This program shall now abruptly exit!\n')
shared.printLock.release()
os._exit(0)
shared.sqlReturnQueue.put(self.cur.fetchall())
#shared.sqlSubmitQueue.task_done()
# shared.sqlSubmitQueue.task_done()
'''The singleCleaner class is a timer-driven thread that cleans data structures to free memory, resends messages when a remote node doesn't respond, and sends pong messages to keep connections alive if the network isn't busy.
@ -2524,7 +2925,10 @@ It resends messages when there has been no response:
resends msg messages in 4 days (then 8 days, then 16 days, etc...)
'''
class singleCleaner(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
@ -2533,47 +2937,59 @@ class singleCleaner(threading.Thread):
while True:
shared.sqlLock.acquire()
shared.UISignalQueue.put(('updateStatusBar','Doing housekeeping (Flushing inventory in memory to disk...)'))
shared.UISignalQueue.put((
'updateStatusBar', 'Doing housekeeping (Flushing inventory in memory to disk...)'))
for hash, storedValue in shared.inventory.items():
objectType, streamNumber, payload, receivedTime = storedValue
if int(time.time())- 3600 > receivedTime:
t = (hash,objectType,streamNumber,payload,receivedTime)
shared.sqlSubmitQueue.put('''INSERT INTO inventory VALUES (?,?,?,?,?)''')
if int(time.time()) - 3600 > receivedTime:
t = (hash, objectType, streamNumber, payload, receivedTime)
shared.sqlSubmitQueue.put(
'''INSERT INTO inventory VALUES (?,?,?,?,?)''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
del shared.inventory[hash]
shared.sqlSubmitQueue.put('commit')
shared.UISignalQueue.put(('updateStatusBar',''))
shared.UISignalQueue.put(('updateStatusBar', ''))
shared.sqlLock.release()
shared.broadcastToSendDataQueues((0, 'pong', 'no data')) #commands the sendData threads to send out a pong message if they haven't sent anything else in the last five minutes. The socket timeout-time is 10 minutes.
#If we are running as a daemon then we are going to fill up the UI queue which will never be handled by a UI. We should clear it to save memory.
if shared.safeConfigGetBoolean('bitmessagesettings','daemon'):
shared.broadcastToSendDataQueues((
0, 'pong', 'no data')) # commands the sendData threads to send out a pong message if they haven't sent anything else in the last five minutes. The socket timeout-time is 10 minutes.
# If we are running as a daemon then we are going to fill up the UI
# queue which will never be handled by a UI. We should clear it to
# save memory.
if shared.safeConfigGetBoolean('bitmessagesettings', 'daemon'):
shared.UISignalQueue.queue.clear()
if timeWeLastClearedInventoryAndPubkeysTables < int(time.time()) - 7380:
timeWeLastClearedInventoryAndPubkeysTables = int(time.time())
#inventory (moves data from the inventory data structure to the on-disk sql database)
# inventory (moves data from the inventory data structure to
# the on-disk sql database)
shared.sqlLock.acquire()
#inventory (clears pubkeys after 28 days and everything else after 2 days and 12 hours)
t = (int(time.time())-lengthOfTimeToLeaveObjectsInInventory,int(time.time())-lengthOfTimeToHoldOnToAllPubkeys)
shared.sqlSubmitQueue.put('''DELETE FROM inventory WHERE (receivedtime<? AND objecttype<>'pubkey') OR (receivedtime<? AND objecttype='pubkey') ''')
# inventory (clears pubkeys after 28 days and everything else
# after 2 days and 12 hours)
t = (int(time.time()) - lengthOfTimeToLeaveObjectsInInventory, int(
time.time()) - lengthOfTimeToHoldOnToAllPubkeys)
shared.sqlSubmitQueue.put(
'''DELETE FROM inventory WHERE (receivedtime<? AND objecttype<>'pubkey') OR (receivedtime<? AND objecttype='pubkey') ''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
#pubkeys
t = (int(time.time())-lengthOfTimeToHoldOnToAllPubkeys,)
shared.sqlSubmitQueue.put('''DELETE FROM pubkeys WHERE time<? AND usedpersonally='no' ''')
# pubkeys
t = (int(time.time()) - lengthOfTimeToHoldOnToAllPubkeys,)
shared.sqlSubmitQueue.put(
'''DELETE FROM pubkeys WHERE time<? AND usedpersonally='no' ''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
t = ()
shared.sqlSubmitQueue.put('''select toaddress, toripe, fromaddress, subject, message, ackdata, lastactiontime, status, pubkeyretrynumber, msgretrynumber FROM sent WHERE ((status='awaitingpubkey' OR status='msgsent') AND folder='sent') ''') #If the message's folder='trash' then we'll ignore it.
shared.sqlSubmitQueue.put(
'''select toaddress, toripe, fromaddress, subject, message, ackdata, lastactiontime, status, pubkeyretrynumber, msgretrynumber FROM sent WHERE ((status='awaitingpubkey' OR status='msgsent') AND folder='sent') ''') # If the message's folder='trash' then we'll ignore it.
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
for row in queryreturn:
if len(row) < 5:
shared.printLock.acquire()
sys.stderr.write('Something went wrong in the singleCleaner thread: a query did not return the requested fields. '+repr(row))
sys.stderr.write(
'Something went wrong in the singleCleaner thread: a query did not return the requested fields. ' + repr(row))
time.sleep(3)
shared.printLock.release()
break
@ -2582,40 +2998,52 @@ class singleCleaner(threading.Thread):
if int(time.time()) - lastactiontime > (maximumAgeOfAnObjectThatIAmWillingToAccept * (2 ** (pubkeyretrynumber))):
print 'It has been a long time and we haven\'t heard a response to our getpubkey request. Sending again.'
try:
del neededPubkeys[toripe] #We need to take this entry out of the neededPubkeys structure because the shared.workerQueue checks to see whether the entry is already present and will not do the POW and send the message because it assumes that it has already done it recently.
del neededPubkeys[
toripe] # We need to take this entry out of the neededPubkeys structure because the shared.workerQueue checks to see whether the entry is already present and will not do the POW and send the message because it assumes that it has already done it recently.
except:
pass
shared.UISignalQueue.put(('updateStatusBar','Doing work necessary to again attempt to request a public key...'))
t = (int(time.time()),pubkeyretrynumber+1,toripe)
shared.sqlSubmitQueue.put('''UPDATE sent SET lastactiontime=?, pubkeyretrynumber=?, status='msgqueued' WHERE toripe=?''')
shared.UISignalQueue.put((
'updateStatusBar', 'Doing work necessary to again attempt to request a public key...'))
t = (int(
time.time()), pubkeyretrynumber + 1, toripe)
shared.sqlSubmitQueue.put(
'''UPDATE sent SET lastactiontime=?, pubkeyretrynumber=?, status='msgqueued' WHERE toripe=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.workerQueue.put(('sendmessage',''))
else:# status == msgsent
shared.workerQueue.put(('sendmessage', ''))
else: # status == msgsent
if int(time.time()) - lastactiontime > (maximumAgeOfAnObjectThatIAmWillingToAccept * (2 ** (msgretrynumber))):
print 'It has been a long time and we haven\'t heard an acknowledgement to our msg. Sending again.'
t = (int(time.time()),msgretrynumber+1,'msgqueued',ackdata)
shared.sqlSubmitQueue.put('''UPDATE sent SET lastactiontime=?, msgretrynumber=?, status=? WHERE ackdata=?''')
t = (int(
time.time()), msgretrynumber + 1, 'msgqueued', ackdata)
shared.sqlSubmitQueue.put(
'''UPDATE sent SET lastactiontime=?, msgretrynumber=?, status=? WHERE ackdata=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.workerQueue.put(('sendmessage',''))
shared.UISignalQueue.put(('updateStatusBar','Doing work necessary to again attempt to deliver a message...'))
shared.workerQueue.put(('sendmessage', ''))
shared.UISignalQueue.put((
'updateStatusBar', 'Doing work necessary to again attempt to deliver a message...'))
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
time.sleep(300)
#This thread, of which there is only one, does the heavy lifting: calculating POWs.
# This thread, of which there is only one, does the heavy lifting:
# calculating POWs.
class singleWorker(threading.Thread):
def __init__(self):
#QThread.__init__(self, parent)
# QThread.__init__(self, parent)
threading.Thread.__init__(self)
def run(self):
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT toripe FROM sent WHERE ((status='awaitingpubkey' OR status='doingpubkeypow') AND folder='sent')''')
shared.sqlSubmitQueue.put(
'''SELECT toripe FROM sent WHERE ((status='awaitingpubkey' OR status='doingpubkeypow') AND folder='sent')''')
shared.sqlSubmitQueue.put('')
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
@ -2623,30 +3051,38 @@ class singleWorker(threading.Thread):
toripe, = row
neededPubkeys[toripe] = 0
#Initialize the ackdataForWhichImWatching data structure using data from the sql database.
# Initialize the ackdataForWhichImWatching data structure using data
# from the sql database.
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT ackdata FROM sent where (status='msgsent' OR status='doingmsgpow')''')
shared.sqlSubmitQueue.put(
'''SELECT ackdata FROM sent where (status='msgsent' OR status='doingmsgpow')''')
shared.sqlSubmitQueue.put('')
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
for row in queryreturn:
ackdata, = row
ackdata, = row
print 'Watching for ackdata', ackdata.encode('hex')
ackdataForWhichImWatching[ackdata] = 0
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT DISTINCT toaddress FROM sent WHERE (status='doingpubkeypow' AND folder='sent')''')
shared.sqlSubmitQueue.put(
'''SELECT DISTINCT toaddress FROM sent WHERE (status='doingpubkeypow' AND folder='sent')''')
shared.sqlSubmitQueue.put('')
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
for row in queryreturn:
toaddress, = row
self.requestPubKey(toaddress)
time.sleep(10) #give some time for the GUI to start before we start on existing POW tasks.
self.sendMsg() #just in case there are any pending tasks for msg messages that have yet to be sent.
self.sendBroadcast() #just in case there are any tasks for Broadcasts that have yet to be sent.
time.sleep(
10) # give some time for the GUI to start before we start on existing POW tasks.
self.sendMsg()
# just in case there are any pending tasks for msg
# messages that have yet to be sent.
self.sendBroadcast()
# just in case there are any tasks for Broadcasts
# that have yet to be sent.
while True:
command, data = shared.workerQueue.get()
@ -2677,12 +3113,13 @@ class singleWorker(threading.Thread):
shared.printLock.release()"""
else:
shared.printLock.acquire()
sys.stderr.write('Probable programming error: The command sent to the workerThread is weird. It is: %s\n' % command)
sys.stderr.write(
'Probable programming error: The command sent to the workerThread is weird. It is: %s\n' % command)
shared.printLock.release()
shared.workerQueue.task_done()
def doPOWForMyV2Pubkey(self,hash): #This function also broadcasts out the pubkey message once it is done with the POW
#Look up my stream number based on my address hash
def doPOWForMyV2Pubkey(self, hash): # This function also broadcasts out the pubkey message once it is done with the POW
# Look up my stream number based on my address hash
"""configSections = shared.config.sections()
for addressInKeysFile in configSections:
if addressInKeysFile <> 'bitmessagesettings':
@ -2691,37 +3128,47 @@ class singleWorker(threading.Thread):
myAddress = addressInKeysFile
break"""
myAddress = shared.myAddressesByHash[hash]
status,addressVersionNumber,streamNumber,hash = decodeAddress(myAddress)
embeddedTime = int(time.time()+random.randrange(-300, 300)) #the current time plus or minus five minutes
payload = pack('>I',(embeddedTime))
payload += encodeVarint(addressVersionNumber) #Address version number
status, addressVersionNumber, streamNumber, hash = decodeAddress(
myAddress)
embeddedTime = int(time.time() + random.randrange(
-300, 300)) # the current time plus or minus five minutes
payload = pack('>I', (embeddedTime))
payload += encodeVarint(addressVersionNumber) # Address version number
payload += encodeVarint(streamNumber)
payload += '\x00\x00\x00\x01' #bitfield of features supported by me (see the wiki).
payload += '\x00\x00\x00\x01' # bitfield of features supported by me (see the wiki).
try:
privSigningKeyBase58 = shared.config.get(myAddress, 'privsigningkey')
privEncryptionKeyBase58 = shared.config.get(myAddress, 'privencryptionkey')
except Exception, err:
privSigningKeyBase58 = shared.config.get(
myAddress, 'privsigningkey')
privEncryptionKeyBase58 = shared.config.get(
myAddress, 'privencryptionkey')
except Exception as err:
shared.printLock.acquire()
sys.stderr.write('Error within doPOWForMyV2Pubkey. Could not read the keys from the keys.dat file for a requested address. %s\n' % err)
sys.stderr.write(
'Error within doPOWForMyV2Pubkey. Could not read the keys from the keys.dat file for a requested address. %s\n' % err)
shared.printLock.release()
return
privSigningKeyHex = shared.decodeWalletImportFormat(privSigningKeyBase58).encode('hex')
privEncryptionKeyHex = shared.decodeWalletImportFormat(privEncryptionKeyBase58).encode('hex')
pubSigningKey = highlevelcrypto.privToPub(privSigningKeyHex).decode('hex')
pubEncryptionKey = highlevelcrypto.privToPub(privEncryptionKeyHex).decode('hex')
privSigningKeyHex = shared.decodeWalletImportFormat(
privSigningKeyBase58).encode('hex')
privEncryptionKeyHex = shared.decodeWalletImportFormat(
privEncryptionKeyBase58).encode('hex')
pubSigningKey = highlevelcrypto.privToPub(
privSigningKeyHex).decode('hex')
pubEncryptionKey = highlevelcrypto.privToPub(
privEncryptionKeyHex).decode('hex')
payload += pubSigningKey[1:]
payload += pubEncryptionKey[1:]
#Do the POW for this pubkey message
target = 2**64 / ((len(payload)+shared.networkDefaultPayloadLengthExtraBytes+8) * shared.networkDefaultProofOfWorkNonceTrialsPerByte)
# Do the POW for this pubkey message
target = 2 ** 64 / ((len(payload) + shared.networkDefaultPayloadLengthExtraBytes +
8) * shared.networkDefaultProofOfWorkNonceTrialsPerByte)
print '(For pubkey message) Doing proof of work...'
initialHash = hashlib.sha512(payload).digest()
trialValue, nonce = proofofwork.run(target, initialHash)
print '(For pubkey message) Found proof of work', trialValue, 'Nonce:', nonce
payload = pack('>Q',nonce) + payload
payload = pack('>Q', nonce) + payload
"""t = (hash,payload,embeddedTime,'no')
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''INSERT INTO pubkeys VALUES (?,?,?,?)''')
@ -2732,57 +3179,72 @@ class singleWorker(threading.Thread):
inventoryHash = calculateInventoryHash(payload)
objectType = 'pubkey'
shared.inventory[inventoryHash] = (objectType, streamNumber, payload, embeddedTime)
shared.inventory[inventoryHash] = (
objectType, streamNumber, payload, embeddedTime)
shared.printLock.acquire()
print 'broadcasting inv with hash:', inventoryHash.encode('hex')
shared.printLock.release()
shared.broadcastToSendDataQueues((streamNumber, 'sendinv', inventoryHash))
shared.UISignalQueue.put(('updateStatusBar',''))
shared.config.set(myAddress,'lastpubkeysendtime',str(int(time.time())))
shared.broadcastToSendDataQueues((
streamNumber, 'sendinv', inventoryHash))
shared.UISignalQueue.put(('updateStatusBar', ''))
shared.config.set(
myAddress, 'lastpubkeysendtime', str(int(time.time())))
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
def doPOWForMyV3Pubkey(self,hash): #This function also broadcasts out the pubkey message once it is done with the POW
def doPOWForMyV3Pubkey(self, hash): # This function also broadcasts out the pubkey message once it is done with the POW
myAddress = shared.myAddressesByHash[hash]
status,addressVersionNumber,streamNumber,hash = decodeAddress(myAddress)
embeddedTime = int(time.time()+random.randrange(-300, 300)) #the current time plus or minus five minutes
payload = pack('>I',(embeddedTime))
payload += encodeVarint(addressVersionNumber) #Address version number
status, addressVersionNumber, streamNumber, hash = decodeAddress(
myAddress)
embeddedTime = int(time.time() + random.randrange(
-300, 300)) # the current time plus or minus five minutes
payload = pack('>I', (embeddedTime))
payload += encodeVarint(addressVersionNumber) # Address version number
payload += encodeVarint(streamNumber)
payload += '\x00\x00\x00\x01' #bitfield of features supported by me (see the wiki).
payload += '\x00\x00\x00\x01' # bitfield of features supported by me (see the wiki).
try:
privSigningKeyBase58 = shared.config.get(myAddress, 'privsigningkey')
privEncryptionKeyBase58 = shared.config.get(myAddress, 'privencryptionkey')
except Exception, err:
privSigningKeyBase58 = shared.config.get(
myAddress, 'privsigningkey')
privEncryptionKeyBase58 = shared.config.get(
myAddress, 'privencryptionkey')
except Exception as err:
shared.printLock.acquire()
sys.stderr.write('Error within doPOWForMyV3Pubkey. Could not read the keys from the keys.dat file for a requested address. %s\n' % err)
sys.stderr.write(
'Error within doPOWForMyV3Pubkey. Could not read the keys from the keys.dat file for a requested address. %s\n' % err)
shared.printLock.release()
return
privSigningKeyHex = shared.decodeWalletImportFormat(privSigningKeyBase58).encode('hex')
privEncryptionKeyHex = shared.decodeWalletImportFormat(privEncryptionKeyBase58).encode('hex')
pubSigningKey = highlevelcrypto.privToPub(privSigningKeyHex).decode('hex')
pubEncryptionKey = highlevelcrypto.privToPub(privEncryptionKeyHex).decode('hex')
privSigningKeyHex = shared.decodeWalletImportFormat(
privSigningKeyBase58).encode('hex')
privEncryptionKeyHex = shared.decodeWalletImportFormat(
privEncryptionKeyBase58).encode('hex')
pubSigningKey = highlevelcrypto.privToPub(
privSigningKeyHex).decode('hex')
pubEncryptionKey = highlevelcrypto.privToPub(
privEncryptionKeyHex).decode('hex')
payload += pubSigningKey[1:]
payload += pubEncryptionKey[1:]
payload += encodeVarint(shared.config.getint(myAddress,'noncetrialsperbyte'))
payload += encodeVarint(shared.config.getint(myAddress,'payloadlengthextrabytes'))
signature = highlevelcrypto.sign(payload,privSigningKeyHex)
payload += encodeVarint(shared.config.getint(
myAddress, 'noncetrialsperbyte'))
payload += encodeVarint(shared.config.getint(
myAddress, 'payloadlengthextrabytes'))
signature = highlevelcrypto.sign(payload, privSigningKeyHex)
payload += encodeVarint(len(signature))
payload += signature
#Do the POW for this pubkey message
target = 2**64 / ((len(payload)+shared.networkDefaultPayloadLengthExtraBytes+8) * shared.networkDefaultProofOfWorkNonceTrialsPerByte)
# Do the POW for this pubkey message
target = 2 ** 64 / ((len(payload) + shared.networkDefaultPayloadLengthExtraBytes +
8) * shared.networkDefaultProofOfWorkNonceTrialsPerByte)
print '(For pubkey message) Doing proof of work...'
initialHash = hashlib.sha512(payload).digest()
trialValue, nonce = proofofwork.run(target, initialHash)
print '(For pubkey message) Found proof of work', trialValue, 'Nonce:', nonce
payload = pack('>Q',nonce) + payload
payload = pack('>Q', nonce) + payload
"""t = (hash,payload,embeddedTime,'no')
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''INSERT INTO pubkeys VALUES (?,?,?,?)''')
@ -2793,380 +3255,503 @@ class singleWorker(threading.Thread):
inventoryHash = calculateInventoryHash(payload)
objectType = 'pubkey'
shared.inventory[inventoryHash] = (objectType, streamNumber, payload, embeddedTime)
shared.inventory[inventoryHash] = (
objectType, streamNumber, payload, embeddedTime)
shared.printLock.acquire()
print 'broadcasting inv with hash:', inventoryHash.encode('hex')
shared.printLock.release()
shared.broadcastToSendDataQueues((streamNumber, 'sendinv', inventoryHash))
shared.UISignalQueue.put(('updateStatusBar',''))
shared.config.set(myAddress,'lastpubkeysendtime',str(int(time.time())))
shared.broadcastToSendDataQueues((
streamNumber, 'sendinv', inventoryHash))
shared.UISignalQueue.put(('updateStatusBar', ''))
shared.config.set(
myAddress, 'lastpubkeysendtime', str(int(time.time())))
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
def sendBroadcast(self):
shared.sqlLock.acquire()
t = ('broadcastqueued',)
shared.sqlSubmitQueue.put('''SELECT fromaddress, subject, message, ackdata FROM sent WHERE status=? and folder='sent' ''')
shared.sqlSubmitQueue.put(
'''SELECT fromaddress, subject, message, ackdata FROM sent WHERE status=? and folder='sent' ''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
for row in queryreturn:
fromaddress, subject, body, ackdata = row
status,addressVersionNumber,streamNumber,ripe = decodeAddress(fromaddress)
status, addressVersionNumber, streamNumber, ripe = decodeAddress(
fromaddress)
if addressVersionNumber == 2 and int(time.time()) < encryptedBroadcastSwitchoverTime:
#We need to convert our private keys to public keys in order to include them.
# We need to convert our private keys to public keys in order
# to include them.
try:
privSigningKeyBase58 = shared.config.get(fromaddress, 'privsigningkey')
privEncryptionKeyBase58 = shared.config.get(fromaddress, 'privencryptionkey')
privSigningKeyBase58 = shared.config.get(
fromaddress, 'privsigningkey')
privEncryptionKeyBase58 = shared.config.get(
fromaddress, 'privencryptionkey')
except:
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,'Error! Could not find sender address (your address) in the keys.dat file.')))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (
ackdata, _translate("MainWindow", "Error! Could not find sender address (your address) in the keys.dat file."))))
continue
privSigningKeyHex = shared.decodeWalletImportFormat(privSigningKeyBase58).encode('hex')
privEncryptionKeyHex = shared.decodeWalletImportFormat(privEncryptionKeyBase58).encode('hex')
privSigningKeyHex = shared.decodeWalletImportFormat(
privSigningKeyBase58).encode('hex')
privEncryptionKeyHex = shared.decodeWalletImportFormat(
privEncryptionKeyBase58).encode('hex')
pubSigningKey = highlevelcrypto.privToPub(privSigningKeyHex).decode('hex') #At this time these pubkeys are 65 bytes long because they include the encoding byte which we won't be sending in the broadcast message.
pubEncryptionKey = highlevelcrypto.privToPub(privEncryptionKeyHex).decode('hex')
pubSigningKey = highlevelcrypto.privToPub(privSigningKeyHex).decode(
'hex') # At this time these pubkeys are 65 bytes long because they include the encoding byte which we won't be sending in the broadcast message.
pubEncryptionKey = highlevelcrypto.privToPub(
privEncryptionKeyHex).decode('hex')
payload = pack('>Q',(int(time.time())+random.randrange(-300, 300)))#the current time plus or minus five minutes
payload += encodeVarint(1) #broadcast version
payload = pack('>Q', (int(time.time()) + random.randrange(
-300, 300))) # the current time plus or minus five minutes
payload += encodeVarint(1) # broadcast version
payload += encodeVarint(addressVersionNumber)
payload += encodeVarint(streamNumber)
payload += '\x00\x00\x00\x01' #behavior bitfield
payload += '\x00\x00\x00\x01' # behavior bitfield
payload += pubSigningKey[1:]
payload += pubEncryptionKey[1:]
payload += ripe
payload += '\x02' #message encoding type
payload += encodeVarint(len('Subject:' + subject + '\n' + 'Body:' + body)) #Type 2 is simple UTF-8 message encoding.
payload += '\x02' # message encoding type
payload += encodeVarint(len(
'Subject:' + subject + '\n' + 'Body:' + body)) # Type 2 is simple UTF-8 message encoding.
payload += 'Subject:' + subject + '\n' + 'Body:' + body
signature = highlevelcrypto.sign(payload,privSigningKeyHex)
signature = highlevelcrypto.sign(payload, privSigningKeyHex)
payload += encodeVarint(len(signature))
payload += signature
target = 2**64 / ((len(payload)+shared.networkDefaultPayloadLengthExtraBytes+8) * shared.networkDefaultProofOfWorkNonceTrialsPerByte)
target = 2 ** 64 / ((len(
payload) + shared.networkDefaultPayloadLengthExtraBytes + 8) * shared.networkDefaultProofOfWorkNonceTrialsPerByte)
print '(For broadcast message) Doing proof of work...'
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,'Doing work necessary to send broadcast...')))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (
ackdata, _translate("MainWindow", "Doing work necessary to send broadcast..."))))
initialHash = hashlib.sha512(payload).digest()
trialValue, nonce = proofofwork.run(target, initialHash)
print '(For broadcast message) Found proof of work', trialValue, 'Nonce:', nonce
payload = pack('>Q',nonce) + payload
payload = pack('>Q', nonce) + payload
inventoryHash = calculateInventoryHash(payload)
objectType = 'broadcast'
shared.inventory[inventoryHash] = (objectType, streamNumber, payload, int(time.time()))
shared.inventory[inventoryHash] = (
objectType, streamNumber, payload, int(time.time()))
print 'Broadcasting inv for my broadcast (within sendBroadcast function):', inventoryHash.encode('hex')
shared.broadcastToSendDataQueues((streamNumber, 'sendinv', inventoryHash))
shared.broadcastToSendDataQueues((
streamNumber, 'sendinv', inventoryHash))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,'Broadcast sent on '+unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time()))),'utf-8'))))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (ackdata, _translate("MainWindow", "Broadcast sent on %1").arg(unicode(
strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(time.time()))), 'utf-8')))))
#Update the status of the message in the 'sent' table to have a 'broadcastsent' status
# Update the status of the message in the 'sent' table to have
# a 'broadcastsent' status
shared.sqlLock.acquire()
t = ('broadcastsent',int(time.time()),fromaddress, subject, body,'broadcastqueued')
shared.sqlSubmitQueue.put('UPDATE sent SET status=?, lastactiontime=? WHERE fromaddress=? AND subject=? AND message=? AND status=?')
t = ('broadcastsent', int(
time.time()), fromaddress, subject, body, 'broadcastqueued')
shared.sqlSubmitQueue.put(
'UPDATE sent SET status=?, lastactiontime=? WHERE fromaddress=? AND subject=? AND message=? AND status=?')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
elif addressVersionNumber == 3 or int(time.time()) > encryptedBroadcastSwitchoverTime:
#We need to convert our private keys to public keys in order to include them.
# We need to convert our private keys to public keys in order
# to include them.
try:
privSigningKeyBase58 = shared.config.get(fromaddress, 'privsigningkey')
privEncryptionKeyBase58 = shared.config.get(fromaddress, 'privencryptionkey')
privSigningKeyBase58 = shared.config.get(
fromaddress, 'privsigningkey')
privEncryptionKeyBase58 = shared.config.get(
fromaddress, 'privencryptionkey')
except:
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,'Error! Could not find sender address (your address) in the keys.dat file.')))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (
ackdata, _translate("MainWindow", "Error! Could not find sender address (your address) in the keys.dat file."))))
continue
privSigningKeyHex = shared.decodeWalletImportFormat(privSigningKeyBase58).encode('hex')
privEncryptionKeyHex = shared.decodeWalletImportFormat(privEncryptionKeyBase58).encode('hex')
privSigningKeyHex = shared.decodeWalletImportFormat(
privSigningKeyBase58).encode('hex')
privEncryptionKeyHex = shared.decodeWalletImportFormat(
privEncryptionKeyBase58).encode('hex')
pubSigningKey = highlevelcrypto.privToPub(privSigningKeyHex).decode('hex') #At this time these pubkeys are 65 bytes long because they include the encoding byte which we won't be sending in the broadcast message.
pubEncryptionKey = highlevelcrypto.privToPub(privEncryptionKeyHex).decode('hex')
pubSigningKey = highlevelcrypto.privToPub(privSigningKeyHex).decode(
'hex') # At this time these pubkeys are 65 bytes long because they include the encoding byte which we won't be sending in the broadcast message.
pubEncryptionKey = highlevelcrypto.privToPub(
privEncryptionKeyHex).decode('hex')
payload = pack('>Q',(int(time.time())+random.randrange(-300, 300)))#the current time plus or minus five minutes
payload += encodeVarint(2) #broadcast version
payload = pack('>Q', (int(time.time()) + random.randrange(
-300, 300))) # the current time plus or minus five minutes
payload += encodeVarint(2) # broadcast version
payload += encodeVarint(streamNumber)
dataToEncrypt = encodeVarint(2) #broadcast version
dataToEncrypt = encodeVarint(2) # broadcast version
dataToEncrypt += encodeVarint(addressVersionNumber)
dataToEncrypt += encodeVarint(streamNumber)
dataToEncrypt += '\x00\x00\x00\x01' #behavior bitfield
dataToEncrypt += '\x00\x00\x00\x01' # behavior bitfield
dataToEncrypt += pubSigningKey[1:]
dataToEncrypt += pubEncryptionKey[1:]
if addressVersionNumber >= 3:
dataToEncrypt += encodeVarint(shared.config.getint(fromaddress,'noncetrialsperbyte'))
dataToEncrypt += encodeVarint(shared.config.getint(fromaddress,'payloadlengthextrabytes'))
dataToEncrypt += '\x02' #message encoding type
dataToEncrypt += '\x02' # message encoding type
dataToEncrypt += encodeVarint(len('Subject:' + subject + '\n' + 'Body:' + body)) #Type 2 is simple UTF-8 message encoding per the documentation on the wiki.
dataToEncrypt += 'Subject:' + subject + '\n' + 'Body:' + body
signature = highlevelcrypto.sign(dataToEncrypt,privSigningKeyHex)
signature = highlevelcrypto.sign(
dataToEncrypt, privSigningKeyHex)
dataToEncrypt += encodeVarint(len(signature))
dataToEncrypt += signature
#Encrypt the broadcast with the information contained in the broadcaster's address. Anyone who knows the address can generate the private encryption key to decrypt the broadcast. This provides virtually no privacy; its purpose is to keep questionable and illegal content from flowing through the Internet connections and being stored on the disk of 3rd parties.
privEncryptionKey = hashlib.sha512(encodeVarint(addressVersionNumber)+encodeVarint(streamNumber)+ripe).digest()[:32]
pubEncryptionKey = pointMult(privEncryptionKey)
payload += highlevelcrypto.encrypt(dataToEncrypt,pubEncryptionKey.encode('hex'))
target = 2**64 / ((len(payload)+shared.networkDefaultPayloadLengthExtraBytes+8) * shared.networkDefaultProofOfWorkNonceTrialsPerByte)
# Encrypt the broadcast with the information contained in the broadcaster's address. Anyone who knows the address can generate
# the private encryption key to decrypt the broadcast. This provides virtually no privacy; its purpose is to keep questionable
# and illegal content from flowing through the Internet connections and being stored on the disk of 3rd parties.
privEncryptionKey = hashlib.sha512(encodeVarint(
addressVersionNumber) + encodeVarint(streamNumber) + ripe).digest()[:32]
pubEncryptionKey = pointMult(privEncryptionKey)
payload += highlevelcrypto.encrypt(
dataToEncrypt, pubEncryptionKey.encode('hex'))
target = 2 ** 64 / ((len(
payload) + shared.networkDefaultPayloadLengthExtraBytes + 8) * shared.networkDefaultProofOfWorkNonceTrialsPerByte)
print '(For broadcast message) Doing proof of work...'
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,'Doing work necessary to send broadcast...')))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (
ackdata, _translate("MainWindow", "Doing work necessary to send broadcast..."))))
initialHash = hashlib.sha512(payload).digest()
trialValue, nonce = proofofwork.run(target, initialHash)
print '(For broadcast message) Found proof of work', trialValue, 'Nonce:', nonce
payload = pack('>Q',nonce) + payload
payload = pack('>Q', nonce) + payload
inventoryHash = calculateInventoryHash(payload)
objectType = 'broadcast'
shared.inventory[inventoryHash] = (objectType, streamNumber, payload, int(time.time()))
shared.inventory[inventoryHash] = (
objectType, streamNumber, payload, int(time.time()))
print 'sending inv (within sendBroadcast function)'
shared.broadcastToSendDataQueues((streamNumber, 'sendinv', inventoryHash))
shared.broadcastToSendDataQueues((
streamNumber, 'sendinv', inventoryHash))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,'Broadcast sent on '+unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time()))),'utf-8'))))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (ackdata, _translate("MainWindow", "Broadcast sent on %1").arg(unicode(
strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(time.time()))), 'utf-8')))))
#Update the status of the message in the 'sent' table to have a 'broadcastsent' status
# Update the status of the message in the 'sent' table to have
# a 'broadcastsent' status
shared.sqlLock.acquire()
t = ('broadcastsent',int(time.time()),fromaddress, subject, body,'broadcastqueued')
shared.sqlSubmitQueue.put('UPDATE sent SET status=?, lastactiontime=? WHERE fromaddress=? AND subject=? AND message=? AND status=?')
t = ('broadcastsent', int(
time.time()), fromaddress, subject, body, 'broadcastqueued')
shared.sqlSubmitQueue.put(
'UPDATE sent SET status=?, lastactiontime=? WHERE fromaddress=? AND subject=? AND message=? AND status=?')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
else:
shared.printLock.acquire()
sys.stderr.write('Error: In the singleWorker thread, the sendBroadcast function doesn\'t understand the address version.\n')
sys.stderr.write(
'Error: In the singleWorker thread, the sendBroadcast function doesn\'t understand the address version.\n')
shared.printLock.release()
def sendMsg(self):
#Check to see if there are any messages queued to be sent
# Check to see if there are any messages queued to be sent
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT DISTINCT toaddress FROM sent WHERE (status='msgqueued' AND folder='sent')''')
shared.sqlSubmitQueue.put(
'''SELECT DISTINCT toaddress FROM sent WHERE (status='msgqueued' AND folder='sent')''')
shared.sqlSubmitQueue.put('')
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
for row in queryreturn: #For each address to which we need to send a message, check to see if we have its pubkey already.
for row in queryreturn: # For each address to which we need to send a message, check to see if we have its pubkey already.
toaddress, = row
toripe = decodeAddress(toaddress)[3]
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT hash FROM pubkeys WHERE hash=? ''')
shared.sqlSubmitQueue.put(
'''SELECT hash FROM pubkeys WHERE hash=? ''')
shared.sqlSubmitQueue.put((toripe,))
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn != []: #If we have the needed pubkey, set the status to doingmsgpow (we'll do it further down)
if queryreturn != []: # If we have the needed pubkey, set the status to doingmsgpow (we'll do it further down)
t = (toaddress,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''UPDATE sent SET status='doingmsgpow' WHERE toaddress=? AND status='msgqueued' ''')
shared.sqlSubmitQueue.put(
'''UPDATE sent SET status='doingmsgpow' WHERE toaddress=? AND status='msgqueued' ''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
else: #We don't have the needed pubkey. Set the status to 'awaitingpubkey' and request it if we haven't already
else: # We don't have the needed pubkey. Set the status to 'awaitingpubkey' and request it if we haven't already
if toripe in neededPubkeys:
#We already sent a request for the pubkey
# We already sent a request for the pubkey
t = (toaddress,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''UPDATE sent SET status='awaitingpubkey' WHERE toaddress=? AND status='msgqueued' ''')
shared.sqlSubmitQueue.put(
'''UPDATE sent SET status='awaitingpubkey' WHERE toaddress=? AND status='msgqueued' ''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.UISignalQueue.put(('updateSentItemStatusByHash',(toripe,'Encryption key was requested earlier.')))
shared.UISignalQueue.put(('updateSentItemStatusByHash', (
toripe, 'Encryption key was requested earlier.')))
else:
#We have not yet sent a request for the pubkey
# We have not yet sent a request for the pubkey
t = (toaddress,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''UPDATE sent SET status='doingpubkeypow' WHERE toaddress=? AND status='msgqueued' ''')
shared.sqlSubmitQueue.put(
'''UPDATE sent SET status='doingpubkeypow' WHERE toaddress=? AND status='msgqueued' ''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.UISignalQueue.put(('updateSentItemStatusByHash',(toripe,'Sending a request for the recipient\'s encryption key.')))
shared.UISignalQueue.put(('updateSentItemStatusByHash', (
toripe, 'Sending a request for the recipient\'s encryption key.')))
self.requestPubKey(toaddress)
shared.sqlLock.acquire()
#Get all messages that are ready to be sent, and also all messages which we have sent in the last 28 days which were previously marked as 'toodifficult'. If the user as raised the maximum acceptable difficulty then those messages may now be sendable.
shared.sqlSubmitQueue.put('''SELECT toaddress, toripe, fromaddress, subject, message, ackdata, status FROM sent WHERE (status='doingmsgpow' or status='forcepow' or (status='toodifficult' and lastactiontime>?)) and folder='sent' ''')
shared.sqlSubmitQueue.put((int(time.time())-2419200,))
# Get all messages that are ready to be sent, and also all messages
# which we have sent in the last 28 days which were previously marked
# as 'toodifficult'. If the user as raised the maximum acceptable
# difficulty then those messages may now be sendable.
shared.sqlSubmitQueue.put(
'''SELECT toaddress, toripe, fromaddress, subject, message, ackdata, status FROM sent WHERE (status='doingmsgpow' or status='forcepow' or (status='toodifficult' and lastactiontime>?)) and folder='sent' ''')
shared.sqlSubmitQueue.put((int(time.time()) - 2419200,))
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
for row in queryreturn: #For each message we need to send..
for row in queryreturn: # For each message we need to send..
toaddress, toripe, fromaddress, subject, message, ackdata, status = row
#There is a remote possibility that we may no longer have the recipient's pubkey. Let us make sure we still have it or else the sendMsg function will appear to freeze. This can happen if the user sends a message but doesn't let the POW function finish, then leaves their client off for a long time which could cause the needed pubkey to expire and be deleted.
# There is a remote possibility that we may no longer have the
# recipient's pubkey. Let us make sure we still have it or else the
# sendMsg function will appear to freeze. This can happen if the
# user sends a message but doesn't let the POW function finish,
# then leaves their client off for a long time which could cause
# the needed pubkey to expire and be deleted.
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT hash FROM pubkeys WHERE hash=? ''')
shared.sqlSubmitQueue.put(
'''SELECT hash FROM pubkeys WHERE hash=? ''')
shared.sqlSubmitQueue.put((toripe,))
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn == [] and toripe not in neededPubkeys:
#We no longer have the needed pubkey and we haven't requested it.
# We no longer have the needed pubkey and we haven't requested
# it.
shared.printLock.acquire()
sys.stderr.write('For some reason, the status of a message in our outbox is \'doingmsgpow\' even though we lack the pubkey. Here is the RIPE hash of the needed pubkey: %s\n' % toripe.encode('hex'))
sys.stderr.write(
'For some reason, the status of a message in our outbox is \'doingmsgpow\' even though we lack the pubkey. Here is the RIPE hash of the needed pubkey: %s\n' % toripe.encode('hex'))
shared.printLock.release()
t = (toaddress,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''UPDATE sent SET status='msgqueued' WHERE toaddress=? AND status='doingmsgpow' ''')
shared.sqlSubmitQueue.put(
'''UPDATE sent SET status='msgqueued' WHERE toaddress=? AND status='doingmsgpow' ''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.UISignalQueue.put(('updateSentItemStatusByHash',(toripe,'Sending a request for the recipient\'s encryption key.')))
shared.UISignalQueue.put(('updateSentItemStatusByHash', (
toripe, 'Sending a request for the recipient\'s encryption key.')))
self.requestPubKey(toaddress)
continue
ackdataForWhichImWatching[ackdata] = 0
toStatus,toAddressVersionNumber,toStreamNumber,toHash = decodeAddress(toaddress)
fromStatus,fromAddressVersionNumber,fromStreamNumber,fromHash = decodeAddress(fromaddress)
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,'Looking up the receiver\'s public key')))
toStatus, toAddressVersionNumber, toStreamNumber, toHash = decodeAddress(
toaddress)
fromStatus, fromAddressVersionNumber, fromStreamNumber, fromHash = decodeAddress(
fromaddress)
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (
ackdata, _translate("MainWindow", "Looking up the receiver\'s public key"))))
shared.printLock.acquire()
print 'Found a message in our database that needs to be sent with this pubkey.'
print 'First 150 characters of message:', repr(message[:150])
shared.printLock.release()
#mark the pubkey as 'usedpersonally' so that we don't ever delete it.
# mark the pubkey as 'usedpersonally' so that we don't ever delete
# it.
shared.sqlLock.acquire()
t = (toripe,)
shared.sqlSubmitQueue.put('''UPDATE pubkeys SET usedpersonally='yes' WHERE hash=?''')
shared.sqlSubmitQueue.put(
'''UPDATE pubkeys SET usedpersonally='yes' WHERE hash=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
#Let us fetch the recipient's public key out of our database. If the required proof of work difficulty is too hard then we'll abort.
shared.sqlSubmitQueue.put('SELECT transmitdata FROM pubkeys WHERE hash=?')
# Let us fetch the recipient's public key out of our database. If
# the required proof of work difficulty is too hard then we'll
# abort.
shared.sqlSubmitQueue.put(
'SELECT transmitdata FROM pubkeys WHERE hash=?')
shared.sqlSubmitQueue.put((toripe,))
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn == []:
shared.printLock.acquire()
sys.stderr.write('(within sendMsg) The needed pubkey was not found. This should never happen. Aborting send.\n')
sys.stderr.write(
'(within sendMsg) The needed pubkey was not found. This should never happen. Aborting send.\n')
shared.printLock.release()
return
for row in queryreturn:
pubkeyPayload, = row
#The pubkey message is stored the way we originally received it which means that we need to read beyond things like the nonce and time to get to the actual public keys.
readPosition = 8 #to bypass the nonce
pubkeyEmbeddedTime, = unpack('>I',pubkeyPayload[readPosition:readPosition+4])
#This section is used for the transition from 32 bit time to 64 bit time in the protocol.
# The pubkey message is stored the way we originally received it
# which means that we need to read beyond things like the nonce and
# time to get to the actual public keys.
readPosition = 8 # to bypass the nonce
pubkeyEmbeddedTime, = unpack(
'>I', pubkeyPayload[readPosition:readPosition + 4])
# This section is used for the transition from 32 bit time to 64
# bit time in the protocol.
if pubkeyEmbeddedTime == 0:
pubkeyEmbeddedTime, = unpack('>Q',pubkeyPayload[readPosition:readPosition+8])
pubkeyEmbeddedTime, = unpack(
'>Q', pubkeyPayload[readPosition:readPosition + 8])
readPosition += 8
else:
readPosition += 4
readPosition += 1 #to bypass the address version whose length is definitely 1
streamNumber, streamNumberLength = decodeVarint(pubkeyPayload[readPosition:readPosition+10])
readPosition += 1 # to bypass the address version whose length is definitely 1
streamNumber, streamNumberLength = decodeVarint(
pubkeyPayload[readPosition:readPosition + 10])
readPosition += streamNumberLength
behaviorBitfield = pubkeyPayload[readPosition:readPosition+4]
readPosition += 4 #to bypass the bitfield of behaviors
#pubSigningKeyBase256 = pubkeyPayload[readPosition:readPosition+64] #We don't use this key for anything here.
behaviorBitfield = pubkeyPayload[readPosition:readPosition + 4]
readPosition += 4 # to bypass the bitfield of behaviors
# pubSigningKeyBase256 =
# pubkeyPayload[readPosition:readPosition+64] #We don't use this
# key for anything here.
readPosition += 64
pubEncryptionKeyBase256 = pubkeyPayload[readPosition:readPosition+64]
pubEncryptionKeyBase256 = pubkeyPayload[
readPosition:readPosition + 64]
readPosition += 64
if toAddressVersionNumber == 2:
requiredAverageProofOfWorkNonceTrialsPerByte = shared.networkDefaultProofOfWorkNonceTrialsPerByte
requiredPayloadLengthExtraBytes = shared.networkDefaultPayloadLengthExtraBytes
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,'Doing work necessary to send message. (There is no required difficulty for version 2 addresses like this.)')))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (
ackdata, _translate("MainWindow", "Doing work necessary to send message. (There is no required difficulty for version 2 addresses like this.)"))))
elif toAddressVersionNumber == 3:
requiredAverageProofOfWorkNonceTrialsPerByte, varintLength = decodeVarint(pubkeyPayload[readPosition:readPosition+10])
requiredAverageProofOfWorkNonceTrialsPerByte, varintLength = decodeVarint(
pubkeyPayload[readPosition:readPosition + 10])
readPosition += varintLength
requiredPayloadLengthExtraBytes, varintLength = decodeVarint(pubkeyPayload[readPosition:readPosition+10])
requiredPayloadLengthExtraBytes, varintLength = decodeVarint(
pubkeyPayload[readPosition:readPosition + 10])
readPosition += varintLength
if requiredAverageProofOfWorkNonceTrialsPerByte < shared.networkDefaultProofOfWorkNonceTrialsPerByte: #We still have to meet a minimum POW difficulty regardless of what they say is allowed in order to get our message to propagate through the network.
if requiredAverageProofOfWorkNonceTrialsPerByte < shared.networkDefaultProofOfWorkNonceTrialsPerByte: # We still have to meet a minimum POW difficulty regardless of what they say is allowed in order to get our message to propagate through the network.
requiredAverageProofOfWorkNonceTrialsPerByte = shared.networkDefaultProofOfWorkNonceTrialsPerByte
if requiredPayloadLengthExtraBytes < shared.networkDefaultPayloadLengthExtraBytes:
requiredPayloadLengthExtraBytes = shared.networkDefaultPayloadLengthExtraBytes
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,'Doing work necessary to send message.\nReceiver\'s required difficulty: '+str(float(requiredAverageProofOfWorkNonceTrialsPerByte)/shared.networkDefaultProofOfWorkNonceTrialsPerByte)+' and '+ str(float(requiredPayloadLengthExtraBytes)/shared.networkDefaultPayloadLengthExtraBytes))))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (ackdata, _translate("MainWindow", "Doing work necessary to send message.\nReceiver\'s required difficulty: %1 and %2").arg(str(float(
requiredAverageProofOfWorkNonceTrialsPerByte) / shared.networkDefaultProofOfWorkNonceTrialsPerByte)).arg(str(float(requiredPayloadLengthExtraBytes) / shared.networkDefaultPayloadLengthExtraBytes)))))
if status != 'forcepow':
if (requiredAverageProofOfWorkNonceTrialsPerByte > shared.config.getint('bitmessagesettings','maxacceptablenoncetrialsperbyte') and shared.config.getint('bitmessagesettings','maxacceptablenoncetrialsperbyte') != 0) or (requiredPayloadLengthExtraBytes > shared.config.getint('bitmessagesettings','maxacceptablepayloadlengthextrabytes') and shared.config.getint('bitmessagesettings','maxacceptablepayloadlengthextrabytes') != 0):
#The demanded difficulty is more than we are willing to do.
if (requiredAverageProofOfWorkNonceTrialsPerByte > shared.config.getint('bitmessagesettings', 'maxacceptablenoncetrialsperbyte') and shared.config.getint('bitmessagesettings', 'maxacceptablenoncetrialsperbyte') != 0) or (requiredPayloadLengthExtraBytes > shared.config.getint('bitmessagesettings', 'maxacceptablepayloadlengthextrabytes') and shared.config.getint('bitmessagesettings', 'maxacceptablepayloadlengthextrabytes') != 0):
# The demanded difficulty is more than we are willing
# to do.
shared.sqlLock.acquire()
t = (ackdata,)
shared.sqlSubmitQueue.put('''UPDATE sent SET status='toodifficult' WHERE ackdata=? ''')
shared.sqlSubmitQueue.put(
'''UPDATE sent SET status='toodifficult' WHERE ackdata=? ''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,'Problem: The work demanded by the recipient (' + str(float(requiredAverageProofOfWorkNonceTrialsPerByte) / shared.networkDefaultProofOfWorkNonceTrialsPerByte) + ' and ' + str(float(requiredPayloadLengthExtraBytes) / shared.networkDefaultPayloadLengthExtraBytes) + ') is more difficult than you are willing to do. ' + unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time()))),'utf-8'))))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (ackdata, _translate("MainWindow", "Problem: The work demanded by the recipient (%1 and %2) is more difficult than you are willing to do.").arg(str(float(requiredAverageProofOfWorkNonceTrialsPerByte) / shared.networkDefaultProofOfWorkNonceTrialsPerByte)).arg(str(float(
requiredPayloadLengthExtraBytes) / shared.networkDefaultPayloadLengthExtraBytes)).arg(unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(time.time()))), 'utf-8')))))
continue
embeddedTime = pack('>Q',(int(time.time())+random.randrange(-300, 300)))#the current time plus or minus five minutes. We will use this time both for our message and for the ackdata packed within our message.
embeddedTime = pack('>Q', (int(time.time()) + random.randrange(
-300, 300))) # the current time plus or minus five minutes. We will use this time both for our message and for the ackdata packed within our message.
if fromAddressVersionNumber == 2:
payload = '\x01' #Message version.
payload = '\x01' # Message version.
payload += encodeVarint(fromAddressVersionNumber)
payload += encodeVarint(fromStreamNumber)
payload += '\x00\x00\x00\x01' #Bitfield of features and behaviors that can be expected from me. (See https://bitmessage.org/wiki/Protocol_specification#Pubkey_bitfield_features )
payload += '\x00\x00\x00\x01' # Bitfield of features and behaviors that can be expected from me. (See https://bitmessage.org/wiki/Protocol_specification#Pubkey_bitfield_features )
#We need to convert our private keys to public keys in order to include them.
# We need to convert our private keys to public keys in order
# to include them.
try:
privSigningKeyBase58 = shared.config.get(fromaddress, 'privsigningkey')
privEncryptionKeyBase58 = shared.config.get(fromaddress, 'privencryptionkey')
privSigningKeyBase58 = shared.config.get(
fromaddress, 'privsigningkey')
privEncryptionKeyBase58 = shared.config.get(
fromaddress, 'privencryptionkey')
except:
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,'Error! Could not find sender address (your address) in the keys.dat file.')))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (
ackdata, _translate("MainWindow", "Error! Could not find sender address (your address) in the keys.dat file."))))
continue
privSigningKeyHex = shared.decodeWalletImportFormat(privSigningKeyBase58).encode('hex')
privEncryptionKeyHex = shared.decodeWalletImportFormat(privEncryptionKeyBase58).encode('hex')
privSigningKeyHex = shared.decodeWalletImportFormat(
privSigningKeyBase58).encode('hex')
privEncryptionKeyHex = shared.decodeWalletImportFormat(
privEncryptionKeyBase58).encode('hex')
pubSigningKey = highlevelcrypto.privToPub(privSigningKeyHex).decode('hex')
pubEncryptionKey = highlevelcrypto.privToPub(privEncryptionKeyHex).decode('hex')
pubSigningKey = highlevelcrypto.privToPub(
privSigningKeyHex).decode('hex')
pubEncryptionKey = highlevelcrypto.privToPub(
privEncryptionKeyHex).decode('hex')
payload += pubSigningKey[1:] #The \x04 on the beginning of the public keys are not sent. This way there is only one acceptable way to encode and send a public key.
payload += pubSigningKey[
1:] # The \x04 on the beginning of the public keys are not sent. This way there is only one acceptable way to encode and send a public key.
payload += pubEncryptionKey[1:]
payload += toHash #This hash will be checked by the receiver of the message to verify that toHash belongs to them. This prevents a Surreptitious Forwarding Attack.
payload += '\x02' #Type 2 is simple UTF-8 message encoding as specified on the Protocol Specification on the Bitmessage Wiki.
messageToTransmit = 'Subject:' + subject + '\n' + 'Body:' + message
payload += toHash # This hash will be checked by the receiver of the message to verify that toHash belongs to them. This prevents a Surreptitious Forwarding Attack.
payload += '\x02' # Type 2 is simple UTF-8 message encoding as specified on the Protocol Specification on the Bitmessage Wiki.
messageToTransmit = 'Subject:' + \
subject + '\n' + 'Body:' + message
payload += encodeVarint(len(messageToTransmit))
payload += messageToTransmit
fullAckPayload = self.generateFullAckMessage(ackdata,toStreamNumber,embeddedTime)#The fullAckPayload is a normal msg protocol message with the proof of work already completed that the receiver of this message can easily send out.
fullAckPayload = self.generateFullAckMessage(
ackdata, toStreamNumber, embeddedTime) # The fullAckPayload is a normal msg protocol message with the proof of work already completed that the receiver of this message can easily send out.
payload += encodeVarint(len(fullAckPayload))
payload += fullAckPayload
signature = highlevelcrypto.sign(payload,privSigningKeyHex)
signature = highlevelcrypto.sign(payload, privSigningKeyHex)
payload += encodeVarint(len(signature))
payload += signature
if fromAddressVersionNumber == 3:
payload = '\x01' #Message version.
payload = '\x01' # Message version.
payload += encodeVarint(fromAddressVersionNumber)
payload += encodeVarint(fromStreamNumber)
payload += '\x00\x00\x00\x01' #Bitfield of features and behaviors that can be expected from me. (See https://bitmessage.org/wiki/Protocol_specification#Pubkey_bitfield_features )
payload += '\x00\x00\x00\x01' # Bitfield of features and behaviors that can be expected from me. (See https://bitmessage.org/wiki/Protocol_specification#Pubkey_bitfield_features )
#We need to convert our private keys to public keys in order to include them.
# We need to convert our private keys to public keys in order
# to include them.
try:
privSigningKeyBase58 = shared.config.get(fromaddress, 'privsigningkey')
privEncryptionKeyBase58 = shared.config.get(fromaddress, 'privencryptionkey')
privSigningKeyBase58 = shared.config.get(
fromaddress, 'privsigningkey')
privEncryptionKeyBase58 = shared.config.get(
fromaddress, 'privencryptionkey')
except:
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,'Error! Could not find sender address (your address) in the keys.dat file.')))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (
ackdata, _translate("MainWindow", "Error! Could not find sender address (your address) in the keys.dat file."))))
continue
privSigningKeyHex = shared.decodeWalletImportFormat(privSigningKeyBase58).encode('hex')
privEncryptionKeyHex = shared.decodeWalletImportFormat(privEncryptionKeyBase58).encode('hex')
privSigningKeyHex = shared.decodeWalletImportFormat(
privSigningKeyBase58).encode('hex')
privEncryptionKeyHex = shared.decodeWalletImportFormat(
privEncryptionKeyBase58).encode('hex')
pubSigningKey = highlevelcrypto.privToPub(privSigningKeyHex).decode('hex')
pubEncryptionKey = highlevelcrypto.privToPub(privEncryptionKeyHex).decode('hex')
pubSigningKey = highlevelcrypto.privToPub(
privSigningKeyHex).decode('hex')
pubEncryptionKey = highlevelcrypto.privToPub(
privEncryptionKeyHex).decode('hex')
payload += pubSigningKey[1:] #The \x04 on the beginning of the public keys are not sent. This way there is only one acceptable way to encode and send a public key.
payload += pubSigningKey[
1:] # The \x04 on the beginning of the public keys are not sent. This way there is only one acceptable way to encode and send a public key.
payload += pubEncryptionKey[1:]
#If the receiver of our message is in our address book, subscriptions list, or whitelist then we will allow them to do the network-minimum proof of work. Let us check to see if the receiver is in any of those lists.
# If the receiver of our message is in our address book,
# subscriptions list, or whitelist then we will allow them to
# do the network-minimum proof of work. Let us check to see if
# the receiver is in any of those lists.
if shared.isAddressInMyAddressBookSubscriptionsListOrWhitelist(toaddress):
payload += encodeVarint(shared.networkDefaultProofOfWorkNonceTrialsPerByte)
payload += encodeVarint(shared.networkDefaultPayloadLengthExtraBytes)
payload += encodeVarint(
shared.networkDefaultProofOfWorkNonceTrialsPerByte)
payload += encodeVarint(
shared.networkDefaultPayloadLengthExtraBytes)
else:
payload += encodeVarint(shared.config.getint(fromaddress,'noncetrialsperbyte'))
payload += encodeVarint(shared.config.getint(fromaddress,'payloadlengthextrabytes'))
payload += encodeVarint(shared.config.getint(
fromaddress, 'noncetrialsperbyte'))
payload += encodeVarint(shared.config.getint(
fromaddress, 'payloadlengthextrabytes'))
payload += toHash #This hash will be checked by the receiver of the message to verify that toHash belongs to them. This prevents a Surreptitious Forwarding Attack.
payload += '\x02' #Type 2 is simple UTF-8 message encoding as specified on the Protocol Specification on the Bitmessage Wiki.
messageToTransmit = 'Subject:' + subject + '\n' + 'Body:' + message
payload += toHash # This hash will be checked by the receiver of the message to verify that toHash belongs to them. This prevents a Surreptitious Forwarding Attack.
payload += '\x02' # Type 2 is simple UTF-8 message encoding as specified on the Protocol Specification on the Bitmessage Wiki.
messageToTransmit = 'Subject:' + \
subject + '\n' + 'Body:' + message
payload += encodeVarint(len(messageToTransmit))
payload += messageToTransmit
fullAckPayload = self.generateFullAckMessage(ackdata,toStreamNumber,embeddedTime)#The fullAckPayload is a normal msg protocol message with the proof of work already completed that the receiver of this message can easily send out.
fullAckPayload = self.generateFullAckMessage(
ackdata, toStreamNumber, embeddedTime) # The fullAckPayload is a normal msg protocol message with the proof of work already completed that the receiver of this message can easily send out.
payload += encodeVarint(len(fullAckPayload))
payload += fullAckPayload
signature = highlevelcrypto.sign(payload,privSigningKeyHex)
signature = highlevelcrypto.sign(payload, privSigningKeyHex)
payload += encodeVarint(len(signature))
payload += signature
#We have assembled the data that will be encrypted.
# We have assembled the data that will be encrypted.
try:
encrypted = highlevelcrypto.encrypt(payload,"04"+pubEncryptionKeyBase256.encode('hex'))
except:
@ -3182,7 +3767,7 @@ class singleWorker(threading.Thread):
encryptedPayload = embeddedTime + encodeVarint(toStreamNumber) + encrypted
target = 2**64 / ((len(encryptedPayload)+requiredPayloadLengthExtraBytes+8) * requiredAverageProofOfWorkNonceTrialsPerByte)
shared.printLock.acquire()
print '(For msg message) Doing proof of work. Total required difficulty:', float(requiredAverageProofOfWorkNonceTrialsPerByte)/shared.networkDefaultProofOfWorkNonceTrialsPerByte,'Required small message difficulty:', float(requiredPayloadLengthExtraBytes)/shared.networkDefaultPayloadLengthExtraBytes
print '(For msg message) Doing proof of work. Total required difficulty:', float(requiredAverageProofOfWorkNonceTrialsPerByte) / shared.networkDefaultProofOfWorkNonceTrialsPerByte, 'Required small message difficulty:', float(requiredPayloadLengthExtraBytes) / shared.networkDefaultPayloadLengthExtraBytes
shared.printLock.release()
powStartTime = time.time()
initialHash = hashlib.sha512(encryptedPayload).digest()
@ -3190,20 +3775,24 @@ class singleWorker(threading.Thread):
shared.printLock.acquire()
print '(For msg message) Found proof of work', trialValue, 'Nonce:', nonce
try:
print 'POW took', int(time.time()-powStartTime), 'seconds.', nonce/(time.time()-powStartTime), 'nonce trials per second.'
print 'POW took', int(time.time() - powStartTime), 'seconds.', nonce / (time.time() - powStartTime), 'nonce trials per second.'
except:
pass
shared.printLock.release()
encryptedPayload = pack('>Q',nonce) + encryptedPayload
encryptedPayload = pack('>Q', nonce) + encryptedPayload
inventoryHash = calculateInventoryHash(encryptedPayload)
objectType = 'msg'
shared.inventory[inventoryHash] = (objectType, toStreamNumber, encryptedPayload, int(time.time()))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,'Message sent. Waiting on acknowledgement. Sent on ' + unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time()))),'utf-8'))))
shared.inventory[inventoryHash] = (
objectType, toStreamNumber, encryptedPayload, int(time.time()))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (ackdata, _translate("MainWindow", "Message sent. Waiting on acknowledgement. Sent on %1").arg(unicode(
strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(time.time()))), 'utf-8')))))
print 'Broadcasting inv for my msg(within sendmsg function):', inventoryHash.encode('hex')
shared.broadcastToSendDataQueues((streamNumber, 'sendinv', inventoryHash))
shared.broadcastToSendDataQueues((
streamNumber, 'sendinv', inventoryHash))
#Update the status of the message in the 'sent' table to have a 'msgsent' status
# Update the status of the message in the 'sent' table to have a
# 'msgsent' status
shared.sqlLock.acquire()
t = (ackdata,)
shared.sqlSubmitQueue.put('''UPDATE sent SET status='msgsent' WHERE ackdata=?''')
@ -3212,54 +3801,64 @@ class singleWorker(threading.Thread):
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
def requestPubKey(self,toAddress):
toStatus,addressVersionNumber,streamNumber,ripe = decodeAddress(toAddress)
def requestPubKey(self, toAddress):
toStatus, addressVersionNumber, streamNumber, ripe = decodeAddress(
toAddress)
if toStatus != 'success':
shared.printLock.acquire()
sys.stderr.write('Very abnormal error occurred in requestPubKey. toAddress is: '+repr(toAddress)+'. Please report this error to Atheros.')
sys.stderr.write('Very abnormal error occurred in requestPubKey. toAddress is: ' + repr(
toAddress) + '. Please report this error to Atheros.')
shared.printLock.release()
return
neededPubkeys[ripe] = 0
payload = pack('>Q',(int(time.time())+random.randrange(-300, 300)))#the current time plus or minus five minutes.
payload = pack('>Q', (int(time.time()) + random.randrange(
-300, 300))) # the current time plus or minus five minutes.
payload += encodeVarint(addressVersionNumber)
payload += encodeVarint(streamNumber)
payload += ripe
shared.printLock.acquire()
print 'making request for pubkey with ripe:', ripe.encode('hex')
shared.printLock.release()
#print 'trial value', trialValue
# print 'trial value', trialValue
statusbar = 'Doing the computations necessary to request the recipient\'s public key.'
shared.UISignalQueue.put(('updateStatusBar',statusbar))
shared.UISignalQueue.put(('updateSentItemStatusByHash',(ripe,'Doing work necessary to request encryption key.')))
target = 2**64 / ((len(payload)+shared.networkDefaultPayloadLengthExtraBytes+8) * shared.networkDefaultProofOfWorkNonceTrialsPerByte)
shared.UISignalQueue.put(('updateStatusBar', statusbar))
shared.UISignalQueue.put(('updateSentItemStatusByHash', (
ripe, 'Doing work necessary to request encryption key.')))
target = 2 ** 64 / ((len(payload) + shared.networkDefaultPayloadLengthExtraBytes +
8) * shared.networkDefaultProofOfWorkNonceTrialsPerByte)
initialHash = hashlib.sha512(payload).digest()
trialValue, nonce = proofofwork.run(target, initialHash)
shared.printLock.acquire()
print 'Found proof of work', trialValue, 'Nonce:', nonce
shared.printLock.release()
payload = pack('>Q',nonce) + payload
payload = pack('>Q', nonce) + payload
inventoryHash = calculateInventoryHash(payload)
objectType = 'getpubkey'
shared.inventory[inventoryHash] = (objectType, streamNumber, payload, int(time.time()))
shared.inventory[inventoryHash] = (
objectType, streamNumber, payload, int(time.time()))
print 'sending inv (for the getpubkey message)'
shared.broadcastToSendDataQueues((streamNumber, 'sendinv', inventoryHash))
shared.broadcastToSendDataQueues((
streamNumber, 'sendinv', inventoryHash))
t = (toAddress,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''UPDATE sent SET status='awaitingpubkey' WHERE toaddress=? AND status='doingpubkeypow' ''')
shared.sqlSubmitQueue.put(
'''UPDATE sent SET status='awaitingpubkey' WHERE toaddress=? AND status='doingpubkeypow' ''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.UISignalQueue.put(('updateStatusBar','Broacasting the public key request. This program will auto-retry if they are offline.'))
shared.UISignalQueue.put(('updateSentItemStatusByHash',(ripe,'Sending public key request. Waiting for reply. Requested at ' + unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time()))),'utf-8'))))
shared.UISignalQueue.put((
'updateStatusBar', 'Broacasting the public key request. This program will auto-retry if they are offline.'))
shared.UISignalQueue.put(('updateSentItemStatusByHash', (ripe, 'Sending public key request. Waiting for reply. Requested at ' + unicode(
strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(time.time()))), 'utf-8'))))
def generateFullAckMessage(self,ackdata,toStreamNumber,embeddedTime):
def generateFullAckMessage(self, ackdata, toStreamNumber, embeddedTime):
payload = embeddedTime + encodeVarint(toStreamNumber) + ackdata
target = 2**64 / ((len(payload)+shared.networkDefaultPayloadLengthExtraBytes+8) * shared.networkDefaultProofOfWorkNonceTrialsPerByte)
target = 2 ** 64 / ((len(payload) + shared.networkDefaultPayloadLengthExtraBytes +
8) * shared.networkDefaultProofOfWorkNonceTrialsPerByte)
shared.printLock.acquire()
print '(For ack message) Doing proof of work...'
shared.printLock.release()
@ -3269,20 +3868,22 @@ class singleWorker(threading.Thread):
shared.printLock.acquire()
print '(For ack message) Found proof of work', trialValue, 'Nonce:', nonce
try:
print 'POW took', int(time.time()-powStartTime), 'seconds.', nonce/(time.time()-powStartTime), 'nonce trials per second.'
print 'POW took', int(time.time() - powStartTime), 'seconds.', nonce / (time.time() - powStartTime), 'nonce trials per second.'
except:
pass
shared.printLock.release()
payload = pack('>Q',nonce) + payload
headerData = '\xe9\xbe\xb4\xd9' #magic bits, slighly different from Bitcoin's magic bits.
payload = pack('>Q', nonce) + payload
headerData = '\xe9\xbe\xb4\xd9' # magic bits, slighly different from Bitcoin's magic bits.
headerData += 'msg\x00\x00\x00\x00\x00\x00\x00\x00\x00'
headerData += pack('>L',len(payload))
headerData += pack('>L', len(payload))
headerData += hashlib.sha512(payload).digest()[:4]
return headerData + payload
class addressGenerator(threading.Thread):
def __init__(self):
#QThread.__init__(self, parent)
# QThread.__init__(self, parent)
threading.Thread.__init__(self)
def run(self):
@ -3291,27 +3892,33 @@ class addressGenerator(threading.Thread):
nonceTrialsPerByte = 0
payloadLengthExtraBytes = 0
if len(queueValue) == 7:
command,addressVersionNumber,streamNumber,label,numberOfAddressesToMake,deterministicPassphrase,eighteenByteRipe = queueValue
command, addressVersionNumber, streamNumber, label, numberOfAddressesToMake, deterministicPassphrase, eighteenByteRipe = queueValue
elif len(queueValue) == 9:
command,addressVersionNumber,streamNumber,label,numberOfAddressesToMake,deterministicPassphrase,eighteenByteRipe,nonceTrialsPerByte,payloadLengthExtraBytes = queueValue
command, addressVersionNumber, streamNumber, label, numberOfAddressesToMake, deterministicPassphrase, eighteenByteRipe, nonceTrialsPerByte, payloadLengthExtraBytes = queueValue
else:
sys.stderr.write('Programming error: A structure with the wrong number of values was passed into the addressGeneratorQueue. Here is the queueValue: %s\n' % queueValue)
sys.stderr.write(
'Programming error: A structure with the wrong number of values was passed into the addressGeneratorQueue. Here is the queueValue: %s\n' % queueValue)
if addressVersionNumber < 3 or addressVersionNumber > 3:
sys.stderr.write('Program error: For some reason the address generator queue has been given a request to create at least one version %s address which it cannot do.\n' % addressVersionNumber)
sys.stderr.write(
'Program error: For some reason the address generator queue has been given a request to create at least one version %s address which it cannot do.\n' % addressVersionNumber)
if nonceTrialsPerByte == 0:
nonceTrialsPerByte = shared.config.getint('bitmessagesettings','defaultnoncetrialsperbyte')
nonceTrialsPerByte = shared.config.getint(
'bitmessagesettings', 'defaultnoncetrialsperbyte')
if nonceTrialsPerByte < shared.networkDefaultProofOfWorkNonceTrialsPerByte:
nonceTrialsPerByte = shared.networkDefaultProofOfWorkNonceTrialsPerByte
if payloadLengthExtraBytes == 0:
payloadLengthExtraBytes = shared.config.getint('bitmessagesettings','defaultpayloadlengthextrabytes')
payloadLengthExtraBytes = shared.config.getint(
'bitmessagesettings', 'defaultpayloadlengthextrabytes')
if payloadLengthExtraBytes < shared.networkDefaultPayloadLengthExtraBytes:
payloadLengthExtraBytes = shared.networkDefaultPayloadLengthExtraBytes
if addressVersionNumber == 3: #currently the only one supported.
if addressVersionNumber == 3: # currently the only one supported.
if command == 'createRandomAddress':
shared.UISignalQueue.put(('updateStatusBar','Generating one new address'))
#This next section is a little bit strange. We're going to generate keys over and over until we
#find one that starts with either \x00 or \x00\x00. Then when we pack them into a Bitmessage address,
#we won't store the \x00 or \x00\x00 bytes thus making the address shorter.
shared.UISignalQueue.put((
'updateStatusBar', _translate("MainWindow", "Generating one new address")))
# This next section is a little bit strange. We're going to generate keys over and over until we
# find one that starts with either \x00 or \x00\x00. Then when we pack them into a Bitmessage address,
# we won't store the \x00 or \x00\x00 bytes thus making the
# address shorter.
startTime = time.time()
numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix = 0
potentialPrivSigningKey = OpenSSL.rand(32)
@ -3319,14 +3926,18 @@ class addressGenerator(threading.Thread):
while True:
numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix += 1
potentialPrivEncryptionKey = OpenSSL.rand(32)
potentialPubEncryptionKey = pointMult(potentialPrivEncryptionKey)
#print 'potentialPubSigningKey', potentialPubSigningKey.encode('hex')
#print 'potentialPubEncryptionKey', potentialPubEncryptionKey.encode('hex')
potentialPubEncryptionKey = pointMult(
potentialPrivEncryptionKey)
# print 'potentialPubSigningKey', potentialPubSigningKey.encode('hex')
# print 'potentialPubEncryptionKey',
# potentialPubEncryptionKey.encode('hex')
ripe = hashlib.new('ripemd160')
sha = hashlib.new('sha512')
sha.update(potentialPubSigningKey+potentialPubEncryptionKey)
sha.update(
potentialPubSigningKey + potentialPubEncryptionKey)
ripe.update(sha.digest())
#print 'potential ripe.digest', ripe.digest().encode('hex')
# print 'potential ripe.digest',
# ripe.digest().encode('hex')
if eighteenByteRipe:
if ripe.digest()[:2] == '\x00\x00':
break
@ -3334,71 +3945,96 @@ class addressGenerator(threading.Thread):
if ripe.digest()[:1] == '\x00':
break
print 'Generated address with ripe digest:', ripe.digest().encode('hex')
print 'Address generator calculated', numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix, 'addresses at', numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix/(time.time()-startTime),'addresses per second before finding one with the correct ripe-prefix.'
address = encodeAddress(3,streamNumber,ripe.digest())
print 'Address generator calculated', numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix, 'addresses at', numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix / (time.time() - startTime), 'addresses per second before finding one with the correct ripe-prefix.'
address = encodeAddress(3, streamNumber, ripe.digest())
#An excellent way for us to store our keys is in Wallet Import Format. Let us convert now.
#https://en.bitcoin.it/wiki/Wallet_import_format
privSigningKey = '\x80'+potentialPrivSigningKey
checksum = hashlib.sha256(hashlib.sha256(privSigningKey).digest()).digest()[0:4]
privSigningKeyWIF = arithmetic.changebase(privSigningKey + checksum,256,58)
#print 'privSigningKeyWIF',privSigningKeyWIF
# An excellent way for us to store our keys is in Wallet Import Format. Let us convert now.
# https://en.bitcoin.it/wiki/Wallet_import_format
privSigningKey = '\x80' + potentialPrivSigningKey
checksum = hashlib.sha256(hashlib.sha256(
privSigningKey).digest()).digest()[0:4]
privSigningKeyWIF = arithmetic.changebase(
privSigningKey + checksum, 256, 58)
# print 'privSigningKeyWIF',privSigningKeyWIF
privEncryptionKey = '\x80'+potentialPrivEncryptionKey
checksum = hashlib.sha256(hashlib.sha256(privEncryptionKey).digest()).digest()[0:4]
privEncryptionKeyWIF = arithmetic.changebase(privEncryptionKey + checksum,256,58)
#print 'privEncryptionKeyWIF',privEncryptionKeyWIF
privEncryptionKey = '\x80' + potentialPrivEncryptionKey
checksum = hashlib.sha256(hashlib.sha256(
privEncryptionKey).digest()).digest()[0:4]
privEncryptionKeyWIF = arithmetic.changebase(
privEncryptionKey + checksum, 256, 58)
# print 'privEncryptionKeyWIF',privEncryptionKeyWIF
shared.config.add_section(address)
shared.config.set(address,'label',label)
shared.config.set(address,'enabled','true')
shared.config.set(address,'decoy','false')
shared.config.set(address,'noncetrialsperbyte',str(nonceTrialsPerByte))
shared.config.set(address,'payloadlengthextrabytes',str(payloadLengthExtraBytes))
shared.config.set(address,'privSigningKey',privSigningKeyWIF)
shared.config.set(address,'privEncryptionKey',privEncryptionKeyWIF)
shared.config.set(address, 'label', label)
shared.config.set(address, 'enabled', 'true')
shared.config.set(address, 'decoy', 'false')
shared.config.set(address, 'noncetrialsperbyte', str(
nonceTrialsPerByte))
shared.config.set(address, 'payloadlengthextrabytes', str(
payloadLengthExtraBytes))
shared.config.set(
address, 'privSigningKey', privSigningKeyWIF)
shared.config.set(
address, 'privEncryptionKey', privEncryptionKeyWIF)
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
#It may be the case that this address is being generated as a result of a call to the API. Let us put the result in the necessary queue.
# It may be the case that this address is being generated
# as a result of a call to the API. Let us put the result
# in the necessary queue.
apiAddressGeneratorReturnQueue.put(address)
shared.UISignalQueue.put(('updateStatusBar','Done generating address. Doing work necessary to broadcast it...'))
shared.UISignalQueue.put(('writeNewAddressToTable',(label,address,streamNumber)))
shared.UISignalQueue.put((
'updateStatusBar', _translate("MainWindow", "Done generating address. Doing work necessary to broadcast it...")))
shared.UISignalQueue.put(('writeNewAddressToTable', (
label, address, streamNumber)))
shared.reloadMyAddressHashes()
shared.workerQueue.put(('doPOWForMyV3Pubkey',ripe.digest()))
shared.workerQueue.put((
'doPOWForMyV3Pubkey', ripe.digest()))
elif command == 'createDeterministicAddresses' or command == 'getDeterministicAddress':
if len(deterministicPassphrase) == 0:
sys.stderr.write('WARNING: You are creating deterministic address(es) using a blank passphrase. Bitmessage will do it but it is rather stupid.')
sys.stderr.write(
'WARNING: You are creating deterministic address(es) using a blank passphrase. Bitmessage will do it but it is rather stupid.')
if command == 'createDeterministicAddresses':
statusbar = 'Generating '+str(numberOfAddressesToMake) + ' new addresses.'
shared.UISignalQueue.put(('updateStatusBar',statusbar))
statusbar = 'Generating ' + str(
numberOfAddressesToMake) + ' new addresses.'
shared.UISignalQueue.put((
'updateStatusBar', statusbar))
signingKeyNonce = 0
encryptionKeyNonce = 1
listOfNewAddressesToSendOutThroughTheAPI = [] #We fill out this list no matter what although we only need it if we end up passing the info to the API.
listOfNewAddressesToSendOutThroughTheAPI = [
] # We fill out this list no matter what although we only need it if we end up passing the info to the API.
for i in range(numberOfAddressesToMake):
#This next section is a little bit strange. We're going to generate keys over and over until we
#find one that has a RIPEMD hash that starts with either \x00 or \x00\x00. Then when we pack them
#into a Bitmessage address, we won't store the \x00 or \x00\x00 bytes thus making the address shorter.
# This next section is a little bit strange. We're going to generate keys over and over until we
# find one that has a RIPEMD hash that starts with either \x00 or \x00\x00. Then when we pack them
# into a Bitmessage address, we won't store the \x00 or
# \x00\x00 bytes thus making the address shorter.
startTime = time.time()
numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix = 0
while True:
numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix += 1
potentialPrivSigningKey = hashlib.sha512(deterministicPassphrase + encodeVarint(signingKeyNonce)).digest()[:32]
potentialPrivEncryptionKey = hashlib.sha512(deterministicPassphrase + encodeVarint(encryptionKeyNonce)).digest()[:32]
potentialPubSigningKey = pointMult(potentialPrivSigningKey)
potentialPubEncryptionKey = pointMult(potentialPrivEncryptionKey)
#print 'potentialPubSigningKey', potentialPubSigningKey.encode('hex')
#print 'potentialPubEncryptionKey', potentialPubEncryptionKey.encode('hex')
potentialPrivSigningKey = hashlib.sha512(
deterministicPassphrase + encodeVarint(signingKeyNonce)).digest()[:32]
potentialPrivEncryptionKey = hashlib.sha512(
deterministicPassphrase + encodeVarint(encryptionKeyNonce)).digest()[:32]
potentialPubSigningKey = pointMult(
potentialPrivSigningKey)
potentialPubEncryptionKey = pointMult(
potentialPrivEncryptionKey)
# print 'potentialPubSigningKey', potentialPubSigningKey.encode('hex')
# print 'potentialPubEncryptionKey',
# potentialPubEncryptionKey.encode('hex')
signingKeyNonce += 2
encryptionKeyNonce += 2
ripe = hashlib.new('ripemd160')
sha = hashlib.new('sha512')
sha.update(potentialPubSigningKey+potentialPubEncryptionKey)
sha.update(
potentialPubSigningKey + potentialPubEncryptionKey)
ripe.update(sha.digest())
#print 'potential ripe.digest', ripe.digest().encode('hex')
# print 'potential ripe.digest',
# ripe.digest().encode('hex')
if eighteenByteRipe:
if ripe.digest()[:2] == '\x00\x00':
break
@ -3407,65 +4043,93 @@ class addressGenerator(threading.Thread):
break
print 'ripe.digest', ripe.digest().encode('hex')
print 'Address generator calculated', numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix, 'addresses at', numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix/(time.time()-startTime),'keys per second.'
address = encodeAddress(3,streamNumber,ripe.digest())
print 'Address generator calculated', numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix, 'addresses at', numberOfAddressesWeHadToMakeBeforeWeFoundOneWithTheCorrectRipePrefix / (time.time() - startTime), 'keys per second.'
address = encodeAddress(3, streamNumber, ripe.digest())
if command == 'createDeterministicAddresses':
#An excellent way for us to store our keys is in Wallet Import Format. Let us convert now.
#https://en.bitcoin.it/wiki/Wallet_import_format
privSigningKey = '\x80'+potentialPrivSigningKey
checksum = hashlib.sha256(hashlib.sha256(privSigningKey).digest()).digest()[0:4]
privSigningKeyWIF = arithmetic.changebase(privSigningKey + checksum,256,58)
# An excellent way for us to store our keys is in Wallet Import Format. Let us convert now.
# https://en.bitcoin.it/wiki/Wallet_import_format
privSigningKey = '\x80' + potentialPrivSigningKey
checksum = hashlib.sha256(hashlib.sha256(
privSigningKey).digest()).digest()[0:4]
privSigningKeyWIF = arithmetic.changebase(
privSigningKey + checksum, 256, 58)
privEncryptionKey = '\x80'+potentialPrivEncryptionKey
checksum = hashlib.sha256(hashlib.sha256(privEncryptionKey).digest()).digest()[0:4]
privEncryptionKeyWIF = arithmetic.changebase(privEncryptionKey + checksum,256,58)
privEncryptionKey = '\x80' + \
potentialPrivEncryptionKey
checksum = hashlib.sha256(hashlib.sha256(
privEncryptionKey).digest()).digest()[0:4]
privEncryptionKeyWIF = arithmetic.changebase(
privEncryptionKey + checksum, 256, 58)
try:
shared.config.add_section(address)
print 'label:', label
shared.config.set(address,'label',label)
shared.config.set(address,'enabled','true')
shared.config.set(address,'decoy','false')
shared.config.set(address,'noncetrialsperbyte',str(nonceTrialsPerByte))
shared.config.set(address,'payloadlengthextrabytes',str(payloadLengthExtraBytes))
shared.config.set(address,'privSigningKey',privSigningKeyWIF)
shared.config.set(address,'privEncryptionKey',privEncryptionKeyWIF)
shared.config.set(address, 'label', label)
shared.config.set(address, 'enabled', 'true')
shared.config.set(address, 'decoy', 'false')
shared.config.set(address, 'noncetrialsperbyte', str(
nonceTrialsPerByte))
shared.config.set(address, 'payloadlengthextrabytes', str(
payloadLengthExtraBytes))
shared.config.set(
address, 'privSigningKey', privSigningKeyWIF)
shared.config.set(
address, 'privEncryptionKey', privEncryptionKeyWIF)
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
shared.UISignalQueue.put(('writeNewAddressToTable',(label,address,str(streamNumber))))
listOfNewAddressesToSendOutThroughTheAPI.append(address)
#if eighteenByteRipe:
# shared.reloadMyAddressHashes()#This is necessary here (rather than just at the end) because otherwise if the human generates a large number of new addresses and uses one before they are done generating, the program will receive a getpubkey message and will ignore it.
shared.myECCryptorObjects[ripe.digest()] = highlevelcrypto.makeCryptor(potentialPrivEncryptionKey.encode('hex'))
shared.myAddressesByHash[ripe.digest()] = address
shared.workerQueue.put(('doPOWForMyV3Pubkey',ripe.digest()))
shared.UISignalQueue.put(('writeNewAddressToTable', (
label, address, str(streamNumber))))
listOfNewAddressesToSendOutThroughTheAPI.append(
address)
# if eighteenByteRipe:
# shared.reloadMyAddressHashes()#This is
# necessary here (rather than just at the end)
# because otherwise if the human generates a
# large number of new addresses and uses one
# before they are done generating, the program
# will receive a getpubkey message and will
# ignore it.
shared.myECCryptorObjects[ripe.digest()] = highlevelcrypto.makeCryptor(
potentialPrivEncryptionKey.encode('hex'))
shared.myAddressesByHash[
ripe.digest()] = address
shared.workerQueue.put((
'doPOWForMyV3Pubkey', ripe.digest()))
except:
print address,'already exists. Not adding it again.'
print address, 'already exists. Not adding it again.'
#Done generating addresses.
# Done generating addresses.
if command == 'createDeterministicAddresses':
#It may be the case that this address is being generated as a result of a call to the API. Let us put the result in the necessary queue.
apiAddressGeneratorReturnQueue.put(listOfNewAddressesToSendOutThroughTheAPI)
shared.UISignalQueue.put(('updateStatusBar','Done generating address'))
#shared.reloadMyAddressHashes()
# It may be the case that this address is being
# generated as a result of a call to the API. Let us
# put the result in the necessary queue.
apiAddressGeneratorReturnQueue.put(
listOfNewAddressesToSendOutThroughTheAPI)
shared.UISignalQueue.put((
'updateStatusBar', _translate("MainWindow", "Done generating address")))
# shared.reloadMyAddressHashes()
elif command == 'getDeterministicAddress':
apiAddressGeneratorReturnQueue.put(address)
else:
raise Exception("Error in the addressGenerator thread. Thread was given a command it could not understand: "+command)
raise Exception(
"Error in the addressGenerator thread. Thread was given a command it could not understand: " + command)
# This is one of several classes that constitute the API
# This class was written by Vaibhav Bhatia. Modified by Jonathan Warren (Atheros).
# http://code.activestate.com/recipes/501148-xmlrpc-serverclient-which-does-cookie-handling-and/
#This is one of several classes that constitute the API
#This class was written by Vaibhav Bhatia. Modified by Jonathan Warren (Atheros).
#http://code.activestate.com/recipes/501148-xmlrpc-serverclient-which-does-cookie-handling-and/
class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
def do_POST(self):
#Handles the HTTP POST request.
#Attempts to interpret all HTTP POST requests as XML-RPC calls,
#which are forwarded to the server's _dispatch method for handling.
#Note: this method is the same as in SimpleXMLRPCRequestHandler,
#just hacked to handle cookies
def do_POST(self):
# Handles the HTTP POST request.
# Attempts to interpret all HTTP POST requests as XML-RPC calls,
# which are forwarded to the server's _dispatch method for handling.
# Note: this method is the same as in SimpleXMLRPCRequestHandler,
# just hacked to handle cookies
# Check that the path is legal
if not self.is_rpc_path_valid():
@ -3477,7 +4141,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
# We read this in chunks to avoid straining
# socket.read(); around the 10 or 15Mb mark, some platforms
# begin to have problems (bug #792570).
max_chunk_size = 10*1024*1024
max_chunk_size = 10 * 1024 * 1024
size_remaining = int(self.headers["content-length"])
L = []
while size_remaining:
@ -3492,9 +4156,9 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
# check to see if a subclass implements _dispatch and dispatch
# using that method if present.
response = self.server._marshaled_dispatch(
data, getattr(self, '_dispatch', None)
)
except: # This should only happen if the module is buggy
data, getattr(self, '_dispatch', None)
)
except: # This should only happen if the module is buggy
# internal error, report as HTTP server error
self.send_response(500)
self.end_headers()
@ -3507,7 +4171,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
# HACK :start -> sends cookies here
if self.cookies:
for cookie in self.cookies:
self.send_header('Set-Cookie',cookie.output(header=''))
self.send_header('Set-Cookie', cookie.output(header=''))
# HACK :end
self.end_headers()
@ -3517,11 +4181,10 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
self.wfile.flush()
self.connection.shutdown(1)
def APIAuthenticateClient(self):
if self.headers.has_key('Authorization'):
if 'Authorization' in self.headers:
# handle Basic authentication
(enctype, encstr) = self.headers.get('Authorization').split()
(enctype, encstr) = self.headers.get('Authorization').split()
(emailid, password) = encstr.decode('base64').split(':')
if emailid == shared.config.get('bitmessagesettings', 'apiusername') and password == shared.config.get('bitmessagesettings', 'apipassword'):
return True
@ -3543,24 +4206,26 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
return "RPC Username or password incorrect or HTTP header lacks authentication at all."
# handle request
if method == 'helloWorld':
(a,b) = params
return a+'-'+b
(a, b) = params
return a + '-' + b
elif method == 'add':
(a,b) = params
return a+b
(a, b) = params
return a + b
elif method == 'statusBar':
message, = params
shared.UISignalQueue.put(('updateStatusBar',message))
shared.UISignalQueue.put(('updateStatusBar', message))
elif method == 'listAddresses':
data = '{"addresses":['
configSections = shared.config.sections()
for addressInKeysFile in configSections:
if addressInKeysFile <> 'bitmessagesettings':
status,addressVersionNumber,streamNumber,hash = decodeAddress(addressInKeysFile)
if addressInKeysFile != 'bitmessagesettings':
status, addressVersionNumber, streamNumber, hash = decodeAddress(
addressInKeysFile)
data
if len(data) > 20:
data += ','
data += json.dumps({'label':shared.config.get(addressInKeysFile,'label'),'address':addressInKeysFile,'stream':streamNumber,'enabled':shared.config.getboolean(addressInKeysFile,'enabled')},indent=4, separators=(',', ': '))
data += json.dumps({'label': shared.config.get(addressInKeysFile, 'label'), 'address': addressInKeysFile, 'stream':
streamNumber, 'enabled': shared.config.getboolean(addressInKeysFile, 'enabled')}, indent=4, separators=(',', ': '))
data += ']}'
return data
elif method == 'createRandomAddress':
@ -3569,30 +4234,39 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
elif len(params) == 1:
label, = params
eighteenByteRipe = False
nonceTrialsPerByte = shared.config.get('bitmessagesettings','defaultnoncetrialsperbyte')
payloadLengthExtraBytes = shared.config.get('bitmessagesettings','defaultpayloadlengthextrabytes')
nonceTrialsPerByte = shared.config.get(
'bitmessagesettings', 'defaultnoncetrialsperbyte')
payloadLengthExtraBytes = shared.config.get(
'bitmessagesettings', 'defaultpayloadlengthextrabytes')
elif len(params) == 2:
label, eighteenByteRipe = params
nonceTrialsPerByte = shared.config.get('bitmessagesettings','defaultnoncetrialsperbyte')
payloadLengthExtraBytes = shared.config.get('bitmessagesettings','defaultpayloadlengthextrabytes')
nonceTrialsPerByte = shared.config.get(
'bitmessagesettings', 'defaultnoncetrialsperbyte')
payloadLengthExtraBytes = shared.config.get(
'bitmessagesettings', 'defaultpayloadlengthextrabytes')
elif len(params) == 3:
label, eighteenByteRipe, totalDifficulty = params
nonceTrialsPerByte = int(shared.networkDefaultProofOfWorkNonceTrialsPerByte * totalDifficulty)
payloadLengthExtraBytes = shared.config.get('bitmessagesettings','defaultpayloadlengthextrabytes')
nonceTrialsPerByte = int(
shared.networkDefaultProofOfWorkNonceTrialsPerByte * totalDifficulty)
payloadLengthExtraBytes = shared.config.get(
'bitmessagesettings', 'defaultpayloadlengthextrabytes')
elif len(params) == 4:
label, eighteenByteRipe, totalDifficulty, smallMessageDifficulty = params
nonceTrialsPerByte = int(shared.networkDefaultProofOfWorkNonceTrialsPerByte * totalDifficulty)
payloadLengthExtraBytes = int(shared.networkDefaultPayloadLengthExtraBytes * smallMessageDifficulty)
nonceTrialsPerByte = int(
shared.networkDefaultProofOfWorkNonceTrialsPerByte * totalDifficulty)
payloadLengthExtraBytes = int(
shared.networkDefaultPayloadLengthExtraBytes * smallMessageDifficulty)
else:
return 'API Error 0000: Too many parameters!'
label = label.decode('base64')
try:
unicode(label,'utf-8')
unicode(label, 'utf-8')
except:
return 'API Error 0017: Label is not valid UTF-8 data.'
return 'API Error 0017: Label is not valid UTF-8 data.'
apiAddressGeneratorReturnQueue.queue.clear()
streamNumberForAddress = 1
shared.addressGeneratorQueue.put(('createRandomAddress',3,streamNumberForAddress,label,1,"",eighteenByteRipe,nonceTrialsPerByte,payloadLengthExtraBytes))
shared.addressGeneratorQueue.put((
'createRandomAddress', 3, streamNumberForAddress, label, 1, "", eighteenByteRipe, nonceTrialsPerByte, payloadLengthExtraBytes))
return apiAddressGeneratorReturnQueue.get()
elif method == 'createDeterministicAddresses':
if len(params) == 0:
@ -3603,48 +4277,62 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
addressVersionNumber = 0
streamNumber = 0
eighteenByteRipe = False
nonceTrialsPerByte = shared.config.get('bitmessagesettings','defaultnoncetrialsperbyte')
payloadLengthExtraBytes = shared.config.get('bitmessagesettings','defaultpayloadlengthextrabytes')
nonceTrialsPerByte = shared.config.get(
'bitmessagesettings', 'defaultnoncetrialsperbyte')
payloadLengthExtraBytes = shared.config.get(
'bitmessagesettings', 'defaultpayloadlengthextrabytes')
elif len(params) == 2:
passphrase, numberOfAddresses = params
addressVersionNumber = 0
streamNumber = 0
eighteenByteRipe = False
nonceTrialsPerByte = shared.config.get('bitmessagesettings','defaultnoncetrialsperbyte')
payloadLengthExtraBytes = shared.config.get('bitmessagesettings','defaultpayloadlengthextrabytes')
nonceTrialsPerByte = shared.config.get(
'bitmessagesettings', 'defaultnoncetrialsperbyte')
payloadLengthExtraBytes = shared.config.get(
'bitmessagesettings', 'defaultpayloadlengthextrabytes')
elif len(params) == 3:
passphrase, numberOfAddresses, addressVersionNumber = params
streamNumber = 0
eighteenByteRipe = False
nonceTrialsPerByte = shared.config.get('bitmessagesettings','defaultnoncetrialsperbyte')
payloadLengthExtraBytes = shared.config.get('bitmessagesettings','defaultpayloadlengthextrabytes')
nonceTrialsPerByte = shared.config.get(
'bitmessagesettings', 'defaultnoncetrialsperbyte')
payloadLengthExtraBytes = shared.config.get(
'bitmessagesettings', 'defaultpayloadlengthextrabytes')
elif len(params) == 4:
passphrase, numberOfAddresses, addressVersionNumber, streamNumber = params
eighteenByteRipe = False
nonceTrialsPerByte = shared.config.get('bitmessagesettings','defaultnoncetrialsperbyte')
payloadLengthExtraBytes = shared.config.get('bitmessagesettings','defaultpayloadlengthextrabytes')
nonceTrialsPerByte = shared.config.get(
'bitmessagesettings', 'defaultnoncetrialsperbyte')
payloadLengthExtraBytes = shared.config.get(
'bitmessagesettings', 'defaultpayloadlengthextrabytes')
elif len(params) == 5:
passphrase, numberOfAddresses, addressVersionNumber, streamNumber, eighteenByteRipe = params
nonceTrialsPerByte = shared.config.get('bitmessagesettings','defaultnoncetrialsperbyte')
payloadLengthExtraBytes = shared.config.get('bitmessagesettings','defaultpayloadlengthextrabytes')
nonceTrialsPerByte = shared.config.get(
'bitmessagesettings', 'defaultnoncetrialsperbyte')
payloadLengthExtraBytes = shared.config.get(
'bitmessagesettings', 'defaultpayloadlengthextrabytes')
elif len(params) == 6:
passphrase, numberOfAddresses, addressVersionNumber, streamNumber, eighteenByteRipe, totalDifficulty = params
nonceTrialsPerByte = int(shared.networkDefaultProofOfWorkNonceTrialsPerByte * totalDifficulty)
payloadLengthExtraBytes = shared.config.get('bitmessagesettings','defaultpayloadlengthextrabytes')
nonceTrialsPerByte = int(
shared.networkDefaultProofOfWorkNonceTrialsPerByte * totalDifficulty)
payloadLengthExtraBytes = shared.config.get(
'bitmessagesettings', 'defaultpayloadlengthextrabytes')
elif len(params) == 7:
passphrase, numberOfAddresses, addressVersionNumber, streamNumber, eighteenByteRipe, totalDifficulty, smallMessageDifficulty = params
nonceTrialsPerByte = int(shared.networkDefaultProofOfWorkNonceTrialsPerByte * totalDifficulty)
payloadLengthExtraBytes = int(shared.networkDefaultPayloadLengthExtraBytes * smallMessageDifficulty)
nonceTrialsPerByte = int(
shared.networkDefaultProofOfWorkNonceTrialsPerByte * totalDifficulty)
payloadLengthExtraBytes = int(
shared.networkDefaultPayloadLengthExtraBytes * smallMessageDifficulty)
else:
return 'API Error 0000: Too many parameters!'
if len(passphrase) == 0:
return 'API Error 0001: The specified passphrase is blank.'
passphrase = passphrase.decode('base64')
if addressVersionNumber == 0: #0 means "just use the proper addressVersionNumber"
if addressVersionNumber == 0: # 0 means "just use the proper addressVersionNumber"
addressVersionNumber = 3
if addressVersionNumber != 3:
return 'API Error 0002: The address version number currently must be 3 (or 0 which means auto-select). '+ addressVersionNumber+' isn\'t supported.'
if streamNumber == 0: #0 means "just use the most available stream"
return 'API Error 0002: The address version number currently must be 3 (or 0 which means auto-select). ' + addressVersionNumber + ' isn\'t supported.'
if streamNumber == 0: # 0 means "just use the most available stream"
streamNumber = 1
if streamNumber != 1:
return 'API Error 0003: The stream number must be 1 (or 0 which means auto-select). Others aren\'t supported.'
@ -3654,13 +4342,15 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
return 'API Error 0005: You have (accidentally?) specified too many addresses to make. Maximum 999. This check only exists to prevent mischief; if you really want to create more addresses than this, contact the Bitmessage developers and we can modify the check or you can do it yourself by searching the source code for this message.'
apiAddressGeneratorReturnQueue.queue.clear()
print 'Requesting that the addressGenerator create', numberOfAddresses, 'addresses.'
shared.addressGeneratorQueue.put(('createDeterministicAddresses',addressVersionNumber,streamNumber,'unused API address',numberOfAddresses,passphrase,eighteenByteRipe,nonceTrialsPerByte,payloadLengthExtraBytes))
shared.addressGeneratorQueue.put(
('createDeterministicAddresses', addressVersionNumber, streamNumber,
'unused API address', numberOfAddresses, passphrase, eighteenByteRipe, nonceTrialsPerByte, payloadLengthExtraBytes))
data = '{"addresses":['
queueReturn = apiAddressGeneratorReturnQueue.get()
for item in queueReturn:
if len(data) > 20:
data += ','
data += "\""+item+ "\""
data += "\"" + item + "\""
data += ']}'
return data
elif method == 'getDeterministicAddress':
@ -3673,16 +4363,19 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
return 'API Error 0001: The specified passphrase is blank.'
passphrase = passphrase.decode('base64')
if addressVersionNumber != 3:
return 'API Error 0002: The address version number currently must be 3. '+ addressVersionNumber +' isn\'t supported.'
return 'API Error 0002: The address version number currently must be 3. ' + addressVersionNumber + ' isn\'t supported.'
if streamNumber != 1:
return 'API Error 0003: The stream number must be 1. Others aren\'t supported.'
apiAddressGeneratorReturnQueue.queue.clear()
print 'Requesting that the addressGenerator create', numberOfAddresses, 'addresses.'
shared.addressGeneratorQueue.put(('getDeterministicAddress',addressVersionNumber,streamNumber,'unused API address',numberOfAddresses,passphrase,eighteenByteRipe))
shared.addressGeneratorQueue.put(
('getDeterministicAddress', addressVersionNumber,
streamNumber, 'unused API address', numberOfAddresses, passphrase, eighteenByteRipe))
return apiAddressGeneratorReturnQueue.get()
elif method == 'getAllInboxMessages':
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT msgid, toaddress, fromaddress, subject, received, message FROM inbox where folder='inbox' ORDER BY received''')
shared.sqlSubmitQueue.put(
'''SELECT msgid, toaddress, fromaddress, subject, received, message FROM inbox where folder='inbox' ORDER BY received''')
shared.sqlSubmitQueue.put('')
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
@ -3693,7 +4386,8 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
message = shared.fixPotentiallyInvalidUTF8Data(message)
if len(data) > 25:
data += ','
data += json.dumps({'msgid':msgid.encode('hex'),'toAddress':toAddress,'fromAddress':fromAddress,'subject':subject.encode('base64'),'message':message.encode('base64'),'encodingType':2,'receivedTime':received},indent=4, separators=(',', ': '))
data += json.dumps({'msgid': msgid.encode('hex'), 'toAddress': toAddress, 'fromAddress': fromAddress, 'subject': subject.encode(
'base64'), 'message': message.encode('base64'), 'encodingType': 2, 'receivedTime': received}, indent=4, separators=(',', ': '))
data += ']}'
return data
elif method == 'trashMessage':
@ -3702,12 +4396,13 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
msgid = params[0].decode('hex')
t = (msgid,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''UPDATE inbox SET folder='trash' WHERE msgid=?''')
shared.sqlSubmitQueue.put(
'''UPDATE inbox SET folder='trash' WHERE msgid=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.UISignalQueue.put(('removeInboxRowByMsgid',msgid))
shared.UISignalQueue.put(('removeInboxRowByMsgid', msgid))
return 'Trashed message (assuming message existed).'
elif method == 'sendMessage':
if len(params) == 0:
@ -3721,34 +4416,36 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
return 'API Error 0006: The encoding type must be 2 because that is the only one this program currently supports.'
subject = subject.decode('base64')
message = message.decode('base64')
status,addressVersionNumber,streamNumber,toRipe = decodeAddress(toAddress)
if status <> 'success':
status, addressVersionNumber, streamNumber, toRipe = decodeAddress(
toAddress)
if status != 'success':
shared.printLock.acquire()
print 'API Error 0007: Could not decode address:', toAddress, ':', status
shared.printLock.release()
if status == 'checksumfailed':
return 'API Error 0008: Checksum failed for address: ' + toAddress
if status == 'invalidcharacters':
return 'API Error 0009: Invalid characters in address: '+ toAddress
return 'API Error 0009: Invalid characters in address: ' + toAddress
if status == 'versiontoohigh':
return 'API Error 0010: Address version number too high (or zero) in address: ' + toAddress
return 'API Error 0007: Could not decode address: ' + toAddress+ ' : '+ status
return 'API Error 0007: Could not decode address: ' + toAddress + ' : ' + status
if addressVersionNumber < 2 or addressVersionNumber > 3:
return 'API Error 0011: The address version number currently must be 2 or 3. Others aren\'t supported. Check the toAddress.'
if streamNumber != 1:
return 'API Error 0012: The stream number must be 1. Others aren\'t supported. Check the toAddress.'
status,addressVersionNumber,streamNumber,fromRipe = decodeAddress(fromAddress)
if status <> 'success':
status, addressVersionNumber, streamNumber, fromRipe = decodeAddress(
fromAddress)
if status != 'success':
shared.printLock.acquire()
print 'API Error 0007: Could not decode address:', fromAddress, ':', status
shared.printLock.release()
if status == 'checksumfailed':
return 'API Error 0008: Checksum failed for address: ' + fromAddress
if status == 'invalidcharacters':
return 'API Error 0009: Invalid characters in address: '+ fromAddress
return 'API Error 0009: Invalid characters in address: ' + fromAddress
if status == 'versiontoohigh':
return 'API Error 0010: Address version number too high (or zero) in address: ' + fromAddress
return 'API Error 0007: Could not decode address: ' + fromAddress+ ' : '+ status
return 'API Error 0007: Could not decode address: ' + fromAddress + ' : ' + status
if addressVersionNumber < 2 or addressVersionNumber > 3:
return 'API Error 0011: The address version number currently must be 2 or 3. Others aren\'t supported. Check the fromAddress.'
if streamNumber != 1:
@ -3756,7 +4453,8 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
toAddress = addBMIfNotPresent(toAddress)
fromAddress = addBMIfNotPresent(fromAddress)
try:
fromAddressEnabled = shared.config.getboolean(fromAddress,'enabled')
fromAddressEnabled = shared.config.getboolean(
fromAddress, 'enabled')
except:
return 'API Error 0013: Could not find your fromAddress in the keys.dat file.'
if not fromAddressEnabled:
@ -3764,30 +4462,34 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
ackdata = OpenSSL.rand(32)
shared.sqlLock.acquire()
t = ('',toAddress,toRipe,fromAddress,subject,message,ackdata,int(time.time()),'msgqueued',1,1,'sent',2)
shared.sqlSubmitQueue.put('''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)''')
t = ('', toAddress, toRipe, fromAddress, subject, message, ackdata, int(
time.time()), 'msgqueued', 1, 1, 'sent', 2)
shared.sqlSubmitQueue.put(
'''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
toLabel = ''
t = (toAddress,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''select label from addressbook where address=?''')
shared.sqlSubmitQueue.put(
'''select label from addressbook where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn <> []:
if queryreturn != []:
for row in queryreturn:
toLabel, = row
#apiSignalQueue.put(('displayNewSentMessage',(toAddress,toLabel,fromAddress,subject,message,ackdata)))
shared.UISignalQueue.put(('displayNewSentMessage',(toAddress,toLabel,fromAddress,subject,message,ackdata)))
# apiSignalQueue.put(('displayNewSentMessage',(toAddress,toLabel,fromAddress,subject,message,ackdata)))
shared.UISignalQueue.put(('displayNewSentMessage', (
toAddress, toLabel, fromAddress, subject, message, ackdata)))
shared.workerQueue.put(('sendmessage', toAddress))
shared.workerQueue.put(('sendmessage',toAddress))
return ackdata.encode('hex')
elif method == 'sendBroadcast':
if len(params) == 0:
return 'API Error 0000: I need parameters!'
@ -3801,25 +4503,27 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
subject = subject.decode('base64')
message = message.decode('base64')
status,addressVersionNumber,streamNumber,fromRipe = decodeAddress(fromAddress)
if status <> 'success':
status, addressVersionNumber, streamNumber, fromRipe = decodeAddress(
fromAddress)
if status != 'success':
shared.printLock.acquire()
print 'API Error 0007: Could not decode address:', fromAddress, ':', status
shared.printLock.release()
if status == 'checksumfailed':
return 'API Error 0008: Checksum failed for address: ' + fromAddress
if status == 'invalidcharacters':
return 'API Error 0009: Invalid characters in address: '+ fromAddress
return 'API Error 0009: Invalid characters in address: ' + fromAddress
if status == 'versiontoohigh':
return 'API Error 0010: Address version number too high (or zero) in address: ' + fromAddress
return 'API Error 0007: Could not decode address: ' + fromAddress+ ' : '+ status
return 'API Error 0007: Could not decode address: ' + fromAddress + ' : ' + status
if addressVersionNumber < 2 or addressVersionNumber > 3:
return 'API Error 0011: the address version number currently must be 2 or 3. Others aren\'t supported. Check the fromAddress.'
if streamNumber != 1:
return 'API Error 0012: the stream number must be 1. Others aren\'t supported. Check the fromAddress.'
fromAddress = addBMIfNotPresent(fromAddress)
try:
fromAddressEnabled = shared.config.getboolean(fromAddress,'enabled')
fromAddressEnabled = shared.config.getboolean(
fromAddress, 'enabled')
except:
return 'API Error 0013: could not find your fromAddress in the keys.dat file.'
ackdata = OpenSSL.rand(32)
@ -3827,18 +4531,21 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
ripe = ''
shared.sqlLock.acquire()
t = ('',toAddress,ripe,fromAddress,subject,message,ackdata,int(time.time()),'broadcastqueued',1,1,'sent',2)
shared.sqlSubmitQueue.put('''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)''')
t = ('', toAddress, ripe, fromAddress, subject, message, ackdata, int(
time.time()), 'broadcastqueued', 1, 1, 'sent', 2)
shared.sqlSubmitQueue.put(
'''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
toLabel = '[Broadcast subscribers]'
shared.UISignalQueue.put(('displayNewSentMessage',(toAddress,toLabel,fromAddress,subject,message,ackdata)))
shared.workerQueue.put(('sendbroadcast',''))
shared.UISignalQueue.put(('displayNewSentMessage', (
toAddress, toLabel, fromAddress, subject, message, ackdata)))
shared.workerQueue.put(('sendbroadcast', ''))
return ackdata.encode('hex')
return ackdata.encode('hex')
elif method == 'getStatus':
if len(params) != 1:
return 'API Error 0000: I need one parameter!'
@ -3846,7 +4553,8 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
if len(ackdata) != 64:
return 'API Error 0015: The length of ackData should be 32 bytes (encoded in hex thus 64 characters).'
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT status FROM sent where ackdata=?''')
shared.sqlSubmitQueue.put(
'''SELECT status FROM sent where ackdata=?''')
shared.sqlSubmitQueue.put((ackdata.decode('hex'),))
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
@ -3865,47 +4573,51 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
address, label = params
label = label.decode('base64')
try:
unicode(label,'utf-8')
unicode(label, 'utf-8')
except:
return 'API Error 0017: Label is not valid UTF-8 data.'
if len(params) >2:
return 'API Error 0017: Label is not valid UTF-8 data.'
if len(params) > 2:
return 'API Error 0000: I need either 1 or 2 parameters!'
address = addBMIfNotPresent(address)
status,addressVersionNumber,streamNumber,toRipe = decodeAddress(address)
if status <> 'success':
status, addressVersionNumber, streamNumber, toRipe = decodeAddress(
address)
if status != 'success':
shared.printLock.acquire()
print 'API Error 0007: Could not decode address:', address, ':', status
shared.printLock.release()
if status == 'checksumfailed':
return 'API Error 0008: Checksum failed for address: ' + address
if status == 'invalidcharacters':
return 'API Error 0009: Invalid characters in address: '+ address
return 'API Error 0009: Invalid characters in address: ' + address
if status == 'versiontoohigh':
return 'API Error 0010: Address version number too high (or zero) in address: ' + address
return 'API Error 0007: Could not decode address: ' + address+ ' : '+ status
return 'API Error 0007: Could not decode address: ' + address + ' : ' + status
if addressVersionNumber < 2 or addressVersionNumber > 3:
return 'API Error 0011: The address version number currently must be 2 or 3. Others aren\'t supported.'
if streamNumber != 1:
return 'API Error 0012: The stream number must be 1. Others aren\'t supported.'
#First we must check to see if the address is already in the subscriptions list.
# First we must check to see if the address is already in the
# subscriptions list.
shared.sqlLock.acquire()
t = (address,)
shared.sqlSubmitQueue.put('''select * from subscriptions where address=?''')
shared.sqlSubmitQueue.put(
'''select * from subscriptions where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn != []:
return 'API Error 0016: You are already subscribed to that address.'
t = (label,address,True)
t = (label, address, True)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''INSERT INTO subscriptions VALUES (?,?,?)''')
shared.sqlSubmitQueue.put(
'''INSERT INTO subscriptions VALUES (?,?,?)''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.reloadBroadcastSendersForWhichImWatching()
shared.UISignalQueue.put(('rerenderInboxFromLabels',''))
shared.UISignalQueue.put(('rerenderSubscriptions',''))
shared.UISignalQueue.put(('rerenderInboxFromLabels', ''))
shared.UISignalQueue.put(('rerenderSubscriptions', ''))
return 'Added subscription.'
elif method == 'deleteSubscription':
@ -3915,56 +4627,70 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
address = addBMIfNotPresent(address)
t = (address,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''DELETE FROM subscriptions WHERE address=?''')
shared.sqlSubmitQueue.put(
'''DELETE FROM subscriptions WHERE address=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.reloadBroadcastSendersForWhichImWatching()
shared.UISignalQueue.put(('rerenderInboxFromLabels',''))
shared.UISignalQueue.put(('rerenderSubscriptions',''))
shared.UISignalQueue.put(('rerenderInboxFromLabels', ''))
shared.UISignalQueue.put(('rerenderSubscriptions', ''))
return 'Deleted subscription if it existed.'
else:
return 'Invalid Method: %s'%method
return 'Invalid Method: %s' % method
# This thread, of which there is only one, runs the API.
#This thread, of which there is only one, runs the API.
class singleAPI(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
se = SimpleXMLRPCServer((shared.config.get('bitmessagesettings', 'apiinterface'),shared.config.getint('bitmessagesettings', 'apiport')), MySimpleXMLRPCRequestHandler, True, True)
se = SimpleXMLRPCServer((shared.config.get('bitmessagesettings', 'apiinterface'), shared.config.getint(
'bitmessagesettings', 'apiport')), MySimpleXMLRPCRequestHandler, True, True)
se.register_introspection_functions()
se.serve_forever()
selfInitiatedConnections = {} #This is a list of current connections (the thread pointers at least)
alreadyAttemptedConnectionsList = {} #This is a list of nodes to which we have already attempted a connection
selfInitiatedConnections = {}
# This is a list of current connections (the thread pointers at least)
alreadyAttemptedConnectionsList = {
} # This is a list of nodes to which we have already attempted a connection
ackdataForWhichImWatching = {}
alreadyAttemptedConnectionsListLock = threading.Lock()
eightBytesOfRandomDataUsedToDetectConnectionsToSelf = pack('>Q',random.randrange(1, 18446744073709551615))
eightBytesOfRandomDataUsedToDetectConnectionsToSelf = pack(
'>Q', random.randrange(1, 18446744073709551615))
neededPubkeys = {}
successfullyDecryptMessageTimings = [] #A list of the amounts of time it took to successfully decrypt msg messages
apiAddressGeneratorReturnQueue = Queue.Queue() #The address generator thread uses this queue to get information back to the API thread.
alreadyAttemptedConnectionsListResetTime = int(time.time()) #used to clear out the alreadyAttemptedConnectionsList periodically so that we will retry connecting to hosts to which we have already tried to connect.
successfullyDecryptMessageTimings = [
] # A list of the amounts of time it took to successfully decrypt msg messages
apiAddressGeneratorReturnQueue = Queue.Queue(
) # The address generator thread uses this queue to get information back to the API thread.
alreadyAttemptedConnectionsListResetTime = int(
time.time()) # used to clear out the alreadyAttemptedConnectionsList periodically so that we will retry connecting to hosts to which we have already tried to connect.
numberOfObjectsThatWeHaveYetToCheckAndSeeWhetherWeAlreadyHavePerPeer = {}
if useVeryEasyProofOfWorkForTesting:
shared.networkDefaultProofOfWorkNonceTrialsPerByte = int(shared.networkDefaultProofOfWorkNonceTrialsPerByte / 16)
shared.networkDefaultPayloadLengthExtraBytes = int(shared.networkDefaultPayloadLengthExtraBytes / 7000)
shared.networkDefaultProofOfWorkNonceTrialsPerByte = int(
shared.networkDefaultProofOfWorkNonceTrialsPerByte / 16)
shared.networkDefaultPayloadLengthExtraBytes = int(
shared.networkDefaultPayloadLengthExtraBytes / 7000)
if __name__ == "__main__":
# is the application already running? If yes then exit.
thisapp = singleton.singleinstance()
signal.signal(signal.SIGINT, signal_handler)
#signal.signal(signal.SIGINT, signal.SIG_DFL)
# signal.signal(signal.SIGINT, signal.SIG_DFL)
# Check the Major version, the first element in the array
if sqlite3.sqlite_version_info[0] < 3:
print 'This program requires sqlite version 3 or higher because 2 and lower cannot store NULL values. I see version:', sqlite3.sqlite_version_info
os._exit(0)
#First try to load the config file (the keys.dat file) from the program directory
# First try to load the config file (the keys.dat file) from the program
# directory
shared.config = ConfigParser.SafeConfigParser()
shared.config.read('keys.dat')
try:
@ -3972,7 +4698,8 @@ if __name__ == "__main__":
print 'Loading config files from same directory as program'
shared.appdata = ''
except:
#Could not load the keys.dat file in the program directory. Perhaps it is in the appdata directory.
# Could not load the keys.dat file in the program directory. Perhaps it
# is in the appdata directory.
shared.appdata = shared.lookupAppdataFolder()
shared.config = ConfigParser.SafeConfigParser()
shared.config.read(shared.appdata + 'keys.dat')
@ -3980,35 +4707,51 @@ if __name__ == "__main__":
shared.config.get('bitmessagesettings', 'settingsversion')
print 'Loading existing config files from', shared.appdata
except:
#This appears to be the first time running the program; there is no config file (or it cannot be accessed). Create config file.
# This appears to be the first time running the program; there is
# no config file (or it cannot be accessed). Create config file.
shared.config.add_section('bitmessagesettings')
shared.config.set('bitmessagesettings','settingsversion','6')
shared.config.set('bitmessagesettings','port','8444')
shared.config.set('bitmessagesettings','timeformat','%%a, %%d %%b %%Y %%I:%%M %%p')
shared.config.set('bitmessagesettings','blackwhitelist','black')
shared.config.set('bitmessagesettings','startonlogon','false')
shared.config.set('bitmessagesettings', 'settingsversion', '6')
shared.config.set('bitmessagesettings', 'port', '8444')
shared.config.set(
'bitmessagesettings', 'timeformat', '%%a, %%d %%b %%Y %%I:%%M %%p')
shared.config.set('bitmessagesettings', 'blackwhitelist', 'black')
shared.config.set('bitmessagesettings', 'startonlogon', 'false')
if 'linux' in sys.platform:
shared.config.set('bitmessagesettings','minimizetotray','false')#This isn't implimented yet and when True on Ubuntu causes Bitmessage to disappear while running when minimized.
shared.config.set(
'bitmessagesettings', 'minimizetotray', 'false')
# This isn't implimented yet and when True on
# Ubuntu causes Bitmessage to disappear while
# running when minimized.
else:
shared.config.set('bitmessagesettings','minimizetotray','true')
shared.config.set('bitmessagesettings','showtraynotifications','true')
shared.config.set('bitmessagesettings','startintray','false')
shared.config.set('bitmessagesettings','socksproxytype','none')
shared.config.set('bitmessagesettings','sockshostname','localhost')
shared.config.set('bitmessagesettings','socksport','9050')
shared.config.set('bitmessagesettings','socksauthentication','false')
shared.config.set('bitmessagesettings','socksusername','')
shared.config.set('bitmessagesettings','sockspassword','')
shared.config.set('bitmessagesettings','keysencrypted','false')
shared.config.set('bitmessagesettings','messagesencrypted','false')
shared.config.set('bitmessagesettings','defaultnoncetrialsperbyte',str(shared.networkDefaultProofOfWorkNonceTrialsPerByte))
shared.config.set('bitmessagesettings','defaultpayloadlengthextrabytes',str(shared.networkDefaultPayloadLengthExtraBytes))
shared.config.set('bitmessagesettings','minimizeonclose','false')
shared.config.set('bitmessagesettings','maxacceptablenoncetrialsperbyte','0')
shared.config.set('bitmessagesettings','maxacceptablepayloadlengthextrabytes','0')
shared.config.set(
'bitmessagesettings', 'minimizetotray', 'true')
shared.config.set(
'bitmessagesettings', 'showtraynotifications', 'true')
shared.config.set('bitmessagesettings', 'startintray', 'false')
shared.config.set('bitmessagesettings', 'socksproxytype', 'none')
shared.config.set(
'bitmessagesettings', 'sockshostname', 'localhost')
shared.config.set('bitmessagesettings', 'socksport', '9050')
shared.config.set(
'bitmessagesettings', 'socksauthentication', 'false')
shared.config.set('bitmessagesettings', 'socksusername', '')
shared.config.set('bitmessagesettings', 'sockspassword', '')
shared.config.set('bitmessagesettings', 'keysencrypted', 'false')
shared.config.set(
'bitmessagesettings', 'messagesencrypted', 'false')
shared.config.set('bitmessagesettings', 'defaultnoncetrialsperbyte', str(
shared.networkDefaultProofOfWorkNonceTrialsPerByte))
shared.config.set('bitmessagesettings', 'defaultpayloadlengthextrabytes', str(
shared.networkDefaultPayloadLengthExtraBytes))
shared.config.set('bitmessagesettings', 'minimizeonclose', 'false')
shared.config.set(
'bitmessagesettings', 'maxacceptablenoncetrialsperbyte', '0')
shared.config.set(
'bitmessagesettings', 'maxacceptablepayloadlengthextrabytes', '0')
if storeConfigFilesInSameDirectoryAsProgramByDefault:
#Just use the same directory as the program and forget about the appdata folder
# Just use the same directory as the program and forget about
# the appdata folder
shared.appdata = ''
print 'Creating new config files in same directory as program.'
else:
@ -4017,23 +4760,26 @@ if __name__ == "__main__":
os.makedirs(shared.appdata)
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
if shared.config.getint('bitmessagesettings','settingsversion') == 1:
shared.config.set('bitmessagesettings','settingsversion','4') #If the settings version is equal to 2 or 3 then the sqlThread will modify the pubkeys table and change the settings version to 4.
shared.config.set('bitmessagesettings','socksproxytype','none')
shared.config.set('bitmessagesettings','sockshostname','localhost')
shared.config.set('bitmessagesettings','socksport','9050')
shared.config.set('bitmessagesettings','socksauthentication','false')
shared.config.set('bitmessagesettings','socksusername','')
shared.config.set('bitmessagesettings','sockspassword','')
shared.config.set('bitmessagesettings','keysencrypted','false')
shared.config.set('bitmessagesettings','messagesencrypted','false')
if shared.config.getint('bitmessagesettings', 'settingsversion') == 1:
shared.config.set('bitmessagesettings', 'settingsversion', '4')
# If the settings version is equal to 2 or 3 then the
# sqlThread will modify the pubkeys table and change
# the settings version to 4.
shared.config.set('bitmessagesettings', 'socksproxytype', 'none')
shared.config.set('bitmessagesettings', 'sockshostname', 'localhost')
shared.config.set('bitmessagesettings', 'socksport', '9050')
shared.config.set('bitmessagesettings', 'socksauthentication', 'false')
shared.config.set('bitmessagesettings', 'socksusername', '')
shared.config.set('bitmessagesettings', 'sockspassword', '')
shared.config.set('bitmessagesettings', 'keysencrypted', 'false')
shared.config.set('bitmessagesettings', 'messagesencrypted', 'false')
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
try:
#We shouldn't have to use the shared.knownNodesLock because this had better be the only thread accessing knownNodes right now.
# We shouldn't have to use the shared.knownNodesLock because this had
# better be the only thread accessing knownNodes right now.
pickleFile = open(shared.appdata + 'knownnodes.dat', 'rb')
shared.knownNodes = pickle.load(pickleFile)
pickleFile.close()
@ -4046,48 +4792,53 @@ if __name__ == "__main__":
print 'Bitmessage cannot read future versions of the keys file (keys.dat). Run the newer version of Bitmessage.'
raise SystemExit
#DNS bootstrap. This could be programmed to use the SOCKS proxy to do the DNS lookup some day but for now we will just rely on the entries in defaultKnownNodes.py. Hopefully either they are up to date or the user has run Bitmessage recently without SOCKS turned on and received good bootstrap nodes using that method.
# DNS bootstrap. This could be programmed to use the SOCKS proxy to do the
# DNS lookup some day but for now we will just rely on the entries in
# defaultKnownNodes.py. Hopefully either they are up to date or the user
# has run Bitmessage recently without SOCKS turned on and received good
# bootstrap nodes using that method.
if shared.config.get('bitmessagesettings', 'socksproxytype') == 'none':
try:
for item in socket.getaddrinfo('bootstrap8080.bitmessage.org',80):
print 'Adding', item[4][0],'to knownNodes based on DNS boostrap method'
shared.knownNodes[1][item[4][0]] = (8080,int(time.time()))
for item in socket.getaddrinfo('bootstrap8080.bitmessage.org', 80):
print 'Adding', item[4][0], 'to knownNodes based on DNS boostrap method'
shared.knownNodes[1][item[4][0]] = (8080, int(time.time()))
except:
print 'bootstrap8080.bitmessage.org DNS bootstraping failed.'
try:
for item in socket.getaddrinfo('bootstrap8444.bitmessage.org',80):
print 'Adding', item[4][0],'to knownNodes based on DNS boostrap method'
shared.knownNodes[1][item[4][0]] = (8444,int(time.time()))
for item in socket.getaddrinfo('bootstrap8444.bitmessage.org', 80):
print 'Adding', item[4][0], 'to knownNodes based on DNS boostrap method'
shared.knownNodes[1][item[4][0]] = (8444, int(time.time()))
except:
print 'bootstrap8444.bitmessage.org DNS bootstrapping failed.'
else:
print 'DNS bootstrap skipped because SOCKS is used.'
#Start the address generation thread
# Start the address generation thread
addressGeneratorThread = addressGenerator()
addressGeneratorThread.daemon = True # close the main program even if there are threads left
addressGeneratorThread.daemon = True # close the main program even if there are threads left
addressGeneratorThread.start()
#Start the thread that calculates POWs
# Start the thread that calculates POWs
singleWorkerThread = singleWorker()
singleWorkerThread.daemon = True # close the main program even if there are threads left
singleWorkerThread.daemon = True # close the main program even if there are threads left
singleWorkerThread.start()
#Start the SQL thread
# Start the SQL thread
sqlLookup = sqlThread()
sqlLookup.daemon = False # DON'T close the main program even if there are threads left. The closeEvent should command this thread to exit gracefully.
sqlLookup.daemon = False # DON'T close the main program even if there are threads left. The closeEvent should command this thread to exit gracefully.
sqlLookup.start()
#Start the cleanerThread
# Start the cleanerThread
singleCleanerThread = singleCleaner()
singleCleanerThread.daemon = True # close the main program even if there are threads left
singleCleanerThread.daemon = True # close the main program even if there are threads left
singleCleanerThread.start()
shared.reloadMyAddressHashes()
shared.reloadBroadcastSendersForWhichImWatching()
if shared.safeConfigGetBoolean('bitmessagesettings','apienabled'):
if shared.safeConfigGetBoolean('bitmessagesettings', 'apienabled'):
try:
apiNotifyPath = shared.config.get('bitmessagesettings','apinotifypath')
apiNotifyPath = shared.config.get(
'bitmessagesettings', 'apinotifypath')
except:
apiNotifyPath = ''
if apiNotifyPath != '':
@ -4096,25 +4847,27 @@ if __name__ == "__main__":
shared.printLock.release()
call([apiNotifyPath, "startingUp"])
singleAPIThread = singleAPI()
singleAPIThread.daemon = True #close the main program even if there are threads left
singleAPIThread.daemon = True # close the main program even if there are threads left
singleAPIThread.start()
#self.singleAPISignalHandlerThread = singleAPISignalHandler()
#self.singleAPISignalHandlerThread.start()
#QtCore.QObject.connect(self.singleAPISignalHandlerThread, QtCore.SIGNAL("updateStatusBar(PyQt_PyObject)"), self.updateStatusBar)
#QtCore.QObject.connect(self.singleAPISignalHandlerThread, QtCore.SIGNAL("passAddressGeneratorObjectThrough(PyQt_PyObject)"), self.connectObjectToAddressGeneratorSignals)
#QtCore.QObject.connect(self.singleAPISignalHandlerThread, QtCore.SIGNAL("displayNewSentMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.displayNewSentMessage)
# self.singleAPISignalHandlerThread = singleAPISignalHandler()
# self.singleAPISignalHandlerThread.start()
# QtCore.QObject.connect(self.singleAPISignalHandlerThread, QtCore.SIGNAL("updateStatusBar(PyQt_PyObject)"), self.updateStatusBar)
# QtCore.QObject.connect(self.singleAPISignalHandlerThread, QtCore.SIGNAL("passAddressGeneratorObjectThrough(PyQt_PyObject)"), self.connectObjectToAddressGeneratorSignals)
# QtCore.QObject.connect(self.singleAPISignalHandlerThread,
# QtCore.SIGNAL("displayNewSentMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),
# self.displayNewSentMessage)
connectToStream(1)
singleListenerThread = singleListener()
singleListenerThread.daemon = True # close the main program even if there are threads left
singleListenerThread.daemon = True # close the main program even if there are threads left
singleListenerThread.start()
if not shared.safeConfigGetBoolean('bitmessagesettings','daemon'):
if not shared.safeConfigGetBoolean('bitmessagesettings', 'daemon'):
try:
from PyQt4.QtCore import *
from PyQt4.QtGui import *
except Exception, err:
except Exception as err:
print 'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download PyQt from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\'. If you want to run in daemon mode, see https://bitmessage.org/wiki/Daemon'
print 'Error message:', err
os._exit(0)

View File

@ -4,13 +4,24 @@ except:
pass
try:
from PyQt4 import QtCore, QtGui
from PyQt4.QtCore import *
from PyQt4.QtGui import *
except Exception, err:
except Exception as err:
print 'PyBitmessage requires PyQt. You can download it from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\' (without quotes).'
print 'Error message:', err
sys.exit()
try:
_encoding = QtGui.QApplication.UnicodeUTF8
except AttributeError:
print 'QtGui.QApplication.UnicodeUTF8 error:', err
def _translate(context, text):
return QtGui.QApplication.translate(context, text)
withMessagingMenu = False
try:
from gi.repository import MessagingMenu
@ -37,7 +48,7 @@ import os
from pyelliptic.openssl import OpenSSL
import pickle
import platform
import string
class MyForm(QtGui.QMainWindow):
@ -48,189 +59,256 @@ class MyForm(QtGui.QMainWindow):
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
#Ask the user if we may delete their old version 1 addresses if they have any.
# Ask the user if we may delete their old version 1 addresses if they
# have any.
configSections = shared.config.sections()
for addressInKeysFile in configSections:
if addressInKeysFile <> 'bitmessagesettings':
status,addressVersionNumber,streamNumber,hash = decodeAddress(addressInKeysFile)
if addressInKeysFile != 'bitmessagesettings':
status, addressVersionNumber, streamNumber, hash = decodeAddress(
addressInKeysFile)
if addressVersionNumber == 1:
displayMsg = "One of your addresses, "+addressInKeysFile+", is an old version 1 address. Version 1 addresses are no longer supported. May we delete it now?"
reply = QtGui.QMessageBox.question(self, 'Message',displayMsg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
displayMsg = _translate(
"MainWindow", "One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer supported. "
+ "May we delete it now?").arg(addressInKeysFile)
reply = QtGui.QMessageBox.question(
self, 'Message', displayMsg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
if reply == QtGui.QMessageBox.Yes:
shared.config.remove_section(addressInKeysFile)
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
#Configure Bitmessage to start on startup (or remove the configuration) based on the setting in the keys.dat file
# Configure Bitmessage to start on startup (or remove the
# configuration) based on the setting in the keys.dat file
if 'win32' in sys.platform or 'win64' in sys.platform:
#Auto-startup for Windows
# Auto-startup for Windows
RUN_PATH = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run"
self.settings = QSettings(RUN_PATH, QSettings.NativeFormat)
self.settings.remove("PyBitmessage") #In case the user moves the program and the registry entry is no longer valid, this will delete the old registry entry.
self.settings.remove(
"PyBitmessage") # In case the user moves the program and the registry entry is no longer valid, this will delete the old registry entry.
if shared.config.getboolean('bitmessagesettings', 'startonlogon'):
self.settings.setValue("PyBitmessage",sys.argv[0])
self.settings.setValue("PyBitmessage", sys.argv[0])
elif 'darwin' in sys.platform:
#startup for mac
# startup for mac
pass
elif 'linux' in sys.platform:
#startup for linux
# startup for linux
pass
self.ui.labelSendBroadcastWarning.setVisible(False)
#FILE MENU and other buttons
QtCore.QObject.connect(self.ui.actionExit, QtCore.SIGNAL("triggered()"), self.quit)
QtCore.QObject.connect(self.ui.actionManageKeys, QtCore.SIGNAL("triggered()"), self.click_actionManageKeys)
QtCore.QObject.connect(self.ui.actionDeleteAllTrashedMessages, QtCore.SIGNAL("triggered()"), self.click_actionDeleteAllTrashedMessages)
QtCore.QObject.connect(self.ui.actionRegenerateDeterministicAddresses, QtCore.SIGNAL("triggered()"), self.click_actionRegenerateDeterministicAddresses)
QtCore.QObject.connect(self.ui.pushButtonNewAddress, QtCore.SIGNAL("clicked()"), self.click_NewAddressDialog)
QtCore.QObject.connect(self.ui.comboBoxSendFrom, QtCore.SIGNAL("activated(int)"),self.redrawLabelFrom)
QtCore.QObject.connect(self.ui.pushButtonAddAddressBook, QtCore.SIGNAL("clicked()"), self.click_pushButtonAddAddressBook)
QtCore.QObject.connect(self.ui.pushButtonAddSubscription, QtCore.SIGNAL("clicked()"), self.click_pushButtonAddSubscription)
QtCore.QObject.connect(self.ui.pushButtonAddBlacklist, QtCore.SIGNAL("clicked()"), self.click_pushButtonAddBlacklist)
QtCore.QObject.connect(self.ui.pushButtonSend, QtCore.SIGNAL("clicked()"), self.click_pushButtonSend)
QtCore.QObject.connect(self.ui.pushButtonLoadFromAddressBook, QtCore.SIGNAL("clicked()"), self.click_pushButtonLoadFromAddressBook)
QtCore.QObject.connect(self.ui.radioButtonBlacklist, QtCore.SIGNAL("clicked()"), self.click_radioButtonBlacklist)
QtCore.QObject.connect(self.ui.radioButtonWhitelist, QtCore.SIGNAL("clicked()"), self.click_radioButtonWhitelist)
QtCore.QObject.connect(self.ui.pushButtonStatusIcon, QtCore.SIGNAL("clicked()"), self.click_pushButtonStatusIcon)
QtCore.QObject.connect(self.ui.actionSettings, QtCore.SIGNAL("triggered()"), self.click_actionSettings)
QtCore.QObject.connect(self.ui.actionAbout, QtCore.SIGNAL("triggered()"), self.click_actionAbout)
QtCore.QObject.connect(self.ui.actionHelp, QtCore.SIGNAL("triggered()"), self.click_actionHelp)
# FILE MENU and other buttons
QtCore.QObject.connect(self.ui.actionExit, QtCore.SIGNAL(
"triggered()"), self.quit)
QtCore.QObject.connect(self.ui.actionManageKeys, QtCore.SIGNAL(
"triggered()"), self.click_actionManageKeys)
QtCore.QObject.connect(self.ui.actionDeleteAllTrashedMessages, QtCore.SIGNAL(
"triggered()"), self.click_actionDeleteAllTrashedMessages)
QtCore.QObject.connect(self.ui.actionRegenerateDeterministicAddresses, QtCore.SIGNAL(
"triggered()"), self.click_actionRegenerateDeterministicAddresses)
QtCore.QObject.connect(self.ui.pushButtonNewAddress, QtCore.SIGNAL(
"clicked()"), self.click_NewAddressDialog)
QtCore.QObject.connect(self.ui.comboBoxSendFrom, QtCore.SIGNAL(
"activated(int)"), self.redrawLabelFrom)
QtCore.QObject.connect(self.ui.pushButtonAddAddressBook, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonAddAddressBook)
QtCore.QObject.connect(self.ui.pushButtonAddSubscription, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonAddSubscription)
QtCore.QObject.connect(self.ui.pushButtonAddBlacklist, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonAddBlacklist)
QtCore.QObject.connect(self.ui.pushButtonSend, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonSend)
QtCore.QObject.connect(self.ui.pushButtonLoadFromAddressBook, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonLoadFromAddressBook)
QtCore.QObject.connect(self.ui.radioButtonBlacklist, QtCore.SIGNAL(
"clicked()"), self.click_radioButtonBlacklist)
QtCore.QObject.connect(self.ui.radioButtonWhitelist, QtCore.SIGNAL(
"clicked()"), self.click_radioButtonWhitelist)
QtCore.QObject.connect(self.ui.pushButtonStatusIcon, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonStatusIcon)
QtCore.QObject.connect(self.ui.actionSettings, QtCore.SIGNAL(
"triggered()"), self.click_actionSettings)
QtCore.QObject.connect(self.ui.actionAbout, QtCore.SIGNAL(
"triggered()"), self.click_actionAbout)
QtCore.QObject.connect(self.ui.actionHelp, QtCore.SIGNAL(
"triggered()"), self.click_actionHelp)
#Popup menu for the Inbox tab
# Popup menu for the Inbox tab
self.ui.inboxContextMenuToolbar = QtGui.QToolBar()
# Actions
self.actionReply = self.ui.inboxContextMenuToolbar.addAction("Reply", self.on_action_InboxReply)
self.actionAddSenderToAddressBook = self.ui.inboxContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Add sender to your Address Book"), self.on_action_InboxAddSenderToAddressBook)
self.actionTrashInboxMessage = self.ui.inboxContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Move to Trash"), self.on_action_InboxTrash)
self.actionForceHtml = self.ui.inboxContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "View HTML code as formatted text"), self.on_action_InboxMessageForceHtml)
self.ui.tableWidgetInbox.setContextMenuPolicy( QtCore.Qt.CustomContextMenu )
self.connect(self.ui.tableWidgetInbox, QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menuInbox)
self.popMenuInbox = QtGui.QMenu( self )
self.popMenuInbox.addAction( self.actionForceHtml )
self.actionReply = self.ui.inboxContextMenuToolbar.addAction(_translate(
"MainWindow", "Reply"), self.on_action_InboxReply)
self.actionAddSenderToAddressBook = self.ui.inboxContextMenuToolbar.addAction(_translate(
"MainWindow", "Add sender to your Address Book"), self.on_action_InboxAddSenderToAddressBook)
self.actionTrashInboxMessage = self.ui.inboxContextMenuToolbar.addAction(
_translate("MainWindow", "Move to Trash"), self.on_action_InboxTrash)
self.actionForceHtml = self.ui.inboxContextMenuToolbar.addAction(_translate(
"MainWindow", "View HTML code as formatted text"), self.on_action_InboxMessageForceHtml)
self.ui.tableWidgetInbox.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
self.connect(self.ui.tableWidgetInbox, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'), self.on_context_menuInbox)
self.popMenuInbox = QtGui.QMenu(self)
self.popMenuInbox.addAction(self.actionForceHtml)
self.popMenuInbox.addSeparator()
self.popMenuInbox.addAction( self.actionReply )
self.popMenuInbox.addAction( self.actionAddSenderToAddressBook )
self.popMenuInbox.addAction(self.actionReply)
self.popMenuInbox.addAction(self.actionAddSenderToAddressBook)
self.popMenuInbox.addSeparator()
self.popMenuInbox.addAction( self.actionTrashInboxMessage )
self.popMenuInbox.addAction(self.actionTrashInboxMessage)
#Popup menu for the Your Identities tab
# Popup menu for the Your Identities tab
self.ui.addressContextMenuToolbar = QtGui.QToolBar()
# Actions
self.actionNew = self.ui.addressContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "New"), self.on_action_YourIdentitiesNew)
self.actionEnable = self.ui.addressContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Enable"), self.on_action_YourIdentitiesEnable)
self.actionDisable = self.ui.addressContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Disable"), self.on_action_YourIdentitiesDisable)
self.actionClipboard = self.ui.addressContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Copy address to clipboard"), self.on_action_YourIdentitiesClipboard)
self.actionSpecialAddressBehavior = self.ui.addressContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Special address behavior..."), self.on_action_SpecialAddressBehaviorDialog)
self.ui.tableWidgetYourIdentities.setContextMenuPolicy( QtCore.Qt.CustomContextMenu )
self.connect(self.ui.tableWidgetYourIdentities, QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menuYourIdentities)
self.popMenu = QtGui.QMenu( self )
self.popMenu.addAction( self.actionNew )
self.actionNew = self.ui.addressContextMenuToolbar.addAction(_translate(
"MainWindow", "New"), self.on_action_YourIdentitiesNew)
self.actionEnable = self.ui.addressContextMenuToolbar.addAction(_translate(
"MainWindow", "Enable"), self.on_action_YourIdentitiesEnable)
self.actionDisable = self.ui.addressContextMenuToolbar.addAction(_translate(
"MainWindow", "Disable"), self.on_action_YourIdentitiesDisable)
self.actionClipboard = self.ui.addressContextMenuToolbar.addAction(_translate(
"MainWindow", "Copy address to clipboard"), self.on_action_YourIdentitiesClipboard)
self.actionSpecialAddressBehavior = self.ui.addressContextMenuToolbar.addAction(_translate(
"MainWindow", "Special address behavior..."), self.on_action_SpecialAddressBehaviorDialog)
self.ui.tableWidgetYourIdentities.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
self.connect(self.ui.tableWidgetYourIdentities, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'), self.on_context_menuYourIdentities)
self.popMenu = QtGui.QMenu(self)
self.popMenu.addAction(self.actionNew)
self.popMenu.addSeparator()
self.popMenu.addAction( self.actionClipboard )
self.popMenu.addAction(self.actionClipboard)
self.popMenu.addSeparator()
self.popMenu.addAction( self.actionEnable )
self.popMenu.addAction( self.actionDisable )
self.popMenu.addAction( self.actionSpecialAddressBehavior )
self.popMenu.addAction(self.actionEnable)
self.popMenu.addAction(self.actionDisable)
self.popMenu.addAction(self.actionSpecialAddressBehavior)
#Popup menu for the Address Book page
# Popup menu for the Address Book page
self.ui.addressBookContextMenuToolbar = QtGui.QToolBar()
# Actions
self.actionAddressBookSend = self.ui.addressBookContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Send message to this address"), self.on_action_AddressBookSend)
self.actionAddressBookClipboard = self.ui.addressBookContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Copy address to clipboard"), self.on_action_AddressBookClipboard)
self.actionAddressBookNew = self.ui.addressBookContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Add New Address"), self.on_action_AddressBookNew)
self.actionAddressBookDelete = self.ui.addressBookContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Delete"), self.on_action_AddressBookDelete)
self.ui.tableWidgetAddressBook.setContextMenuPolicy( QtCore.Qt.CustomContextMenu )
self.connect(self.ui.tableWidgetAddressBook, QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menuAddressBook)
self.popMenuAddressBook = QtGui.QMenu( self )
self.popMenuAddressBook.addAction( self.actionAddressBookSend )
self.popMenuAddressBook.addAction( self.actionAddressBookClipboard )
self.actionAddressBookSend = self.ui.addressBookContextMenuToolbar.addAction(_translate(
"MainWindow", "Send message to this address"), self.on_action_AddressBookSend)
self.actionAddressBookClipboard = self.ui.addressBookContextMenuToolbar.addAction(_translate(
"MainWindow", "Copy address to clipboard"), self.on_action_AddressBookClipboard)
self.actionAddressBookNew = self.ui.addressBookContextMenuToolbar.addAction(_translate(
"MainWindow", "Add New Address"), self.on_action_AddressBookNew)
self.actionAddressBookDelete = self.ui.addressBookContextMenuToolbar.addAction(_translate(
"MainWindow", "Delete"), self.on_action_AddressBookDelete)
self.ui.tableWidgetAddressBook.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
self.connect(self.ui.tableWidgetAddressBook, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'), self.on_context_menuAddressBook)
self.popMenuAddressBook = QtGui.QMenu(self)
self.popMenuAddressBook.addAction(self.actionAddressBookSend)
self.popMenuAddressBook.addAction(self.actionAddressBookClipboard)
self.popMenuAddressBook.addSeparator()
self.popMenuAddressBook.addAction( self.actionAddressBookNew )
self.popMenuAddressBook.addAction( self.actionAddressBookDelete )
self.popMenuAddressBook.addAction(self.actionAddressBookNew)
self.popMenuAddressBook.addAction(self.actionAddressBookDelete)
#Popup menu for the Subscriptions page
# Popup menu for the Subscriptions page
self.ui.subscriptionsContextMenuToolbar = QtGui.QToolBar()
# Actions
self.actionsubscriptionsNew = self.ui.subscriptionsContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "New"), self.on_action_SubscriptionsNew)
self.actionsubscriptionsDelete = self.ui.subscriptionsContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Delete"), self.on_action_SubscriptionsDelete)
self.actionsubscriptionsClipboard = self.ui.subscriptionsContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Copy address to clipboard"), self.on_action_SubscriptionsClipboard)
self.actionsubscriptionsEnable = self.ui.subscriptionsContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Enable"), self.on_action_SubscriptionsEnable)
self.actionsubscriptionsDisable = self.ui.subscriptionsContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Disable"), self.on_action_SubscriptionsDisable)
self.ui.tableWidgetSubscriptions.setContextMenuPolicy( QtCore.Qt.CustomContextMenu )
self.connect(self.ui.tableWidgetSubscriptions, QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menuSubscriptions)
self.popMenuSubscriptions = QtGui.QMenu( self )
self.popMenuSubscriptions.addAction( self.actionsubscriptionsNew )
self.popMenuSubscriptions.addAction( self.actionsubscriptionsDelete )
self.actionsubscriptionsNew = self.ui.subscriptionsContextMenuToolbar.addAction(
_translate("MainWindow", "New"), self.on_action_SubscriptionsNew)
self.actionsubscriptionsDelete = self.ui.subscriptionsContextMenuToolbar.addAction(
_translate("MainWindow", "Delete"), self.on_action_SubscriptionsDelete)
self.actionsubscriptionsClipboard = self.ui.subscriptionsContextMenuToolbar.addAction(
_translate("MainWindow", "Copy address to clipboard"), self.on_action_SubscriptionsClipboard)
self.actionsubscriptionsEnable = self.ui.subscriptionsContextMenuToolbar.addAction(
_translate("MainWindow", "Enable"), self.on_action_SubscriptionsEnable)
self.actionsubscriptionsDisable = self.ui.subscriptionsContextMenuToolbar.addAction(
_translate("MainWindow", "Disable"), self.on_action_SubscriptionsDisable)
self.ui.tableWidgetSubscriptions.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
self.connect(self.ui.tableWidgetSubscriptions, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'), self.on_context_menuSubscriptions)
self.popMenuSubscriptions = QtGui.QMenu(self)
self.popMenuSubscriptions.addAction(self.actionsubscriptionsNew)
self.popMenuSubscriptions.addAction(self.actionsubscriptionsDelete)
self.popMenuSubscriptions.addSeparator()
self.popMenuSubscriptions.addAction( self.actionsubscriptionsEnable )
self.popMenuSubscriptions.addAction( self.actionsubscriptionsDisable )
self.popMenuSubscriptions.addAction(self.actionsubscriptionsEnable)
self.popMenuSubscriptions.addAction(self.actionsubscriptionsDisable)
self.popMenuSubscriptions.addSeparator()
self.popMenuSubscriptions.addAction( self.actionsubscriptionsClipboard )
self.popMenuSubscriptions.addAction(self.actionsubscriptionsClipboard)
#Popup menu for the Sent page
# Popup menu for the Sent page
self.ui.sentContextMenuToolbar = QtGui.QToolBar()
# Actions
self.actionTrashSentMessage = self.ui.sentContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Move to Trash"), self.on_action_SentTrash)
self.actionSentClipboard = self.ui.sentContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Copy destination address to clipboard"), self.on_action_SentClipboard)
self.actionForceSend = self.ui.sentContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Force send"), self.on_action_ForceSend)
self.ui.tableWidgetSent.setContextMenuPolicy( QtCore.Qt.CustomContextMenu )
self.connect(self.ui.tableWidgetSent, QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menuSent)
#self.popMenuSent = QtGui.QMenu( self )
#self.popMenuSent.addAction( self.actionSentClipboard )
#self.popMenuSent.addAction( self.actionTrashSentMessage )
self.actionTrashSentMessage = self.ui.sentContextMenuToolbar.addAction(_translate(
"MainWindow", "Move to Trash"), self.on_action_SentTrash)
self.actionSentClipboard = self.ui.sentContextMenuToolbar.addAction(_translate(
"MainWindow", "Copy destination address to clipboard"), self.on_action_SentClipboard)
self.actionForceSend = self.ui.sentContextMenuToolbar.addAction(_translate(
"MainWindow", "Force send"), self.on_action_ForceSend)
self.ui.tableWidgetSent.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
self.connect(self.ui.tableWidgetSent, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'), self.on_context_menuSent)
# self.popMenuSent = QtGui.QMenu( self )
# self.popMenuSent.addAction( self.actionSentClipboard )
# self.popMenuSent.addAction( self.actionTrashSentMessage )
#Popup menu for the Blacklist page
# Popup menu for the Blacklist page
self.ui.blacklistContextMenuToolbar = QtGui.QToolBar()
# Actions
self.actionBlacklistNew = self.ui.blacklistContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Add new entry"), self.on_action_BlacklistNew)
self.actionBlacklistDelete = self.ui.blacklistContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Delete"), self.on_action_BlacklistDelete)
self.actionBlacklistClipboard = self.ui.blacklistContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Copy address to clipboard"), self.on_action_BlacklistClipboard)
self.actionBlacklistEnable = self.ui.blacklistContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Enable"), self.on_action_BlacklistEnable)
self.actionBlacklistDisable = self.ui.blacklistContextMenuToolbar.addAction(QtGui.QApplication.translate("MainWindow", "Disable"), self.on_action_BlacklistDisable)
self.ui.tableWidgetBlacklist.setContextMenuPolicy( QtCore.Qt.CustomContextMenu )
self.connect(self.ui.tableWidgetBlacklist, QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menuBlacklist)
self.popMenuBlacklist = QtGui.QMenu( self )
#self.popMenuBlacklist.addAction( self.actionBlacklistNew )
self.popMenuBlacklist.addAction( self.actionBlacklistDelete )
self.actionBlacklistNew = self.ui.blacklistContextMenuToolbar.addAction(_translate(
"MainWindow", "Add new entry"), self.on_action_BlacklistNew)
self.actionBlacklistDelete = self.ui.blacklistContextMenuToolbar.addAction(_translate(
"MainWindow", "Delete"), self.on_action_BlacklistDelete)
self.actionBlacklistClipboard = self.ui.blacklistContextMenuToolbar.addAction(_translate(
"MainWindow", "Copy address to clipboard"), self.on_action_BlacklistClipboard)
self.actionBlacklistEnable = self.ui.blacklistContextMenuToolbar.addAction(_translate(
"MainWindow", "Enable"), self.on_action_BlacklistEnable)
self.actionBlacklistDisable = self.ui.blacklistContextMenuToolbar.addAction(_translate(
"MainWindow", "Disable"), self.on_action_BlacklistDisable)
self.ui.tableWidgetBlacklist.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
self.connect(self.ui.tableWidgetBlacklist, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'), self.on_context_menuBlacklist)
self.popMenuBlacklist = QtGui.QMenu(self)
# self.popMenuBlacklist.addAction( self.actionBlacklistNew )
self.popMenuBlacklist.addAction(self.actionBlacklistDelete)
self.popMenuBlacklist.addSeparator()
self.popMenuBlacklist.addAction( self.actionBlacklistClipboard )
self.popMenuBlacklist.addAction(self.actionBlacklistClipboard)
self.popMenuBlacklist.addSeparator()
self.popMenuBlacklist.addAction( self.actionBlacklistEnable )
self.popMenuBlacklist.addAction( self.actionBlacklistDisable )
self.popMenuBlacklist.addAction(self.actionBlacklistEnable)
self.popMenuBlacklist.addAction(self.actionBlacklistDisable)
#Initialize the user's list of addresses on the 'Your Identities' tab.
# Initialize the user's list of addresses on the 'Your Identities' tab.
configSections = shared.config.sections()
for addressInKeysFile in configSections:
if addressInKeysFile <> 'bitmessagesettings':
isEnabled = shared.config.getboolean(addressInKeysFile, 'enabled')
newItem = QtGui.QTableWidgetItem(unicode(shared.config.get(addressInKeysFile, 'label'),'utf-8)'))
if addressInKeysFile != 'bitmessagesettings':
isEnabled = shared.config.getboolean(
addressInKeysFile, 'enabled')
newItem = QtGui.QTableWidgetItem(unicode(
shared.config.get(addressInKeysFile, 'label'), 'utf-8)'))
if not isEnabled:
newItem.setTextColor(QtGui.QColor(128,128,128))
newItem.setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetYourIdentities.insertRow(0)
self.ui.tableWidgetYourIdentities.setItem(0, 0, newItem)
newItem = QtGui.QTableWidgetItem(addressInKeysFile)
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not isEnabled:
newItem.setTextColor(QtGui.QColor(128,128,128))
if shared.safeConfigGetBoolean(addressInKeysFile,'mailinglist'):
newItem.setTextColor(QtGui.QColor(137,04,177))#magenta
newItem.setTextColor(QtGui.QColor(128, 128, 128))
if shared.safeConfigGetBoolean(addressInKeysFile, 'mailinglist'):
newItem.setTextColor(QtGui.QColor(137, 04, 177)) # magenta
self.ui.tableWidgetYourIdentities.setItem(0, 1, newItem)
newItem = QtGui.QTableWidgetItem(str(addressStream(addressInKeysFile)))
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
newItem = QtGui.QTableWidgetItem(str(
addressStream(addressInKeysFile)))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not isEnabled:
newItem.setTextColor(QtGui.QColor(128,128,128))
newItem.setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetYourIdentities.setItem(0, 2, newItem)
if isEnabled:
status,addressVersionNumber,streamNumber,hash = decodeAddress(addressInKeysFile)
status, addressVersionNumber, streamNumber, hash = decodeAddress(
addressInKeysFile)
#Load inbox from messages database file
# Load inbox from messages database file
font = QFont()
font.setBold(True)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT msgid, toaddress, fromaddress, subject, received, message, read FROM inbox where folder='inbox' ORDER BY received''')
shared.sqlSubmitQueue.put(
'''SELECT msgid, toaddress, fromaddress, subject, received, message, read FROM inbox where folder='inbox' ORDER BY received''')
shared.sqlSubmitQueue.put('')
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
@ -251,70 +329,80 @@ class MyForm(QtGui.QMainWindow):
fromLabel = ''
t = (fromAddress,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''select label from addressbook where address=?''')
shared.sqlSubmitQueue.put(
'''select label from addressbook where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn <> []:
if queryreturn != []:
for row in queryreturn:
fromLabel, = row
if fromLabel == '': #If this address wasn't in our address book..
if fromLabel == '': # If this address wasn't in our address book...
t = (fromAddress,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''select label from subscriptions where address=?''')
shared.sqlSubmitQueue.put(
'''select label from subscriptions where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn <> []:
if queryreturn != []:
for row in queryreturn:
fromLabel, = row
self.ui.tableWidgetInbox.insertRow(0)
newItem = QtGui.QTableWidgetItem(unicode(toLabel,'utf-8'))
newItem.setToolTip(unicode(toLabel,'utf-8'))
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
newItem = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8'))
newItem.setToolTip(unicode(toLabel, 'utf-8'))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not read:
newItem.setFont(font)
newItem.setData(Qt.UserRole,str(toAddress))
if shared.safeConfigGetBoolean(toAddress,'mailinglist'):
newItem.setTextColor(QtGui.QColor(137,04,177))
self.ui.tableWidgetInbox.setItem(0,0,newItem)
newItem.setData(Qt.UserRole, str(toAddress))
if shared.safeConfigGetBoolean(toAddress, 'mailinglist'):
newItem.setTextColor(QtGui.QColor(137, 04, 177))
self.ui.tableWidgetInbox.setItem(0, 0, newItem)
if fromLabel == '':
newItem = QtGui.QTableWidgetItem(unicode(fromAddress,'utf-8'))
newItem.setToolTip(unicode(fromAddress,'utf-8'))
newItem = QtGui.QTableWidgetItem(
unicode(fromAddress, 'utf-8'))
newItem.setToolTip(unicode(fromAddress, 'utf-8'))
else:
newItem = QtGui.QTableWidgetItem(unicode(fromLabel,'utf-8'))
newItem.setToolTip(unicode(fromLabel,'utf-8'))
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
newItem = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8'))
newItem.setToolTip(unicode(fromLabel, 'utf-8'))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not read:
newItem.setFont(font)
newItem.setData(Qt.UserRole,str(fromAddress))
newItem.setData(Qt.UserRole, str(fromAddress))
self.ui.tableWidgetInbox.setItem(0,1,newItem)
newItem = QtGui.QTableWidgetItem(unicode(subject,'utf-8'))
newItem.setToolTip(unicode(subject,'utf-8'))
newItem.setData(Qt.UserRole,unicode(message,'utf-8)'))
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetInbox.setItem(0, 1, newItem)
newItem = QtGui.QTableWidgetItem(unicode(subject, 'utf-8'))
newItem.setToolTip(unicode(subject, 'utf-8'))
newItem.setData(Qt.UserRole, unicode(message, 'utf-8)'))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not read:
newItem.setFont(font)
self.ui.tableWidgetInbox.setItem(0,2,newItem)
newItem = myTableWidgetItem(unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(received))),'utf-8'))
newItem.setToolTip(unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(received))),'utf-8'))
newItem.setData(Qt.UserRole,QByteArray(msgid))
newItem.setData(33,int(received))
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetInbox.setItem(0, 2, newItem)
newItem = myTableWidgetItem(unicode(strftime(shared.config.get(
'bitmessagesettings', 'timeformat'), localtime(int(received))), 'utf-8'))
newItem.setToolTip(unicode(strftime(shared.config.get(
'bitmessagesettings', 'timeformat'), localtime(int(received))), 'utf-8'))
newItem.setData(Qt.UserRole, QByteArray(msgid))
newItem.setData(33, int(received))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not read:
newItem.setFont(font)
self.ui.tableWidgetInbox.setItem(0,3,newItem)
self.ui.tableWidgetInbox.sortItems(3,Qt.DescendingOrder)
self.ui.tableWidgetInbox.setItem(0, 3, newItem)
self.ui.tableWidgetInbox.sortItems(3, Qt.DescendingOrder)
self.ui.tableWidgetInbox.keyPressEvent = self.tableWidgetInboxKeyPressEvent
#Load Sent items from database
# Load Sent items from database
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT toaddress, fromaddress, subject, message, status, ackdata, lastactiontime FROM sent where folder = 'sent' ORDER BY lastactiontime''')
shared.sqlSubmitQueue.put(
'''SELECT toaddress, fromaddress, subject, message, status, ackdata, lastactiontime FROM sent where folder = 'sent' ORDER BY lastactiontime''')
shared.sqlSubmitQueue.put('')
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
@ -332,73 +420,91 @@ class MyForm(QtGui.QMainWindow):
toLabel = ''
t = (toAddress,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''select label from addressbook where address=?''')
shared.sqlSubmitQueue.put(
'''select label from addressbook where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn <> []:
if queryreturn != []:
for row in queryreturn:
toLabel, = row
self.ui.tableWidgetSent.insertRow(0)
if toLabel == '':
newItem = QtGui.QTableWidgetItem(unicode(toAddress,'utf-8'))
newItem.setToolTip(unicode(toAddress,'utf-8'))
newItem = QtGui.QTableWidgetItem(unicode(toAddress, 'utf-8'))
newItem.setToolTip(unicode(toAddress, 'utf-8'))
else:
newItem = QtGui.QTableWidgetItem(unicode(toLabel,'utf-8'))
newItem.setToolTip(unicode(toLabel,'utf-8'))
newItem.setData(Qt.UserRole,str(toAddress))
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetSent.setItem(0,0,newItem)
newItem = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8'))
newItem.setToolTip(unicode(toLabel, 'utf-8'))
newItem.setData(Qt.UserRole, str(toAddress))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetSent.setItem(0, 0, newItem)
if fromLabel == '':
newItem = QtGui.QTableWidgetItem(unicode(fromAddress,'utf-8'))
newItem.setToolTip(unicode(fromAddress,'utf-8'))
newItem = QtGui.QTableWidgetItem(
unicode(fromAddress, 'utf-8'))
newItem.setToolTip(unicode(fromAddress, 'utf-8'))
else:
newItem = QtGui.QTableWidgetItem(unicode(fromLabel,'utf-8'))
newItem.setToolTip(unicode(fromLabel,'utf-8'))
newItem.setData(Qt.UserRole,str(fromAddress))
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetSent.setItem(0,1,newItem)
newItem = QtGui.QTableWidgetItem(unicode(subject,'utf-8'))
newItem.setToolTip(unicode(subject,'utf-8'))
newItem.setData(Qt.UserRole,unicode(message,'utf-8)'))
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetSent.setItem(0,2,newItem)
newItem = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8'))
newItem.setToolTip(unicode(fromLabel, 'utf-8'))
newItem.setData(Qt.UserRole, str(fromAddress))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetSent.setItem(0, 1, newItem)
newItem = QtGui.QTableWidgetItem(unicode(subject, 'utf-8'))
newItem.setToolTip(unicode(subject, 'utf-8'))
newItem.setData(Qt.UserRole, unicode(message, 'utf-8)'))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetSent.setItem(0, 2, newItem)
if status == 'awaitingpubkey':
statusText = QtGui.QApplication.translate("MainWindow", "Waiting on their encryption key. Will request it again soon.")
statusText = _translate(
"MainWindow", "Waiting on their encryption key. Will request it again soon.")
elif status == 'doingpowforpubkey':
statusText = QtGui.QApplication.translate("MainWindow", "Encryption key request queued.")
statusText = _translate(
"MainWindow", "Encryption key request queued.")
elif status == 'msgqueued':
statusText = QtGui.QApplication.translate("MainWindow", "Queued.")
statusText = _translate(
"MainWindow", "Queued.")
elif status == 'msgsent':
statusText = QtGui.QApplication.translate("MainWindow", "Message sent. Waiting on acknowledgement. Sent at %1").arg(unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(lastactiontime))))
statusText = _translate("MainWindow", "Message sent. Waiting on acknowledgement. Sent at %1").arg(
unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(lastactiontime))))
elif status == 'doingmsgpow':
statusText = QtGui.QApplication.translate("MainWindow", "Need to do work to send message. Work is queued.")
statusText = _translate(
"MainWindow", "Need to do work to send message. Work is queued.")
elif status == 'ackreceived':
statusText = QtGui.QApplication.translate("MainWindow", "Acknowledgement of the message received %1").arg(unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(lastactiontime)))))
statusText = _translate("MainWindow", "Acknowledgement of the message received %1").arg(
unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(lastactiontime)))))
elif status == 'broadcastqueued':
statusText = QtGui.QApplication.translate("MainWindow", "Broadcast queued.")
statusText = _translate(
"MainWindow", "Broadcast queued.")
elif status == 'broadcastsent':
statusText = QtGui.QApplication.translate("MainWindow", "Broadcast on %1").arg(unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(lastactiontime)))))
statusText = _translate("MainWindow", "Broadcast on %1").arg(unicode(strftime(
shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(lastactiontime)))))
elif status == 'toodifficult':
statusText = QtGui.QApplication.translate("MainWindow", "Problem: The work demanded by the recipient is more difficult than you are willing to do. %1").arg(unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(lastactiontime)))))
statusText = _translate("MainWindow", "Problem: The work demanded by the recipient is more difficult than you are willing to do. %1").arg(
unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(lastactiontime)))))
elif status == 'badkey':
statusText = QtGui.QApplication.translate("MainWindow", "Problem: The recipient\'s encryption key is no good. Could not encrypt message. %1").arg(unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(lastactiontime)))))
statusText = QtGui.QApplication.translate("MainWindow", "Problem: The recipient\'s encryption key is no good. Could not encrypt message. %1").arg(
unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(lastactiontime)))))
elif status == 'forcepow':
statusText = QtGui.QApplication.translate("MainWindow", "Forced difficulty override. Send should start soon.")
statusText = _translate(
"MainWindow", "Forced difficulty override. Send should start soon.")
else:
statusText = QtGui.QApplication.translate("Unknown status: %1 %2").arg(status).arg(unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(lastactiontime)))))
newItem = myTableWidgetItem(statusText)
statusText = _translate("MainWindow", "Unknown status: %1 %2").arg(status).arg(unicode(
strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(lastactiontime)))))
newItem = myTableWidgetItem(statusText)
newItem.setToolTip(statusText)
newItem.setData(Qt.UserRole,QByteArray(ackdata))
newItem.setData(33,int(lastactiontime))
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetSent.setItem(0,3,newItem)
self.ui.tableWidgetSent.sortItems(3,Qt.DescendingOrder)
newItem.setData(Qt.UserRole, QByteArray(ackdata))
newItem.setData(33, int(lastactiontime))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetSent.setItem(0, 3, newItem)
self.ui.tableWidgetSent.sortItems(3, Qt.DescendingOrder)
self.ui.tableWidgetSent.keyPressEvent = self.tableWidgetSentKeyPressEvent
#Initialize the address book
# Initialize the address book
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('SELECT * FROM addressbook')
shared.sqlSubmitQueue.put('')
@ -407,77 +513,98 @@ class MyForm(QtGui.QMainWindow):
for row in queryreturn:
label, address = row
self.ui.tableWidgetAddressBook.insertRow(0)
newItem = QtGui.QTableWidgetItem(unicode(label,'utf-8'))
self.ui.tableWidgetAddressBook.setItem(0,0,newItem)
newItem = QtGui.QTableWidgetItem(address)
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetAddressBook.setItem(0,1,newItem)
newItem = QtGui.QTableWidgetItem(unicode(label, 'utf-8'))
self.ui.tableWidgetAddressBook.setItem(0, 0, newItem)
newItem = QtGui.QTableWidgetItem(address)
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetAddressBook.setItem(0, 1, newItem)
#Initialize the Subscriptions
# Initialize the Subscriptions
self.rerenderSubscriptions()
#Initialize the Blacklist or Whitelist
# Initialize the Blacklist or Whitelist
if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'black':
self.loadBlackWhiteList()
else:
self.ui.tabWidget.setTabText(6,'Whitelist')
self.ui.tabWidget.setTabText(6, 'Whitelist')
self.ui.radioButtonWhitelist.click()
self.loadBlackWhiteList()
QtCore.QObject.connect(self.ui.tableWidgetYourIdentities, QtCore.SIGNAL(
"itemChanged(QTableWidgetItem *)"), self.tableWidgetYourIdentitiesItemChanged)
QtCore.QObject.connect(self.ui.tableWidgetAddressBook, QtCore.SIGNAL(
"itemChanged(QTableWidgetItem *)"), self.tableWidgetAddressBookItemChanged)
QtCore.QObject.connect(self.ui.tableWidgetSubscriptions, QtCore.SIGNAL(
"itemChanged(QTableWidgetItem *)"), self.tableWidgetSubscriptionsItemChanged)
QtCore.QObject.connect(self.ui.tableWidgetInbox, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.tableWidgetInboxItemClicked)
QtCore.QObject.connect(self.ui.tableWidgetSent, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.tableWidgetSentItemClicked)
QtCore.QObject.connect(self.ui.tableWidgetYourIdentities, QtCore.SIGNAL("itemChanged(QTableWidgetItem *)"), self.tableWidgetYourIdentitiesItemChanged)
QtCore.QObject.connect(self.ui.tableWidgetAddressBook, QtCore.SIGNAL("itemChanged(QTableWidgetItem *)"), self.tableWidgetAddressBookItemChanged)
QtCore.QObject.connect(self.ui.tableWidgetSubscriptions, QtCore.SIGNAL("itemChanged(QTableWidgetItem *)"), self.tableWidgetSubscriptionsItemChanged)
QtCore.QObject.connect(self.ui.tableWidgetInbox, QtCore.SIGNAL("itemSelectionChanged ()"), self.tableWidgetInboxItemClicked)
QtCore.QObject.connect(self.ui.tableWidgetSent, QtCore.SIGNAL("itemSelectionChanged ()"), self.tableWidgetSentItemClicked)
#Put the colored icon on the status bar
#self.ui.pushButtonStatusIcon.setIcon(QIcon(":/newPrefix/images/yellowicon.png"))
# Put the colored icon on the status bar
# self.ui.pushButtonStatusIcon.setIcon(QIcon(":/newPrefix/images/yellowicon.png"))
self.statusbar = self.statusBar()
self.statusbar.insertPermanentWidget(0,self.ui.pushButtonStatusIcon)
self.ui.labelStartupTime.setText(QtGui.QApplication.translate("MainWindow", "Since startup on %1").arg(unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time()))))))
self.statusbar.insertPermanentWidget(0, self.ui.pushButtonStatusIcon)
self.ui.labelStartupTime.setText(_translate("MainWindow", "Since startup on %1").arg(
unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'), localtime(int(time.time()))))))
self.numberOfMessagesProcessed = 0
self.numberOfBroadcastsProcessed = 0
self.numberOfPubkeysProcessed = 0
self.UISignalThread = UISignaler()
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("updateStatusBar(PyQt_PyObject)"), self.updateStatusBar)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("updateSentItemStatusByHash(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByHash)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("updateSentItemStatusByAckdata(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByAckdata)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("displayNewInboxMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.displayNewInboxMessage)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("displayNewSentMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.displayNewSentMessage)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("updateNetworkStatusTab()"), self.updateNetworkStatusTab)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("incrementNumberOfMessagesProcessed()"), self.incrementNumberOfMessagesProcessed)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("incrementNumberOfPubkeysProcessed()"), self.incrementNumberOfPubkeysProcessed)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("incrementNumberOfBroadcastsProcessed()"), self.incrementNumberOfBroadcastsProcessed)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("setStatusIcon(PyQt_PyObject)"), self.setStatusIcon)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("rerenderInboxFromLabels()"), self.rerenderInboxFromLabels)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("rerenderSubscriptions()"), self.rerenderSubscriptions)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("removeInboxRowByMsgid(PyQt_PyObject)"), self.removeInboxRowByMsgid)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"updateStatusBar(PyQt_PyObject)"), self.updateStatusBar)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"updateSentItemStatusByHash(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByHash)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"updateSentItemStatusByAckdata(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByAckdata)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"displayNewInboxMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.displayNewInboxMessage)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"displayNewSentMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.displayNewSentMessage)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"updateNetworkStatusTab()"), self.updateNetworkStatusTab)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"incrementNumberOfMessagesProcessed()"), self.incrementNumberOfMessagesProcessed)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"incrementNumberOfPubkeysProcessed()"), self.incrementNumberOfPubkeysProcessed)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"incrementNumberOfBroadcastsProcessed()"), self.incrementNumberOfBroadcastsProcessed)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"setStatusIcon(PyQt_PyObject)"), self.setStatusIcon)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"rerenderInboxFromLabels()"), self.rerenderInboxFromLabels)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"rerenderSubscriptions()"), self.rerenderSubscriptions)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"removeInboxRowByMsgid(PyQt_PyObject)"), self.removeInboxRowByMsgid)
self.UISignalThread.start()
#Below this point, it would be good if all of the necessary global data structures were initialized.
# Below this point, it would be good if all of the necessary global data
# structures were initialized.
self.rerenderComboBoxSendFrom()
#Show or hide the application window after clicking an item within the tray icon or, on Windows, the try icon itself.
# Show or hide the application window after clicking an item within the
# tray icon or, on Windows, the try icon itself.
def appIndicatorShowOrHideWindow(self):
if not self.actionShow.isChecked():
self.hide()
else:
if sys.platform[0:3] == 'win':
self.setWindowFlags(Qt.Window)
#else:
#self.showMaximized()
# else:
# self.showMaximized()
self.show()
self.setWindowState(self.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive)
self.setWindowState(
self.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive)
self.activateWindow()
# pointer to the application
#app = None
# app = None
# The most recent message
newMessageItem = None
@ -486,7 +613,7 @@ class MyForm(QtGui.QMainWindow):
# show the application window
def appIndicatorShow(self):
if self.actionShow == None:
if self.actionShow is None:
return
if not self.actionShow.isChecked():
self.actionShow.setChecked(True)
@ -494,7 +621,7 @@ class MyForm(QtGui.QMainWindow):
# unchecks the show item on the application indicator
def appIndicatorHide(self):
if self.actionShow == None:
if self.actionShow is None:
return
if self.actionShow.isChecked():
self.actionShow.setChecked(False)
@ -533,11 +660,11 @@ class MyForm(QtGui.QMainWindow):
try:
self.ui.tableWidgetInbox.setCurrentItem(selectedItem)
except Exception:
self.ui.tableWidgetInbox.setCurrentCell(0,0)
self.ui.tableWidgetInbox.setCurrentCell(0, 0)
self.tableWidgetInboxItemClicked()
else:
# just select the first item
self.ui.tableWidgetInbox.setCurrentCell(0,0)
self.ui.tableWidgetInbox.setCurrentCell(0, 0)
self.tableWidgetInboxItemClicked()
# Show the program window and select send tab
@ -556,51 +683,60 @@ class MyForm(QtGui.QMainWindow):
self.ui.tabWidget.setCurrentIndex(5)
# create application indicator
def appIndicatorInit(self,app):
self.tray = QSystemTrayIcon(QtGui.QIcon(":/newPrefix/images/can-icon-24px-red.png"), app)
def appIndicatorInit(self, app):
self.tray = QSystemTrayIcon(QtGui.QIcon(
":/newPrefix/images/can-icon-24px-red.png"), app)
if sys.platform[0:3] == 'win':
traySignal = "activated(QSystemTrayIcon::ActivationReason)"
QtCore.QObject.connect(self.tray, QtCore.SIGNAL(traySignal), self.__icon_activated)
QtCore.QObject.connect(self.tray, QtCore.SIGNAL(
traySignal), self.__icon_activated)
m = QMenu()
self.actionStatus = QtGui.QAction(QtGui.QApplication.translate("MainWindow", "Not Connected"),m,checkable=False)
self.actionStatus = QtGui.QAction(_translate(
"MainWindow", "Not Connected"), m, checkable=False)
m.addAction(self.actionStatus)
# separator
actionSeparator = QtGui.QAction('',m,checkable=False)
actionSeparator = QtGui.QAction('', m, checkable=False)
actionSeparator.setSeparator(True)
m.addAction(actionSeparator)
# show bitmessage
self.actionShow = QtGui.QAction(QtGui.QApplication.translate("MainWindow", "Show Bitmessage"),m,checkable=True)
self.actionShow.setChecked(not shared.config.getboolean('bitmessagesettings', 'startintray'))
self.actionShow = QtGui.QAction(_translate(
"MainWindow", "Show Bitmessage"), m, checkable=True)
self.actionShow.setChecked(not shared.config.getboolean(
'bitmessagesettings', 'startintray'))
self.actionShow.triggered.connect(self.appIndicatorShowOrHideWindow)
if not sys.platform[0:3] == 'win':
m.addAction(self.actionShow)
m.addAction(self.actionShow)
# Send
actionSend = QtGui.QAction(QtGui.QApplication.translate("MainWindow", "Send"),m,checkable=False)
actionSend = QtGui.QAction(_translate(
"MainWindow", "Send"), m, checkable=False)
actionSend.triggered.connect(self.appIndicatorSend)
m.addAction(actionSend)
# Subscribe
actionSubscribe = QtGui.QAction(QtGui.QApplication.translate("MainWindow", "Subscribe"),m,checkable=False)
actionSubscribe = QtGui.QAction(_translate(
"MainWindow", "Subscribe"), m, checkable=False)
actionSubscribe.triggered.connect(self.appIndicatorSubscribe)
m.addAction(actionSubscribe)
# Address book
actionAddressBook = QtGui.QAction(QtGui.QApplication.translate("MainWindow", "Address Book"),m,checkable=False)
actionAddressBook = QtGui.QAction(_translate(
"MainWindow", "Address Book"), m, checkable=False)
actionAddressBook.triggered.connect(self.appIndicatorAddressBook)
m.addAction(actionAddressBook)
# separator
actionSeparator = QtGui.QAction('',m,checkable=False)
actionSeparator = QtGui.QAction('', m, checkable=False)
actionSeparator.setSeparator(True)
m.addAction(actionSeparator)
# Quit
m.addAction(QtGui.QApplication.translate("MainWindow", "Quit"), self.quit)
m.addAction(_translate(
"MainWindow", "Quit"), self.quit)
self.tray.setContextMenu(m)
self.tray.show()
@ -633,7 +769,8 @@ class MyForm(QtGui.QMainWindow):
return
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT toaddress, read FROM inbox WHERE msgid=?''')
shared.sqlSubmitQueue.put(
'''SELECT toaddress, read FROM inbox WHERE msgid=?''')
shared.sqlSubmitQueue.put(inventoryHash)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
@ -653,7 +790,8 @@ class MyForm(QtGui.QMainWindow):
unreadSubscriptions = 0
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT msgid, toaddress, read FROM inbox where folder='inbox' ''')
shared.sqlSubmitQueue.put(
'''SELECT msgid, toaddress, read FROM inbox where folder='inbox' ''')
shared.sqlSubmitQueue.put('')
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
@ -679,21 +817,24 @@ class MyForm(QtGui.QMainWindow):
unreadMessages = unreadMessages + 1
return unreadMessages, unreadSubscriptions
# show the number of unread messages and subscriptions on the messaging menu
# show the number of unread messages and subscriptions on the messaging
# menu
def ubuntuMessagingMenuUnread(self, drawAttention):
unreadMessages, unreadSubscriptions = self.getUnread()
# unread messages
if unreadMessages > 0:
self.mmapp.append_source("Messages", None, "Messages (" + str(unreadMessages) + ")")
self.mmapp.append_source(
"Messages", None, "Messages (" + str(unreadMessages) + ")")
if drawAttention:
self.mmapp.draw_attention("Messages")
# unread subscriptions
if unreadSubscriptions > 0:
self.mmapp.append_source("Subscriptions", None, "Subscriptions (" + str(unreadSubscriptions) + ")")
self.mmapp.append_source("Subscriptions", None, "Subscriptions (" + str(
unreadSubscriptions) + ")")
if drawAttention:
self.mmapp.draw_attention("Subscriptions")
# initialise the Ubuntu messaging menu
def ubuntuMessagingMenuInit(self):
global withMessagingMenu
@ -704,13 +845,14 @@ class MyForm(QtGui.QMainWindow):
# has messageing menu been installed
if not withMessagingMenu:
print 'WARNING: MessagingMenu is not available. Is libmessaging-menu-dev installed?'
print 'WARNING: MessagingMenu is not available. Is libmessaging-menu-dev installed?'
return
# create the menu server
if withMessagingMenu:
try:
self.mmapp = MessagingMenu.App(desktop_id='pybitmessage.desktop')
self.mmapp = MessagingMenu.App(
desktop_id='pybitmessage.desktop')
self.mmapp.register()
self.mmapp.connect('activate-source', self.appIndicatorInbox)
self.ubuntuMessagingMenuUnread(True)
@ -728,7 +870,7 @@ class MyForm(QtGui.QMainWindow):
# has messageing menu been installed
if not withMessagingMenu:
print 'WARNING: messaging menu disabled or libmessaging-menu-dev not installed'
print 'WARNING: messaging menu disabled or libmessaging-menu-dev not installed'
return
# remember this item to that the messaging menu can find it
@ -758,18 +900,19 @@ class MyForm(QtGui.QMainWindow):
def notifierShow(self, title, subtitle):
global withMessagingMenu
if withMessagingMenu:
n = Notify.Notification.new(title, subtitle,'notification-message-email')
n = Notify.Notification.new(
title, subtitle, 'notification-message-email')
n.show()
return
else:
self.tray.showMessage(title, subtitle, 1, 2000)
def tableWidgetInboxKeyPressEvent(self,event):
def tableWidgetInboxKeyPressEvent(self, event):
if event.key() == QtCore.Qt.Key_Delete:
self.on_action_InboxTrash()
return QtGui.QTableWidget.keyPressEvent(self.ui.tableWidgetInbox, event)
def tableWidgetSentKeyPressEvent(self,event):
def tableWidgetSentKeyPressEvent(self, event):
if event.key() == QtCore.Qt.Key_Delete:
self.on_action_SentTrash()
return QtGui.QTableWidget.keyPressEvent(self.ui.tableWidgetSent, event)
@ -777,40 +920,52 @@ class MyForm(QtGui.QMainWindow):
def click_actionManageKeys(self):
if 'darwin' in sys.platform or 'linux' in sys.platform:
if shared.appdata == '':
#reply = QtGui.QMessageBox.information(self, 'keys.dat?','You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file.', QMessageBox.Ok)
reply = QtGui.QMessageBox.information(self, 'keys.dat?',QtGui.QApplication.translate("MainWindow", "You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file."), QMessageBox.Ok)
# reply = QtGui.QMessageBox.information(self, 'keys.dat?','You
# may manage your keys by editing the keys.dat file stored in
# the same directory as this program. It is important that you
# back up this file.', QMessageBox.Ok)
reply = QtGui.QMessageBox.information(self, 'keys.dat?', _translate(
"MainWindow", "You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file."), QMessageBox.Ok)
else:
QtGui.QMessageBox.information(self, 'keys.dat?',QtGui.QApplication.translate("MainWindow", "You may manage your keys by editing the keys.dat file stored in\n %1 \nIt is important that you back up this file.").arg(shared.appdata), QMessageBox.Ok)
QtGui.QMessageBox.information(self, 'keys.dat?', _translate(
"MainWindow", "You may manage your keys by editing the keys.dat file stored in\n %1 \nIt is important that you back up this file.").arg(shared.appdata), QMessageBox.Ok)
elif sys.platform == 'win32' or sys.platform == 'win64':
if shared.appdata == '':
reply = QtGui.QMessageBox.question(self, QtGui.QApplication.translate("MainWindow", "Open keys.dat?"),QtGui.QApplication.translate("MainWindow", "You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)"), QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
reply = QtGui.QMessageBox.question(self, _translate("MainWindow", "Open keys.dat?"), _translate(
"MainWindow", "You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)"), QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
else:
reply = QtGui.QMessageBox.question(self, QtGui.QApplication.translate("MainWindow", "Open keys.dat?"),QtGui.QApplication.translate("MainWindow", "You may manage your keys by editing the keys.dat file stored in\n %1 \nIt is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)").arg(shared.appdata), QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
reply = QtGui.QMessageBox.question(self, _translate("MainWindow", "Open keys.dat?"), _translate(
"MainWindow", "You may manage your keys by editing the keys.dat file stored in\n %1 \nIt is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)").arg(shared.appdata), QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
if reply == QtGui.QMessageBox.Yes:
self.openKeysFile()
def click_actionDeleteAllTrashedMessages(self):
if QtGui.QMessageBox.question(self, QtGui.QApplication.translate("MainWindow", "Delete trash?"),QtGui.QApplication.translate("MainWindow", "Are you sure you want to delete all trashed messages?"), QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) == QtGui.QMessageBox.No:
if QtGui.QMessageBox.question(self, _translate("MainWindow", "Delete trash?"), _translate("MainWindow", "Are you sure you want to delete all trashed messages?"), QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) == QtGui.QMessageBox.No:
return
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('deleteandvacuume')
shared.sqlLock.release()
def click_actionRegenerateDeterministicAddresses(self):
self.regenerateAddressesDialogInstance = regenerateAddressesDialog(self)
self.regenerateAddressesDialogInstance = regenerateAddressesDialog(
self)
if self.regenerateAddressesDialogInstance.exec_():
if self.regenerateAddressesDialogInstance.ui.lineEditPassphrase.text() == "":
QMessageBox.about(self, QtGui.QApplication.translate("MainWindow", "bad passphrase"), QtGui.QApplication.translate("MainWindow", "You must type your passphrase. If you don\'t have one then this is not the form for you."))
QMessageBox.about(self, _translate("MainWindow", "bad passphrase"), _translate(
"MainWindow", "You must type your passphrase. If you don\'t have one then this is not the form for you."))
else:
streamNumberForAddress = int(self.regenerateAddressesDialogInstance.ui.lineEditStreamNumber.text())
addressVersionNumber = int(self.regenerateAddressesDialogInstance.ui.lineEditAddressVersionNumber.text())
#self.addressGenerator = addressGenerator()
#self.addressGenerator.setup(addressVersionNumber,streamNumberForAddress,"unused address",self.regenerateAddressesDialogInstance.ui.spinBoxNumberOfAddressesToMake.value(),self.regenerateAddressesDialogInstance.ui.lineEditPassphrase.text().toUtf8(),self.regenerateAddressesDialogInstance.ui.checkBoxEighteenByteRipe.isChecked())
#QtCore.QObject.connect(self.addressGenerator, SIGNAL("writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable)
#QtCore.QObject.connect(self.addressGenerator, QtCore.SIGNAL("updateStatusBar(PyQt_PyObject)"), self.updateStatusBar)
#self.addressGenerator.start()
shared.addressGeneratorQueue.put(('createDeterministicAddresses',addressVersionNumber,streamNumberForAddress,"regenerated deterministic address",self.regenerateAddressesDialogInstance.ui.spinBoxNumberOfAddressesToMake.value(),self.regenerateAddressesDialogInstance.ui.lineEditPassphrase.text().toUtf8(),self.regenerateAddressesDialogInstance.ui.checkBoxEighteenByteRipe.isChecked()))
streamNumberForAddress = int(
self.regenerateAddressesDialogInstance.ui.lineEditStreamNumber.text())
addressVersionNumber = int(
self.regenerateAddressesDialogInstance.ui.lineEditAddressVersionNumber.text())
# self.addressGenerator = addressGenerator()
# self.addressGenerator.setup(addressVersionNumber,streamNumberForAddress,"unused address",self.regenerateAddressesDialogInstance.ui.spinBoxNumberOfAddressesToMake.value(),self.regenerateAddressesDialogInstance.ui.lineEditPassphrase.text().toUtf8(),self.regenerateAddressesDialogInstance.ui.checkBoxEighteenByteRipe.isChecked())
# QtCore.QObject.connect(self.addressGenerator, SIGNAL("writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable)
# QtCore.QObject.connect(self.addressGenerator, QtCore.SIGNAL("updateStatusBar(PyQt_PyObject)"), self.updateStatusBar)
# self.addressGenerator.start()
shared.addressGeneratorQueue.put(('createDeterministicAddresses', addressVersionNumber, streamNumberForAddress, "regenerated deterministic address", self.regenerateAddressesDialogInstance.ui.spinBoxNumberOfAddressesToMake.value(
), self.regenerateAddressesDialogInstance.ui.lineEditPassphrase.text().toUtf8(), self.regenerateAddressesDialogInstance.ui.checkBoxEighteenByteRipe.isChecked()))
self.ui.tabWidget.setCurrentIndex(3)
def openKeysFile(self):
@ -830,9 +985,10 @@ class MyForm(QtGui.QMainWindow):
if 'win32' in sys.platform or 'win64' in sys.platform:
self.setWindowFlags(Qt.ToolTip)
elif event.oldState() & QtCore.Qt.WindowMinimized:
#The window state has just been changed to Normal/Maximised/FullScreen
# The window state has just been changed to
# Normal/Maximised/FullScreen
pass
#QtGui.QWidget.changeEvent(self, event)
# QtGui.QWidget.changeEvent(self, event)
def __icon_activated(self, reason):
if reason == QtGui.QSystemTrayIcon.Trigger:
@ -841,19 +997,22 @@ class MyForm(QtGui.QMainWindow):
def incrementNumberOfMessagesProcessed(self):
self.numberOfMessagesProcessed += 1
self.ui.labelMessageCount.setText(QtGui.QApplication.translate("MainWindow", "Processed %1 person-to-person messages.").arg(str(self.numberOfMessagesProcessed)))
self.ui.labelMessageCount.setText(_translate(
"MainWindow", "Processed %1 person-to-person messages.").arg(str(self.numberOfMessagesProcessed)))
def incrementNumberOfBroadcastsProcessed(self):
self.numberOfBroadcastsProcessed += 1
self.ui.labelBroadcastCount.setText(QtGui.QApplication.translate("MainWindow", "Processed %1 broadcast messages.").arg(str(self.numberOfBroadcastsProcessed)))
self.ui.labelBroadcastCount.setText(_translate(
"MainWindow", "Processed %1 broadcast messages.").arg(str(self.numberOfBroadcastsProcessed)))
def incrementNumberOfPubkeysProcessed(self):
self.numberOfPubkeysProcessed += 1
self.ui.labelPubkeyCount.setText(QtGui.QApplication.translate("MainWindow", "Processed %1 public keys.").arg(str(self.numberOfPubkeysProcessed)))
self.ui.labelPubkeyCount.setText(_translate(
"MainWindow", "Processed %1 public keys.").arg(str(self.numberOfPubkeysProcessed)))
def updateNetworkStatusTab(self):
#print 'updating network status tab'
totalNumberOfConnectionsFromAllStreams = 0 #One would think we could use len(sendDataQueues) for this but the number doesn't always match: just because we have a sendDataThread running doesn't mean that the connection has been fully established (with the exchange of version messages).
# print 'updating network status tab'
totalNumberOfConnectionsFromAllStreams = 0 # One would think we could use len(sendDataQueues) for this but the number doesn't always match: just because we have a sendDataThread running doesn't mean that the connection has been fully established (with the exchange of version messages).
streamNumberTotals = {}
for host, streamNumber in shared.connectedHostsList.items():
if not streamNumber in streamNumberTotals:
@ -866,14 +1025,16 @@ class MyForm(QtGui.QMainWindow):
for streamNumber, connectionCount in streamNumberTotals.items():
self.ui.tableWidgetConnectionCount.insertRow(0)
if streamNumber == 0:
newItem = QtGui.QTableWidgetItem("?")
newItem = QtGui.QTableWidgetItem("?")
else:
newItem = QtGui.QTableWidgetItem(str(streamNumber))
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetConnectionCount.setItem(0,0,newItem)
newItem = QtGui.QTableWidgetItem(str(connectionCount))
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetConnectionCount.setItem(0,1,newItem)
newItem = QtGui.QTableWidgetItem(str(streamNumber))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetConnectionCount.setItem(0, 0, newItem)
newItem = QtGui.QTableWidgetItem(str(connectionCount))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetConnectionCount.setItem(0, 1, newItem)
"""for currentRow in range(self.ui.tableWidgetConnectionCount.rowCount()):
rowStreamNumber = int(self.ui.tableWidgetConnectionCount.item(currentRow,0).text())
if streamNumber == rowStreamNumber:
@ -890,8 +1051,9 @@ class MyForm(QtGui.QMainWindow):
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetConnectionCount.setItem(0,1,newItem)
totalNumberOfConnectionsFromAllStreams += connectionCount"""
self.ui.labelTotalConnections.setText(QtGui.QApplication.translate("MainWindow", "Total Connections: %1").arg(str(len(shared.connectedHostsList))))
if len(shared.connectedHostsList) > 0 and shared.statusIconColor == 'red': #FYI: The 'singlelistener' thread sets the icon color to green when it receives an incoming connection, meaning that the user's firewall is configured correctly.
self.ui.labelTotalConnections.setText(_translate(
"MainWindow", "Total Connections: %1").arg(str(len(shared.connectedHostsList))))
if len(shared.connectedHostsList) > 0 and shared.statusIconColor == 'red': # FYI: The 'singlelistener' thread sets the icon color to green when it receives an incoming connection, meaning that the user's firewall is configured correctly.
self.setStatusIcon('yellow')
elif len(shared.connectedHostsList) == 0:
self.setStatusIcon('red')
@ -899,225 +1061,280 @@ class MyForm(QtGui.QMainWindow):
# Indicates whether or not there is a connection to the Bitmessage network
connected = False
def setStatusIcon(self,color):
def setStatusIcon(self, color):
global withMessagingMenu
#print 'setting status icon color'
# print 'setting status icon color'
if color == 'red':
self.ui.pushButtonStatusIcon.setIcon(QIcon(":/newPrefix/images/redicon.png"))
self.ui.pushButtonStatusIcon.setIcon(
QIcon(":/newPrefix/images/redicon.png"))
shared.statusIconColor = 'red'
# if the connection is lost then show a notification
if self.connected:
self.notifierShow('Bitmessage',QtGui.QApplication.translate("MainWindow", "Connection lost"))
self.notifierShow('Bitmessage', _translate(
"MainWindow", "Connection lost"))
self.connected = False
if self.actionStatus != None:
self.actionStatus.setText(QtGui.QApplication.translate("MainWindow", "Not Connected"))
self.tray.setIcon(QtGui.QIcon(":/newPrefix/images/can-icon-24px-red.png"))
if self.actionStatus is not None:
self.actionStatus.setText(_translate(
"MainWindow", "Not Connected"))
self.tray.setIcon(QtGui.QIcon(
":/newPrefix/images/can-icon-24px-red.png"))
if color == 'yellow':
if self.statusBar().currentMessage() == 'Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won\'t send until you connect.':
self.statusBar().showMessage('')
self.ui.pushButtonStatusIcon.setIcon(QIcon(":/newPrefix/images/yellowicon.png"))
self.ui.pushButtonStatusIcon.setIcon(QIcon(
":/newPrefix/images/yellowicon.png"))
shared.statusIconColor = 'yellow'
# if a new connection has been established then show a notification
if not self.connected:
self.notifierShow('Bitmessage',QtGui.QApplication.translate("MainWindow", "Connected"))
self.notifierShow('Bitmessage', _translate(
"MainWindow", "Connected"))
self.connected = True
if self.actionStatus != None:
self.actionStatus.setText(QtGui.QApplication.translate("MainWindow", "Connected"))
self.tray.setIcon(QtGui.QIcon(":/newPrefix/images/can-icon-24px-yellow.png"))
if self.actionStatus is not None:
self.actionStatus.setText(_translate(
"MainWindow", "Connected"))
self.tray.setIcon(QtGui.QIcon(
":/newPrefix/images/can-icon-24px-yellow.png"))
if color == 'green':
if self.statusBar().currentMessage() == 'Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won\'t send until you connect.':
self.statusBar().showMessage('')
self.ui.pushButtonStatusIcon.setIcon(QIcon(":/newPrefix/images/greenicon.png"))
self.ui.pushButtonStatusIcon.setIcon(
QIcon(":/newPrefix/images/greenicon.png"))
shared.statusIconColor = 'green'
if not self.connected:
self.notifierShow('Bitmessage',QtGui.QApplication.translate("MainWindow", "Connected"))
self.notifierShow('Bitmessage', _translate(
"MainWindow", "Connected"))
self.connected = True
if self.actionStatus != None:
self.actionStatus.setText(QtGui.QApplication.translate("MainWindow", "Connected"))
self.tray.setIcon(QtGui.QIcon(":/newPrefix/images/can-icon-24px-green.png"))
if self.actionStatus is not None:
self.actionStatus.setText(_translate(
"MainWindow", "Connected"))
self.tray.setIcon(QtGui.QIcon(
":/newPrefix/images/can-icon-24px-green.png"))
def updateSentItemStatusByHash(self,toRipe,textToDisplay):
def updateSentItemStatusByHash(self, toRipe, textToDisplay):
for i in range(self.ui.tableWidgetSent.rowCount()):
toAddress = str(self.ui.tableWidgetSent.item(i,0).data(Qt.UserRole).toPyObject())
status,addressVersionNumber,streamNumber,ripe = decodeAddress(toAddress)
toAddress = str(self.ui.tableWidgetSent.item(
i, 0).data(Qt.UserRole).toPyObject())
status, addressVersionNumber, streamNumber, ripe = decodeAddress(
toAddress)
if ripe == toRipe:
self.ui.tableWidgetSent.item(i,3).setToolTip(textToDisplay)
parenPositionIndex = string.find(textToDisplay,'\n')
self.ui.tableWidgetSent.item(i, 3).setToolTip(textToDisplay)
newlinePosition = textToDisplay.indexOf('\n')
if parenPositionIndex > 1:
self.ui.tableWidgetSent.item(i,3).setText(textToDisplay[:parenPositionIndex])
self.ui.tableWidgetSent.item(i, 3).setText(
textToDisplay[:parenPositionIndex])
else:
self.ui.tableWidgetSent.item(i,3).setText(textToDisplay)
self.ui.tableWidgetSent.item(i, 3).setText(textToDisplay)
def updateSentItemStatusByAckdata(self,ackdata,textToDisplay):
def updateSentItemStatusByAckdata(self, ackdata, textToDisplay):
for i in range(self.ui.tableWidgetSent.rowCount()):
toAddress = str(self.ui.tableWidgetSent.item(i,0).data(Qt.UserRole).toPyObject())
tableAckdata = self.ui.tableWidgetSent.item(i,3).data(Qt.UserRole).toPyObject()
status,addressVersionNumber,streamNumber,ripe = decodeAddress(toAddress)
toAddress = str(self.ui.tableWidgetSent.item(
i, 0).data(Qt.UserRole).toPyObject())
tableAckdata = self.ui.tableWidgetSent.item(
i, 3).data(Qt.UserRole).toPyObject()
status, addressVersionNumber, streamNumber, ripe = decodeAddress(
toAddress)
if ackdata == tableAckdata:
self.ui.tableWidgetSent.item(i,3).setToolTip(textToDisplay)
parenPositionIndex = string.find(textToDisplay,'\n')
if parenPositionIndex > 1:
self.ui.tableWidgetSent.item(i,3).setText(textToDisplay[:parenPositionIndex])
self.ui.tableWidgetSent.item(i, 3).setToolTip(textToDisplay)
newlinePosition = textToDisplay.indexOf('\n')
if newlinePosition > 1:
self.ui.tableWidgetSent.item(i, 3).setText(
textToDisplay[:newlinePosition])
else:
self.ui.tableWidgetSent.item(i,3).setText(textToDisplay)
self.ui.tableWidgetSent.item(i, 3).setText(textToDisplay)
def removeInboxRowByMsgid(self,msgid):#msgid and inventoryHash are the same thing
def removeInboxRowByMsgid(self, msgid): # msgid and inventoryHash are the same thing
for i in range(self.ui.tableWidgetInbox.rowCount()):
if msgid == str(self.ui.tableWidgetInbox.item(i,3).data(Qt.UserRole).toPyObject()):
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Message trashed"))
if msgid == str(self.ui.tableWidgetInbox.item(i, 3).data(Qt.UserRole).toPyObject()):
self.statusBar().showMessage(_translate(
"MainWindow", "Message trashed"))
self.ui.tableWidgetInbox.removeRow(i)
break
def rerenderInboxFromLabels(self):
for i in range(self.ui.tableWidgetInbox.rowCount()):
addressToLookup = str(self.ui.tableWidgetInbox.item(i,1).data(Qt.UserRole).toPyObject())
addressToLookup = str(self.ui.tableWidgetInbox.item(
i, 1).data(Qt.UserRole).toPyObject())
fromLabel = ''
t = (addressToLookup,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''select label from addressbook where address=?''')
shared.sqlSubmitQueue.put(
'''select label from addressbook where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn <> []:
if queryreturn != []:
for row in queryreturn:
fromLabel, = row
self.ui.tableWidgetInbox.item(i,1).setText(unicode(fromLabel,'utf-8'))
self.ui.tableWidgetInbox.item(
i, 1).setText(unicode(fromLabel, 'utf-8'))
else:
#It might be a broadcast message. We should check for that label.
# It might be a broadcast message. We should check for that
# label.
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''select label from subscriptions where address=?''')
shared.sqlSubmitQueue.put(
'''select label from subscriptions where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn <> []:
if queryreturn != []:
for row in queryreturn:
fromLabel, = row
self.ui.tableWidgetInbox.item(i,1).setText(unicode(fromLabel,'utf-8'))
self.ui.tableWidgetInbox.item(
i, 1).setText(unicode(fromLabel, 'utf-8'))
def rerenderInboxToLabels(self):
for i in range(self.ui.tableWidgetInbox.rowCount()):
toAddress = str(self.ui.tableWidgetInbox.item(i,0).data(Qt.UserRole).toPyObject())
toAddress = str(self.ui.tableWidgetInbox.item(
i, 0).data(Qt.UserRole).toPyObject())
try:
toLabel = shared.config.get(toAddress, 'label')
except:
toLabel = ''
if toLabel == '':
toLabel = toAddress
self.ui.tableWidgetInbox.item(i,0).setText(unicode(toLabel,'utf-8'))
#Set the color according to whether it is the address of a mailing list or not.
if shared.safeConfigGetBoolean(toAddress,'mailinglist'):
self.ui.tableWidgetInbox.item(i,0).setTextColor(QtGui.QColor(137,04,177))
self.ui.tableWidgetInbox.item(
i, 0).setText(unicode(toLabel, 'utf-8'))
# Set the color according to whether it is the address of a mailing
# list or not.
if shared.safeConfigGetBoolean(toAddress, 'mailinglist'):
self.ui.tableWidgetInbox.item(i, 0).setTextColor(QtGui.QColor(137, 04, 177))
else:
self.ui.tableWidgetInbox.item(i,0).setTextColor(QtGui.QColor(0,0,0))
self.ui.tableWidgetInbox.item(
i, 0).setTextColor(QtGui.QColor(0, 0, 0))
def rerenderSentFromLabels(self):
for i in range(self.ui.tableWidgetSent.rowCount()):
fromAddress = str(self.ui.tableWidgetSent.item(i,1).data(Qt.UserRole).toPyObject())
fromAddress = str(self.ui.tableWidgetSent.item(
i, 1).data(Qt.UserRole).toPyObject())
try:
fromLabel = shared.config.get(fromAddress, 'label')
except:
fromLabel = ''
if fromLabel == '':
fromLabel = fromAddress
self.ui.tableWidgetSent.item(i,1).setText(unicode(fromLabel,'utf-8'))
self.ui.tableWidgetSent.item(
i, 1).setText(unicode(fromLabel, 'utf-8'))
def rerenderSentToLabels(self):
for i in range(self.ui.tableWidgetSent.rowCount()):
addressToLookup = str(self.ui.tableWidgetSent.item(i,0).data(Qt.UserRole).toPyObject())
addressToLookup = str(self.ui.tableWidgetSent.item(
i, 0).data(Qt.UserRole).toPyObject())
toLabel = ''
t = (addressToLookup,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''select label from addressbook where address=?''')
shared.sqlSubmitQueue.put(
'''select label from addressbook where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn <> []:
if queryreturn != []:
for row in queryreturn:
toLabel, = row
self.ui.tableWidgetSent.item(i,0).setText(unicode(toLabel,'utf-8'))
self.ui.tableWidgetSent.item(
i, 0).setText(unicode(toLabel, 'utf-8'))
def rerenderSubscriptions(self):
self.ui.tableWidgetSubscriptions.setRowCount(0)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('SELECT label, address, enabled FROM subscriptions')
shared.sqlSubmitQueue.put(
'SELECT label, address, enabled FROM subscriptions')
shared.sqlSubmitQueue.put('')
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
for row in queryreturn:
label, address, enabled = row
self.ui.tableWidgetSubscriptions.insertRow(0)
newItem = QtGui.QTableWidgetItem(unicode(label,'utf-8'))
newItem = QtGui.QTableWidgetItem(unicode(label, 'utf-8'))
if not enabled:
newItem.setTextColor(QtGui.QColor(128,128,128))
self.ui.tableWidgetSubscriptions.setItem(0,0,newItem)
newItem = QtGui.QTableWidgetItem(address)
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
newItem.setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetSubscriptions.setItem(0, 0, newItem)
newItem = QtGui.QTableWidgetItem(address)
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not enabled:
newItem.setTextColor(QtGui.QColor(128,128,128))
self.ui.tableWidgetSubscriptions.setItem(0,1,newItem)
newItem.setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetSubscriptions.setItem(0, 1, newItem)
def click_pushButtonSend(self):
self.statusBar().showMessage('')
toAddresses = str(self.ui.lineEditTo.text())
fromAddress = str(self.ui.labelFrom.text())
subject = str(self.ui.lineEditSubject.text().toUtf8())
message = str(self.ui.textEditMessage.document().toPlainText().toUtf8())
if self.ui.radioButtonSpecific.isChecked(): #To send a message to specific people (rather than broadcast)
toAddressesList = [s.strip() for s in toAddresses.replace(',', ';').split(';')]
toAddressesList = list(set(toAddressesList)) #remove duplicate addresses. If the user has one address with a BM- and the same address without the BM-, this will not catch it. They'll send the message to the person twice.
message = str(
self.ui.textEditMessage.document().toPlainText().toUtf8())
if self.ui.radioButtonSpecific.isChecked(): # To send a message to specific people (rather than broadcast)
toAddressesList = [s.strip()
for s in toAddresses.replace(',', ';').split(';')]
toAddressesList = list(set(
toAddressesList)) # remove duplicate addresses. If the user has one address with a BM- and the same address without the BM-, this will not catch it. They'll send the message to the person twice.
for toAddress in toAddressesList:
if toAddress <> '':
status,addressVersionNumber,streamNumber,ripe = decodeAddress(toAddress)
if status <> 'success':
if toAddress != '':
status, addressVersionNumber, streamNumber, ripe = decodeAddress(
toAddress)
if status != 'success':
shared.printLock.acquire()
print 'Error: Could not decode', toAddress, ':', status
shared.printLock.release()
if status == 'missingbm':
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: Bitmessage addresses start with BM- Please check %1").arg(toAddress))
self.statusBar().showMessage(_translate(
"MainWindow", "Error: Bitmessage addresses start with BM- Please check %1").arg(toAddress))
elif status == 'checksumfailed':
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: The address %1 is not typed or copied correctly. Please check it.").arg(toAddress))
self.statusBar().showMessage(_translate(
"MainWindow", "Error: The address %1 is not typed or copied correctly. Please check it.").arg(toAddress))
elif status == 'invalidcharacters':
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: The address %1 contains invalid characters. Please check it.").arg(toAddress))
self.statusBar().showMessage(_translate(
"MainWindow", "Error: The address %1 contains invalid characters. Please check it.").arg(toAddress))
elif status == 'versiontoohigh':
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: The address version in %1 is too high. Either you need to upgrade your Bitmessage software or your acquaintance is being clever.").arg(toAddress))
self.statusBar().showMessage(_translate(
"MainWindow", "Error: The address version in %1 is too high. Either you need to upgrade your Bitmessage software or your acquaintance is being clever.").arg(toAddress))
elif status == 'ripetooshort':
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: Some data encoded in the address %1 is too short. There might be something wrong with the software of your acquaintance.").arg(toAddress))
self.statusBar().showMessage(_translate(
"MainWindow", "Error: Some data encoded in the address %1 is too short. There might be something wrong with the software of your acquaintance.").arg(toAddress))
elif status == 'ripetoolong':
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: Some data encoded in the address %1 is too long. There might be something wrong with the software of your acquaintance.").arg(toAddress))
self.statusBar().showMessage(_translate(
"MainWindow", "Error: Some data encoded in the address %1 is too long. There might be something wrong with the software of your acquaintance.").arg(toAddress))
else:
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: Something is wrong with the address %1.").arg(toAddress))
self.statusBar().showMessage(_translate(
"MainWindow", "Error: Something is wrong with the address %1.").arg(toAddress))
elif fromAddress == '':
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: You must specify a From address. If you don\'t have one, go to the \'Your Identities\' tab."))
self.statusBar().showMessage(_translate(
"MainWindow", "Error: You must specify a From address. If you don\'t have one, go to the \'Your Identities\' tab."))
else:
toAddress = addBMIfNotPresent(toAddress)
try:
shared.config.get(toAddress, 'enabled')
#The toAddress is one owned by me. We cannot send messages to ourselves without significant changes to the codebase.
QMessageBox.about(self, QtGui.QApplication.translate("MainWindow", "Sending to your address"), QtGui.QApplication.translate("MainWindow", "Error: One of the addresses to which you are sending a message, %1, is yours. Unfortunately the Bitmessage client cannot process its own messages. Please try running a second client on a different computer or within a VM.").arg(toAddress))
# The toAddress is one owned by me. We cannot send
# messages to ourselves without significant changes
# to the codebase.
QMessageBox.about(self, _translate("MainWindow", "Sending to your address"), _translate(
"MainWindow", "Error: One of the addresses to which you are sending a message, %1, is yours. Unfortunately the Bitmessage client cannot process its own messages. Please try running a second client on a different computer or within a VM.").arg(toAddress))
continue
except:
pass
if addressVersionNumber > 3 or addressVersionNumber <= 1:
QMessageBox.about(self, QtGui.QApplication.translate("MainWindow", "Address version number"), QtGui.QApplication.translate("MainWindow", "Concerning the address %1, Bitmessage cannot understand address version numbers of %2. Perhaps upgrade Bitmessage to the latest version.").arg(toAddress).arg(str(addressVersionNumber)))
QMessageBox.about(self, _translate("MainWindow", "Address version number"), _translate(
"MainWindow", "Concerning the address %1, Bitmessage cannot understand address version numbers of %2. Perhaps upgrade Bitmessage to the latest version.").arg(toAddress).arg(str(addressVersionNumber)))
continue
if streamNumber > 1 or streamNumber == 0:
QMessageBox.about(self, QtGui.QApplication.translate("MainWindow", "Stream number"), QtGui.QApplication.translate("MainWindow", "Concerning the address %1, Bitmessage cannot handle stream numbers of %2. Perhaps upgrade Bitmessage to the latest version.").arg(toAddress).arg(str(streamNumber)))
QMessageBox.about(self, _translate("MainWindow", "Stream number"), _translate(
"MainWindow", "Concerning the address %1, Bitmessage cannot handle stream numbers of %2. Perhaps upgrade Bitmessage to the latest version.").arg(toAddress).arg(str(streamNumber)))
continue
self.statusBar().showMessage('')
if shared.statusIconColor == 'red':
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won\'t send until you connect."))
self.statusBar().showMessage(_translate(
"MainWindow", "Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won\'t send until you connect."))
ackdata = OpenSSL.rand(32)
shared.sqlLock.acquire()
t = ('',toAddress,ripe,fromAddress,subject,message,ackdata,int(time.time()),'msgqueued',1,1,'sent',2)
shared.sqlSubmitQueue.put('''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)''')
t = ('', toAddress, ripe, fromAddress, subject, message, ackdata, int(
time.time()), 'msgqueued', 1, 1, 'sent', 2)
shared.sqlSubmitQueue.put(
'''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
@ -1126,16 +1343,18 @@ class MyForm(QtGui.QMainWindow):
toLabel = ''
t = (toAddress,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''select label from addressbook where address=?''')
shared.sqlSubmitQueue.put(
'''select label from addressbook where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn <> []:
if queryreturn != []:
for row in queryreturn:
toLabel, = row
self.displayNewSentMessage(toAddress,toLabel,fromAddress, subject, message, ackdata)
shared.workerQueue.put(('sendmessage',toAddress))
self.displayNewSentMessage(
toAddress, toLabel, fromAddress, subject, message, ackdata)
shared.workerQueue.put(('sendmessage', toAddress))
self.ui.comboBoxSendFrom.setCurrentIndex(0)
self.ui.labelFrom.setText('')
@ -1143,27 +1362,33 @@ class MyForm(QtGui.QMainWindow):
self.ui.lineEditSubject.setText('')
self.ui.textEditMessage.setText('')
self.ui.tabWidget.setCurrentIndex(2)
self.ui.tableWidgetSent.setCurrentCell(0,0)
self.ui.tableWidgetSent.setCurrentCell(0, 0)
else:
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Your \'To\' field is empty."))
else: #User selected 'Broadcast'
self.statusBar().showMessage(_translate(
"MainWindow", "Your \'To\' field is empty."))
else: # User selected 'Broadcast'
if fromAddress == '':
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: You must specify a From address. If you don\'t have one, go to the \'Your Identities\' tab."))
self.statusBar().showMessage(_translate(
"MainWindow", "Error: You must specify a From address. If you don\'t have one, go to the \'Your Identities\' tab."))
else:
self.statusBar().showMessage('')
#We don't actually need the ackdata for acknowledgement since this is a broadcast message, but we can use it to update the user interface when the POW is done generating.
# We don't actually need the ackdata for acknowledgement since
# this is a broadcast message, but we can use it to update the
# user interface when the POW is done generating.
ackdata = OpenSSL.rand(32)
toAddress = self.str_broadcast_subscribers
ripe = ''
shared.sqlLock.acquire()
t = ('',toAddress,ripe,fromAddress,subject,message,ackdata,int(time.time()),'broadcastqueued',1,1,'sent',2)
shared.sqlSubmitQueue.put('''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)''')
t = ('', toAddress, ripe, fromAddress, subject, message, ackdata, int(
time.time()), 'broadcastqueued', 1, 1, 'sent', 2)
shared.sqlSubmitQueue.put(
'''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
shared.workerQueue.put(('sendbroadcast',''))
shared.workerQueue.put(('sendbroadcast', ''))
try:
fromLabel = shared.config.get(fromAddress, 'label')
@ -1175,26 +1400,32 @@ class MyForm(QtGui.QMainWindow):
toLabel = self.str_broadcast_subscribers
self.ui.tableWidgetSent.insertRow(0)
newItem = QtGui.QTableWidgetItem(unicode(toLabel,'utf-8'))
newItem.setData(Qt.UserRole,str(toAddress))
self.ui.tableWidgetSent.setItem(0,0,newItem)
newItem = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8'))
newItem.setData(Qt.UserRole, str(toAddress))
self.ui.tableWidgetSent.setItem(0, 0, newItem)
if fromLabel == '':
newItem = QtGui.QTableWidgetItem(unicode(fromAddress,'utf-8'))
newItem = QtGui.QTableWidgetItem(
unicode(fromAddress, 'utf-8'))
else:
newItem = QtGui.QTableWidgetItem(unicode(fromLabel,'utf-8'))
newItem.setData(Qt.UserRole,str(fromAddress))
self.ui.tableWidgetSent.setItem(0,1,newItem)
newItem = QtGui.QTableWidgetItem(unicode(subject,'utf-8)'))
newItem.setData(Qt.UserRole,unicode(message,'utf-8)'))
self.ui.tableWidgetSent.setItem(0,2,newItem)
#newItem = QtGui.QTableWidgetItem('Doing work necessary to send broadcast...'+ unicode(strftime(config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time()))),'utf-8'))
newItem = myTableWidgetItem('Work is queued.')
newItem.setData(Qt.UserRole,QByteArray(ackdata))
newItem.setData(33,int(time.time()))
self.ui.tableWidgetSent.setItem(0,3,newItem)
newItem = QtGui.QTableWidgetItem(
unicode(fromLabel, 'utf-8'))
newItem.setData(Qt.UserRole, str(fromAddress))
self.ui.tableWidgetSent.setItem(0, 1, newItem)
newItem = QtGui.QTableWidgetItem(unicode(subject, 'utf-8)'))
newItem.setData(Qt.UserRole, unicode(message, 'utf-8)'))
self.ui.tableWidgetSent.setItem(0, 2, newItem)
# newItem = QtGui.QTableWidgetItem('Doing work necessary to
# send broadcast...'+
# unicode(strftime(config.get('bitmessagesettings',
# 'timeformat'),localtime(int(time.time()))),'utf-8'))
newItem = myTableWidgetItem(_translate("MainWindow", "Work is queued."))
newItem.setData(Qt.UserRole, QByteArray(ackdata))
newItem.setData(33, int(time.time()))
self.ui.tableWidgetSent.setItem(0, 3, newItem)
self.ui.textEditSentMessage.setPlainText(self.ui.tableWidgetSent.item(0,2).data(Qt.UserRole).toPyObject())
self.ui.textEditSentMessage.setPlainText(
self.ui.tableWidgetSent.item(0, 2).data(Qt.UserRole).toPyObject())
self.ui.comboBoxSendFrom.setCurrentIndex(0)
self.ui.labelFrom.setText('')
@ -1202,8 +1433,7 @@ class MyForm(QtGui.QMainWindow):
self.ui.lineEditSubject.setText('')
self.ui.textEditMessage.setText('')
self.ui.tabWidget.setCurrentIndex(2)
self.ui.tableWidgetSent.setCurrentCell(0,0)
self.ui.tableWidgetSent.setCurrentCell(0, 0)
def click_pushButtonLoadFromAddressBook(self):
self.ui.tabWidget.setCurrentIndex(5)
@ -1211,30 +1441,36 @@ class MyForm(QtGui.QMainWindow):
time.sleep(0.1)
self.statusBar().showMessage('')
time.sleep(0.1)
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Right click one or more entries in your address book and select \'Send message to this address\'."))
self.statusBar().showMessage(_translate(
"MainWindow", "Right click one or more entries in your address book and select \'Send message to this address\'."))
def redrawLabelFrom(self,index):
self.ui.labelFrom.setText(self.ui.comboBoxSendFrom.itemData(index).toPyObject())
def redrawLabelFrom(self, index):
self.ui.labelFrom.setText(
self.ui.comboBoxSendFrom.itemData(index).toPyObject())
def rerenderComboBoxSendFrom(self):
self.ui.comboBoxSendFrom.clear()
self.ui.labelFrom.setText('')
configSections = shared.config.sections()
for addressInKeysFile in configSections:
if addressInKeysFile <> 'bitmessagesettings':
isEnabled = shared.config.getboolean(addressInKeysFile, 'enabled') #I realize that this is poor programming practice but I don't care. It's easier for others to read.
if addressInKeysFile != 'bitmessagesettings':
isEnabled = shared.config.getboolean(
addressInKeysFile, 'enabled') # I realize that this is poor programming practice but I don't care. It's easier for others to read.
if isEnabled:
self.ui.comboBoxSendFrom.insertItem(0,unicode(shared.config.get(addressInKeysFile, 'label'),'utf-8'),addressInKeysFile)
self.ui.comboBoxSendFrom.insertItem(0,'','')
self.ui.comboBoxSendFrom.insertItem(0, unicode(shared.config.get(
addressInKeysFile, 'label'), 'utf-8'), addressInKeysFile)
self.ui.comboBoxSendFrom.insertItem(0, '', '')
if(self.ui.comboBoxSendFrom.count() == 2):
self.ui.comboBoxSendFrom.setCurrentIndex(1)
self.redrawLabelFrom(self.ui.comboBoxSendFrom.currentIndex())
else:
self.ui.comboBoxSendFrom.setCurrentIndex(0)
#This function is called by the processmsg function when that function receives a message to an address that is acting as a pseudo-mailing-list. The message will be broadcast out. This function puts the message on the 'Sent' tab.
def displayNewSentMessage(self,toAddress,toLabel,fromAddress,subject,message,ackdata):
# This function is called by the processmsg function when that function
# receives a message to an address that is acting as a
# pseudo-mailing-list. The message will be broadcast out. This function
# puts the message on the 'Sent' tab.
def displayNewSentMessage(self, toAddress, toLabel, fromAddress, subject, message, ackdata):
subject = shared.fixPotentiallyInvalidUTF8Data(subject)
message = shared.fixPotentiallyInvalidUTF8Data(message)
try:
@ -1247,56 +1483,64 @@ class MyForm(QtGui.QMainWindow):
self.ui.tableWidgetSent.setSortingEnabled(False)
self.ui.tableWidgetSent.insertRow(0)
if toLabel == '':
newItem = QtGui.QTableWidgetItem(unicode(toAddress,'utf-8'))
newItem.setToolTip(unicode(toAddress,'utf-8'))
newItem = QtGui.QTableWidgetItem(unicode(toAddress, 'utf-8'))
newItem.setToolTip(unicode(toAddress, 'utf-8'))
else:
newItem = QtGui.QTableWidgetItem(unicode(toLabel,'utf-8'))
newItem.setToolTip(unicode(toLabel,'utf-8'))
newItem.setData(Qt.UserRole,str(toAddress))
self.ui.tableWidgetSent.setItem(0,0,newItem)
newItem = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8'))
newItem.setToolTip(unicode(toLabel, 'utf-8'))
newItem.setData(Qt.UserRole, str(toAddress))
self.ui.tableWidgetSent.setItem(0, 0, newItem)
if fromLabel == '':
newItem = QtGui.QTableWidgetItem(unicode(fromAddress,'utf-8'))
newItem.setToolTip(unicode(fromAddress,'utf-8'))
newItem = QtGui.QTableWidgetItem(unicode(fromAddress, 'utf-8'))
newItem.setToolTip(unicode(fromAddress, 'utf-8'))
else:
newItem = QtGui.QTableWidgetItem(unicode(fromLabel,'utf-8'))
newItem.setToolTip(unicode(fromLabel,'utf-8'))
newItem.setData(Qt.UserRole,str(fromAddress))
self.ui.tableWidgetSent.setItem(0,1,newItem)
newItem = QtGui.QTableWidgetItem(unicode(subject,'utf-8)'))
newItem.setToolTip(unicode(subject,'utf-8)'))
newItem.setData(Qt.UserRole,unicode(message,'utf-8)'))
self.ui.tableWidgetSent.setItem(0,2,newItem)
#newItem = QtGui.QTableWidgetItem('Doing work necessary to send broadcast...'+ unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time()))),'utf-8'))
newItem = myTableWidgetItem('Work is queued. '+ unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time()))),'utf-8'))
newItem.setToolTip('Work is queued. '+ unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time()))),'utf-8'))
newItem.setData(Qt.UserRole,QByteArray(ackdata))
newItem.setData(33,int(time.time()))
self.ui.tableWidgetSent.setItem(0,3,newItem)
self.ui.textEditSentMessage.setPlainText(self.ui.tableWidgetSent.item(0,2).data(Qt.UserRole).toPyObject())
newItem = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8'))
newItem.setToolTip(unicode(fromLabel, 'utf-8'))
newItem.setData(Qt.UserRole, str(fromAddress))
self.ui.tableWidgetSent.setItem(0, 1, newItem)
newItem = QtGui.QTableWidgetItem(unicode(subject, 'utf-8)'))
newItem.setToolTip(unicode(subject, 'utf-8)'))
newItem.setData(Qt.UserRole, unicode(message, 'utf-8)'))
self.ui.tableWidgetSent.setItem(0, 2, newItem)
# newItem = QtGui.QTableWidgetItem('Doing work necessary to send
# broadcast...'+
# unicode(strftime(shared.config.get('bitmessagesettings',
# 'timeformat'),localtime(int(time.time()))),'utf-8'))
newItem = myTableWidgetItem(_translate("MainWindow", "Work is queued. %1").arg(unicode(strftime(shared.config.get(
'bitmessagesettings', 'timeformat'), localtime(int(time.time()))), 'utf-8')))
newItem.setToolTip(_translate("MainWindow", "Work is queued. %1").arg(unicode(strftime(shared.config.get(
'bitmessagesettings', 'timeformat'), localtime(int(time.time()))), 'utf-8')))
newItem.setData(Qt.UserRole, QByteArray(ackdata))
newItem.setData(33, int(time.time()))
self.ui.tableWidgetSent.setItem(0, 3, newItem)
self.ui.textEditSentMessage.setPlainText(
self.ui.tableWidgetSent.item(0, 2).data(Qt.UserRole).toPyObject())
self.ui.tableWidgetSent.setSortingEnabled(True)
def displayNewInboxMessage(self,inventoryHash,toAddress,fromAddress,subject,message):
def displayNewInboxMessage(self, inventoryHash, toAddress, fromAddress, subject, message):
subject = shared.fixPotentiallyInvalidUTF8Data(subject)
message = shared.fixPotentiallyInvalidUTF8Data(message)
fromLabel = ''
shared.sqlLock.acquire()
t = (fromAddress,)
shared.sqlSubmitQueue.put('''select label from addressbook where address=?''')
shared.sqlSubmitQueue.put(
'''select label from addressbook where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn <> []:
if queryreturn != []:
for row in queryreturn:
fromLabel, = row
else:
#There might be a label in the subscriptions table
# There might be a label in the subscriptions table
shared.sqlLock.acquire()
t = (fromAddress,)
shared.sqlSubmitQueue.put('''select label from subscriptions where address=?''')
shared.sqlSubmitQueue.put(
'''select label from subscriptions where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn <> []:
if queryreturn != []:
for row in queryreturn:
fromLabel, = row
@ -1313,65 +1557,76 @@ class MyForm(QtGui.QMainWindow):
font = QFont()
font.setBold(True)
self.ui.tableWidgetInbox.setSortingEnabled(False)
newItem = QtGui.QTableWidgetItem(unicode(toLabel,'utf-8'))
newItem.setToolTip(unicode(toLabel,'utf-8'))
newItem = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8'))
newItem.setToolTip(unicode(toLabel, 'utf-8'))
newItem.setFont(font)
newItem.setData(Qt.UserRole,str(toAddress))
if shared.safeConfigGetBoolean(str(toAddress),'mailinglist'):
newItem.setTextColor(QtGui.QColor(137,04,177))
newItem.setData(Qt.UserRole, str(toAddress))
if shared.safeConfigGetBoolean(str(toAddress), 'mailinglist'):
newItem.setTextColor(QtGui.QColor(137, 04, 177))
self.ui.tableWidgetInbox.insertRow(0)
self.ui.tableWidgetInbox.setItem(0,0,newItem)
self.ui.tableWidgetInbox.setItem(0, 0, newItem)
if fromLabel == '':
newItem = QtGui.QTableWidgetItem(unicode(fromAddress,'utf-8'))
newItem.setToolTip(unicode(fromAddress,'utf-8'))
newItem = QtGui.QTableWidgetItem(unicode(fromAddress, 'utf-8'))
newItem.setToolTip(unicode(fromAddress, 'utf-8'))
if shared.config.getboolean('bitmessagesettings', 'showtraynotifications'):
self.notifierShow('New Message', 'From '+ fromAddress)
self.notifierShow('New Message', 'From ' + fromAddress)
else:
newItem = QtGui.QTableWidgetItem(unicode(fromLabel,'utf-8'))
newItem.setToolTip(unicode(unicode(fromLabel,'utf-8')))
newItem = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8'))
newItem.setToolTip(unicode(unicode(fromLabel, 'utf-8')))
if shared.config.getboolean('bitmessagesettings', 'showtraynotifications'):
self.notifierShow('New Message', 'From ' + fromLabel)
newItem.setData(Qt.UserRole,str(fromAddress))
newItem.setData(Qt.UserRole, str(fromAddress))
newItem.setFont(font)
self.ui.tableWidgetInbox.setItem(0,1,newItem)
newItem = QtGui.QTableWidgetItem(unicode(subject,'utf-8)'))
newItem.setToolTip(unicode(subject,'utf-8)'))
newItem.setData(Qt.UserRole,unicode(message,'utf-8)'))
self.ui.tableWidgetInbox.setItem(0, 1, newItem)
newItem = QtGui.QTableWidgetItem(unicode(subject, 'utf-8)'))
newItem.setToolTip(unicode(subject, 'utf-8)'))
newItem.setData(Qt.UserRole, unicode(message, 'utf-8)'))
newItem.setFont(font)
self.ui.tableWidgetInbox.setItem(0,2,newItem)
newItem = myTableWidgetItem(unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time()))),'utf-8'))
newItem.setToolTip(unicode(strftime(shared.config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time()))),'utf-8'))
newItem.setData(Qt.UserRole,QByteArray(inventoryHash))
newItem.setData(33,int(time.time()))
self.ui.tableWidgetInbox.setItem(0, 2, newItem)
newItem = myTableWidgetItem(unicode(strftime(shared.config.get(
'bitmessagesettings', 'timeformat'), localtime(int(time.time()))), 'utf-8'))
newItem.setToolTip(unicode(strftime(shared.config.get(
'bitmessagesettings', 'timeformat'), localtime(int(time.time()))), 'utf-8'))
newItem.setData(Qt.UserRole, QByteArray(inventoryHash))
newItem.setData(33, int(time.time()))
newItem.setFont(font)
self.ui.tableWidgetInbox.setItem(0,3,newItem)
self.ui.tableWidgetInbox.setItem(0, 3, newItem)
self.ui.tableWidgetInbox.setSortingEnabled(True)
self.ubuntuMessagingMenuUpdate(True, newItem, toLabel)
def click_pushButtonAddAddressBook(self):
self.NewSubscriptionDialogInstance = NewSubscriptionDialog(self)
if self.NewSubscriptionDialogInstance.exec_():
if self.NewSubscriptionDialogInstance.ui.labelSubscriptionAddressCheck.text() == 'Address is valid.':
#First we must check to see if the address is already in the address book. The user cannot add it again or else it will cause problems when updating and deleting the entry.
if self.NewSubscriptionDialogInstance.ui.labelSubscriptionAddressCheck.text() == _translate("MainWindow", "Address is valid."):
# First we must check to see if the address is already in the
# address book. The user cannot add it again or else it will
# cause problems when updating and deleting the entry.
shared.sqlLock.acquire()
t = (addBMIfNotPresent(str(self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text())),)
shared.sqlSubmitQueue.put('''select * from addressbook where address=?''')
t = (addBMIfNotPresent(str(
self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text())),)
shared.sqlSubmitQueue.put(
'''select * from addressbook where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn == []:
self.ui.tableWidgetAddressBook.setSortingEnabled(False)
self.ui.tableWidgetAddressBook.insertRow(0)
newItem = QtGui.QTableWidgetItem(unicode(self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8(),'utf-8'))
self.ui.tableWidgetAddressBook.setItem(0,0,newItem)
newItem = QtGui.QTableWidgetItem(addBMIfNotPresent(self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text()))
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetAddressBook.setItem(0,1,newItem)
newItem = QtGui.QTableWidgetItem(unicode(
self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8(), 'utf-8'))
self.ui.tableWidgetAddressBook.setItem(0, 0, newItem)
newItem = QtGui.QTableWidgetItem(addBMIfNotPresent(
self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text()))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetAddressBook.setItem(0, 1, newItem)
self.ui.tableWidgetAddressBook.setSortingEnabled(True)
t = (str(self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8()),addBMIfNotPresent(str(self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text())))
t = (str(self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8()), addBMIfNotPresent(
str(self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text())))
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''INSERT INTO addressbook VALUES (?,?)''')
shared.sqlSubmitQueue.put(
'''INSERT INTO addressbook VALUES (?,?)''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
@ -1379,34 +1634,45 @@ class MyForm(QtGui.QMainWindow):
self.rerenderInboxFromLabels()
self.rerenderSentToLabels()
else:
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want."))
self.statusBar().showMessage(_translate(
"MainWindow", "Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want."))
else:
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "The address you entered was invalid. Ignoring it."))
self.statusBar().showMessage(_translate(
"MainWindow", "The address you entered was invalid. Ignoring it."))
def click_pushButtonAddSubscription(self):
self.NewSubscriptionDialogInstance = NewSubscriptionDialog(self)
if self.NewSubscriptionDialogInstance.exec_():
if self.NewSubscriptionDialogInstance.ui.labelSubscriptionAddressCheck.text() == 'Address is valid.':
#First we must check to see if the address is already in the subscriptions list. The user cannot add it again or else it will cause problems when updating and deleting the entry.
if self.NewSubscriptionDialogInstance.ui.labelSubscriptionAddressCheck.text() == _translate("MainWindow", "Address is valid."):
# First we must check to see if the address is already in the
# subscriptions list. The user cannot add it again or else it
# will cause problems when updating and deleting the entry.
shared.sqlLock.acquire()
t = (addBMIfNotPresent(str(self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text())),)
shared.sqlSubmitQueue.put('''select * from subscriptions where address=?''')
t = (addBMIfNotPresent(str(
self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text())),)
shared.sqlSubmitQueue.put(
'''select * from subscriptions where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn == []:
self.ui.tableWidgetSubscriptions.setSortingEnabled(False)
self.ui.tableWidgetSubscriptions.insertRow(0)
newItem = QtGui.QTableWidgetItem(unicode(self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8(),'utf-8'))
self.ui.tableWidgetSubscriptions.setItem(0,0,newItem)
newItem = QtGui.QTableWidgetItem(addBMIfNotPresent(self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text()))
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetSubscriptions.setItem(0,1,newItem)
newItem = QtGui.QTableWidgetItem(unicode(
self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8(), 'utf-8'))
self.ui.tableWidgetSubscriptions.setItem(0, 0, newItem)
newItem = QtGui.QTableWidgetItem(addBMIfNotPresent(
self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text()))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetSubscriptions.setItem(0, 1, newItem)
self.ui.tableWidgetSubscriptions.setSortingEnabled(True)
t = (str(self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8()),addBMIfNotPresent(str(self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text())),True)
t = (str(self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8()), addBMIfNotPresent(
str(self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text())), True)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''INSERT INTO subscriptions VALUES (?,?,?)''')
shared.sqlSubmitQueue.put(
'''INSERT INTO subscriptions VALUES (?,?,?)''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
@ -1414,33 +1680,38 @@ class MyForm(QtGui.QMainWindow):
self.rerenderInboxFromLabels()
shared.reloadBroadcastSendersForWhichImWatching()
else:
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: You cannot add the same address to your subsciptions twice. Perhaps rename the existing one if you want."))
self.statusBar().showMessage(_translate(
"MainWindow", "Error: You cannot add the same address to your subsciptions twice. Perhaps rename the existing one if you want."))
else:
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "The address you entered was invalid. Ignoring it."))
self.statusBar().showMessage(_translate(
"MainWindow", "The address you entered was invalid. Ignoring it."))
def loadBlackWhiteList(self):
#Initialize the Blacklist or Whitelist table
# Initialize the Blacklist or Whitelist table
listType = shared.config.get('bitmessagesettings', 'blackwhitelist')
shared.sqlLock.acquire()
if listType == 'black':
shared.sqlSubmitQueue.put('''SELECT label, address, enabled FROM blacklist''')
shared.sqlSubmitQueue.put(
'''SELECT label, address, enabled FROM blacklist''')
else:
shared.sqlSubmitQueue.put('''SELECT label, address, enabled FROM whitelist''')
shared.sqlSubmitQueue.put(
'''SELECT label, address, enabled FROM whitelist''')
shared.sqlSubmitQueue.put('')
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
for row in queryreturn:
label, address, enabled = row
self.ui.tableWidgetBlacklist.insertRow(0)
newItem = QtGui.QTableWidgetItem(unicode(label,'utf-8'))
newItem = QtGui.QTableWidgetItem(unicode(label, 'utf-8'))
if not enabled:
newItem.setTextColor(QtGui.QColor(128,128,128))
self.ui.tableWidgetBlacklist.setItem(0,0,newItem)
newItem = QtGui.QTableWidgetItem(address)
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
newItem.setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetBlacklist.setItem(0, 0, newItem)
newItem = QtGui.QTableWidgetItem(address)
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not enabled:
newItem.setTextColor(QtGui.QColor(128,128,128))
self.ui.tableWidgetBlacklist.setItem(0,1,newItem)
newItem.setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetBlacklist.setItem(0, 1, newItem)
def click_pushButtonStatusIcon(self):
print 'click_pushButtonStatusIcon'
@ -1459,64 +1730,82 @@ class MyForm(QtGui.QMainWindow):
def click_actionSettings(self):
self.settingsDialogInstance = settingsDialog(self)
if self.settingsDialogInstance.exec_():
shared.config.set('bitmessagesettings', 'startonlogon', str(self.settingsDialogInstance.ui.checkBoxStartOnLogon.isChecked()))
shared.config.set('bitmessagesettings', 'minimizetotray', str(self.settingsDialogInstance.ui.checkBoxMinimizeToTray.isChecked()))
shared.config.set('bitmessagesettings', 'showtraynotifications', str(self.settingsDialogInstance.ui.checkBoxShowTrayNotifications.isChecked()))
shared.config.set('bitmessagesettings', 'startintray', str(self.settingsDialogInstance.ui.checkBoxStartInTray.isChecked()))
if int(shared.config.get('bitmessagesettings','port')) != int(self.settingsDialogInstance.ui.lineEditTCPPort.text()):
QMessageBox.about(self, QtGui.QApplication.translate("MainWindow", "Restart"), QtGui.QApplication.translate("MainWindow", "You must restart Bitmessage for the port number change to take effect."))
shared.config.set('bitmessagesettings', 'port', str(self.settingsDialogInstance.ui.lineEditTCPPort.text()))
shared.config.set('bitmessagesettings', 'startonlogon', str(
self.settingsDialogInstance.ui.checkBoxStartOnLogon.isChecked()))
shared.config.set('bitmessagesettings', 'minimizetotray', str(
self.settingsDialogInstance.ui.checkBoxMinimizeToTray.isChecked()))
shared.config.set('bitmessagesettings', 'showtraynotifications', str(
self.settingsDialogInstance.ui.checkBoxShowTrayNotifications.isChecked()))
shared.config.set('bitmessagesettings', 'startintray', str(
self.settingsDialogInstance.ui.checkBoxStartInTray.isChecked()))
if int(shared.config.get('bitmessagesettings', 'port')) != int(self.settingsDialogInstance.ui.lineEditTCPPort.text()):
QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate(
"MainWindow", "You must restart Bitmessage for the port number change to take effect."))
shared.config.set('bitmessagesettings', 'port', str(
self.settingsDialogInstance.ui.lineEditTCPPort.text()))
if shared.config.get('bitmessagesettings', 'socksproxytype') == 'none' and str(self.settingsDialogInstance.ui.comboBoxProxyType.currentText())[0:5] == 'SOCKS':
if shared.statusIconColor != 'red':
QMessageBox.about(self, QtGui.QApplication.translate("MainWindow", "Restart"), QtGui.QApplication.translate("MainWindow", "Bitmessage will use your proxy from now on now but you may want to manually restart Bitmessage now to close existing connections."))
QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate(
"MainWindow", "Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections."))
if shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and str(self.settingsDialogInstance.ui.comboBoxProxyType.currentText()) == 'none':
self.statusBar().showMessage('')
shared.config.set('bitmessagesettings', 'socksproxytype', str(self.settingsDialogInstance.ui.comboBoxProxyType.currentText()))
shared.config.set('bitmessagesettings', 'socksauthentication', str(self.settingsDialogInstance.ui.checkBoxAuthentication.isChecked()))
shared.config.set('bitmessagesettings', 'sockshostname', str(self.settingsDialogInstance.ui.lineEditSocksHostname.text()))
shared.config.set('bitmessagesettings', 'socksport', str(self.settingsDialogInstance.ui.lineEditSocksPort.text()))
shared.config.set('bitmessagesettings', 'socksusername', str(self.settingsDialogInstance.ui.lineEditSocksUsername.text()))
shared.config.set('bitmessagesettings', 'sockspassword', str(self.settingsDialogInstance.ui.lineEditSocksPassword.text()))
shared.config.set('bitmessagesettings', 'socksproxytype', str(
self.settingsDialogInstance.ui.comboBoxProxyType.currentText()))
shared.config.set('bitmessagesettings', 'socksauthentication', str(
self.settingsDialogInstance.ui.checkBoxAuthentication.isChecked()))
shared.config.set('bitmessagesettings', 'sockshostname', str(
self.settingsDialogInstance.ui.lineEditSocksHostname.text()))
shared.config.set('bitmessagesettings', 'socksport', str(
self.settingsDialogInstance.ui.lineEditSocksPort.text()))
shared.config.set('bitmessagesettings', 'socksusername', str(
self.settingsDialogInstance.ui.lineEditSocksUsername.text()))
shared.config.set('bitmessagesettings', 'sockspassword', str(
self.settingsDialogInstance.ui.lineEditSocksPassword.text()))
if float(self.settingsDialogInstance.ui.lineEditTotalDifficulty.text()) >= 1:
shared.config.set('bitmessagesettings', 'defaultnoncetrialsperbyte',str(int(float(self.settingsDialogInstance.ui.lineEditTotalDifficulty.text())*shared.networkDefaultProofOfWorkNonceTrialsPerByte)))
shared.config.set('bitmessagesettings', 'defaultnoncetrialsperbyte', str(int(float(
self.settingsDialogInstance.ui.lineEditTotalDifficulty.text()) * shared.networkDefaultProofOfWorkNonceTrialsPerByte)))
if float(self.settingsDialogInstance.ui.lineEditSmallMessageDifficulty.text()) >= 1:
shared.config.set('bitmessagesettings', 'defaultpayloadlengthextrabytes',str(int(float(self.settingsDialogInstance.ui.lineEditSmallMessageDifficulty.text())*shared.networkDefaultPayloadLengthExtraBytes)))
shared.config.set('bitmessagesettings', 'defaultpayloadlengthextrabytes', str(int(float(
self.settingsDialogInstance.ui.lineEditSmallMessageDifficulty.text()) * shared.networkDefaultPayloadLengthExtraBytes)))
if float(self.settingsDialogInstance.ui.lineEditMaxAcceptableTotalDifficulty.text()) >= 1 or float(self.settingsDialogInstance.ui.lineEditMaxAcceptableTotalDifficulty.text()) == 0:
shared.config.set('bitmessagesettings', 'maxacceptablenoncetrialsperbyte',str(int(float(self.settingsDialogInstance.ui.lineEditMaxAcceptableTotalDifficulty.text())*shared.networkDefaultProofOfWorkNonceTrialsPerByte)))
shared.config.set('bitmessagesettings', 'maxacceptablenoncetrialsperbyte', str(int(float(
self.settingsDialogInstance.ui.lineEditMaxAcceptableTotalDifficulty.text()) * shared.networkDefaultProofOfWorkNonceTrialsPerByte)))
if float(self.settingsDialogInstance.ui.lineEditMaxAcceptableSmallMessageDifficulty.text()) >= 1 or float(self.settingsDialogInstance.ui.lineEditMaxAcceptableSmallMessageDifficulty.text()) == 0:
shared.config.set('bitmessagesettings', 'maxacceptablepayloadlengthextrabytes',str(int(float(self.settingsDialogInstance.ui.lineEditMaxAcceptableSmallMessageDifficulty.text())*shared.networkDefaultPayloadLengthExtraBytes)))
#if str(self.settingsDialogInstance.ui.comboBoxMaxCores.currentText()) == 'All':
shared.config.set('bitmessagesettings', 'maxacceptablepayloadlengthextrabytes', str(int(float(
self.settingsDialogInstance.ui.lineEditMaxAcceptableSmallMessageDifficulty.text()) * shared.networkDefaultPayloadLengthExtraBytes)))
# if str(self.settingsDialogInstance.ui.comboBoxMaxCores.currentText()) == 'All':
# shared.config.set('bitmessagesettings', 'maxcores', '99999')
#else:
# shared.config.set('bitmessagesettings', 'maxcores', str(self.settingsDialogInstance.ui.comboBoxMaxCores.currentText()))
# else:
# shared.config.set('bitmessagesettings', 'maxcores',
# str(self.settingsDialogInstance.ui.comboBoxMaxCores.currentText()))
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
if 'win32' in sys.platform or 'win64' in sys.platform:
#Auto-startup for Windows
# Auto-startup for Windows
RUN_PATH = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run"
self.settings = QSettings(RUN_PATH, QSettings.NativeFormat)
if shared.config.getboolean('bitmessagesettings', 'startonlogon'):
self.settings.setValue("PyBitmessage",sys.argv[0])
self.settings.setValue("PyBitmessage", sys.argv[0])
else:
self.settings.remove("PyBitmessage")
elif 'darwin' in sys.platform:
#startup for mac
# startup for mac
pass
elif 'linux' in sys.platform:
#startup for linux
# startup for linux
pass
if shared.appdata != '' and self.settingsDialogInstance.ui.checkBoxPortableMode.isChecked(): #If we are NOT using portable mode now but the user selected that we should...
#Write the keys.dat file to disk in the new location
if shared.appdata != '' and self.settingsDialogInstance.ui.checkBoxPortableMode.isChecked(): # If we are NOT using portable mode now but the user selected that we should...
# Write the keys.dat file to disk in the new location
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('movemessagstoprog')
shared.sqlLock.release()
with open('keys.dat', 'wb') as configfile:
shared.config.write(configfile)
#Write the knownnodes.dat file to disk in the new location
# Write the knownnodes.dat file to disk in the new location
shared.knownNodesLock.acquire()
output = open('knownnodes.dat', 'wb')
pickle.dump(shared.knownNodes, output)
@ -1526,17 +1815,17 @@ class MyForm(QtGui.QMainWindow):
os.remove(shared.appdata + 'knownnodes.dat')
shared.appdata = ''
if shared.appdata == '' and not self.settingsDialogInstance.ui.checkBoxPortableMode.isChecked(): #If we ARE using portable mode now but the user selected that we shouldn't...
if shared.appdata == '' and not self.settingsDialogInstance.ui.checkBoxPortableMode.isChecked(): # If we ARE using portable mode now but the user selected that we shouldn't...
shared.appdata = shared.lookupAppdataFolder()
if not os.path.exists(shared.appdata):
os.makedirs(shared.appdata)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('movemessagstoappdata')
shared.sqlLock.release()
#Write the keys.dat file to disk in the new location
# Write the keys.dat file to disk in the new location
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
#Write the knownnodes.dat file to disk in the new location
# Write the knownnodes.dat file to disk in the new location
shared.knownNodesLock.acquire()
output = open(shared.appdata + 'knownnodes.dat', 'wb')
pickle.dump(shared.knownNodes, output)
@ -1545,123 +1834,144 @@ class MyForm(QtGui.QMainWindow):
os.remove('keys.dat')
os.remove('knownnodes.dat')
def click_radioButtonBlacklist(self):
if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'white':
shared.config.set('bitmessagesettings','blackwhitelist','black')
shared.config.set('bitmessagesettings', 'blackwhitelist', 'black')
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
#self.ui.tableWidgetBlacklist.clearContents()
# self.ui.tableWidgetBlacklist.clearContents()
self.ui.tableWidgetBlacklist.setRowCount(0)
self.loadBlackWhiteList()
self.ui.tabWidget.setTabText(6,'Blacklist')
self.ui.tabWidget.setTabText(6, 'Blacklist')
def click_radioButtonWhitelist(self):
if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'black':
shared.config.set('bitmessagesettings','blackwhitelist','white')
shared.config.set('bitmessagesettings', 'blackwhitelist', 'white')
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
#self.ui.tableWidgetBlacklist.clearContents()
# self.ui.tableWidgetBlacklist.clearContents()
self.ui.tableWidgetBlacklist.setRowCount(0)
self.loadBlackWhiteList()
self.ui.tabWidget.setTabText(6,'Whitelist')
self.ui.tabWidget.setTabText(6, 'Whitelist')
def click_pushButtonAddBlacklist(self):
self.NewBlacklistDialogInstance = NewSubscriptionDialog(self)
if self.NewBlacklistDialogInstance.exec_():
if self.NewBlacklistDialogInstance.ui.labelSubscriptionAddressCheck.text() == 'Address is valid.':
#First we must check to see if the address is already in the address book. The user cannot add it again or else it will cause problems when updating and deleting the entry.
if self.NewBlacklistDialogInstance.ui.labelSubscriptionAddressCheck.text() == _translate("MainWindow", "Address is valid."):
# First we must check to see if the address is already in the
# address book. The user cannot add it again or else it will
# cause problems when updating and deleting the entry.
shared.sqlLock.acquire()
t = (addBMIfNotPresent(str(self.NewBlacklistDialogInstance.ui.lineEditSubscriptionAddress.text())),)
t = (addBMIfNotPresent(str(
self.NewBlacklistDialogInstance.ui.lineEditSubscriptionAddress.text())),)
if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'black':
shared.sqlSubmitQueue.put('''select * from blacklist where address=?''')
shared.sqlSubmitQueue.put(
'''select * from blacklist where address=?''')
else:
shared.sqlSubmitQueue.put('''select * from whitelist where address=?''')
shared.sqlSubmitQueue.put(
'''select * from whitelist where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn == []:
self.ui.tableWidgetBlacklist.setSortingEnabled(False)
self.ui.tableWidgetBlacklist.insertRow(0)
newItem = QtGui.QTableWidgetItem(unicode(self.NewBlacklistDialogInstance.ui.newsubscriptionlabel.text().toUtf8(),'utf-8'))
self.ui.tableWidgetBlacklist.setItem(0,0,newItem)
newItem = QtGui.QTableWidgetItem(addBMIfNotPresent(self.NewBlacklistDialogInstance.ui.lineEditSubscriptionAddress.text()))
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetBlacklist.setItem(0,1,newItem)
newItem = QtGui.QTableWidgetItem(unicode(
self.NewBlacklistDialogInstance.ui.newsubscriptionlabel.text().toUtf8(), 'utf-8'))
self.ui.tableWidgetBlacklist.setItem(0, 0, newItem)
newItem = QtGui.QTableWidgetItem(addBMIfNotPresent(
self.NewBlacklistDialogInstance.ui.lineEditSubscriptionAddress.text()))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetBlacklist.setItem(0, 1, newItem)
self.ui.tableWidgetBlacklist.setSortingEnabled(True)
t = (str(self.NewBlacklistDialogInstance.ui.newsubscriptionlabel.text().toUtf8()),addBMIfNotPresent(str(self.NewBlacklistDialogInstance.ui.lineEditSubscriptionAddress.text())),True)
t = (str(self.NewBlacklistDialogInstance.ui.newsubscriptionlabel.text().toUtf8()), addBMIfNotPresent(
str(self.NewBlacklistDialogInstance.ui.lineEditSubscriptionAddress.text())), True)
shared.sqlLock.acquire()
if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'black':
shared.sqlSubmitQueue.put('''INSERT INTO blacklist VALUES (?,?,?)''')
shared.sqlSubmitQueue.put(
'''INSERT INTO blacklist VALUES (?,?,?)''')
else:
shared.sqlSubmitQueue.put('''INSERT INTO whitelist VALUES (?,?,?)''')
shared.sqlSubmitQueue.put(
'''INSERT INTO whitelist VALUES (?,?,?)''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
else:
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: You cannot add the same address to your list twice. Perhaps rename the existing one if you want."))
self.statusBar().showMessage(_translate(
"MainWindow", "Error: You cannot add the same address to your list twice. Perhaps rename the existing one if you want."))
else:
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "The address you entered was invalid. Ignoring it."))
self.statusBar().showMessage(_translate(
"MainWindow", "The address you entered was invalid. Ignoring it."))
def on_action_SpecialAddressBehaviorDialog(self):
self.dialog = SpecialAddressBehaviorDialog(self)
# For Modal dialogs
if self.dialog.exec_():
currentRow = self.ui.tableWidgetYourIdentities.currentRow()
addressAtCurrentRow = str(self.ui.tableWidgetYourIdentities.item(currentRow,1).text())
addressAtCurrentRow = str(
self.ui.tableWidgetYourIdentities.item(currentRow, 1).text())
if self.dialog.ui.radioButtonBehaveNormalAddress.isChecked():
shared.config.set(str(addressAtCurrentRow),'mailinglist','false')
#Set the color to either black or grey
if shared.config.getboolean(addressAtCurrentRow,'enabled'):
self.ui.tableWidgetYourIdentities.item(currentRow,1).setTextColor(QtGui.QColor(0,0,0))
shared.config.set(str(
addressAtCurrentRow), 'mailinglist', 'false')
# Set the color to either black or grey
if shared.config.getboolean(addressAtCurrentRow, 'enabled'):
self.ui.tableWidgetYourIdentities.item(
currentRow, 1).setTextColor(QtGui.QColor(0, 0, 0))
else:
self.ui.tableWidgetYourIdentities.item(currentRow,1).setTextColor(QtGui.QColor(128,128,128))
self.ui.tableWidgetYourIdentities.item(
currentRow, 1).setTextColor(QtGui.QColor(128, 128, 128))
else:
shared.config.set(str(addressAtCurrentRow),'mailinglist','true')
shared.config.set(str(addressAtCurrentRow),'mailinglistname',str(self.dialog.ui.lineEditMailingListName.text().toUtf8()))
self.ui.tableWidgetYourIdentities.item(currentRow,1).setTextColor(QtGui.QColor(137,04,177))
shared.config.set(str(
addressAtCurrentRow), 'mailinglist', 'true')
shared.config.set(str(addressAtCurrentRow), 'mailinglistname', str(
self.dialog.ui.lineEditMailingListName.text().toUtf8()))
self.ui.tableWidgetYourIdentities.item(currentRow, 1).setTextColor(QtGui.QColor(137, 04, 177))
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
self.rerenderInboxToLabels()
def click_NewAddressDialog(self):
self.dialog = NewAddressDialog(self)
# For Modal dialogs
if self.dialog.exec_():
#self.dialog.ui.buttonBox.enabled = False
# self.dialog.ui.buttonBox.enabled = False
if self.dialog.ui.radioButtonRandomAddress.isChecked():
if self.dialog.ui.radioButtonMostAvailable.isChecked():
streamNumberForAddress = 1
else:
#User selected 'Use the same stream as an existing address.'
streamNumberForAddress = addressStream(self.dialog.ui.comboBoxExisting.currentText())
# User selected 'Use the same stream as an existing
# address.'
streamNumberForAddress = addressStream(
self.dialog.ui.comboBoxExisting.currentText())
#self.addressGenerator = addressGenerator()
#self.addressGenerator.setup(3,streamNumberForAddress,str(self.dialog.ui.newaddresslabel.text().toUtf8()),1,"",self.dialog.ui.checkBoxEighteenByteRipe.isChecked())
#QtCore.QObject.connect(self.addressGenerator, SIGNAL("writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable)
#QtCore.QObject.connect(self.addressGenerator, QtCore.SIGNAL("updateStatusBar(PyQt_PyObject)"), self.updateStatusBar)
#self.addressGenerator.start()
shared.addressGeneratorQueue.put(('createRandomAddress',3,streamNumberForAddress,str(self.dialog.ui.newaddresslabel.text().toUtf8()),1,"",self.dialog.ui.checkBoxEighteenByteRipe.isChecked()))
# self.addressGenerator = addressGenerator()
# self.addressGenerator.setup(3,streamNumberForAddress,str(self.dialog.ui.newaddresslabel.text().toUtf8()),1,"",self.dialog.ui.checkBoxEighteenByteRipe.isChecked())
# QtCore.QObject.connect(self.addressGenerator, SIGNAL("writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable)
# QtCore.QObject.connect(self.addressGenerator, QtCore.SIGNAL("updateStatusBar(PyQt_PyObject)"), self.updateStatusBar)
# self.addressGenerator.start()
shared.addressGeneratorQueue.put(('createRandomAddress', 3, streamNumberForAddress, str(
self.dialog.ui.newaddresslabel.text().toUtf8()), 1, "", self.dialog.ui.checkBoxEighteenByteRipe.isChecked()))
else:
if self.dialog.ui.lineEditPassphrase.text() != self.dialog.ui.lineEditPassphraseAgain.text():
QMessageBox.about(self, QtGui.QApplication.translate("MainWindow", "Passphrase mismatch"), QtGui.QApplication.translate("MainWindow", "The passphrase you entered twice doesn\'t match. Try again."))
QMessageBox.about(self, _translate("MainWindow", "Passphrase mismatch"), _translate(
"MainWindow", "The passphrase you entered twice doesn\'t match. Try again."))
elif self.dialog.ui.lineEditPassphrase.text() == "":
QMessageBox.about(self, QtGui.QApplication.translate("MainWindow", "Choose a passphrase"), QtGui.QApplication.translate("MainWindow", "You really do need a passphrase."))
QMessageBox.about(self, _translate(
"MainWindow", "Choose a passphrase"), _translate("MainWindow", "You really do need a passphrase."))
else:
streamNumberForAddress = 1 #this will eventually have to be replaced by logic to determine the most available stream number.
#self.addressGenerator = addressGenerator()
#self.addressGenerator.setup(3,streamNumberForAddress,"unused address",self.dialog.ui.spinBoxNumberOfAddressesToMake.value(),self.dialog.ui.lineEditPassphrase.text().toUtf8(),self.dialog.ui.checkBoxEighteenByteRipe.isChecked())
#QtCore.QObject.connect(self.addressGenerator, SIGNAL("writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable)
#QtCore.QObject.connect(self.addressGenerator, QtCore.SIGNAL("updateStatusBar(PyQt_PyObject)"), self.updateStatusBar)
#self.addressGenerator.start()
shared.addressGeneratorQueue.put(('createDeterministicAddresses',3,streamNumberForAddress,"unused deterministic address",self.dialog.ui.spinBoxNumberOfAddressesToMake.value(),self.dialog.ui.lineEditPassphrase.text().toUtf8(),self.dialog.ui.checkBoxEighteenByteRipe.isChecked()))
streamNumberForAddress = 1 # this will eventually have to be replaced by logic to determine the most available stream number.
# self.addressGenerator = addressGenerator()
# self.addressGenerator.setup(3,streamNumberForAddress,"unused address",self.dialog.ui.spinBoxNumberOfAddressesToMake.value(),self.dialog.ui.lineEditPassphrase.text().toUtf8(),self.dialog.ui.checkBoxEighteenByteRipe.isChecked())
# QtCore.QObject.connect(self.addressGenerator, SIGNAL("writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable)
# QtCore.QObject.connect(self.addressGenerator, QtCore.SIGNAL("updateStatusBar(PyQt_PyObject)"), self.updateStatusBar)
# self.addressGenerator.start()
shared.addressGeneratorQueue.put(('createDeterministicAddresses', 3, streamNumberForAddress, "unused deterministic address", self.dialog.ui.spinBoxNumberOfAddressesToMake.value(
), self.dialog.ui.lineEditPassphrase.text().toUtf8(), self.dialog.ui.checkBoxEighteenByteRipe.isChecked()))
else:
print 'new address dialog box rejected'
# Quit selected from menu or application indicator
def quit(self):
'''quit_msg = "Are you sure you want to exit Bitmessage?"
@ -1676,7 +1986,8 @@ class MyForm(QtGui.QMainWindow):
# unregister the messaging system
if self.mmapp is not None:
self.mmapp.unregister()
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "All done. Closing user interface..."))
self.statusBar().showMessage(_translate(
"MainWindow", "All done. Closing user interface..."))
os._exit(0)
# window close event
@ -1685,7 +1996,8 @@ class MyForm(QtGui.QMainWindow):
minimizeonclose = False
try:
minimizeonclose = shared.config.getboolean('bitmessagesettings', 'minimizeonclose')
minimizeonclose = shared.config.getboolean(
'bitmessagesettings', 'minimizeonclose')
except Exception:
pass
@ -1699,10 +2011,12 @@ class MyForm(QtGui.QMainWindow):
def on_action_InboxMessageForceHtml(self):
currentInboxRow = self.ui.tableWidgetInbox.currentRow()
lines = self.ui.tableWidgetInbox.item(currentInboxRow,2).data(Qt.UserRole).toPyObject().split('\n')
lines = self.ui.tableWidgetInbox.item(
currentInboxRow, 2).data(Qt.UserRole).toPyObject().split('\n')
for i in xrange(len(lines)):
if lines[i].contains('Message ostensibly from '):
lines[i] = '<p style="font-size: 12px; color: grey;">%s</span></p>' % (lines[i])
lines[i] = '<p style="font-size: 12px; color: grey;">%s</span></p>' % (
lines[i])
elif lines[i] == '------------------------------------------------------':
lines[i] = '<hr>'
content = ''
@ -1713,140 +2027,171 @@ class MyForm(QtGui.QMainWindow):
def on_action_InboxReply(self):
currentInboxRow = self.ui.tableWidgetInbox.currentRow()
toAddressAtCurrentInboxRow = str(self.ui.tableWidgetInbox.item(currentInboxRow,0).data(Qt.UserRole).toPyObject())
fromAddressAtCurrentInboxRow = str(self.ui.tableWidgetInbox.item(currentInboxRow,1).data(Qt.UserRole).toPyObject())
toAddressAtCurrentInboxRow = str(self.ui.tableWidgetInbox.item(
currentInboxRow, 0).data(Qt.UserRole).toPyObject())
fromAddressAtCurrentInboxRow = str(self.ui.tableWidgetInbox.item(
currentInboxRow, 1).data(Qt.UserRole).toPyObject())
if toAddressAtCurrentInboxRow == self.str_broadcast_subscribers:
self.ui.labelFrom.setText('')
elif not shared.config.has_section(toAddressAtCurrentInboxRow):
QtGui.QMessageBox.information(self, QtGui.QApplication.translate("MainWindow", "Address is gone"),QtGui.QApplication.translate("MainWindow", "Bitmessage cannot find your address %1. Perhaps you removed it?").arg(toAddressAtCurrentInboxRow), QMessageBox.Ok)
QtGui.QMessageBox.information(self, _translate("MainWindow", "Address is gone"), _translate(
"MainWindow", "Bitmessage cannot find your address %1. Perhaps you removed it?").arg(toAddressAtCurrentInboxRow), QMessageBox.Ok)
self.ui.labelFrom.setText('')
elif not shared.config.getboolean(toAddressAtCurrentInboxRow,'enabled'):
QtGui.QMessageBox.information(self, QtGui.QApplication.translate("MainWindow", "Address disabled"),QtGui.QApplication.translate("MainWindow", "Error: The address from which you are trying to send is disabled. You\'ll have to enable it on the \'Your Identities\' tab before using it."), QMessageBox.Ok)
elif not shared.config.getboolean(toAddressAtCurrentInboxRow, 'enabled'):
QtGui.QMessageBox.information(self, _translate("MainWindow", "Address disabled"), _translate(
"MainWindow", "Error: The address from which you are trying to send is disabled. You\'ll have to enable it on the \'Your Identities\' tab before using it."), QMessageBox.Ok)
self.ui.labelFrom.setText('')
else:
self.ui.labelFrom.setText(toAddressAtCurrentInboxRow)
self.ui.lineEditTo.setText(str(fromAddressAtCurrentInboxRow))
self.ui.comboBoxSendFrom.setCurrentIndex(0)
#self.ui.comboBoxSendFrom.setEditText(str(self.ui.tableWidgetInbox.item(currentInboxRow,0).text))
self.ui.textEditMessage.setText('\n\n------------------------------------------------------\n'+self.ui.tableWidgetInbox.item(currentInboxRow,2).data(Qt.UserRole).toPyObject())
if self.ui.tableWidgetInbox.item(currentInboxRow,2).text()[0:3] == 'Re:':
self.ui.lineEditSubject.setText(self.ui.tableWidgetInbox.item(currentInboxRow,2).text())
# self.ui.comboBoxSendFrom.setEditText(str(self.ui.tableWidgetInbox.item(currentInboxRow,0).text))
self.ui.textEditMessage.setText('\n\n------------------------------------------------------\n' + self.ui.tableWidgetInbox.item(
currentInboxRow, 2).data(Qt.UserRole).toPyObject())
if self.ui.tableWidgetInbox.item(currentInboxRow, 2).text()[0:3] == 'Re:':
self.ui.lineEditSubject.setText(
self.ui.tableWidgetInbox.item(currentInboxRow, 2).text())
else:
self.ui.lineEditSubject.setText('Re: '+self.ui.tableWidgetInbox.item(currentInboxRow,2).text())
self.ui.lineEditSubject.setText(
'Re: ' + self.ui.tableWidgetInbox.item(currentInboxRow, 2).text())
self.ui.radioButtonSpecific.setChecked(True)
self.ui.tabWidget.setCurrentIndex(1)
def on_action_InboxAddSenderToAddressBook(self):
currentInboxRow = self.ui.tableWidgetInbox.currentRow()
#self.ui.tableWidgetInbox.item(currentRow,1).data(Qt.UserRole).toPyObject()
addressAtCurrentInboxRow = str(self.ui.tableWidgetInbox.item(currentInboxRow,1).data(Qt.UserRole).toPyObject())
#Let's make sure that it isn't already in the address book
# self.ui.tableWidgetInbox.item(currentRow,1).data(Qt.UserRole).toPyObject()
addressAtCurrentInboxRow = str(self.ui.tableWidgetInbox.item(
currentInboxRow, 1).data(Qt.UserRole).toPyObject())
# Let's make sure that it isn't already in the address book
shared.sqlLock.acquire()
t = (addressAtCurrentInboxRow,)
shared.sqlSubmitQueue.put('''select * from addressbook where address=?''')
shared.sqlSubmitQueue.put(
'''select * from addressbook where address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
if queryreturn == []:
self.ui.tableWidgetAddressBook.insertRow(0)
newItem = QtGui.QTableWidgetItem('--New entry. Change label in Address Book.--')
self.ui.tableWidgetAddressBook.setItem(0,0,newItem)
newItem = QtGui.QTableWidgetItem(addressAtCurrentInboxRow)
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetAddressBook.setItem(0,1,newItem)
t = ('--New entry. Change label in Address Book.--',addressAtCurrentInboxRow)
newItem = QtGui.QTableWidgetItem(
'--New entry. Change label in Address Book.--')
self.ui.tableWidgetAddressBook.setItem(0, 0, newItem)
newItem = QtGui.QTableWidgetItem(addressAtCurrentInboxRow)
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetAddressBook.setItem(0, 1, newItem)
t = ('--New entry. Change label in Address Book.--',
addressAtCurrentInboxRow)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''INSERT INTO addressbook VALUES (?,?)''')
shared.sqlSubmitQueue.put(
'''INSERT INTO addressbook VALUES (?,?)''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
self.ui.tabWidget.setCurrentIndex(5)
self.ui.tableWidgetAddressBook.setCurrentCell(0,0)
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Entry added to the Address Book. Edit the label to your liking."))
self.ui.tableWidgetAddressBook.setCurrentCell(0, 0)
self.statusBar().showMessage(_translate(
"MainWindow", "Entry added to the Address Book. Edit the label to your liking."))
else:
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want."))
self.statusBar().showMessage(_translate(
"MainWindow", "Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want."))
#Send item on the Inbox tab to trash
# Send item on the Inbox tab to trash
def on_action_InboxTrash(self):
while self.ui.tableWidgetInbox.selectedIndexes() != []:
currentRow = self.ui.tableWidgetInbox.selectedIndexes()[0].row()
inventoryHashToTrash = str(self.ui.tableWidgetInbox.item(currentRow,3).data(Qt.UserRole).toPyObject())
inventoryHashToTrash = str(self.ui.tableWidgetInbox.item(
currentRow, 3).data(Qt.UserRole).toPyObject())
t = (inventoryHashToTrash,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''UPDATE inbox SET folder='trash' WHERE msgid=?''')
shared.sqlSubmitQueue.put(
'''UPDATE inbox SET folder='trash' WHERE msgid=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlLock.release()
self.ui.textEditInboxMessage.setText("")
self.ui.tableWidgetInbox.removeRow(currentRow)
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back."))
self.statusBar().showMessage(_translate(
"MainWindow", "Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back."))
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
if currentRow == 0:
self.ui.tableWidgetInbox.selectRow(currentRow)
else:
self.ui.tableWidgetInbox.selectRow(currentRow-1)
self.ui.tableWidgetInbox.selectRow(currentRow - 1)
#Send item on the Sent tab to trash
# Send item on the Sent tab to trash
def on_action_SentTrash(self):
while self.ui.tableWidgetSent.selectedIndexes() != []:
currentRow = self.ui.tableWidgetSent.selectedIndexes()[0].row()
ackdataToTrash = str(self.ui.tableWidgetSent.item(currentRow,3).data(Qt.UserRole).toPyObject())
ackdataToTrash = str(self.ui.tableWidgetSent.item(
currentRow, 3).data(Qt.UserRole).toPyObject())
t = (ackdataToTrash,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''UPDATE sent SET folder='trash' WHERE ackdata=?''')
shared.sqlSubmitQueue.put(
'''UPDATE sent SET folder='trash' WHERE ackdata=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlLock.release()
self.ui.textEditSentMessage.setPlainText("")
self.ui.tableWidgetSent.removeRow(currentRow)
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back."))
self.statusBar().showMessage(_translate(
"MainWindow", "Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back."))
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
if currentRow == 0:
self.ui.tableWidgetSent.selectRow(currentRow)
else:
self.ui.tableWidgetSent.selectRow(currentRow-1)
self.ui.tableWidgetSent.selectRow(currentRow - 1)
def on_action_ForceSend(self):
currentRow = self.ui.tableWidgetSent.currentRow()
addressAtCurrentRow = str(self.ui.tableWidgetSent.item(currentRow,0).data(Qt.UserRole).toPyObject())
addressAtCurrentRow = str(self.ui.tableWidgetSent.item(
currentRow, 0).data(Qt.UserRole).toPyObject())
toRipe = decodeAddress(addressAtCurrentRow)[3]
t = (toRipe,)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''UPDATE sent SET status='forcepow' WHERE toripe=? AND status='toodifficult' and folder='sent' ''')
shared.sqlSubmitQueue.put(
'''UPDATE sent SET status='forcepow' WHERE toripe=? AND status='toodifficult' and folder='sent' ''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlSubmitQueue.put('''select ackdata FROM sent WHERE status='forcepow' ''')
shared.sqlSubmitQueue.put(
'''select ackdata FROM sent WHERE status='forcepow' ''')
shared.sqlSubmitQueue.put('')
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
for row in queryreturn:
ackdata, = row
shared.UISignalQueue.put(('updateSentItemStatusByAckdata',(ackdata,'Overriding maximum-difficulty setting. Work queued.')))
shared.workerQueue.put(('sendmessage',''))
shared.UISignalQueue.put(('updateSentItemStatusByAckdata', (
ackdata, 'Overriding maximum-difficulty setting. Work queued.')))
shared.workerQueue.put(('sendmessage', ''))
def on_action_SentClipboard(self):
currentRow = self.ui.tableWidgetSent.currentRow()
addressAtCurrentRow = str(self.ui.tableWidgetSent.item(currentRow,0).data(Qt.UserRole).toPyObject())
addressAtCurrentRow = str(self.ui.tableWidgetSent.item(
currentRow, 0).data(Qt.UserRole).toPyObject())
clipboard = QtGui.QApplication.clipboard()
clipboard.setText(str(addressAtCurrentRow))
#Group of functions for the Address Book dialog box
# Group of functions for the Address Book dialog box
def on_action_AddressBookNew(self):
self.click_pushButtonAddAddressBook()
def on_action_AddressBookDelete(self):
while self.ui.tableWidgetAddressBook.selectedIndexes() != []:
currentRow = self.ui.tableWidgetAddressBook.selectedIndexes()[0].row()
labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,0).text().toUtf8()
addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,1).text()
t = (str(labelAtCurrentRow),str(addressAtCurrentRow))
currentRow = self.ui.tableWidgetAddressBook.selectedIndexes()[
0].row()
labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(
currentRow, 0).text().toUtf8()
addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(
currentRow, 1).text()
t = (str(labelAtCurrentRow), str(addressAtCurrentRow))
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''DELETE FROM addressbook WHERE label=? AND address=?''')
shared.sqlSubmitQueue.put(
'''DELETE FROM addressbook WHERE label=? AND address=?''')
shared.sqlSubmitQueue.put(t)
queryreturn = shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
@ -1854,49 +2199,62 @@ class MyForm(QtGui.QMainWindow):
self.ui.tableWidgetAddressBook.removeRow(currentRow)
self.rerenderInboxFromLabels()
self.rerenderSentToLabels()
def on_action_AddressBookClipboard(self):
fullStringOfAddresses = ''
listOfSelectedRows = {}
for i in range(len(self.ui.tableWidgetAddressBook.selectedIndexes())):
listOfSelectedRows[self.ui.tableWidgetAddressBook.selectedIndexes()[i].row()] = 0
listOfSelectedRows[
self.ui.tableWidgetAddressBook.selectedIndexes()[i].row()] = 0
for currentRow in listOfSelectedRows:
addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,1).text()
addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(
currentRow, 1).text()
if fullStringOfAddresses == '':
fullStringOfAddresses = addressAtCurrentRow
else:
fullStringOfAddresses += ', '+ str(addressAtCurrentRow)
fullStringOfAddresses += ', ' + str(addressAtCurrentRow)
clipboard = QtGui.QApplication.clipboard()
clipboard.setText(fullStringOfAddresses)
def on_action_AddressBookSend(self):
listOfSelectedRows = {}
for i in range(len(self.ui.tableWidgetAddressBook.selectedIndexes())):
listOfSelectedRows[self.ui.tableWidgetAddressBook.selectedIndexes()[i].row()] = 0
listOfSelectedRows[
self.ui.tableWidgetAddressBook.selectedIndexes()[i].row()] = 0
for currentRow in listOfSelectedRows:
addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,1).text()
addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(
currentRow, 1).text()
if self.ui.lineEditTo.text() == '':
self.ui.lineEditTo.setText(str(addressAtCurrentRow))
else:
self.ui.lineEditTo.setText(str(self.ui.lineEditTo.text()) + '; '+ str(addressAtCurrentRow))
self.ui.lineEditTo.setText(str(
self.ui.lineEditTo.text()) + '; ' + str(addressAtCurrentRow))
if listOfSelectedRows == {}:
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "No addresses selected."))
self.statusBar().showMessage(_translate(
"MainWindow", "No addresses selected."))
else:
self.statusBar().showMessage('')
self.ui.tabWidget.setCurrentIndex(1)
def on_context_menuAddressBook(self, point):
self.popMenuAddressBook.exec_( self.ui.tableWidgetAddressBook.mapToGlobal(point) )
self.popMenuAddressBook.exec_(
self.ui.tableWidgetAddressBook.mapToGlobal(point))
#Group of functions for the Subscriptions dialog box
# Group of functions for the Subscriptions dialog box
def on_action_SubscriptionsNew(self):
self.click_pushButtonAddSubscription()
def on_action_SubscriptionsDelete(self):
print 'clicked Delete'
currentRow = self.ui.tableWidgetSubscriptions.currentRow()
labelAtCurrentRow = self.ui.tableWidgetSubscriptions.item(currentRow,0).text().toUtf8()
addressAtCurrentRow = self.ui.tableWidgetSubscriptions.item(currentRow,1).text()
t = (str(labelAtCurrentRow),str(addressAtCurrentRow))
labelAtCurrentRow = self.ui.tableWidgetSubscriptions.item(
currentRow, 0).text().toUtf8()
addressAtCurrentRow = self.ui.tableWidgetSubscriptions.item(
currentRow, 1).text()
t = (str(labelAtCurrentRow), str(addressAtCurrentRow))
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''DELETE FROM subscriptions WHERE label=? AND address=?''')
shared.sqlSubmitQueue.put(
'''DELETE FROM subscriptions WHERE label=? AND address=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
@ -1904,187 +2262,251 @@ class MyForm(QtGui.QMainWindow):
self.ui.tableWidgetSubscriptions.removeRow(currentRow)
self.rerenderInboxFromLabels()
shared.reloadBroadcastSendersForWhichImWatching()
def on_action_SubscriptionsClipboard(self):
currentRow = self.ui.tableWidgetSubscriptions.currentRow()
addressAtCurrentRow = self.ui.tableWidgetSubscriptions.item(currentRow,1).text()
addressAtCurrentRow = self.ui.tableWidgetSubscriptions.item(
currentRow, 1).text()
clipboard = QtGui.QApplication.clipboard()
clipboard.setText(str(addressAtCurrentRow))
def on_action_SubscriptionsEnable(self):
currentRow = self.ui.tableWidgetSubscriptions.currentRow()
labelAtCurrentRow = self.ui.tableWidgetSubscriptions.item(currentRow,0).text().toUtf8()
addressAtCurrentRow = self.ui.tableWidgetSubscriptions.item(currentRow,1).text()
t = (str(labelAtCurrentRow),str(addressAtCurrentRow))
labelAtCurrentRow = self.ui.tableWidgetSubscriptions.item(
currentRow, 0).text().toUtf8()
addressAtCurrentRow = self.ui.tableWidgetSubscriptions.item(
currentRow, 1).text()
t = (str(labelAtCurrentRow), str(addressAtCurrentRow))
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''update subscriptions set enabled=1 WHERE label=? AND address=?''')
shared.sqlSubmitQueue.put(
'''update subscriptions set enabled=1 WHERE label=? AND address=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
self.ui.tableWidgetSubscriptions.item(currentRow,0).setTextColor(QtGui.QColor(0,0,0))
self.ui.tableWidgetSubscriptions.item(currentRow,1).setTextColor(QtGui.QColor(0,0,0))
self.ui.tableWidgetSubscriptions.item(
currentRow, 0).setTextColor(QtGui.QColor(0, 0, 0))
self.ui.tableWidgetSubscriptions.item(
currentRow, 1).setTextColor(QtGui.QColor(0, 0, 0))
shared.reloadBroadcastSendersForWhichImWatching()
def on_action_SubscriptionsDisable(self):
currentRow = self.ui.tableWidgetSubscriptions.currentRow()
labelAtCurrentRow = self.ui.tableWidgetSubscriptions.item(currentRow,0).text().toUtf8()
addressAtCurrentRow = self.ui.tableWidgetSubscriptions.item(currentRow,1).text()
t = (str(labelAtCurrentRow),str(addressAtCurrentRow))
labelAtCurrentRow = self.ui.tableWidgetSubscriptions.item(
currentRow, 0).text().toUtf8()
addressAtCurrentRow = self.ui.tableWidgetSubscriptions.item(
currentRow, 1).text()
t = (str(labelAtCurrentRow), str(addressAtCurrentRow))
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''update subscriptions set enabled=0 WHERE label=? AND address=?''')
shared.sqlSubmitQueue.put(
'''update subscriptions set enabled=0 WHERE label=? AND address=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
self.ui.tableWidgetSubscriptions.item(currentRow,0).setTextColor(QtGui.QColor(128,128,128))
self.ui.tableWidgetSubscriptions.item(currentRow,1).setTextColor(QtGui.QColor(128,128,128))
self.ui.tableWidgetSubscriptions.item(
currentRow, 0).setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetSubscriptions.item(
currentRow, 1).setTextColor(QtGui.QColor(128, 128, 128))
shared.reloadBroadcastSendersForWhichImWatching()
def on_context_menuSubscriptions(self, point):
self.popMenuSubscriptions.exec_( self.ui.tableWidgetSubscriptions.mapToGlobal(point) )
#Group of functions for the Blacklist dialog box
def on_context_menuSubscriptions(self, point):
self.popMenuSubscriptions.exec_(
self.ui.tableWidgetSubscriptions.mapToGlobal(point))
# Group of functions for the Blacklist dialog box
def on_action_BlacklistNew(self):
self.click_pushButtonAddBlacklist()
def on_action_BlacklistDelete(self):
currentRow = self.ui.tableWidgetBlacklist.currentRow()
labelAtCurrentRow = self.ui.tableWidgetBlacklist.item(currentRow,0).text().toUtf8()
addressAtCurrentRow = self.ui.tableWidgetBlacklist.item(currentRow,1).text()
t = (str(labelAtCurrentRow),str(addressAtCurrentRow))
labelAtCurrentRow = self.ui.tableWidgetBlacklist.item(
currentRow, 0).text().toUtf8()
addressAtCurrentRow = self.ui.tableWidgetBlacklist.item(
currentRow, 1).text()
t = (str(labelAtCurrentRow), str(addressAtCurrentRow))
shared.sqlLock.acquire()
if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'black':
shared.sqlSubmitQueue.put('''DELETE FROM blacklist WHERE label=? AND address=?''')
shared.sqlSubmitQueue.put(
'''DELETE FROM blacklist WHERE label=? AND address=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
else:
shared.sqlSubmitQueue.put('''DELETE FROM whitelist WHERE label=? AND address=?''')
shared.sqlSubmitQueue.put(
'''DELETE FROM whitelist WHERE label=? AND address=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
self.ui.tableWidgetBlacklist.removeRow(currentRow)
def on_action_BlacklistClipboard(self):
currentRow = self.ui.tableWidgetBlacklist.currentRow()
addressAtCurrentRow = self.ui.tableWidgetBlacklist.item(currentRow,1).text()
addressAtCurrentRow = self.ui.tableWidgetBlacklist.item(
currentRow, 1).text()
clipboard = QtGui.QApplication.clipboard()
clipboard.setText(str(addressAtCurrentRow))
def on_context_menuBlacklist(self, point):
self.popMenuBlacklist.exec_( self.ui.tableWidgetBlacklist.mapToGlobal(point) )
self.popMenuBlacklist.exec_(
self.ui.tableWidgetBlacklist.mapToGlobal(point))
def on_action_BlacklistEnable(self):
currentRow = self.ui.tableWidgetBlacklist.currentRow()
addressAtCurrentRow = self.ui.tableWidgetBlacklist.item(currentRow,1).text()
self.ui.tableWidgetBlacklist.item(currentRow,0).setTextColor(QtGui.QColor(0,0,0))
self.ui.tableWidgetBlacklist.item(currentRow,1).setTextColor(QtGui.QColor(0,0,0))
addressAtCurrentRow = self.ui.tableWidgetBlacklist.item(
currentRow, 1).text()
self.ui.tableWidgetBlacklist.item(
currentRow, 0).setTextColor(QtGui.QColor(0, 0, 0))
self.ui.tableWidgetBlacklist.item(
currentRow, 1).setTextColor(QtGui.QColor(0, 0, 0))
t = (str(addressAtCurrentRow),)
shared.sqlLock.acquire()
if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'black':
shared.sqlSubmitQueue.put('''UPDATE blacklist SET enabled=1 WHERE address=?''')
shared.sqlSubmitQueue.put(
'''UPDATE blacklist SET enabled=1 WHERE address=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
else:
shared.sqlSubmitQueue.put('''UPDATE whitelist SET enabled=1 WHERE address=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
def on_action_BlacklistDisable(self):
currentRow = self.ui.tableWidgetBlacklist.currentRow()
addressAtCurrentRow = self.ui.tableWidgetBlacklist.item(currentRow,1).text()
self.ui.tableWidgetBlacklist.item(currentRow,0).setTextColor(QtGui.QColor(128,128,128))
self.ui.tableWidgetBlacklist.item(currentRow,1).setTextColor(QtGui.QColor(128,128,128))
t = (str(addressAtCurrentRow),)
shared.sqlLock.acquire()
if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'black':
shared.sqlSubmitQueue.put('''UPDATE blacklist SET enabled=0 WHERE address=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
else:
shared.sqlSubmitQueue.put('''UPDATE whitelist SET enabled=0 WHERE address=?''')
shared.sqlSubmitQueue.put(
'''UPDATE whitelist SET enabled=1 WHERE address=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
#Group of functions for the Your Identities dialog box
def on_action_BlacklistDisable(self):
currentRow = self.ui.tableWidgetBlacklist.currentRow()
addressAtCurrentRow = self.ui.tableWidgetBlacklist.item(
currentRow, 1).text()
self.ui.tableWidgetBlacklist.item(
currentRow, 0).setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetBlacklist.item(
currentRow, 1).setTextColor(QtGui.QColor(128, 128, 128))
t = (str(addressAtCurrentRow),)
shared.sqlLock.acquire()
if shared.config.get('bitmessagesettings', 'blackwhitelist') == 'black':
shared.sqlSubmitQueue.put(
'''UPDATE blacklist SET enabled=0 WHERE address=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
else:
shared.sqlSubmitQueue.put(
'''UPDATE whitelist SET enabled=0 WHERE address=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
shared.sqlLock.release()
# Group of functions for the Your Identities dialog box
def on_action_YourIdentitiesNew(self):
self.click_NewAddressDialog()
def on_action_YourIdentitiesEnable(self):
currentRow = self.ui.tableWidgetYourIdentities.currentRow()
addressAtCurrentRow = str(self.ui.tableWidgetYourIdentities.item(currentRow,1).text())
shared.config.set(addressAtCurrentRow,'enabled','true')
addressAtCurrentRow = str(
self.ui.tableWidgetYourIdentities.item(currentRow, 1).text())
shared.config.set(addressAtCurrentRow, 'enabled', 'true')
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
self.ui.tableWidgetYourIdentities.item(currentRow,0).setTextColor(QtGui.QColor(0,0,0))
self.ui.tableWidgetYourIdentities.item(currentRow,1).setTextColor(QtGui.QColor(0,0,0))
self.ui.tableWidgetYourIdentities.item(currentRow,2).setTextColor(QtGui.QColor(0,0,0))
if shared.safeConfigGetBoolean(addressAtCurrentRow,'mailinglist'):
self.ui.tableWidgetYourIdentities.item(currentRow,1).setTextColor(QtGui.QColor(137,04,177))
self.ui.tableWidgetYourIdentities.item(
currentRow, 0).setTextColor(QtGui.QColor(0, 0, 0))
self.ui.tableWidgetYourIdentities.item(
currentRow, 1).setTextColor(QtGui.QColor(0, 0, 0))
self.ui.tableWidgetYourIdentities.item(
currentRow, 2).setTextColor(QtGui.QColor(0, 0, 0))
if shared.safeConfigGetBoolean(addressAtCurrentRow, 'mailinglist'):
self.ui.tableWidgetYourIdentities.item(currentRow, 1).setTextColor(QtGui.QColor(137, 04, 177))
shared.reloadMyAddressHashes()
def on_action_YourIdentitiesDisable(self):
currentRow = self.ui.tableWidgetYourIdentities.currentRow()
addressAtCurrentRow = str(self.ui.tableWidgetYourIdentities.item(currentRow,1).text())
shared.config.set(str(addressAtCurrentRow),'enabled','false')
self.ui.tableWidgetYourIdentities.item(currentRow,0).setTextColor(QtGui.QColor(128,128,128))
self.ui.tableWidgetYourIdentities.item(currentRow,1).setTextColor(QtGui.QColor(128,128,128))
self.ui.tableWidgetYourIdentities.item(currentRow,2).setTextColor(QtGui.QColor(128,128,128))
if shared.safeConfigGetBoolean(addressAtCurrentRow,'mailinglist'):
self.ui.tableWidgetYourIdentities.item(currentRow,1).setTextColor(QtGui.QColor(137,04,177))
addressAtCurrentRow = str(
self.ui.tableWidgetYourIdentities.item(currentRow, 1).text())
shared.config.set(str(addressAtCurrentRow), 'enabled', 'false')
self.ui.tableWidgetYourIdentities.item(
currentRow, 0).setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetYourIdentities.item(
currentRow, 1).setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetYourIdentities.item(
currentRow, 2).setTextColor(QtGui.QColor(128, 128, 128))
if shared.safeConfigGetBoolean(addressAtCurrentRow, 'mailinglist'):
self.ui.tableWidgetYourIdentities.item(currentRow, 1).setTextColor(QtGui.QColor(137, 04, 177))
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
shared.reloadMyAddressHashes()
def on_action_YourIdentitiesClipboard(self):
currentRow = self.ui.tableWidgetYourIdentities.currentRow()
addressAtCurrentRow = self.ui.tableWidgetYourIdentities.item(currentRow,1).text()
addressAtCurrentRow = self.ui.tableWidgetYourIdentities.item(
currentRow, 1).text()
clipboard = QtGui.QApplication.clipboard()
clipboard.setText(str(addressAtCurrentRow))
def on_context_menuYourIdentities(self, point):
self.popMenu.exec_( self.ui.tableWidgetYourIdentities.mapToGlobal(point) )
self.popMenu.exec_(
self.ui.tableWidgetYourIdentities.mapToGlobal(point))
def on_context_menuInbox(self, point):
self.popMenuInbox.exec_( self.ui.tableWidgetInbox.mapToGlobal(point) )
self.popMenuInbox.exec_(self.ui.tableWidgetInbox.mapToGlobal(point))
def on_context_menuSent(self, point):
self.popMenuSent = QtGui.QMenu( self )
self.popMenuSent.addAction( self.actionSentClipboard )
self.popMenuSent.addAction( self.actionTrashSentMessage )
#Check to see if this item is toodifficult and display an additional menu option (Force Send) if it is.
self.popMenuSent = QtGui.QMenu(self)
self.popMenuSent.addAction(self.actionSentClipboard)
self.popMenuSent.addAction(self.actionTrashSentMessage)
# Check to see if this item is toodifficult and display an additional
# menu option (Force Send) if it is.
currentRow = self.ui.tableWidgetSent.currentRow()
ackData = str(self.ui.tableWidgetSent.item(currentRow,3).data(Qt.UserRole).toPyObject())
ackData = str(self.ui.tableWidgetSent.item(
currentRow, 3).data(Qt.UserRole).toPyObject())
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''SELECT status FROM sent where ackdata=?''')
shared.sqlSubmitQueue.put(
'''SELECT status FROM sent where ackdata=?''')
shared.sqlSubmitQueue.put((ackData,))
queryreturn = shared.sqlReturnQueue.get()
shared.sqlLock.release()
for row in queryreturn:
status, = row
if status == 'toodifficult':
self.popMenuSent.addAction( self.actionForceSend )
self.popMenuSent.exec_( self.ui.tableWidgetSent.mapToGlobal(point) )
self.popMenuSent.addAction(self.actionForceSend)
self.popMenuSent.exec_(self.ui.tableWidgetSent.mapToGlobal(point))
def tableWidgetInboxItemClicked(self):
currentRow = self.ui.tableWidgetInbox.currentRow()
if currentRow >= 0:
fromAddress = str(self.ui.tableWidgetInbox.item(currentRow,1).data(Qt.UserRole).toPyObject())
#If we have received this message from either a broadcast address or from someone in our address book, display as HTML
fromAddress = str(self.ui.tableWidgetInbox.item(
currentRow, 1).data(Qt.UserRole).toPyObject())
# If we have received this message from either a broadcast address
# or from someone in our address book, display as HTML
if decodeAddress(fromAddress)[3] in shared.broadcastSendersForWhichImWatching or shared.isAddressInMyAddressBook(fromAddress):
if len(self.ui.tableWidgetInbox.item(currentRow,2).data(Qt.UserRole).toPyObject()) < 30000:
self.ui.textEditInboxMessage.setText(self.ui.tableWidgetInbox.item(currentRow,2).data(Qt.UserRole).toPyObject())#Only show the first 30K characters
if len(self.ui.tableWidgetInbox.item(currentRow, 2).data(Qt.UserRole).toPyObject()) < 30000:
self.ui.textEditInboxMessage.setText(self.ui.tableWidgetInbox.item(
currentRow, 2).data(Qt.UserRole).toPyObject()) # Only show the first 30K characters
else:
self.ui.textEditInboxMessage.setText(self.ui.tableWidgetInbox.item(currentRow,2).data(Qt.UserRole).toPyObject()[:30000]+'\n\nDisplay of the remainder of the message truncated because it is too long.')#Only show the first 30K characters
self.ui.textEditInboxMessage.setText(self.ui.tableWidgetInbox.item(currentRow, 2).data(Qt.UserRole).toPyObject()[
:30000] + '\n\nDisplay of the remainder of the message truncated because it is too long.') # Only show the first 30K characters
else:
if len(self.ui.tableWidgetInbox.item(currentRow,2).data(Qt.UserRole).toPyObject()) < 30000:
self.ui.textEditInboxMessage.setPlainText(self.ui.tableWidgetInbox.item(currentRow,2).data(Qt.UserRole).toPyObject())#Only show the first 30K characters
if len(self.ui.tableWidgetInbox.item(currentRow, 2).data(Qt.UserRole).toPyObject()) < 30000:
self.ui.textEditInboxMessage.setPlainText(self.ui.tableWidgetInbox.item(
currentRow, 2).data(Qt.UserRole).toPyObject()) # Only show the first 30K characters
else:
self.ui.textEditInboxMessage.setPlainText(self.ui.tableWidgetInbox.item(currentRow,2).data(Qt.UserRole).toPyObject()[:30000]+'\n\nDisplay of the remainder of the message truncated because it is too long.')#Only show the first 30K characters
self.ui.textEditInboxMessage.setPlainText(self.ui.tableWidgetInbox.item(currentRow, 2).data(Qt.UserRole).toPyObject()[
:30000] + '\n\nDisplay of the remainder of the message truncated because it is too long.') # Only show the first 30K characters
font = QFont()
font.setBold(False)
self.ui.tableWidgetInbox.item(currentRow,0).setFont(font)
self.ui.tableWidgetInbox.item(currentRow,1).setFont(font)
self.ui.tableWidgetInbox.item(currentRow,2).setFont(font)
self.ui.tableWidgetInbox.item(currentRow,3).setFont(font)
self.ui.tableWidgetInbox.item(currentRow, 0).setFont(font)
self.ui.tableWidgetInbox.item(currentRow, 1).setFont(font)
self.ui.tableWidgetInbox.item(currentRow, 2).setFont(font)
self.ui.tableWidgetInbox.item(currentRow, 3).setFont(font)
inventoryHash = str(self.ui.tableWidgetInbox.item(currentRow,3).data(Qt.UserRole).toPyObject())
inventoryHash = str(self.ui.tableWidgetInbox.item(
currentRow, 3).data(Qt.UserRole).toPyObject())
t = (inventoryHash,)
self.ubuntuMessagingMenuClear(t)
shared.sqlLock.acquire()
shared.sqlSubmitQueue.put('''update inbox set read=1 WHERE msgid=?''')
shared.sqlSubmitQueue.put(
'''update inbox set read=1 WHERE msgid=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
@ -2093,28 +2515,34 @@ class MyForm(QtGui.QMainWindow):
def tableWidgetSentItemClicked(self):
currentRow = self.ui.tableWidgetSent.currentRow()
if currentRow >= 0:
self.ui.textEditSentMessage.setPlainText(self.ui.tableWidgetSent.item(currentRow,2).data(Qt.UserRole).toPyObject())
self.ui.textEditSentMessage.setPlainText(self.ui.tableWidgetSent.item(
currentRow, 2).data(Qt.UserRole).toPyObject())
def tableWidgetYourIdentitiesItemChanged(self):
currentRow = self.ui.tableWidgetYourIdentities.currentRow()
if currentRow >= 0:
addressAtCurrentRow = self.ui.tableWidgetYourIdentities.item(currentRow,1).text()
shared.config.set(str(addressAtCurrentRow),'label',str(self.ui.tableWidgetYourIdentities.item(currentRow,0).text().toUtf8()))
addressAtCurrentRow = self.ui.tableWidgetYourIdentities.item(
currentRow, 1).text()
shared.config.set(str(addressAtCurrentRow), 'label', str(
self.ui.tableWidgetYourIdentities.item(currentRow, 0).text().toUtf8()))
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile)
self.rerenderComboBoxSendFrom()
#self.rerenderInboxFromLabels()
# self.rerenderInboxFromLabels()
self.rerenderInboxToLabels()
self.rerenderSentFromLabels()
#self.rerenderSentToLabels()
# self.rerenderSentToLabels()
def tableWidgetAddressBookItemChanged(self):
currentRow = self.ui.tableWidgetAddressBook.currentRow()
shared.sqlLock.acquire()
if currentRow >= 0:
addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,1).text()
t = (str(self.ui.tableWidgetAddressBook.item(currentRow,0).text().toUtf8()),str(addressAtCurrentRow))
shared.sqlSubmitQueue.put('''UPDATE addressbook set label=? WHERE address=?''')
addressAtCurrentRow = self.ui.tableWidgetAddressBook.item(
currentRow, 1).text()
t = (str(self.ui.tableWidgetAddressBook.item(
currentRow, 0).text().toUtf8()), str(addressAtCurrentRow))
shared.sqlSubmitQueue.put(
'''UPDATE addressbook set label=? WHERE address=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
@ -2126,9 +2554,12 @@ class MyForm(QtGui.QMainWindow):
currentRow = self.ui.tableWidgetSubscriptions.currentRow()
shared.sqlLock.acquire()
if currentRow >= 0:
addressAtCurrentRow = self.ui.tableWidgetSubscriptions.item(currentRow,1).text()
t = (str(self.ui.tableWidgetSubscriptions.item(currentRow,0).text().toUtf8()),str(addressAtCurrentRow))
shared.sqlSubmitQueue.put('''UPDATE subscriptions set label=? WHERE address=?''')
addressAtCurrentRow = self.ui.tableWidgetSubscriptions.item(
currentRow, 1).text()
t = (str(self.ui.tableWidgetSubscriptions.item(
currentRow, 0).text().toUtf8()), str(addressAtCurrentRow))
shared.sqlSubmitQueue.put(
'''UPDATE subscriptions set label=? WHERE address=?''')
shared.sqlSubmitQueue.put(t)
shared.sqlReturnQueue.get()
shared.sqlSubmitQueue.put('commit')
@ -2136,79 +2567,94 @@ class MyForm(QtGui.QMainWindow):
self.rerenderInboxFromLabels()
self.rerenderSentToLabels()
def writeNewAddressToTable(self,label,address,streamNumber):
def writeNewAddressToTable(self, label, address, streamNumber):
self.ui.tableWidgetYourIdentities.setSortingEnabled(False)
self.ui.tableWidgetYourIdentities.insertRow(0)
self.ui.tableWidgetYourIdentities.setItem(0, 0, QtGui.QTableWidgetItem(unicode(label,'utf-8')))
self.ui.tableWidgetYourIdentities.setItem(
0, 0, QtGui.QTableWidgetItem(unicode(label, 'utf-8')))
newItem = QtGui.QTableWidgetItem(address)
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetYourIdentities.setItem(0, 1, newItem)
newItem = QtGui.QTableWidgetItem(streamNumber)
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetYourIdentities.setItem(0, 2, newItem)
#self.ui.tableWidgetYourIdentities.setSortingEnabled(True)
# self.ui.tableWidgetYourIdentities.setSortingEnabled(True)
self.rerenderComboBoxSendFrom()
def updateStatusBar(self,data):
def updateStatusBar(self, data):
if data != "":
shared.printLock.acquire()
print 'Status bar:', data
shared.printLock.release()
self.statusBar().showMessage(data)
class helpDialog(QtGui.QDialog):
def __init__(self,parent):
def __init__(self, parent):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_helpDialog()
self.ui.setupUi(self)
self.parent = parent
self.ui.labelHelpURI.setOpenExternalLinks(True)
QtGui.QWidget.resize(self,QtGui.QWidget.sizeHint(self))
QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
class aboutDialog(QtGui.QDialog):
def __init__(self,parent):
def __init__(self, parent):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_aboutDialog()
self.ui.setupUi(self)
self.parent = parent
self.ui.labelVersion.setText('version ' + shared.softwareVersion)
class regenerateAddressesDialog(QtGui.QDialog):
def __init__(self,parent):
def __init__(self, parent):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_regenerateAddressesDialog()
self.ui.setupUi(self)
self.parent = parent
QtGui.QWidget.resize(self,QtGui.QWidget.sizeHint(self))
QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
class settingsDialog(QtGui.QDialog):
def __init__(self,parent):
def __init__(self, parent):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_settingsDialog()
self.ui.setupUi(self)
self.parent = parent
self.ui.checkBoxStartOnLogon.setChecked(shared.config.getboolean('bitmessagesettings', 'startonlogon'))
self.ui.checkBoxMinimizeToTray.setChecked(shared.config.getboolean('bitmessagesettings', 'minimizetotray'))
self.ui.checkBoxShowTrayNotifications.setChecked(shared.config.getboolean('bitmessagesettings', 'showtraynotifications'))
self.ui.checkBoxStartInTray.setChecked(shared.config.getboolean('bitmessagesettings', 'startintray'))
self.ui.checkBoxStartOnLogon.setChecked(
shared.config.getboolean('bitmessagesettings', 'startonlogon'))
self.ui.checkBoxMinimizeToTray.setChecked(
shared.config.getboolean('bitmessagesettings', 'minimizetotray'))
self.ui.checkBoxShowTrayNotifications.setChecked(
shared.config.getboolean('bitmessagesettings', 'showtraynotifications'))
self.ui.checkBoxStartInTray.setChecked(
shared.config.getboolean('bitmessagesettings', 'startintray'))
if shared.appdata == '':
self.ui.checkBoxPortableMode.setChecked(True)
if 'darwin' in sys.platform:
self.ui.checkBoxStartOnLogon.setDisabled(True)
self.ui.checkBoxMinimizeToTray.setDisabled(True)
self.ui.checkBoxShowTrayNotifications.setDisabled(True)
self.ui.labelSettingsNote.setText(QtGui.QApplication.translate("MainWindow", "Options have been disabled because they either aren\'t applicable or because they haven\'t yet been implimented for your operating system."))
self.ui.labelSettingsNote.setText(_translate(
"MainWindow", "Options have been disabled because they either aren\'t applicable or because they haven\'t yet been implimented for your operating system."))
elif 'linux' in sys.platform:
self.ui.checkBoxStartOnLogon.setDisabled(True)
self.ui.checkBoxMinimizeToTray.setDisabled(True)
self.ui.labelSettingsNote.setText(QtGui.QApplication.translate("MainWindow", "Options have been disabled because they either aren\'t applicable or because they haven\'t yet been implimented for your operating system."))
#On the Network settings tab:
self.ui.lineEditTCPPort.setText(str(shared.config.get('bitmessagesettings', 'port')))
self.ui.checkBoxAuthentication.setChecked(shared.config.getboolean('bitmessagesettings', 'socksauthentication'))
self.ui.labelSettingsNote.setText(_translate(
"MainWindow", "Options have been disabled because they either aren\'t applicable or because they haven\'t yet been implimented for your operating system."))
# On the Network settings tab:
self.ui.lineEditTCPPort.setText(str(
shared.config.get('bitmessagesettings', 'port')))
self.ui.checkBoxAuthentication.setChecked(shared.config.getboolean(
'bitmessagesettings', 'socksauthentication'))
if str(shared.config.get('bitmessagesettings', 'socksproxytype')) == 'none':
self.ui.comboBoxProxyType.setCurrentIndex(0)
self.ui.lineEditSocksHostname.setEnabled(False)
@ -2223,18 +2669,27 @@ class settingsDialog(QtGui.QDialog):
self.ui.comboBoxProxyType.setCurrentIndex(2)
self.ui.lineEditTCPPort.setEnabled(False)
self.ui.lineEditSocksHostname.setText(str(shared.config.get('bitmessagesettings', 'sockshostname')))
self.ui.lineEditSocksPort.setText(str(shared.config.get('bitmessagesettings', 'socksport')))
self.ui.lineEditSocksUsername.setText(str(shared.config.get('bitmessagesettings', 'socksusername')))
self.ui.lineEditSocksPassword.setText(str(shared.config.get('bitmessagesettings', 'sockspassword')))
QtCore.QObject.connect(self.ui.comboBoxProxyType, QtCore.SIGNAL("currentIndexChanged(int)"), self.comboBoxProxyTypeChanged)
self.ui.lineEditSocksHostname.setText(str(
shared.config.get('bitmessagesettings', 'sockshostname')))
self.ui.lineEditSocksPort.setText(str(
shared.config.get('bitmessagesettings', 'socksport')))
self.ui.lineEditSocksUsername.setText(str(
shared.config.get('bitmessagesettings', 'socksusername')))
self.ui.lineEditSocksPassword.setText(str(
shared.config.get('bitmessagesettings', 'sockspassword')))
QtCore.QObject.connect(self.ui.comboBoxProxyType, QtCore.SIGNAL(
"currentIndexChanged(int)"), self.comboBoxProxyTypeChanged)
self.ui.lineEditTotalDifficulty.setText(str((float(shared.config.getint('bitmessagesettings', 'defaultnoncetrialsperbyte'))/shared.networkDefaultProofOfWorkNonceTrialsPerByte)))
self.ui.lineEditSmallMessageDifficulty.setText(str((float(shared.config.getint('bitmessagesettings', 'defaultpayloadlengthextrabytes'))/shared.networkDefaultPayloadLengthExtraBytes)))
self.ui.lineEditTotalDifficulty.setText(str((float(shared.config.getint(
'bitmessagesettings', 'defaultnoncetrialsperbyte')) / shared.networkDefaultProofOfWorkNonceTrialsPerByte)))
self.ui.lineEditSmallMessageDifficulty.setText(str((float(shared.config.getint(
'bitmessagesettings', 'defaultpayloadlengthextrabytes')) / shared.networkDefaultPayloadLengthExtraBytes)))
#Max acceptable difficulty tab
self.ui.lineEditMaxAcceptableTotalDifficulty.setText(str((float(shared.config.getint('bitmessagesettings', 'maxacceptablenoncetrialsperbyte'))/shared.networkDefaultProofOfWorkNonceTrialsPerByte)))
self.ui.lineEditMaxAcceptableSmallMessageDifficulty.setText(str((float(shared.config.getint('bitmessagesettings', 'maxacceptablepayloadlengthextrabytes'))/shared.networkDefaultPayloadLengthExtraBytes)))
# Max acceptable difficulty tab
self.ui.lineEditMaxAcceptableTotalDifficulty.setText(str((float(shared.config.getint(
'bitmessagesettings', 'maxacceptablenoncetrialsperbyte')) / shared.networkDefaultProofOfWorkNonceTrialsPerByte)))
self.ui.lineEditMaxAcceptableSmallMessageDifficulty.setText(str((float(shared.config.getint(
'bitmessagesettings', 'maxacceptablepayloadlengthextrabytes')) / shared.networkDefaultPayloadLengthExtraBytes)))
#'System' tab removed for now.
"""try:
@ -2254,9 +2709,9 @@ class settingsDialog(QtGui.QDialog):
else:
self.ui.comboBoxMaxCores.setCurrentIndex(5)"""
QtGui.QWidget.resize(self,QtGui.QWidget.sizeHint(self))
QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
def comboBoxProxyTypeChanged(self,comboBoxIndex):
def comboBoxProxyTypeChanged(self, comboBoxIndex):
if comboBoxIndex == 0:
self.ui.lineEditSocksHostname.setEnabled(False)
self.ui.lineEditSocksPort.setEnabled(False)
@ -2273,84 +2728,111 @@ class settingsDialog(QtGui.QDialog):
self.ui.lineEditSocksPassword.setEnabled(True)
self.ui.lineEditTCPPort.setEnabled(False)
class SpecialAddressBehaviorDialog(QtGui.QDialog):
def __init__(self,parent):
def __init__(self, parent):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_SpecialAddressBehaviorDialog()
self.ui.setupUi(self)
self.parent = parent
currentRow = parent.ui.tableWidgetYourIdentities.currentRow()
addressAtCurrentRow = str(parent.ui.tableWidgetYourIdentities.item(currentRow,1).text())
if shared.safeConfigGetBoolean(addressAtCurrentRow,'mailinglist'):
addressAtCurrentRow = str(
parent.ui.tableWidgetYourIdentities.item(currentRow, 1).text())
if shared.safeConfigGetBoolean(addressAtCurrentRow, 'mailinglist'):
self.ui.radioButtonBehaviorMailingList.click()
else:
self.ui.radioButtonBehaveNormalAddress.click()
try:
mailingListName = shared.config.get(addressAtCurrentRow, 'mailinglistname')
mailingListName = shared.config.get(
addressAtCurrentRow, 'mailinglistname')
except:
mailingListName = ''
self.ui.lineEditMailingListName.setText(unicode(mailingListName,'utf-8'))
QtGui.QWidget.resize(self,QtGui.QWidget.sizeHint(self))
self.ui.lineEditMailingListName.setText(
unicode(mailingListName, 'utf-8'))
QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
class NewSubscriptionDialog(QtGui.QDialog):
def __init__(self,parent):
def __init__(self, parent):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_NewSubscriptionDialog()
self.ui.setupUi(self)
self.parent = parent
QtCore.QObject.connect(self.ui.lineEditSubscriptionAddress, QtCore.SIGNAL("textChanged(QString)"), self.subscriptionAddressChanged)
QtCore.QObject.connect(self.ui.lineEditSubscriptionAddress, QtCore.SIGNAL(
"textChanged(QString)"), self.subscriptionAddressChanged)
def subscriptionAddressChanged(self,QString):
status,a,b,c = decodeAddress(str(QString))
def subscriptionAddressChanged(self, QString):
status, a, b, c = decodeAddress(str(QString))
if status == 'missingbm':
self.ui.labelSubscriptionAddressCheck.setText(QtGui.QApplication.translate("MainWindow", "The address should start with ''BM-''"))
self.ui.labelSubscriptionAddressCheck.setText(_translate(
"MainWindow", "The address should start with ''BM-''"))
elif status == 'checksumfailed':
self.ui.labelSubscriptionAddressCheck.setText(QtGui.QApplication.translate("MainWindow", "The address is not typed or copied correctly (the checksum failed)."))
self.ui.labelSubscriptionAddressCheck.setText(_translate(
"MainWindow", "The address is not typed or copied correctly (the checksum failed)."))
elif status == 'versiontoohigh':
self.ui.labelSubscriptionAddressCheck.setText(QtGui.QApplication.translate("MainWindow", "The version number of this address is higher than this software can support. Please upgrade Bitmessage."))
self.ui.labelSubscriptionAddressCheck.setText(_translate(
"MainWindow", "The version number of this address is higher than this software can support. Please upgrade Bitmessage."))
elif status == 'invalidcharacters':
self.ui.labelSubscriptionAddressCheck.setText(QtGui.QApplication.translate("MainWindow", "The address contains invalid characters."))
self.ui.labelSubscriptionAddressCheck.setText(_translate(
"MainWindow", "The address contains invalid characters."))
elif status == 'ripetooshort':
self.ui.labelSubscriptionAddressCheck.setText(QtGui.QApplication.translate("MainWindow", "Some data encoded in the address is too short."))
self.ui.labelSubscriptionAddressCheck.setText(_translate(
"MainWindow", "Some data encoded in the address is too short."))
elif status == 'ripetoolong':
self.ui.labelSubscriptionAddressCheck.setText(QtGui.QApplication.translate("MainWindow", "Some data encoded in the address is too long."))
self.ui.labelSubscriptionAddressCheck.setText(_translate(
"MainWindow", "Some data encoded in the address is too long."))
elif status == 'success':
self.ui.labelSubscriptionAddressCheck.setText(QtGui.QApplication.translate("MainWindow", "Address is valid."))
self.ui.labelSubscriptionAddressCheck.setText(
_translate("MainWindow", "Address is valid."))
class NewAddressDialog(QtGui.QDialog):
def __init__(self, parent):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_NewAddressDialog()
self.ui.setupUi(self)
self.parent = parent
row = 1
#Let's fill out the 'existing address' combo box with addresses from the 'Your Identities' tab.
while self.parent.ui.tableWidgetYourIdentities.item(row-1,1):
# Let's fill out the 'existing address' combo box with addresses from
# the 'Your Identities' tab.
while self.parent.ui.tableWidgetYourIdentities.item(row - 1, 1):
self.ui.radioButtonExisting.click()
#print self.parent.ui.tableWidgetYourIdentities.item(row-1,1).text()
self.ui.comboBoxExisting.addItem(self.parent.ui.tableWidgetYourIdentities.item(row-1,1).text())
# print
# self.parent.ui.tableWidgetYourIdentities.item(row-1,1).text()
self.ui.comboBoxExisting.addItem(
self.parent.ui.tableWidgetYourIdentities.item(row - 1, 1).text())
row += 1
self.ui.groupBoxDeterministic.setHidden(True)
QtGui.QWidget.resize(self,QtGui.QWidget.sizeHint(self))
QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
class iconGlossaryDialog(QtGui.QDialog):
def __init__(self,parent):
def __init__(self, parent):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_iconGlossaryDialog()
self.ui.setupUi(self)
self.parent = parent
self.ui.labelPortNumber.setText(QtGui.QApplication.translate("MainWindow", "You are using TCP port %1. (This can be changed in the settings).").arg(str(shared.config.getint('bitmessagesettings', 'port'))))
QtGui.QWidget.resize(self,QtGui.QWidget.sizeHint(self))
self.ui.labelPortNumber.setText(_translate(
"MainWindow", "You are using TCP port %1. (This can be changed in the settings).").arg(str(shared.config.getint('bitmessagesettings', 'port'))))
QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
#In order for the time columns on the Inbox and Sent tabs to be sorted correctly (rather than alphabetically), we need to overload the < operator and use this class instead of QTableWidgetItem.
# In order for the time columns on the Inbox and Sent tabs to be sorted
# correctly (rather than alphabetically), we need to overload the <
# operator and use this class instead of QTableWidgetItem.
class myTableWidgetItem(QTableWidgetItem):
def __lt__(self,other):
def __lt__(self, other):
return int(self.data(33).toPyObject()) < int(other.data(33).toPyObject())
class UISignaler(QThread):
def __init__(self, parent = None):
def __init__(self, parent=None):
QThread.__init__(self, parent)
def run(self):
@ -2358,21 +2840,28 @@ class UISignaler(QThread):
command, data = shared.UISignalQueue.get()
if command == 'writeNewAddressToTable':
label, address, streamNumber = data
self.emit(SIGNAL("writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),label,address,str(streamNumber))
self.emit(SIGNAL(
"writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), label, address, str(streamNumber))
elif command == 'updateStatusBar':
self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"),data)
self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"), data)
elif command == 'updateSentItemStatusByHash':
hash, message = data
self.emit(SIGNAL("updateSentItemStatusByHash(PyQt_PyObject,PyQt_PyObject)"),hash,message)
self.emit(SIGNAL(
"updateSentItemStatusByHash(PyQt_PyObject,PyQt_PyObject)"), hash, message)
elif command == 'updateSentItemStatusByAckdata':
ackData, message = data
self.emit(SIGNAL("updateSentItemStatusByAckdata(PyQt_PyObject,PyQt_PyObject)"),ackData,message)
self.emit(SIGNAL(
"updateSentItemStatusByAckdata(PyQt_PyObject,PyQt_PyObject)"), ackData, message)
elif command == 'displayNewInboxMessage':
inventoryHash,toAddress,fromAddress,subject,body = data
self.emit(SIGNAL("displayNewInboxMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),inventoryHash,toAddress,fromAddress,subject,body)
inventoryHash, toAddress, fromAddress, subject, body = data
self.emit(SIGNAL(
"displayNewInboxMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),
inventoryHash, toAddress, fromAddress, subject, body)
elif command == 'displayNewSentMessage':
toAddress,fromLabel,fromAddress,subject,message,ackdata = data
self.emit(SIGNAL("displayNewSentMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),toAddress,fromLabel,fromAddress,subject,message,ackdata)
toAddress, fromLabel, fromAddress, subject, message, ackdata = data
self.emit(SIGNAL(
"displayNewSentMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),
toAddress, fromLabel, fromAddress, subject, message, ackdata)
elif command == 'updateNetworkStatusTab':
self.emit(SIGNAL("updateNetworkStatusTab()"))
elif command == 'incrementNumberOfMessagesProcessed':
@ -2382,20 +2871,25 @@ class UISignaler(QThread):
elif command == 'incrementNumberOfBroadcastsProcessed':
self.emit(SIGNAL("incrementNumberOfBroadcastsProcessed()"))
elif command == 'setStatusIcon':
self.emit(SIGNAL("setStatusIcon(PyQt_PyObject)"),data)
self.emit(SIGNAL("setStatusIcon(PyQt_PyObject)"), data)
elif command == 'rerenderInboxFromLabels':
self.emit(SIGNAL("rerenderInboxFromLabels()"))
elif command == 'rerenderSubscriptions':
self.emit(SIGNAL("rerenderSubscriptions()"))
elif command == 'removeInboxRowByMsgid':
self.emit(SIGNAL("removeInboxRowByMsgid(PyQt_PyObject)"),data)
self.emit(SIGNAL("removeInboxRowByMsgid(PyQt_PyObject)"), data)
else:
sys.stderr.write('Command sent to UISignaler not recognized: %s\n' % command)
sys.stderr.write(
'Command sent to UISignaler not recognized: %s\n' % command)
def run():
app = QtGui.QApplication(sys.argv)
translator = QtCore.QTranslator()
translator.load("translations/bitmessage_"+str(locale.getlocale()[0]))
translator.load("translations/bitmessage_" + str(locale.getlocale()[0]))
#translator.load("translations/bitmessage_fr_BE") # Try French instead
QtGui.QApplication.installTranslator(translator)
app.setStyleSheet("QStatusBar::item { border: 0px solid black }")
myapp = MyForm()

View File

@ -2,8 +2,8 @@
# Form implementation generated from reading ui file 'bitmessageui.ui'
#
# Created: Tue May 28 16:22:12 2013
# by: PyQt4 UI code generator 4.9.4
# Created: Thu Jun 13 01:02:50 2013
# by: PyQt4 UI code generator 4.10.1
#
# WARNING! All changes made in this file will be lost!
@ -12,7 +12,16 @@ from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
@ -457,96 +466,106 @@ class Ui_MainWindow(object):
MainWindow.setTabOrder(self.tableWidgetConnectionCount, self.pushButtonStatusIcon)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Bitmessage", None, QtGui.QApplication.UnicodeUTF8))
MainWindow.setWindowTitle(_translate("MainWindow", "Bitmessage", None))
self.tableWidgetInbox.setSortingEnabled(True)
item = self.tableWidgetInbox.horizontalHeaderItem(0)
item.setText(QtGui.QApplication.translate("MainWindow", "To", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "To", None))
item = self.tableWidgetInbox.horizontalHeaderItem(1)
item.setText(QtGui.QApplication.translate("MainWindow", "From", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "From", None))
item = self.tableWidgetInbox.horizontalHeaderItem(2)
item.setText(QtGui.QApplication.translate("MainWindow", "Subject", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "Subject", None))
item = self.tableWidgetInbox.horizontalHeaderItem(3)
item.setText(QtGui.QApplication.translate("MainWindow", "Received", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.inbox), QtGui.QApplication.translate("MainWindow", "Inbox", None, QtGui.QApplication.UnicodeUTF8))
self.pushButtonLoadFromAddressBook.setText(QtGui.QApplication.translate("MainWindow", "Load from Address book", None, QtGui.QApplication.UnicodeUTF8))
self.label_4.setText(QtGui.QApplication.translate("MainWindow", "Message:", None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setText(QtGui.QApplication.translate("MainWindow", "Subject:", None, QtGui.QApplication.UnicodeUTF8))
self.radioButtonSpecific.setText(QtGui.QApplication.translate("MainWindow", "Send to one or more specific people", None, QtGui.QApplication.UnicodeUTF8))
self.textEditMessage.setHtml(QtGui.QApplication.translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
item.setText(_translate("MainWindow", "Received", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.inbox), _translate("MainWindow", "Inbox", None))
self.pushButtonLoadFromAddressBook.setText(_translate("MainWindow", "Load from Address book", None))
self.label_4.setText(_translate("MainWindow", "Message:", None))
self.label_3.setText(_translate("MainWindow", "Subject:", None))
self.radioButtonSpecific.setText(_translate("MainWindow", "Send to one or more specific people", None))
self.textEditMessage.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("MainWindow", "To:", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setText(QtGui.QApplication.translate("MainWindow", "From:", None, QtGui.QApplication.UnicodeUTF8))
self.radioButtonBroadcast.setText(QtGui.QApplication.translate("MainWindow", "Broadcast to everyone who is subscribed to your address", None, QtGui.QApplication.UnicodeUTF8))
self.pushButtonSend.setText(QtGui.QApplication.translate("MainWindow", "Send", None, QtGui.QApplication.UnicodeUTF8))
self.labelSendBroadcastWarning.setText(QtGui.QApplication.translate("MainWindow", "Be aware that broadcasts are only encrypted with your address. Anyone who knows your address can read them.", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), QtGui.QApplication.translate("MainWindow", "Send", None, QtGui.QApplication.UnicodeUTF8))
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>", None))
self.label.setText(_translate("MainWindow", "To:", None))
self.label_2.setText(_translate("MainWindow", "From:", None))
self.radioButtonBroadcast.setText(_translate("MainWindow", "Broadcast to everyone who is subscribed to your address", None))
self.pushButtonSend.setText(_translate("MainWindow", "Send", None))
self.labelSendBroadcastWarning.setText(_translate("MainWindow", "Be aware that broadcasts are only encrypted with your address. Anyone who knows your address can read them.", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), _translate("MainWindow", "Send", None))
self.tableWidgetSent.setSortingEnabled(True)
item = self.tableWidgetSent.horizontalHeaderItem(0)
item.setText(QtGui.QApplication.translate("MainWindow", "To", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "To", None))
item = self.tableWidgetSent.horizontalHeaderItem(1)
item.setText(QtGui.QApplication.translate("MainWindow", "From", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "From", None))
item = self.tableWidgetSent.horizontalHeaderItem(2)
item.setText(QtGui.QApplication.translate("MainWindow", "Subject", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "Subject", None))
item = self.tableWidgetSent.horizontalHeaderItem(3)
item.setText(QtGui.QApplication.translate("MainWindow", "Status", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.sent), QtGui.QApplication.translate("MainWindow", "Sent", None, QtGui.QApplication.UnicodeUTF8))
self.pushButtonNewAddress.setText(QtGui.QApplication.translate("MainWindow", "New", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "Status", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.sent), _translate("MainWindow", "Sent", None))
self.pushButtonNewAddress.setText(_translate("MainWindow", "New", None))
self.tableWidgetYourIdentities.setSortingEnabled(True)
item = self.tableWidgetYourIdentities.horizontalHeaderItem(0)
item.setText(QtGui.QApplication.translate("MainWindow", "Label (not shown to anyone)", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "Label (not shown to anyone)", None))
item = self.tableWidgetYourIdentities.horizontalHeaderItem(1)
item.setText(QtGui.QApplication.translate("MainWindow", "Address", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "Address", None))
item = self.tableWidgetYourIdentities.horizontalHeaderItem(2)
item.setText(QtGui.QApplication.translate("MainWindow", "Stream", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.youridentities), QtGui.QApplication.translate("MainWindow", "Your Identities", None, QtGui.QApplication.UnicodeUTF8))
self.label_5.setText(QtGui.QApplication.translate("MainWindow", "Here you can subscribe to \'broadcast messages\' that are sent by other users. Messages will appear in your Inbox. Addresses here override those on the Blacklist tab.", None, QtGui.QApplication.UnicodeUTF8))
self.pushButtonAddSubscription.setText(QtGui.QApplication.translate("MainWindow", "Add new Subscription", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "Stream", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.youridentities), _translate("MainWindow", "Your Identities", None))
self.label_5.setText(_translate("MainWindow", "Here you can subscribe to \'broadcast messages\' that are sent by other users. Messages will appear in your Inbox. Addresses here override those on the Blacklist tab.", None))
self.pushButtonAddSubscription.setText(_translate("MainWindow", "Add new Subscription", None))
self.tableWidgetSubscriptions.setSortingEnabled(True)
item = self.tableWidgetSubscriptions.horizontalHeaderItem(0)
item.setText(QtGui.QApplication.translate("MainWindow", "Label", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "Label", None))
item = self.tableWidgetSubscriptions.horizontalHeaderItem(1)
item.setText(QtGui.QApplication.translate("MainWindow", "Address", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.subscriptions), QtGui.QApplication.translate("MainWindow", "Subscriptions", None, QtGui.QApplication.UnicodeUTF8))
self.label_6.setText(QtGui.QApplication.translate("MainWindow", "The Address book is useful for adding names or labels to other people\'s Bitmessage addresses so that you can recognize them more easily in your inbox. You can add entries here using the \'Add\' button, or from your inbox by right-clicking on a message.", None, QtGui.QApplication.UnicodeUTF8))
self.pushButtonAddAddressBook.setText(QtGui.QApplication.translate("MainWindow", "Add new entry", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "Address", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.subscriptions), _translate("MainWindow", "Subscriptions", None))
self.label_6.setText(_translate("MainWindow", "The Address book is useful for adding names or labels to other people\'s Bitmessage addresses so that you can recognize them more easily in your inbox. You can add entries here using the \'Add\' button, or from your inbox by right-clicking on a message.", None))
self.pushButtonAddAddressBook.setText(_translate("MainWindow", "Add new entry", None))
self.tableWidgetAddressBook.setSortingEnabled(True)
item = self.tableWidgetAddressBook.horizontalHeaderItem(0)
item.setText(QtGui.QApplication.translate("MainWindow", "Name or Label", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "Name or Label", None))
item = self.tableWidgetAddressBook.horizontalHeaderItem(1)
item.setText(QtGui.QApplication.translate("MainWindow", "Address", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.addressbook), QtGui.QApplication.translate("MainWindow", "Address Book", None, QtGui.QApplication.UnicodeUTF8))
self.radioButtonBlacklist.setText(QtGui.QApplication.translate("MainWindow", "Use a Blacklist (Allow all incoming messages except those on the Blacklist)", None, QtGui.QApplication.UnicodeUTF8))
self.radioButtonWhitelist.setText(QtGui.QApplication.translate("MainWindow", "Use a Whitelist (Block all incoming messages except those on the Whitelist)", None, QtGui.QApplication.UnicodeUTF8))
self.pushButtonAddBlacklist.setText(QtGui.QApplication.translate("MainWindow", "Add new entry", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "Address", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.addressbook), _translate("MainWindow", "Address Book", None))
self.radioButtonBlacklist.setText(_translate("MainWindow", "Use a Blacklist (Allow all incoming messages except those on the Blacklist)", None))
self.radioButtonWhitelist.setText(_translate("MainWindow", "Use a Whitelist (Block all incoming messages except those on the Whitelist)", None))
self.pushButtonAddBlacklist.setText(_translate("MainWindow", "Add new entry", None))
self.tableWidgetBlacklist.setSortingEnabled(True)
item = self.tableWidgetBlacklist.horizontalHeaderItem(0)
item.setText(QtGui.QApplication.translate("MainWindow", "Name or Label", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "Name or Label", None))
item = self.tableWidgetBlacklist.horizontalHeaderItem(1)
item.setText(QtGui.QApplication.translate("MainWindow", "Address", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.blackwhitelist), QtGui.QApplication.translate("MainWindow", "Blacklist", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "Address", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.blackwhitelist), _translate("MainWindow", "Blacklist", None))
item = self.tableWidgetConnectionCount.horizontalHeaderItem(0)
item.setText(QtGui.QApplication.translate("MainWindow", "Stream Number", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "Stream Number", None))
item = self.tableWidgetConnectionCount.horizontalHeaderItem(1)
item.setText(QtGui.QApplication.translate("MainWindow", "Number of Connections", None, QtGui.QApplication.UnicodeUTF8))
self.labelTotalConnections.setText(QtGui.QApplication.translate("MainWindow", "Total connections: 0", None, QtGui.QApplication.UnicodeUTF8))
self.labelStartupTime.setText(QtGui.QApplication.translate("MainWindow", "Since startup at asdf:", None, QtGui.QApplication.UnicodeUTF8))
self.labelMessageCount.setText(QtGui.QApplication.translate("MainWindow", "Processed 0 person-to-person messages.", None, QtGui.QApplication.UnicodeUTF8))
self.labelPubkeyCount.setText(QtGui.QApplication.translate("MainWindow", "Processed 0 public keys.", None, QtGui.QApplication.UnicodeUTF8))
self.labelBroadcastCount.setText(QtGui.QApplication.translate("MainWindow", "Processed 0 broadcasts.", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.networkstatus), QtGui.QApplication.translate("MainWindow", "Network Status", None, QtGui.QApplication.UnicodeUTF8))
self.menuFile.setTitle(QtGui.QApplication.translate("MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8))
self.menuSettings.setTitle(QtGui.QApplication.translate("MainWindow", "Settings", None, QtGui.QApplication.UnicodeUTF8))
self.menuHelp.setTitle(QtGui.QApplication.translate("MainWindow", "Help", None, QtGui.QApplication.UnicodeUTF8))
self.actionImport_keys.setText(QtGui.QApplication.translate("MainWindow", "Import keys", None, QtGui.QApplication.UnicodeUTF8))
self.actionManageKeys.setText(QtGui.QApplication.translate("MainWindow", "Manage keys", None, QtGui.QApplication.UnicodeUTF8))
self.actionExit.setText(QtGui.QApplication.translate("MainWindow", "Quit", None, QtGui.QApplication.UnicodeUTF8))
self.actionHelp.setText(QtGui.QApplication.translate("MainWindow", "Help", None, QtGui.QApplication.UnicodeUTF8))
self.actionAbout.setText(QtGui.QApplication.translate("MainWindow", "About", None, QtGui.QApplication.UnicodeUTF8))
self.actionSettings.setText(QtGui.QApplication.translate("MainWindow", "Settings", None, QtGui.QApplication.UnicodeUTF8))
self.actionRegenerateDeterministicAddresses.setText(QtGui.QApplication.translate("MainWindow", "Regenerate deterministic addresses", None, QtGui.QApplication.UnicodeUTF8))
self.actionDeleteAllTrashedMessages.setText(QtGui.QApplication.translate("MainWindow", "Delete all trashed messages", None, QtGui.QApplication.UnicodeUTF8))
item.setText(_translate("MainWindow", "Number of Connections", None))
self.labelTotalConnections.setText(_translate("MainWindow", "Total connections: 0", None))
self.labelStartupTime.setText(_translate("MainWindow", "Since startup at asdf:", None))
self.labelMessageCount.setText(_translate("MainWindow", "Processed 0 person-to-person message.", None))
self.labelPubkeyCount.setText(_translate("MainWindow", "Processed 0 public key.", None))
self.labelBroadcastCount.setText(_translate("MainWindow", "Processed 0 broadcast.", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.networkstatus), _translate("MainWindow", "Network Status", None))
self.menuFile.setTitle(_translate("MainWindow", "File", None))
self.menuSettings.setTitle(_translate("MainWindow", "Settings", None))
self.menuHelp.setTitle(_translate("MainWindow", "Help", None))
self.actionImport_keys.setText(_translate("MainWindow", "Import keys", None))
self.actionManageKeys.setText(_translate("MainWindow", "Manage keys", None))
self.actionExit.setText(_translate("MainWindow", "Quit", None))
self.actionHelp.setText(_translate("MainWindow", "Help", None))
self.actionAbout.setText(_translate("MainWindow", "About", None))
self.actionSettings.setText(_translate("MainWindow", "Settings", None))
self.actionRegenerateDeterministicAddresses.setText(_translate("MainWindow", "Regenerate deterministic addresses", None))
self.actionDeleteAllTrashedMessages.setText(_translate("MainWindow", "Delete all trashed messages", None))
import bitmessage_icons_rc
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
MainWindow = QtGui.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())

View File

@ -885,7 +885,7 @@ p, li { white-space: pre-wrap; }
</rect>
</property>
<property name="text">
<string>Processed 0 person-to-person messages.</string>
<string>Processed 0 person-to-person message.</string>
</property>
</widget>
<widget class="QLabel" name="labelPubkeyCount">
@ -898,7 +898,7 @@ p, li { white-space: pre-wrap; }
</rect>
</property>
<property name="text">
<string>Processed 0 public keys.</string>
<string>Processed 0 public key.</string>
</property>
</widget>
<widget class="QLabel" name="labelBroadcastCount">
@ -911,7 +911,7 @@ p, li { white-space: pre-wrap; }
</rect>
</property>
<property name="text">
<string>Processed 0 broadcasts.</string>
<string>Processed 0 broadcast.</string>
</property>
</widget>
</widget>

View File

@ -2,8 +2,8 @@
# Form implementation generated from reading ui file 'iconglossary.ui'
#
# Created: Tue Dec 18 14:31:18 2012
# by: PyQt4 UI code generator 4.9.4
# Created: Thu Jun 13 20:15:48 2013
# by: PyQt4 UI code generator 4.10.1
#
# WARNING! All changes made in this file will be lost!
@ -12,7 +12,16 @@ from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_iconGlossaryDialog(object):
def setupUi(self, iconGlossaryDialog):
@ -69,11 +78,21 @@ class Ui_iconGlossaryDialog(object):
QtCore.QMetaObject.connectSlotsByName(iconGlossaryDialog)
def retranslateUi(self, iconGlossaryDialog):
iconGlossaryDialog.setWindowTitle(QtGui.QApplication.translate("iconGlossaryDialog", "Icon Glossary", None, QtGui.QApplication.UnicodeUTF8))
self.groupBox.setTitle(QtGui.QApplication.translate("iconGlossaryDialog", "Icon Glossary", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setText(QtGui.QApplication.translate("iconGlossaryDialog", "You have no connections with other peers. ", None, QtGui.QApplication.UnicodeUTF8))
self.label_4.setText(QtGui.QApplication.translate("iconGlossaryDialog", "You have made at least one connection to a peer using an outgoing connection but you have not yet received any incoming connections. Your firewall or home router probably isn\'t configured to foward incoming TCP connections to your computer. Bitmessage will work just fine but it would help the Bitmessage network if you allowed for incoming connections and will help you be a better-connected node.", None, QtGui.QApplication.UnicodeUTF8))
self.labelPortNumber.setText(QtGui.QApplication.translate("iconGlossaryDialog", "You are using TCP port ?. (This can be changed in the settings).", None, QtGui.QApplication.UnicodeUTF8))
self.label_6.setText(QtGui.QApplication.translate("iconGlossaryDialog", "You do have connections with other peers and your firewall is correctly configured.", None, QtGui.QApplication.UnicodeUTF8))
iconGlossaryDialog.setWindowTitle(_translate("iconGlossaryDialog", "Icon Glossary", None))
self.groupBox.setTitle(_translate("iconGlossaryDialog", "Icon Glossary", None))
self.label_2.setText(_translate("iconGlossaryDialog", "You have no connections with other peers. ", None))
self.label_4.setText(_translate("iconGlossaryDialog", "You have made at least one connection to a peer using an outgoing connection but you have not yet received any incoming connections. Your firewall or home router probably isn\'t configured to forward incoming TCP connections to your computer. Bitmessage will work just fine but it would help the Bitmessage network if you allowed for incoming connections and will help you be a better-connected node.", None))
self.labelPortNumber.setText(_translate("iconGlossaryDialog", "You are using TCP port ?. (This can be changed in the settings).", None))
self.label_6.setText(_translate("iconGlossaryDialog", "You do have connections with other peers and your firewall is correctly configured.", None))
import bitmessage_icons_rc
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
iconGlossaryDialog = QtGui.QDialog()
ui = Ui_iconGlossaryDialog()
ui.setupUi(iconGlossaryDialog)
iconGlossaryDialog.show()
sys.exit(app.exec_())

View File

@ -50,7 +50,7 @@
<item row="1" column="1" rowspan="2">
<widget class="QLabel" name="label_4">
<property name="text">
<string>You have made at least one connection to a peer using an outgoing connection but you have not yet received any incoming connections. Your firewall or home router probably isn't configured to foward incoming TCP connections to your computer. Bitmessage will work just fine but it would help the Bitmessage network if you allowed for incoming connections and will help you be a better-connected node.</string>
<string>You have made at least one connection to a peer using an outgoing connection but you have not yet received any incoming connections. Your firewall or home router probably isn't configured to forward incoming TCP connections to your computer. Bitmessage will work just fine but it would help the Bitmessage network if you allowed for incoming connections and will help you be a better-connected node.</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 1007 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 634 B

View File

@ -2,8 +2,8 @@
# Form implementation generated from reading ui file 'newaddressdialog.ui'
#
# Created: Tue Apr 30 12:21:14 2013
# by: PyQt4 UI code generator 4.9.4
# Created: Thu Jun 13 20:12:21 2013
# by: PyQt4 UI code generator 4.10.1
#
# WARNING! All changes made in this file will be lost!
@ -12,7 +12,16 @@ from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_NewAddressDialog(object):
def setupUi(self, NewAddressDialog):
@ -161,24 +170,34 @@ class Ui_NewAddressDialog(object):
NewAddressDialog.setTabOrder(self.checkBoxEighteenByteRipe, self.buttonBox)
def retranslateUi(self, NewAddressDialog):
NewAddressDialog.setWindowTitle(QtGui.QApplication.translate("NewAddressDialog", "Create new Address", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("NewAddressDialog", "Here you may generate as many addresses as you like. Indeed, creating and abandoning addresses is encouraged. You may generate addresses by using either random numbers or by using a passphrase. If you use a passphrase, the address is called a \"deterministic\" address.\n"
"The \'Random Number\' option is selected by default but deterministic addresses have several pros and cons:", None, QtGui.QApplication.UnicodeUTF8))
self.label_5.setText(QtGui.QApplication.translate("NewAddressDialog", "<html><head/><body><p><span style=\" font-weight:600;\">Pros:<br/></span>You can recreate your addresses on any computer from memory. <br/>You need-not worry about backing up your keys.dat file as long as you can remember your passphrase. <br/><span style=\" font-weight:600;\">Cons:<br/></span>You must remember (or write down) your passphrase if you expect to be able to recreate your keys if they are lost. <br/>You must remember the address version number and the stream number along with your passphrase. <br/>If you choose a weak passphrase and someone on the Internet can brute-force it, they can read your messages and send messages as you.</p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.radioButtonRandomAddress.setText(QtGui.QApplication.translate("NewAddressDialog", "Use a random number generator to make an address", None, QtGui.QApplication.UnicodeUTF8))
self.radioButtonDeterministicAddress.setText(QtGui.QApplication.translate("NewAddressDialog", "Use a passpharase to make addresses", None, QtGui.QApplication.UnicodeUTF8))
self.checkBoxEighteenByteRipe.setText(QtGui.QApplication.translate("NewAddressDialog", "Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter", None, QtGui.QApplication.UnicodeUTF8))
self.groupBoxDeterministic.setTitle(QtGui.QApplication.translate("NewAddressDialog", "Make deterministic addresses", None, QtGui.QApplication.UnicodeUTF8))
self.label_9.setText(QtGui.QApplication.translate("NewAddressDialog", "Address version number: 3", None, QtGui.QApplication.UnicodeUTF8))
self.label_8.setText(QtGui.QApplication.translate("NewAddressDialog", "In addition to your passphrase, you must remember these numbers:", None, QtGui.QApplication.UnicodeUTF8))
self.label_6.setText(QtGui.QApplication.translate("NewAddressDialog", "Passphrase", None, QtGui.QApplication.UnicodeUTF8))
self.label_11.setText(QtGui.QApplication.translate("NewAddressDialog", "Number of addresses to make based on your passphrase:", None, QtGui.QApplication.UnicodeUTF8))
self.label_10.setText(QtGui.QApplication.translate("NewAddressDialog", "Stream number: 1", None, QtGui.QApplication.UnicodeUTF8))
self.label_7.setText(QtGui.QApplication.translate("NewAddressDialog", "Retype passphrase", None, QtGui.QApplication.UnicodeUTF8))
self.groupBox.setTitle(QtGui.QApplication.translate("NewAddressDialog", "Randomly generate address", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setText(QtGui.QApplication.translate("NewAddressDialog", "Label (not shown to anyone except you)", None, QtGui.QApplication.UnicodeUTF8))
self.radioButtonMostAvailable.setText(QtGui.QApplication.translate("NewAddressDialog", "Use the most available stream", None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setText(QtGui.QApplication.translate("NewAddressDialog", " (best if this is the first of many addresses you will create)", None, QtGui.QApplication.UnicodeUTF8))
self.radioButtonExisting.setText(QtGui.QApplication.translate("NewAddressDialog", "Use the same stream as an existing address", None, QtGui.QApplication.UnicodeUTF8))
self.label_4.setText(QtGui.QApplication.translate("NewAddressDialog", "(saves you some bandwidth and processing power)", None, QtGui.QApplication.UnicodeUTF8))
NewAddressDialog.setWindowTitle(_translate("NewAddressDialog", "Create new Address", None))
self.label.setText(_translate("NewAddressDialog", "Here you may generate as many addresses as you like. Indeed, creating and abandoning addresses is encouraged. You may generate addresses by using either random numbers or by using a passphrase. If you use a passphrase, the address is called a \"deterministic\" address.\n"
"The \'Random Number\' option is selected by default but deterministic addresses have several pros and cons:", None))
self.label_5.setText(_translate("NewAddressDialog", "<html><head/><body><p><span style=\" font-weight:600;\">Pros:<br/></span>You can recreate your addresses on any computer from memory. <br/>You need-not worry about backing up your keys.dat file as long as you can remember your passphrase. <br/><span style=\" font-weight:600;\">Cons:<br/></span>You must remember (or write down) your passphrase if you expect to be able to recreate your keys if they are lost. <br/>You must remember the address version number and the stream number along with your passphrase. <br/>If you choose a weak passphrase and someone on the Internet can brute-force it, they can read your messages and send messages as you.</p></body></html>", None))
self.radioButtonRandomAddress.setText(_translate("NewAddressDialog", "Use a random number generator to make an address", None))
self.radioButtonDeterministicAddress.setText(_translate("NewAddressDialog", "Use a passphrase to make addresses", None))
self.checkBoxEighteenByteRipe.setText(_translate("NewAddressDialog", "Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter", None))
self.groupBoxDeterministic.setTitle(_translate("NewAddressDialog", "Make deterministic addresses", None))
self.label_9.setText(_translate("NewAddressDialog", "Address version number: 3", None))
self.label_8.setText(_translate("NewAddressDialog", "In addition to your passphrase, you must remember these numbers:", None))
self.label_6.setText(_translate("NewAddressDialog", "Passphrase", None))
self.label_11.setText(_translate("NewAddressDialog", "Number of addresses to make based on your passphrase:", None))
self.label_10.setText(_translate("NewAddressDialog", "Stream number: 1", None))
self.label_7.setText(_translate("NewAddressDialog", "Retype passphrase", None))
self.groupBox.setTitle(_translate("NewAddressDialog", "Randomly generate address", None))
self.label_2.setText(_translate("NewAddressDialog", "Label (not shown to anyone except you)", None))
self.radioButtonMostAvailable.setText(_translate("NewAddressDialog", "Use the most available stream", None))
self.label_3.setText(_translate("NewAddressDialog", " (best if this is the first of many addresses you will create)", None))
self.radioButtonExisting.setText(_translate("NewAddressDialog", "Use the same stream as an existing address", None))
self.label_4.setText(_translate("NewAddressDialog", "(saves you some bandwidth and processing power)", None))
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
NewAddressDialog = QtGui.QDialog()
ui = Ui_NewAddressDialog()
ui.setupUi(NewAddressDialog)
NewAddressDialog.show()
sys.exit(app.exec_())

View File

@ -76,7 +76,7 @@ The 'Random Number' option is selected by default but deterministic addresses ha
<item row="6" column="0">
<widget class="QRadioButton" name="radioButtonDeterministicAddress">
<property name="text">
<string>Use a passpharase to make addresses</string>
<string>Use a passphrase to make addresses</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>

Binary file not shown.

View File

@ -1,60 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="fr_BE" sourcelanguage="en">
<!DOCTYPE TS><TS version="2.0" language="fr_BE" sourcelanguage="en">
<context>
<name>MainWindow</name>
<message>
<location filename="../bitmessageui.py" line="460"/>
<location filename="../bitmessageui.py" line="469"/>
<source>Bitmessage</source>
<translation>Bitmessage</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="488"/>
<location filename="../bitmessageui.py" line="497"/>
<source>To</source>
<translation>Vers</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="490"/>
<location filename="../bitmessageui.py" line="499"/>
<source>From</source>
<translation>De</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="492"/>
<location filename="../bitmessageui.py" line="501"/>
<source>Subject</source>
<translation>Sujet</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="469"/>
<location filename="../bitmessageui.py" line="478"/>
<source>Received</source>
<translation>Reçu</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="470"/>
<location filename="../bitmessageui.py" line="479"/>
<source>Inbox</source>
<translation>Boîte de réception</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="471"/>
<location filename="../bitmessageui.py" line="480"/>
<source>Load from Address book</source>
<translation>Charger depuis carnet d&apos;adresse</translation>
<translation>Charger depuis carnet d&apos;adresses</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="472"/>
<location filename="../bitmessageui.py" line="481"/>
<source>Message:</source>
<translation>Message :</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="473"/>
<location filename="../bitmessageui.py" line="482"/>
<source>Subject:</source>
<translation>Sujet :</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="474"/>
<location filename="../bitmessageui.py" line="483"/>
<source>Send to one or more specific people</source>
<translation>Envoyer à une ou plusieurs personne(s)</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="475"/>
<location filename="../bitmessageui.py" line="484"/>
<source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
@ -67,307 +66,307 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="480"/>
<location filename="../bitmessageui.py" line="489"/>
<source>To:</source>
<translation>Vers :</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="481"/>
<location filename="../bitmessageui.py" line="490"/>
<source>From:</source>
<translation>De :</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="482"/>
<location filename="../bitmessageui.py" line="491"/>
<source>Broadcast to everyone who is subscribed to your address</source>
<translation>Diffuser à chaque abonné de cette adresse</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="485"/>
<location filename="../bitmessageui.py" line="494"/>
<source>Send</source>
<translation>Envoyer</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="484"/>
<location filename="../bitmessageui.py" line="493"/>
<source>Be aware that broadcasts are only encrypted with your address. Anyone who knows your address can read them.</source>
<translation>Gardez en tête que les diffusions sont seulement chiffrées avec votre adresse. Quiconque disposant de votre adresse peut les lire.</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="494"/>
<location filename="../bitmessageui.py" line="503"/>
<source>Status</source>
<translation>Statut</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="495"/>
<location filename="../bitmessageui.py" line="504"/>
<source>Sent</source>
<translation>Envoyé</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="496"/>
<location filename="../bitmessageui.py" line="505"/>
<source>New</source>
<translation>Nouveau</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="499"/>
<location filename="../bitmessageui.py" line="508"/>
<source>Label (not shown to anyone)</source>
<translation>Label (seulement visible par vous)</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="528"/>
<location filename="../bitmessageui.py" line="537"/>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="503"/>
<location filename="../bitmessageui.py" line="512"/>
<source>Stream</source>
<translation>Flux</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="504"/>
<location filename="../bitmessageui.py" line="513"/>
<source>Your Identities</source>
<translation>Vos identités</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="505"/>
<location filename="../bitmessageui.py" line="514"/>
<source>Here you can subscribe to &apos;broadcast messages&apos; that are sent by other users. Messages will appear in your Inbox. Addresses here override those on the Blacklist tab.</source>
<translation>Vous pouvez ici souscrire aux &apos;messages de diffusion&apos; envoyés par d&apos;autres utilisateurs. Les messages apparaîtront dans votre boîte de récption. Les adresses placées ici outrepassent la liste noire.</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="506"/>
<location filename="../bitmessageui.py" line="515"/>
<source>Add new Subscription</source>
<translation>Ajouter un nouvel abonnement</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="509"/>
<location filename="../bitmessageui.py" line="518"/>
<source>Label</source>
<translation>Label</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="512"/>
<location filename="../bitmessageui.py" line="521"/>
<source>Subscriptions</source>
<translation>Abonnements</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="513"/>
<location filename="../bitmessageui.py" line="522"/>
<source>The Address book is useful for adding names or labels to other people&apos;s Bitmessage addresses so that you can recognize them more easily in your inbox. You can add entries here using the &apos;Add&apos; button, or from your inbox by right-clicking on a message.</source>
<translation>Le carnet d&apos;adresse est utile pour mettre un nom sur une adresse Bitmessage et ainsi faciliter la gestion de votre boîte de réception. Vous pouvez ajouter des entrées ici en utilisant le bouton &apos;Ajouter&apos;, ou depuis votre boîte de réception en faisant un clic-droit sur un message.</translation>
<translation>Le carnet d&apos;adresses est utile pour mettre un nom sur une adresse Bitmessage et ainsi faciliter la gestion de votre boîte de réception. Vous pouvez ajouter des entrées ici en utilisant le bouton &apos;Ajouter&apos;, ou depuis votre boîte de réception en faisant un clic-droit sur un message.</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="523"/>
<location filename="../bitmessageui.py" line="532"/>
<source>Add new entry</source>
<translation>Ajouter une nouvelle entrée</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="526"/>
<location filename="../bitmessageui.py" line="535"/>
<source>Name or Label</source>
<translation>Nom ou Label</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="520"/>
<location filename="../bitmessageui.py" line="529"/>
<source>Address Book</source>
<translation>Carnet d&apos;adresses</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="521"/>
<location filename="../bitmessageui.py" line="530"/>
<source>Use a Blacklist (Allow all incoming messages except those on the Blacklist)</source>
<translation>Utiliser une liste noire (autoriser tous les messages entrants exceptés ceux sur la liste noire)</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="522"/>
<location filename="../bitmessageui.py" line="531"/>
<source>Use a Whitelist (Block all incoming messages except those on the Whitelist)</source>
<translation>Utiliser une liste blanche (refuser tous les messages entrants exceptés ceux sur la liste blanche)</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="529"/>
<location filename="../bitmessageui.py" line="538"/>
<source>Blacklist</source>
<translation>Liste noire</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="531"/>
<location filename="../bitmessageui.py" line="540"/>
<source>Stream Number</source>
<translation>Numéro de flux</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="533"/>
<location filename="../bitmessageui.py" line="542"/>
<source>Number of Connections</source>
<translation>Nombre de connexions</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="534"/>
<location filename="../bitmessageui.py" line="543"/>
<source>Total connections: 0</source>
<translation>Nombre de connexions total : 0</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="535"/>
<location filename="../bitmessageui.py" line="544"/>
<source>Since startup at asdf:</source>
<translation>Depuis le lancement à asdf :</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="536"/>
<source>Processed 0 person-to-person messages.</source>
<location filename="../bitmessageui.py" line="545"/>
<source>Processed 0 person-to-person message.</source>
<translation>0 message de pair à pair traité.</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="537"/>
<source>Processed 0 public keys.</source>
<location filename="../bitmessageui.py" line="546"/>
<source>Processed 0 public key.</source>
<translation>0 clé publique traitée.</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="538"/>
<source>Processed 0 broadcasts.</source>
<location filename="../bitmessageui.py" line="547"/>
<source>Processed 0 broadcast.</source>
<translation>0 message de diffusion traité.</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="539"/>
<location filename="../bitmessageui.py" line="548"/>
<source>Network Status</source>
<translation>État du réseau</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="540"/>
<location filename="../bitmessageui.py" line="549"/>
<source>File</source>
<translation>Fichier</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="548"/>
<location filename="../bitmessageui.py" line="557"/>
<source>Settings</source>
<translation>Paramètres</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="546"/>
<location filename="../bitmessageui.py" line="555"/>
<source>Help</source>
<translation>Aide</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="543"/>
<location filename="../bitmessageui.py" line="552"/>
<source>Import keys</source>
<translation>Importer les clés</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="544"/>
<location filename="../bitmessageui.py" line="553"/>
<source>Manage keys</source>
<translation>Gérer les clés</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="545"/>
<location filename="../bitmessageui.py" line="554"/>
<source>Quit</source>
<translation>Quitter</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="547"/>
<location filename="../bitmessageui.py" line="556"/>
<source>About</source>
<translation>À propos</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="549"/>
<location filename="../bitmessageui.py" line="558"/>
<source>Regenerate deterministic addresses</source>
<translation>Regénérer les clés déterministes</translation>
</message>
<message>
<location filename="../bitmessageui.py" line="550"/>
<location filename="../bitmessageui.py" line="559"/>
<source>Delete all trashed messages</source>
<translation>Supprimer tous les messages dans la corbeille</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="891"/>
<location filename="../bitmessageqt/__init__.py" line="1050"/>
<source>Total Connections: %1</source>
<translation>Nombre total de connexions : %1</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="912"/>
<location filename="../bitmessageqt/__init__.py" line="1074"/>
<source>Not Connected</source>
<translation>Déconnecté</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="937"/>
<location filename="../bitmessageqt/__init__.py" line="1107"/>
<source>Connected</source>
<translation>Connecté</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="574"/>
<location filename="../bitmessageqt/__init__.py" line="702"/>
<source>Show Bitmessage</source>
<translation>Afficher Bitmessage</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="586"/>
<location filename="../bitmessageqt/__init__.py" line="717"/>
<source>Subscribe</source>
<translation>S&apos;abonner</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="842"/>
<location filename="../bitmessageqt/__init__.py" line="996"/>
<source>Processed %1 person-to-person messages.</source>
<translation>%1 messages de pair à pair traités.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="846"/>
<location filename="../bitmessageqt/__init__.py" line="1001"/>
<source>Processed %1 broadcast messages.</source>
<translation>%1 messages de diffusion traités.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="850"/>
<location filename="../bitmessageqt/__init__.py" line="1006"/>
<source>Processed %1 public keys.</source>
<translation>%1 clés publiques traitées.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="436"/>
<location filename="../bitmessageqt/__init__.py" line="545"/>
<source>Since startup on %1</source>
<translation>Depuis lancement le %1</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="369"/>
<location filename="../bitmessageqt/__init__.py" line="461"/>
<source>Waiting on their encryption key. Will request it again soon.</source>
<translation>En attente de la clé de chiffrement. Une nouvelle requête sera bientôt lancée.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="371"/>
<location filename="../bitmessageqt/__init__.py" line="464"/>
<source>Encryption key request queued.</source>
<translation>Demande de clé de chiffrement en attente.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="373"/>
<location filename="../bitmessageqt/__init__.py" line="467"/>
<source>Queued.</source>
<translation>En attente.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="377"/>
<location filename="../bitmessageqt/__init__.py" line="473"/>
<source>Need to do work to send message. Work is queued.</source>
<translation>Travail nécessaire pour envoyer le message. Travail en attente.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="379"/>
<location filename="../bitmessageqt/__init__.py" line="476"/>
<source>Acknowledgement of the message received %1</source>
<translation>Accusé de réception reçu le %1</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="381"/>
<location filename="../bitmessageqt/__init__.py" line="479"/>
<source>Broadcast queued.</source>
<translation>Message de diffusion en attente.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="383"/>
<location filename="../bitmessageqt/__init__.py" line="482"/>
<source>Broadcast on %1</source>
<translation>Message de diffusion à %1</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="385"/>
<location filename="../bitmessageqt/__init__.py" line="485"/>
<source>Problem: The work demanded by the recipient is more difficult than you are willing to do. %1</source>
<translation>Problème : Le travail demandé par le destinataire est plus difficile que ce que vous avez paramétré. %1</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="387"/>
<location filename="../bitmessageqt/__init__.py" line="488"/>
<source>Forced difficulty override. Send should start soon.</source>
<translation>Neutralisation forcée de la difficulté. L&apos;envoi devrait bientôt commencer.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="375"/>
<location filename="../bitmessageqt/__init__.py" line="470"/>
<source>Message sent. Waiting on acknowledgement. Sent at %1</source>
<translation>Message envoyé. En attente de l&apos;accusé de réception. Envoyé le %1</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="779"/>
<location filename="../bitmessageqt/__init__.py" line="923"/>
<source>You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file.</source>
<translation>Vous pouvez éditer vos clés en éditant le fichier keys.dat stocké dans le même répertoire que ce programme. Il est important de faire des sauvegardes de ce fichier.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="782"/>
<location filename="../bitmessageqt/__init__.py" line="927"/>
<source>You may manage your keys by editing the keys.dat file stored in
%1
It is important that you back up this file.</source>
@ -376,12 +375,12 @@ It is important that you back up this file.</source>
Il est important de faire des sauvegardes de ce fichier.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="785"/>
<location filename="../bitmessageqt/__init__.py" line="931"/>
<source>You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)</source>
<translation>Vous pouvez éditer vos clés en éditant le fichier keys.dat stocké dans le même répertoire que ce programme. Il est important de faire des sauvegardes de ce fichier. Souhaitez-vous l&apos;ouvrir maintenant ? (Assurez-vous de fermer Bitmessage avant d&apos;effectuer des changements.)</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="787"/>
<location filename="../bitmessageqt/__init__.py" line="934"/>
<source>You may manage your keys by editing the keys.dat file stored in
%1
It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)</source>
@ -390,417 +389,517 @@ It is important that you back up this file. Would you like to open the file now?
Il est important de faire des sauvegardes de ce fichier. Souhaitez-vous l&apos;ouvrir maintenant ? (Assurez-vous de fermer Bitmessage avant d&apos;effectuer des changements.)</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="104"/>
<location filename="../bitmessageqt/__init__.py" line="139"/>
<source>Add sender to your Address Book</source>
<translation>Ajouter l&apos;expéditeur au carnet d&apos;adresse</translation>
<translation>Ajouter l&apos;expéditeur au carnet d&apos;adresses</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="175"/>
<location filename="../bitmessageqt/__init__.py" line="234"/>
<source>Move to Trash</source>
<translation>Envoyer à la Corbeille</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="106"/>
<location filename="../bitmessageqt/__init__.py" line="143"/>
<source>View HTML code as formatted text</source>
<translation>Voir le code HTML comme du texte formaté</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="191"/>
<location filename="../bitmessageqt/__init__.py" line="257"/>
<source>Enable</source>
<translation>Activer</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="192"/>
<location filename="../bitmessageqt/__init__.py" line="259"/>
<source>Disable</source>
<translation>Désactiver</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="190"/>
<location filename="../bitmessageqt/__init__.py" line="255"/>
<source>Copy address to clipboard</source>
<translation>Copier l&apos;adresse dans le presse-papier</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="125"/>
<location filename="../bitmessageqt/__init__.py" line="168"/>
<source>Special address behavior...</source>
<translation>Comportement spécial de l&apos;adresse...</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="140"/>
<location filename="../bitmessageqt/__init__.py" line="186"/>
<source>Send message to this address</source>
<translation>Envoyer un message à cette adresse</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="142"/>
<location filename="../bitmessageqt/__init__.py" line="190"/>
<source>Add New Address</source>
<translation>Ajouter nouvelle adresse</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="189"/>
<location filename="../bitmessageqt/__init__.py" line="253"/>
<source>Delete</source>
<translation>Supprimer</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="176"/>
<location filename="../bitmessageqt/__init__.py" line="236"/>
<source>Copy destination address to clipboard</source>
<translation>Copier l&apos;adresse de destination dans le presse-papier</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="177"/>
<location filename="../bitmessageqt/__init__.py" line="238"/>
<source>Force send</source>
<translation>Forcer l&apos;envoi</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="792"/>
<location filename="../bitmessageqt/__init__.py" line="940"/>
<source>Are you sure you want to delete all trashed messages?</source>
<translation>Êtes-vous sûr de vouloir supprimer tous les messages dans la corbeille ?</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="802"/>
<location filename="../bitmessageqt/__init__.py" line="951"/>
<source>You must type your passphrase. If you don&apos;t have one then this is not the form for you.</source>
<translation>Vous devez taper votre phrase secrète. Si vous n&apos;en avez pas, ce formulaire n&apos;est pas pour vous.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="792"/>
<location filename="../bitmessageqt/__init__.py" line="940"/>
<source>Delete trash?</source>
<translation>Supprimer la corbeille ?</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="787"/>
<location filename="../bitmessageqt/__init__.py" line="934"/>
<source>Open keys.dat?</source>
<translation>Ouvrir keys.dat ?</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="802"/>
<location filename="../bitmessageqt/__init__.py" line="951"/>
<source>bad passphrase</source>
<translation>Mauvaise phrase secrète</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1469"/>
<location filename="../bitmessageqt/__init__.py" line="1744"/>
<source>Restart</source>
<translation>Redémarrer</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1465"/>
<location filename="../bitmessageqt/__init__.py" line="1738"/>
<source>You must restart Bitmessage for the port number change to take effect.</source>
<translation>Vous devez redémarrer Bitmessage pour que le changement de port prenne effet.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1469"/>
<source>Bitmessage will use your proxy from now on now but you may want to manually restart Bitmessage now to close existing connections.</source>
<location filename="../bitmessageqt/__init__.py" line="1744"/>
<source>Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections.</source>
<translation>Bitmessage utilisera votre proxy à partir de maintenant mais il vous faudra redémarrer Bitmessage pour fermer les connexions existantes.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1602"/>
<location filename="../bitmessageqt/__init__.py" line="1898"/>
<source>Error: You cannot add the same address to your list twice. Perhaps rename the existing one if you want.</source>
<translation>Erreur : Vous ne pouvez pas ajouter une adresse déjà présente dans votre liste. Essayez de renommer l&apos;adresse existante.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1604"/>
<location filename="../bitmessageqt/__init__.py" line="1901"/>
<source>The address you entered was invalid. Ignoring it.</source>
<translation>L&apos;adresse que vous avez entré est invalide. Adresse ignorée.</translation>
<translation>L&apos;adresse que vous avez entrée est invalide. Adresse ignorée.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1648"/>
<location filename="../bitmessageqt/__init__.py" line="1954"/>
<source>Passphrase mismatch</source>
<translation>Phrases secrètes différentes</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1648"/>
<location filename="../bitmessageqt/__init__.py" line="1954"/>
<source>The passphrase you entered twice doesn&apos;t match. Try again.</source>
<translation>Les phrases secrètes entrées sont différentes. Réessayez.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1650"/>
<location filename="../bitmessageqt/__init__.py" line="1957"/>
<source>Choose a passphrase</source>
<translation>Choisissez une phrase secrète</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1650"/>
<location filename="../bitmessageqt/__init__.py" line="1957"/>
<source>You really do need a passphrase.</source>
<translation>Vous devez vraiment utiliser une phrase secrète.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1677"/>
<location filename="../bitmessageqt/__init__.py" line="1985"/>
<source>All done. Closing user interface...</source>
<translation>Terminé. Fermeture de l&apos;interface...</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1719"/>
<location filename="../bitmessageqt/__init__.py" line="2033"/>
<source>Address is gone</source>
<translation>L&apos;adresse a disparu</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1719"/>
<location filename="../bitmessageqt/__init__.py" line="2033"/>
<source>Bitmessage cannot find your address %1. Perhaps you removed it?</source>
<translation>Bitmessage ne peut pas trouver votre adresse %1. Peut-être l&apos;avez-vous supprimée ?</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1722"/>
<location filename="../bitmessageqt/__init__.py" line="2037"/>
<source>Address disabled</source>
<translation>Adresse désactivée</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1722"/>
<location filename="../bitmessageqt/__init__.py" line="2037"/>
<source>Error: The address from which you are trying to send is disabled. You&apos;ll have to enable it on the &apos;Your Identities&apos; tab before using it.</source>
<translation>Erreur : L&apos;adresse avec laquelle vous essayez de communiquer est désactivée. Vous devez d&apos;abord l&apos;activer dans l&apos;onglet &apos;Vos identités&apos; avant de l&apos;utiliser.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1764"/>
<location filename="../bitmessageqt/__init__.py" line="2089"/>
<source>Entry added to the Address Book. Edit the label to your liking.</source>
<translation>Entrée ajoutée au carnet d&apos;adresse. Éditez le label selon votre souhait.</translation>
<translation>Entrée ajoutée au carnet d&apos;adresses. Éditez le label selon votre souhait.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1766"/>
<location filename="../bitmessageqt/__init__.py" line="2092"/>
<source>Error: You cannot add the same address to your address book twice. Try renaming the existing one if you want.</source>
<translation>Erreur : Vous ne pouvez pas ajouter une adresse déjà présente dans votre carnet d&apos;adresse. Essayez de renommer l&apos;adresse existante.</translation>
<translation>Erreur : Vous ne pouvez pas ajouter une adresse déjà présente dans votre carnet d&apos;adresses. Essayez de renommer l&apos;adresse existante.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1803"/>
<location filename="../bitmessageqt/__init__.py" line="2135"/>
<source>Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back.</source>
<translation>Messages déplacés dans la corbeille. Il n&apos;y a pas d&apos;interface utilisateur pour voir votre corbeille, mais ils sont toujours présents sur le disque si vous êtes désespérés pour les récupérer.</translation>
<translation>Messages déplacés dans la corbeille. Il n&apos;y a pas d&apos;interface utilisateur pour voir votre corbeille, mais ils sont toujours présents sur le disque si vous souhaitez les récupérer.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1879"/>
<location filename="../bitmessageqt/__init__.py" line="2229"/>
<source>No addresses selected.</source>
<translation>Aucune adresses sélectionnée.</translation>
<translation>Aucune adresse sélectionnée.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="2206"/>
<location filename="../bitmessageqt/__init__.py" line="2647"/>
<source>Options have been disabled because they either aren&apos;t applicable or because they haven&apos;t yet been implimented for your operating system.</source>
<translation>Certaines options ont é désactivées car elles n&apos;étaient pas applicables ou car elles n&apos;ont pas encore é implémentées pour votre système d&apos;exploitation.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="2304"/>
<location filename="../bitmessageqt/__init__.py" line="2765"/>
<source>The address should start with &apos;&apos;BM-&apos;&apos;</source>
<translation>L&apos;adresse devrait commencer avec &quot;BM-&quot;</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="2306"/>
<location filename="../bitmessageqt/__init__.py" line="2768"/>
<source>The address is not typed or copied correctly (the checksum failed).</source>
<translation>L&apos;adresse n&apos;est pas correcte (la somme de contrôle a échoué).</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="2308"/>
<location filename="../bitmessageqt/__init__.py" line="2771"/>
<source>The version number of this address is higher than this software can support. Please upgrade Bitmessage.</source>
<translation>Le numéro de version de cette adresse est supérieure à celle que ce programme peut supporter. Veuiller mettre Bitmessage à jour.</translation>
<translation>Le numéro de version de cette adresse est supérieur à celui que le programme peut supporter. Veuiller mettre Bitmessage à jour.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="2310"/>
<location filename="../bitmessageqt/__init__.py" line="2774"/>
<source>The address contains invalid characters.</source>
<translation>L&apos;adresse contient des caractères invalides.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="2312"/>
<location filename="../bitmessageqt/__init__.py" line="2777"/>
<source>Some data encoded in the address is too short.</source>
<translation>Certaines données encodées dans l&apos;adresse sont trop courtes.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="2314"/>
<location filename="../bitmessageqt/__init__.py" line="2780"/>
<source>Some data encoded in the address is too long.</source>
<translation>Certaines données encodées dans l&apos;adresse sont trop longues.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="2316"/>
<location filename="../bitmessageqt/__init__.py" line="2783"/>
<source>Address is valid.</source>
<translation>L&apos;adresse est invalide.</translation>
<translation>L&apos;adresse est valide.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="2340"/>
<location filename="../bitmessageqt/__init__.py" line="2815"/>
<source>You are using TCP port %1. (This can be changed in the settings).</source>
<translation>Vous utilisez le port TCP %1. (Ceci peut être changé dans les paramètres).</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1082"/>
<location filename="../bitmessageqt/__init__.py" line="1281"/>
<source>Error: Bitmessage addresses start with BM- Please check %1</source>
<translation>Erreur : Les adresses Bitmessage commencent avec BM- Merci de vérifier %1</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1086"/>
<location filename="../bitmessageqt/__init__.py" line="1287"/>
<source>Error: The address %1 contains invalid characters. Please check it.</source>
<translation>Erreur : L&apos;adresse %1 contient des caractères invalides. Veuillez la vérifier.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1084"/>
<location filename="../bitmessageqt/__init__.py" line="1284"/>
<source>Error: The address %1 is not typed or copied correctly. Please check it.</source>
<translation>Erreur : L&apos;adresse %1 n&apos;est pas correctement recopiée. Veuillez la vérifier.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1088"/>
<location filename="../bitmessageqt/__init__.py" line="1290"/>
<source>Error: The address version in %1 is too high. Either you need to upgrade your Bitmessage software or your acquaintance is being clever.</source>
<translation>Erreur : La version de l&apos;adresse %1 est trop grande. Pensez à mettre à jour Bitmessage.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1090"/>
<location filename="../bitmessageqt/__init__.py" line="1293"/>
<source>Error: Some data encoded in the address %1 is too short. There might be something wrong with the software of your acquaintance.</source>
<translation>Erreur : Certaines données encodées dans l&apos;adresse %1 sont trop courtes. Il peut y avoir un problème avec le logiciel ou votre connaissance. </translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1092"/>
<location filename="../bitmessageqt/__init__.py" line="1296"/>
<source>Error: Some data encoded in the address %1 is too long. There might be something wrong with the software of your acquaintance.</source>
<translation>Erreur : Certaines données encodées dans l&apos;adresse %1 sont trop longues. Il peut y avoir un problème avec le logiciel ou votre connaissance.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1094"/>
<location filename="../bitmessageqt/__init__.py" line="1299"/>
<source>Error: Something is wrong with the address %1.</source>
<translation>Erreur : Problème avec l&apos;adresse %1.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1149"/>
<location filename="../bitmessageqt/__init__.py" line="1367"/>
<source>Error: You must specify a From address. If you don&apos;t have one, go to the &apos;Your Identities&apos; tab.</source>
<translation>Erreur : Vous devez spécifier une adresse d&apos;expéditeur. Si vous n&apos;en avez pas, rendez-vous dans l&apos;onglet &apos;Vos identités&apos;.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1102"/>
<location filename="../bitmessageqt/__init__.py" line="1311"/>
<source>Sending to your address</source>
<translation>Envoi vers votre adresse</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1102"/>
<location filename="../bitmessageqt/__init__.py" line="1311"/>
<source>Error: One of the addresses to which you are sending a message, %1, is yours. Unfortunately the Bitmessage client cannot process its own messages. Please try running a second client on a different computer or within a VM.</source>
<translation>Erreur : Une des adresses vers lesquelles vous envoyez un message, %1, est vôtre. Malheureusement, Bitmessage ne peut pas traiter ses propres messages. Essayez de lancer un second client sur une machine différente.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1107"/>
<location filename="../bitmessageqt/__init__.py" line="1317"/>
<source>Address version number</source>
<translation>Numéro de version de l&apos;adresse</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1107"/>
<location filename="../bitmessageqt/__init__.py" line="1317"/>
<source>Concerning the address %1, Bitmessage cannot understand address version numbers of %2. Perhaps upgrade Bitmessage to the latest version.</source>
<translation>Concernant l&apos;adresse %1, Bitmessage ne peut pas comprendre les numéros de version de %2. Essayez de mettre à jour Bitmessage vers la dernière version.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1110"/>
<location filename="../bitmessageqt/__init__.py" line="1321"/>
<source>Stream number</source>
<translation>Numéro de flux</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1110"/>
<location filename="../bitmessageqt/__init__.py" line="1321"/>
<source>Concerning the address %1, Bitmessage cannot handle stream numbers of %2. Perhaps upgrade Bitmessage to the latest version.</source>
<translation>Concernant l&apos;adresse %1, Bitmessage ne peut pas supporter les nombres de flux de %2. Essayez de mettre à jour Bitmessage vers la dernière version.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1114"/>
<location filename="../bitmessageqt/__init__.py" line="1326"/>
<source>Warning: You are currently not connected. Bitmessage will do the work necessary to send the message but it won&apos;t send until you connect.</source>
<translation>Avertissement : Vous êtes actuellement déconnecté. Bitmessage fera le travail nécessaire pour envoyer le message mais il ne sera pas envoyé tant que vous ne vous connecterez pas.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1146"/>
<location filename="../bitmessageqt/__init__.py" line="1363"/>
<source>Your &apos;To&apos; field is empty.</source>
<translation>Votre champ &apos;Vers&apos; est vide.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1212"/>
<location filename="../bitmessageqt/__init__.py" line="1440"/>
<source>Right click one or more entries in your address book and select &apos;Send message to this address&apos;.</source>
<translation>Cliquez droit sur une ou plusieurs entrées dans votre carnet d&apos;adresses et sélectionnez &apos;Envoyer un message à ces adresses&apos;.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1415"/>
<location filename="../bitmessageqt/__init__.py" line="1679"/>
<source>Error: You cannot add the same address to your subsciptions twice. Perhaps rename the existing one if you want.</source>
<translation>Erreur : Vous ne pouvez pas ajouter une même adresse à vos abonnements deux fois. Essayez de renommer l&apos;adresse existante.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="969"/>
<location filename="../bitmessageqt/__init__.py" line="1147"/>
<source>Message trashed</source>
<translation>Message envoyé à la corbeille</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="69"/>
<source>One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer supported. May we delete it now?</source>
<translation>Une de vos adresses, %1, est une vieille adresse de la version 1. Les adresses de la version 1 ne sont plus supportées. Nous pourrions la supprimer maintenant ?</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="491"/>
<source>Unknown status: %1 %2</source>
<translation>Statut inconnu : %1 %2</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1069"/>
<source>Connection lost</source>
<translation>Connexion perdue</translation>
</message>
<message>
<location filename="../bitmessagemain.py" line="187"/>
<source>SOCKS5 Authentication problem: %1</source>
<translation>Problème d&apos;authentification SOCKS5 : %1</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="137"/>
<source>Reply</source>
<translation>Répondre</translation>
</message>
<message>
<location filename="../bitmessagemain.py" line="3909"/>
<source>Generating one new address</source>
<translation>Génération d&apos;une nouvelle adresse</translation>
</message>
<message>
<location filename="../bitmessagemain.py" line="3980"/>
<source>Done generating address. Doing work necessary to broadcast it...</source>
<translation>Génération de l&apos;adresse terminée. Travail pour la diffuser en cours...</translation>
</message>
<message>
<location filename="../bitmessagemain.py" line="4103"/>
<source>Done generating address</source>
<translation>Génération de l&apos;adresse terminée</translation>
</message>
<message>
<location filename="../bitmessagemain.py" line="3780"/>
<source>Message sent. Waiting on acknowledgement. Sent on %1</source>
<translation>Message envoyé. En attente de l&apos;accusé de réception. Envoyé le %1</translation>
</message>
<message>
<location filename="../bitmessagemain.py" line="3708"/>
<source>Error! Could not find sender address (your address) in the keys.dat file.</source>
<translation>Erreur ! L&apos;adresse de l&apos;expéditeur (vous) n&apos;a pas pu être trouvée dans le fichier keys.dat.</translation>
</message>
<message>
<location filename="../bitmessagemain.py" line="3416"/>
<source>Doing work necessary to send broadcast...</source>
<translation>Travail pour envoyer la diffusion en cours...</translation>
</message>
<message>
<location filename="../bitmessagemain.py" line="3432"/>
<source>Broadcast sent on %1</source>
<translation>Message de diffusion envoyé le %1</translation>
</message>
<message>
<location filename="../bitmessagemain.py" line="3552"/>
<source>Looking up the receiver&apos;s public key</source>
<translation>Recherche de la clé publique du destinataire</translation>
</message>
<message>
<location filename="../bitmessagemain.py" line="3615"/>
<source>Doing work necessary to send message. (There is no required difficulty for version 2 addresses like this.)</source>
<translation>Travail nécessaire pour envoyer le message en cours. (Il n&apos;y a pas de difficulté requise pour ces adresses de version 2.)</translation>
</message>
<message>
<location filename="../bitmessagemain.py" line="3628"/>
<source>Doing work necessary to send message.
Receiver&apos;s required difficulty: %1 and %2</source>
<translation>Travail nécessaire pour envoyer le message.
Difficulté requise par le destinataire : %1 et %2</translation>
</message>
<message>
<location filename="../bitmessagemain.py" line="3642"/>
<source>Problem: The work demanded by the recipient (%1 and %2) is more difficult than you are willing to do.</source>
<translation>Problème : Le travail demandé par le destinataire (%1 et %2) est plus difficile que ce que vous souhaitez faire.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1418"/>
<source>Work is queued.</source>
<translation>Travail en attente.</translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="1507"/>
<source>Work is queued. %1</source>
<translation>Travail en attente. %1</translation>
</message>
</context>
<context>
<name>MainWindows</name>
<message>
<location filename="../bitmessageqt/__init__.py" line="1597"/>
<source>Address is valid.</source>
<translation type="obsolete">L&apos;adresse est valide.</translation>
</message>
</context>
<context>
<name>NewAddressDialog</name>
<message>
<location filename="../newaddressdialog.py" line="164"/>
<location filename="../newaddressdialog.py" line="173"/>
<source>Create new Address</source>
<translation>Créer une nouvelle adresse</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="165"/>
<location filename="../newaddressdialog.py" line="174"/>
<source>Here you may generate as many addresses as you like. Indeed, creating and abandoning addresses is encouraged. You may generate addresses by using either random numbers or by using a passphrase. If you use a passphrase, the address is called a &quot;deterministic&quot; address.
The &apos;Random Number&apos; option is selected by default but deterministic addresses have several pros and cons:</source>
<translation>Vous pouvez générer autant d&apos;adresses que vous le souhaitez. En effet, nous vous encourageons à créer et à délaisser vos adresses. Vous pouvez générer des adresses en utilisant des nombres aléatoires ou en utilisant une phrase secrète. Si vous utilisez une phrase secrète, l&apos;adresse sera une adresse \&quot;déterministe\&quot;.\n&quot;
L&apos;option \&apos;Nombre Aléatoire\&apos; est sélectionnée par défaut mais les adresses déterministes ont certains avantages et inconvénients :</translation>
<translation>Vous pouvez générer autant d&apos;adresses que vous le souhaitez. En effet, nous vous encourageons à créer et à délaisser vos adresses. Vous pouvez générer des adresses en utilisant des nombres aléatoires ou en utilisant une phrase secrète. Si vous utilisez une phrase secrète, l&apos;adresse sera une adresse &quot;déterministe&quot;.
L&apos;option &apos;Nombre Aléatoire&apos; est sélectionnée par défaut mais les adresses déterministes ont certains avantages et inconvénients :</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="167"/>
<location filename="../newaddressdialog.py" line="176"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Pros:&lt;br/&gt;&lt;/span&gt;You can recreate your addresses on any computer from memory. &lt;br/&gt;You need-not worry about backing up your keys.dat file as long as you can remember your passphrase. &lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Cons:&lt;br/&gt;&lt;/span&gt;You must remember (or write down) your passphrase if you expect to be able to recreate your keys if they are lost. &lt;br/&gt;You must remember the address version number and the stream number along with your passphrase. &lt;br/&gt;If you choose a weak passphrase and someone on the Internet can brute-force it, they can read your messages and send messages as you.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Avantages :&lt;br/&gt;&lt;/span&gt;Vous pouvez recréer vos adresses sur n&apos;importe quel ordinateur. &lt;br/&gt;Vous n&apos;avez pas à vous inquiéter à propos de la sauvegarde de votre fichier keys.dat tant que vous vous rappelez de votre phrase secrète. &lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Inconvénients :&lt;br/&gt;&lt;/span&gt;Vous devez vous rappeler (ou noter) votre phrase secrète si vous souhaitez être capable de récréer vos clés si vous les perdez. &lt;br/&gt;Vous devez vous rappeler du numéro de version de l&apos;adresse et du numéro de flux en plus de votre phrase secrète. &lt;br/&gt;Si vous choisissez une phrase secrète faible et que quelqu&apos;un sur Internet parvient à la brute-forcer, il pourra lire vos messages et vous en envoyer.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="168"/>
<location filename="../newaddressdialog.py" line="177"/>
<source>Use a random number generator to make an address</source>
<translation>Utiliser un générateur de nombres aléatoires pour créer une adresse</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="169"/>
<source>Use a passpharase to make addresses</source>
<location filename="../newaddressdialog.py" line="178"/>
<source>Use a passphrase to make addresses</source>
<translation>Utiliser une phrase secrète pour créer une adresse</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="170"/>
<location filename="../newaddressdialog.py" line="179"/>
<source>Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter</source>
<translation>Créer une adresse plus courte d&apos;un ou deux caractères (nécessite plusieurs minutes de temps de calcul supplémentaires)</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="171"/>
<location filename="../newaddressdialog.py" line="180"/>
<source>Make deterministic addresses</source>
<translation>Créer une adresse déterministe</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="172"/>
<location filename="../newaddressdialog.py" line="181"/>
<source>Address version number: 3</source>
<translation>Numéro de version de l&apos;adresse : 3</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="173"/>
<location filename="../newaddressdialog.py" line="182"/>
<source>In addition to your passphrase, you must remember these numbers:</source>
<translation>En plus de votre phrase secrète, vous devez vous rappeler ces numéros :</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="174"/>
<location filename="../newaddressdialog.py" line="183"/>
<source>Passphrase</source>
<translation>Phrase secrète</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="175"/>
<location filename="../newaddressdialog.py" line="184"/>
<source>Number of addresses to make based on your passphrase:</source>
<translation>Nombre d&apos;adresses à créer sur base de votre phrase secrète :</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="176"/>
<location filename="../newaddressdialog.py" line="185"/>
<source>Stream number: 1</source>
<translation>Nombre de flux : 1</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="177"/>
<location filename="../newaddressdialog.py" line="186"/>
<source>Retype passphrase</source>
<translation>Retapez la phrase secrète</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="178"/>
<location filename="../newaddressdialog.py" line="187"/>
<source>Randomly generate address</source>
<translation>Générer une adresse de manière aléatoire</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="179"/>
<location filename="../newaddressdialog.py" line="188"/>
<source>Label (not shown to anyone except you)</source>
<translation>Label (seulement visible par vous)</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="180"/>
<location filename="../newaddressdialog.py" line="189"/>
<source>Use the most available stream</source>
<translation>Utiliser le flux le plus disponible</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="181"/>
<location filename="../newaddressdialog.py" line="190"/>
<source> (best if this is the first of many addresses you will create)</source>
<translation> (préférable si vous générez votre première adresse)</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="182"/>
<location filename="../newaddressdialog.py" line="191"/>
<source>Use the same stream as an existing address</source>
<translation>Utiliser le même flux qu&apos;une adresse existante</translation>
</message>
<message>
<location filename="../newaddressdialog.py" line="183"/>
<location filename="../newaddressdialog.py" line="192"/>
<source>(saves you some bandwidth and processing power)</source>
<translation>(économise de la bande passante et de la puissance de calcul)</translation>
</message>
@ -868,7 +967,7 @@ L&apos;option \&apos;Nombre Aléatoire\&apos; est sélectionnée par défaut mai
<source>About</source>
<translation>À propos</translation>
</message>
<message utf8="true">
<message encoding="UTF-8">
<location filename="../about.py" line="60"/>
<source>Copyright © 2013 Jonathan Warren</source>
<translation>Copyright © 2013 Jonathan Warren</translation>
@ -905,27 +1004,27 @@ L&apos;option \&apos;Nombre Aléatoire\&apos; est sélectionnée par défaut mai
<context>
<name>iconGlossaryDialog</name>
<message>
<location filename="../iconglossary.py" line="73"/>
<location filename="../iconglossary.py" line="82"/>
<source>Icon Glossary</source>
<translation>Glossaire des icônes</translation>
</message>
<message>
<location filename="../iconglossary.py" line="74"/>
<location filename="../iconglossary.py" line="83"/>
<source>You have no connections with other peers. </source>
<translation>Vous n&apos;avez aucune connexion avec d&apos;autres pairs.</translation>
</message>
<message>
<location filename="../iconglossary.py" line="75"/>
<source>You have made at least one connection to a peer using an outgoing connection but you have not yet received any incoming connections. Your firewall or home router probably isn&apos;t configured to foward incoming TCP connections to your computer. Bitmessage will work just fine but it would help the Bitmessage network if you allowed for incoming connections and will help you be a better-connected node.</source>
<location filename="../iconglossary.py" line="84"/>
<source>You have made at least one connection to a peer using an outgoing connection but you have not yet received any incoming connections. Your firewall or home router probably isn&apos;t configured to forward incoming TCP connections to your computer. Bitmessage will work just fine but it would help the Bitmessage network if you allowed for incoming connections and will help you be a better-connected node.</source>
<translation>Vous avez au moins une connexion sortante avec un pair mais vous n&apos;avez encore reçu aucune connexion entrante. Votre pare-feu ou routeur n&apos;est probablement pas configuré pour transmettre les connexions TCP vers votre ordinateur. Bitmessage fonctionnera correctement, mais le réseau Bitmessage se portera mieux si vous autorisez les connexions entrantes. Cela vous permettra d&apos;être un nœud mieux connecté.</translation>
</message>
<message>
<location filename="../iconglossary.py" line="76"/>
<location filename="../iconglossary.py" line="85"/>
<source>You are using TCP port ?. (This can be changed in the settings).</source>
<translation>Vous utilisez le port TCP ?. (Peut être changé dans les paramètres).</translation>
</message>
<message>
<location filename="../iconglossary.py" line="77"/>
<location filename="../iconglossary.py" line="86"/>
<source>You do have connections with other peers and your firewall is correctly configured.</source>
<translation>Vous avez des connexions avec d&apos;autres pairs et votre pare-feu est configuré correctement.</translation>
</message>
@ -980,12 +1079,12 @@ L&apos;option \&apos;Nombre Aléatoire\&apos; est sélectionnée par défaut mai
<message>
<location filename="../regenerateaddresses.py" line="113"/>
<source>You must check (or not check) this box just like you did (or didn&apos;t) when you made your addresses the first time.</source>
<translation>Vous devez cocher (ou décocher) cette case comme vous l&apos;avez fait (ou non) lors de la création de vos adresses la première fois.</translation>
<translation>Vous devez cocher (ou décocher) cette case comme vous l&apos;aviez fait (ou non) lors de la création de vos adresses la première fois.</translation>
</message>
<message>
<location filename="../regenerateaddresses.py" line="114"/>
<source>If you have previously made deterministic addresses but lost them due to an accident (like hard drive failure), you can regenerate them here. If you used the random number generator to make your addresses then this form will be of no use to you.</source>
<translation>Si vous aviez généré des adresses déterministes mais les avez perdus à cause d&apos;un accident, vous pouvez les regénérer ici. Si vous aviez utilisé le générateur de nombres aléatoires pour créer vos adresses, ce formulaire ne vous sera d&apos;aucune utilité.</translation>
<translation>Si vous aviez généré des adresses déterministes mais les avez perdues à cause d&apos;un accident, vous pouvez les regénérer ici. Si vous aviez utilisé le générateur de nombres aléatoires pour créer vos adresses, ce formulaire ne vous sera d&apos;aucune utilité.</translation>
</message>
</context>
<context>
@ -1098,7 +1197,7 @@ L&apos;option \&apos;Nombre Aléatoire\&apos; est sélectionnée par défaut mai
<message>
<location filename="../settings.py" line="262"/>
<source>When someone sends you a message, their computer must first complete some work. The difficulty of this work, by default, is 1. You may raise this default for new addresses you create by changing the values here. Any new addresses you create will require senders to meet the higher difficulty. There is one exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically notify them when you next send a message that they need only complete the minimum amount of work: difficulty 1. </source>
<translation>Lorsque quelqu&apos;un vous envoie un message, son ordinateur doit d&apos;abord effectuer un travail. La difficulté de ce travail, par défaut, est de 1. Vous pouvez augmenter cette valeur pour les adresses que vous créez en changeant la valeur ici. Chaque nouvelle adresse que vous créez requerra à l&apos;envoyeur de faire face à une difficulté supérieure. Il existe une exception : si vous ajoutez un ami ou une connaissance à votre carnet d&apos;adresse, Bitmessage les notifiera automatiquement lors du prochain message que vous leur envoyez qu&apos;ils ne doivent compléter que la charge de travail minimale : difficulté 1. </translation>
<translation>Lorsque quelqu&apos;un vous envoie un message, son ordinateur doit d&apos;abord effectuer un travail. La difficulté de ce travail, par défaut, est de 1. Vous pouvez augmenter cette valeur pour les adresses que vous créez en changeant la valeur ici. Chaque nouvelle adresse que vous créez requerra à l&apos;envoyeur de faire face à une difficulté supérieure. Il existe une exception : si vous ajoutez un ami ou une connaissance à votre carnet d&apos;adresses, Bitmessage les notifiera automatiquement lors du prochain message que vous leur envoyez qu&apos;ils ne doivent compléter que la charge de travail minimale : difficulté 1. </translation>
</message>
<message>
<location filename="../settings.py" line="263"/>