Remove unused print statement
BIN
src/alice.png
Normal file
After Width: | Height: | Size: 669 B |
|
@ -5,6 +5,7 @@ import queues
|
||||||
from semaphores import kivyuisignaler
|
from semaphores import kivyuisignaler
|
||||||
from helper_sql import SqlBulkExecute, sqlExecute, sqlQuery, sqlStoredProcedure
|
from helper_sql import SqlBulkExecute, sqlExecute, sqlQuery, sqlStoredProcedure
|
||||||
|
|
||||||
|
|
||||||
class UIkivySignaler(Thread):
|
class UIkivySignaler(Thread):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
@ -12,7 +13,6 @@ class UIkivySignaler(Thread):
|
||||||
while state.shutdown == 0:
|
while state.shutdown == 0:
|
||||||
try:
|
try:
|
||||||
command, data = queues.UISignalQueue.get()
|
command, data = queues.UISignalQueue.get()
|
||||||
print("ssssssseeeeeeeeeeeeeeeeeeeeeeeeeewuhatsacomment.................", command)
|
|
||||||
if command == 'writeNewAddressToTable':
|
if command == 'writeNewAddressToTable':
|
||||||
label, address, streamNumber = data
|
label, address, streamNumber = data
|
||||||
state.kivyapp.variable_1.append(address)
|
state.kivyapp.variable_1.append(address)
|
||||||
|
@ -20,4 +20,4 @@ class UIkivySignaler(Thread):
|
||||||
state.kivyapp.obj_1.refreshs()
|
state.kivyapp.obj_1.refreshs()
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|
BIN
src/bob.png
Normal file
After Width: | Height: | Size: 640 B |
|
@ -50,7 +50,6 @@ class singleWorker(StoppableThread):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(singleWorker, self).__init__(name="singleWorker")
|
super(singleWorker, self).__init__(name="singleWorker")
|
||||||
proofofwork.init()
|
proofofwork.init()
|
||||||
print("I am in single worker 52.....................................................")
|
|
||||||
|
|
||||||
def stopThread(self):
|
def stopThread(self):
|
||||||
"""Signal through the queue that the thread should be stopped"""
|
"""Signal through the queue that the thread should be stopped"""
|
||||||
|
|
BIN
src/dave.png
Normal file
After Width: | Height: | Size: 650 B |
|
@ -32,7 +32,6 @@ import helper_startup
|
||||||
import state
|
import state
|
||||||
|
|
||||||
helper_startup.loadConfig()
|
helper_startup.loadConfig()
|
||||||
print("333333333333333333333333333333333333333333333333333333333333333333333333333333333")
|
|
||||||
# Now can be overriden from a config file, which uses standard python
|
# Now can be overriden from a config file, which uses standard python
|
||||||
# logging.config.fileConfig interface
|
# logging.config.fileConfig interface
|
||||||
# examples are here:
|
# examples are here:
|
||||||
|
|
|
@ -231,7 +231,6 @@ def check_sqlite():
|
||||||
|
|
||||||
|
|
||||||
def check_openssl():
|
def check_openssl():
|
||||||
print(state.kivy, "state.kivystate.kivystate.kivystate.kivystate.kivystate.kivystate.kivystate.kivy")
|
|
||||||
"""Do openssl dependency check.
|
"""Do openssl dependency check.
|
||||||
|
|
||||||
Here we are checking for openssl with its all dependent libraries
|
Here we are checking for openssl with its all dependent libraries
|
||||||
|
@ -250,7 +249,6 @@ def check_openssl():
|
||||||
import os.path
|
import os.path
|
||||||
paths.insert(0, os.path.join(sys._MEIPASS, 'libeay32.dll'))
|
paths.insert(0, os.path.join(sys._MEIPASS, 'libeay32.dll'))
|
||||||
elif state.kivy:
|
elif state.kivy:
|
||||||
print("kivykivykivykivykivykivykivy...........................")
|
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
paths = ['libcrypto.so', 'libcrypto.so.1.0.0']
|
paths = ['libcrypto.so', 'libcrypto.so.1.0.0']
|
||||||
|
@ -283,7 +281,6 @@ def check_openssl():
|
||||||
logger.info('Checking OpenSSL at %s', path)
|
logger.info('Checking OpenSSL at %s', path)
|
||||||
try:
|
try:
|
||||||
library = ctypes.CDLL(path)
|
library = ctypes.CDLL(path)
|
||||||
print("I am loading here in depends file................................................................")
|
|
||||||
except OSError:
|
except OSError:
|
||||||
continue
|
continue
|
||||||
logger.info('OpenSSL Name: %s', library._name)
|
logger.info('OpenSSL Name: %s', library._name)
|
||||||
|
|
BIN
src/eve.png
Normal file
After Width: | Height: | Size: 651 B |
|
@ -44,7 +44,6 @@ def _loadTrustedPeer():
|
||||||
def loadConfig():
|
def loadConfig():
|
||||||
"""Load the config"""
|
"""Load the config"""
|
||||||
config = BMConfigParser()
|
config = BMConfigParser()
|
||||||
print("I am coming in loadConfig now................................................................")
|
|
||||||
|
|
||||||
if state.appdata:
|
if state.appdata:
|
||||||
config.read(state.appdata + 'keys.dat')
|
config.read(state.appdata + 'keys.dat')
|
||||||
|
|
BIN
src/image.svg
Normal file
After Width: | Height: | Size: 704 B |
BIN
src/images/black_cross.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
src/images/left_arrow.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
src/images/red.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
src/images/search_mail.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
src/images/text_images/!.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
src/images/text_images/0.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
src/images/text_images/1.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
src/images/text_images/2.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
src/images/text_images/3.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
src/images/text_images/4.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
src/images/text_images/5.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
src/images/text_images/6.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
src/images/text_images/7.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
src/images/text_images/8.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
src/images/text_images/9.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
src/images/transparent.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
src/images/white.png
Normal file
After Width: | Height: | Size: 80 KiB |
|
@ -19,9 +19,7 @@ class BMNetworkThread(StoppableThread):
|
||||||
def run(self):
|
def run(self):
|
||||||
try:
|
try:
|
||||||
while not self._stopped and state.shutdown == 0:
|
while not self._stopped and state.shutdown == 0:
|
||||||
print("I am running in run method which calls a loop for BMConnectionPool line19..................................")
|
|
||||||
BMConnectionPool().loop()
|
BMConnectionPool().loop()
|
||||||
print("I am running in run method which calls a loop for BMConnectionPool line 21..................................")
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
excQueue.put((self.name, e))
|
excQueue.put((self.name, e))
|
||||||
raise
|
raise
|
||||||
|
|
|
@ -24,7 +24,6 @@ def lookupExeFolder():
|
||||||
|
|
||||||
def lookupAppdataFolder():
|
def lookupAppdataFolder():
|
||||||
|
|
||||||
print("HIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII", platform)
|
|
||||||
import traceback
|
import traceback
|
||||||
print(traceback.print_tb)
|
print(traceback.print_tb)
|
||||||
APPNAME = "PyBitmessage"
|
APPNAME = "PyBitmessage"
|
||||||
|
@ -45,7 +44,6 @@ def lookupAppdataFolder():
|
||||||
elif platform == 'android':
|
elif platform == 'android':
|
||||||
# dataFolder = path.join(os.path.dirname(os.path.abspath("__file__")), "PyBitmessage") + '/'
|
# dataFolder = path.join(os.path.dirname(os.path.abspath("__file__")), "PyBitmessage") + '/'
|
||||||
dataFolder = path.join('/sdcard/', 'DCIM/', APPNAME) + '/'
|
dataFolder = path.join('/sdcard/', 'DCIM/', APPNAME) + '/'
|
||||||
print("YOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", dataFolder)
|
|
||||||
|
|
||||||
elif 'win32' in sys.platform or 'win64' in sys.platform:
|
elif 'win32' in sys.platform or 'win64' in sys.platform:
|
||||||
dataFolder = path.join(environ['APPDATA'].decode(sys.getfilesystemencoding(), 'ignore'), APPNAME) + path.sep
|
dataFolder = path.join(environ['APPDATA'].decode(sys.getfilesystemencoding(), 'ignore'), APPNAME) + path.sep
|
||||||
|
|
|
@ -230,7 +230,6 @@ def buildCPoW():
|
||||||
call(["make", "-C", os.path.join(paths.codePath(), "bitmsghash"), '-f', 'Makefile.bsd'])
|
call(["make", "-C", os.path.join(paths.codePath(), "bitmsghash"), '-f', 'Makefile.bsd'])
|
||||||
else:
|
else:
|
||||||
# GNU make
|
# GNU make
|
||||||
print("I am in buildCPoW hurray.......................................", os.path.join(paths.codePath(), "bitmsghash"))
|
|
||||||
call(["make", "-C", os.path.join(paths.codePath(), "bitmsghash")])
|
call(["make", "-C", os.path.join(paths.codePath(), "bitmsghash")])
|
||||||
if os.path.exists(os.path.join(paths.codePath(), "bitmsghash", "bitmsghash.so")):
|
if os.path.exists(os.path.join(paths.codePath(), "bitmsghash", "bitmsghash.so")):
|
||||||
init()
|
init()
|
||||||
|
@ -322,12 +321,10 @@ def init():
|
||||||
logger.error("C PoW test fail.", exc_info=True)
|
logger.error("C PoW test fail.", exc_info=True)
|
||||||
bso = None
|
bso = None
|
||||||
elif platform == "android":
|
elif platform == "android":
|
||||||
print(sys.platform)
|
|
||||||
try:
|
try:
|
||||||
bso = ctypes.CDLL('libbitmsghash.so')
|
bso = ctypes.CDLL('libbitmsghash.so')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
bso = None
|
bso = None
|
||||||
print(e)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -72,9 +72,7 @@ class _OpenSSL:
|
||||||
"""
|
"""
|
||||||
Build the wrapper
|
Build the wrapper
|
||||||
"""
|
"""
|
||||||
print("I am on openssl ctypes loading...............................................")
|
|
||||||
self._lib = ctypes.CDLL(library)
|
self._lib = ctypes.CDLL(library)
|
||||||
print(library, "library12library12library12library12library12library12library12")
|
|
||||||
self._version, self._hexversion, self._cflags = get_version(self._lib)
|
self._version, self._hexversion, self._cflags = get_version(self._lib)
|
||||||
self._libreSSL = self._version.startswith("LibreSSL")
|
self._libreSSL = self._version.startswith("LibreSSL")
|
||||||
|
|
||||||
|
@ -687,7 +685,6 @@ def loadOpenSSL():
|
||||||
libdir.append(find_library('libeay32'))
|
libdir.append(find_library('libeay32'))
|
||||||
for library in libdir:
|
for library in libdir:
|
||||||
try:
|
try:
|
||||||
print(library, "librarylibrarylibrarylibrarylibrarylibrarylibrarylibrarylibrarylibrarylibrary")
|
|
||||||
OpenSSL = _OpenSSL(library)
|
OpenSSL = _OpenSSL(library)
|
||||||
return
|
return
|
||||||
except:
|
except:
|
||||||
|
|
|
@ -116,30 +116,22 @@ def decodeWalletImportFormat(WIFstring):
|
||||||
|
|
||||||
def reloadMyAddressHashes():
|
def reloadMyAddressHashes():
|
||||||
logger.debug('reloading keys from keys.dat file')
|
logger.debug('reloading keys from keys.dat file')
|
||||||
print("SHARED 146 begins.....................................................................")
|
|
||||||
|
|
||||||
myECCryptorObjects.clear()
|
myECCryptorObjects.clear()
|
||||||
myAddressesByHash.clear()
|
myAddressesByHash.clear()
|
||||||
myAddressesByTag.clear()
|
myAddressesByTag.clear()
|
||||||
# myPrivateKeys.clear()
|
# myPrivateKeys.clear()
|
||||||
print("SHARED 152 begins.....................................................................")
|
|
||||||
|
|
||||||
keyfileSecure = checkSensitiveFilePermissions(state.appdata + 'keys.dat')
|
keyfileSecure = checkSensitiveFilePermissions(state.appdata + 'keys.dat')
|
||||||
hasEnabledKeys = False
|
hasEnabledKeys = False
|
||||||
print("SHARED 156 begins.....................................................................")
|
|
||||||
print(BMConfigParser().addresses())
|
|
||||||
for addressInKeysFile in BMConfigParser().addresses():
|
for addressInKeysFile in BMConfigParser().addresses():
|
||||||
print("SHARED 158 begins.....................................................................")
|
|
||||||
isEnabled = BMConfigParser().getboolean(addressInKeysFile, 'enabled')
|
isEnabled = BMConfigParser().getboolean(addressInKeysFile, 'enabled')
|
||||||
print("SHARED 160 begins.....................................................................")
|
|
||||||
if isEnabled:
|
if isEnabled:
|
||||||
print("SHARED 161 begins.....................................................................")
|
|
||||||
hasEnabledKeys = True
|
hasEnabledKeys = True
|
||||||
# status
|
# status
|
||||||
_, addressVersionNumber, streamNumber, hash = \
|
_, addressVersionNumber, streamNumber, hash = \
|
||||||
decodeAddress(addressInKeysFile)
|
decodeAddress(addressInKeysFile)
|
||||||
if addressVersionNumber in (2, 3, 4):
|
if addressVersionNumber in (2, 3, 4):
|
||||||
print("SHARED 166 begins.....................................................................")
|
|
||||||
# Returns a simple 32 bytes of information encoded
|
# Returns a simple 32 bytes of information encoded
|
||||||
# in 64 Hex characters, or null if there was an error.
|
# in 64 Hex characters, or null if there was an error.
|
||||||
privEncryptionKey = hexlify(decodeWalletImportFormat(
|
privEncryptionKey = hexlify(decodeWalletImportFormat(
|
||||||
|
@ -158,17 +150,14 @@ def reloadMyAddressHashes():
|
||||||
myAddressesByTag[tag] = addressInKeysFile
|
myAddressesByTag[tag] = addressInKeysFile
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("SHARED 185 begins.....................................................................")
|
|
||||||
logger.error(
|
logger.error(
|
||||||
'Error in reloadMyAddressHashes: Can\'t handle'
|
'Error in reloadMyAddressHashes: Can\'t handle'
|
||||||
' address versions other than 2, 3, or 4.\n'
|
' address versions other than 2, 3, or 4.\n'
|
||||||
)
|
)
|
||||||
print("SHARED 187 begins.....................................................................")
|
|
||||||
|
|
||||||
if not platform == "android":
|
if not platform == "android":
|
||||||
if not keyfileSecure:
|
if not keyfileSecure:
|
||||||
fixSensitiveFilePermissions(state.appdata + 'keys.dat', hasEnabledKeys)
|
fixSensitiveFilePermissions(state.appdata + 'keys.dat', hasEnabledKeys)
|
||||||
print("SHARED 196 begins.....................................................................")
|
|
||||||
|
|
||||||
|
|
||||||
def reloadBroadcastSendersForWhichImWatching():
|
def reloadBroadcastSendersForWhichImWatching():
|
||||||
|
|
32
src/suravata.py
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# Import the libraries.
|
||||||
|
import pdb;pdb.set_trace()
|
||||||
|
import pydenticon100000000000000000000000
|
||||||
|
import hashlib
|
||||||
|
# Set-up some test data.
|
||||||
|
users = ["alice", "bob", "eve", "dave"]
|
||||||
|
# Set-up a list of foreground colours (taken from Sigil).
|
||||||
|
foreground = ["rgb(45,79,255)",
|
||||||
|
"rgb(254,180,44)",
|
||||||
|
"rgb(226,121,234)",
|
||||||
|
"rgb(30,179,253)",
|
||||||
|
"rgb(232,77,65)",
|
||||||
|
"rgb(49,203,115)",
|
||||||
|
"rgb(141,69,170)"]
|
||||||
|
# Set-up a background colour (taken from Sigil).
|
||||||
|
background = "rgb(224,224,224)"
|
||||||
|
# Set-up the padding (top, bottom, left, right) in pixels.
|
||||||
|
padding = (20, 20, 20, 20)
|
||||||
|
# Instantiate a generator that will create 5x5 block identicons using SHA1
|
||||||
|
# digest.
|
||||||
|
generator = pydenticon.Generator(5, 5, digest=hashlib.sha1, foreground=foreground, background=background)
|
||||||
|
|
||||||
|
# identicon_ascii = generator.generate("john.doe@example.com", 200, 200,
|
||||||
|
# output_format="ascii")
|
||||||
|
|
||||||
|
# print identicon_ascii
|
||||||
|
for user in users:
|
||||||
|
identicon = generator.generate(user, 200, 200, padding=padding, output_format="png")
|
||||||
|
filename = user + ".png"
|
||||||
|
with open(filename, "wb") as f:
|
||||||
|
f.write(identicon)
|