communicator/daemon now working with http server
parent
084b2425e9
commit
1006be971b
|
@ -14,12 +14,16 @@
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
'''
|
'''
|
||||||
import sqlite3, requests, hmac, hashlib
|
import sqlite3, requests, hmac, hashlib, time
|
||||||
import core
|
import core
|
||||||
class OnionrCommunicate:
|
class OnionrCommunicate:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
self._core = core.Core()
|
||||||
|
while True:
|
||||||
|
print('Onionr daemon running')
|
||||||
|
time.sleep(2)
|
||||||
return
|
return
|
||||||
def getKey(self, peerID):
|
def getRemotePeerKey(self, peerID):
|
||||||
'''This function contacts a peer and gets their main PGP key.
|
'''This function contacts a peer and gets their main PGP key.
|
||||||
This is safe because Tor or I2P is used, but it does not insure that the person is who they say they are
|
This is safe because Tor or I2P is used, but it does not insure that the person is who they say they are
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
'''
|
'''
|
||||||
import sys, os, threading, configparser, base64, random, getpass, shutil
|
import sys, os, configparser, base64, random, getpass, shutil, subprocess
|
||||||
import gui, api, colors, core
|
import gui, api, colors, core
|
||||||
from onionrutils import OnionrUtils
|
from onionrutils import OnionrUtils
|
||||||
from colors import Colors
|
from colors import Colors
|
||||||
|
@ -93,7 +93,8 @@ class Onionr:
|
||||||
shutil.rmtree('data/')
|
shutil.rmtree('data/')
|
||||||
return
|
return
|
||||||
def daemon(self):
|
def daemon(self):
|
||||||
os.system('./communicator.py')
|
if not os.environ.get("WERKZEUG_RUN_MAIN") == "true":
|
||||||
|
subprocess.Popen(["./communicator.py"])
|
||||||
print('Started communicator')
|
print('Started communicator')
|
||||||
api.API(self.config, self.debug)
|
api.API(self.config, self.debug)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue