work on adding peers, updated readme

master
Kevin Froman 2018-01-12 03:06:24 -06:00
parent 0c6d1ed790
commit 084b2425e9
No known key found for this signature in database
GPG Key ID: 0D414D0FE405B63B
3 changed files with 17 additions and 2 deletions

4
api.py
View File

@ -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:

View File

@ -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()

View File

@ -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.