From 084b2425e903d16b64624105657f72bdc5286be4 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Fri, 12 Jan 2018 03:06:24 -0600 Subject: [PATCH] work on adding peers, updated readme --- api.py | 4 +++- communicator.py | 10 ++++++++++ readme.md | 5 ++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/api.py b/api.py index aef14784..fa2b2fa3 100755 --- a/api.py +++ b/api.py @@ -42,6 +42,7 @@ class API: bindPort = int(self.config['CLIENT']['PORT']) self.bindPort = bindPort self.clientToken = self.config['CLIENT']['CLIENT HMAC'] + print(self.clientToken) if not debug: hostNums = [random.randint(1, 255), random.randint(1, 255), random.randint(1, 255)] @@ -99,6 +100,7 @@ class API: requestingPeer = request.args.get('myID') if action == 'firstConnect': + pass @app.errorhandler(404) @@ -130,7 +132,7 @@ class API: if not request.host.endswith('onion') and not request.hosst.endswith('i2p'): abort(403) # Validate x-requested-with, to protect against CSRF/metadata leaks - if self._developmentMode: + if not self._developmentMode: try: request.headers['x-requested-with'] except: diff --git a/communicator.py b/communicator.py index 69f330b3..398ff4cb 100755 --- a/communicator.py +++ b/communicator.py @@ -19,5 +19,15 @@ import core class OnionrCommunicate: def __init__(self): return + def getKey(self, peerID): + '''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 + ''' + url = 'http://' + peerID + '/public/?action=getPGP' + r = requests.get(url, headers=headers) + response = r.text + return response + + OnionrCommunicate() \ No newline at end of file diff --git a/readme.md b/readme.md index 29ff9e85..49f904e2 100644 --- a/readme.md +++ b/readme.md @@ -2,8 +2,11 @@ P2P microblogging platform and social network, using Tor & I2P. -Major work in progress. *NOT USABLE OR SAFE YET* +Major work in progress. + +***THIS SOFTWARE IS NOT USABLE OR SAFE YET.*** # Development +This software is in heavy development. If for some reason you want to get involved, get in touch first.