diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f5a31c5d..ea21aeef 100755 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ This file serves to provide guidelines on how to successfully contribute to Onio ## Code of Conduct -See our [Code of Conduct](https://github.com/beardog108/onionr/blob/master/CODE_OF_CONDUCT.md) +Contributors in project-related spaces/contexts are expected to follow the [Code of Conduct](https://github.com/beardog108/onionr/blob/master/CODE_OF_CONDUCT.md) ## Reporting Bugs @@ -23,11 +23,13 @@ Please provide the following information when reporting a bug: If a bug is a security issue, please contact us privately. -And most importantly, please be patient. Onionr is an open source project done by volunteers. +And most importantly, please be patient. Onionr is a free open source project maintained by volunteers in their free time. ## Asking Questions -If you need help with Onionr, you can contact the devs (be polite and remember this is a volunteer-driven non-profit project). +If you need help with Onionr, you can contact the devs (be polite and remember this is a volunteer-driven project). + +Do your best to use good english. ## Contributing Code diff --git a/onionr/api.py b/onionr/api.py index f85501dd..50bc83b5 100755 --- a/onionr/api.py +++ b/onionr/api.py @@ -184,7 +184,8 @@ class API: # Be extremely mindful of this. These are endpoints available without a password self.whitelistEndpoints = ('site', 'www', 'onionrhome', 'homedata', 'board', 'profiles', 'profilesindex', - 'boardContent', 'sharedContent', 'mail', 'mailindex', 'friends', 'friendsindex') + 'boardContent', 'sharedContent', 'mail', 'mailindex', 'friends', 'friendsindex', + 'clandestine', 'clandestineIndex') self.clientToken = config.get('client.webpassword') self.timeBypassToken = base64.b16encode(os.urandom(32)).decode() @@ -239,6 +240,13 @@ class API: @app.route('/mail/', endpoint='mailindex') def loadMailIndex(): return send_from_directory('static-data/www/mail/', 'index.html') + + @app.route('/clandestine/', endpoint='clandestine') + def loadClandestine(path): + return send_from_directory('static-data/www/clandestine/', path) + @app.route('/clandestine/', endpoint='clandestineIndex') + def loadClandestineIndex(): + return send_from_directory('static-data/www/clandestine/', 'index.html') @app.route('/friends/', endpoint='friends') def loadContacts(path): diff --git a/onionr/etc/pgpwords.py b/onionr/etc/pgpwords.py index d9738f3f..8e4ddb8e 100755 --- a/onionr/etc/pgpwords.py +++ b/onionr/etc/pgpwords.py @@ -3,6 +3,14 @@ '''This file is adapted from https://github.com/thblt/pgp-words by github user 'thblt' ('Thibault Polge), GPL v3 license''' +''' +Changes made for Onionr: +Minor changes such as slight word adjustment, line breaks + +CLI commands/usage function removed +hexify function added +''' + import os, re, sys, binascii _words = [ diff --git a/onionr/static-data/default-plugins/clandestine/controlapi.py b/onionr/static-data/default-plugins/clandestine/controlapi.py index f203c0af..773e9c36 100644 --- a/onionr/static-data/default-plugins/clandestine/controlapi.py +++ b/onionr/static-data/default-plugins/clandestine/controlapi.py @@ -18,7 +18,7 @@ along with this program. If not, see . ''' import json -from flask import Response, request, redirect, Blueprint, g +from flask import Response, request, redirect, Blueprint, send_from_directory import core core_inst = core.Core() diff --git a/onionr/static-data/www/clandestine/index.html b/onionr/static-data/www/clandestine/index.html new file mode 100644 index 00000000..2badec8d --- /dev/null +++ b/onionr/static-data/www/clandestine/index.html @@ -0,0 +1,22 @@ + + + + + + Clandestine + + + + + + +
+ + Clandestine + +
    +
    + + + + \ No newline at end of file diff --git a/onionr/static-data/www/clandestine/js/main.js b/onionr/static-data/www/clandestine/js/main.js new file mode 100644 index 00000000..0e7071a0 --- /dev/null +++ b/onionr/static-data/www/clandestine/js/main.js @@ -0,0 +1,26 @@ +friendList = [] +convoListElement = document.getElementsByClassName('conversationList')[0] + +function createConvoList(){ + for (var x = 0; x < friendList.length; x++){ + var convoEntry = document.createElement('div') + convoEntry.classList.add('convoEntry') + convoEntry.setAttribute('data-pubkey', friendList[x]) + convoEntry.innerText = friendList[x] + convoListElement.append(convoEntry) + } +} + +fetch('/friends/list', { + headers: { + "token": webpass + }}) +.then((resp) => resp.json()) // Transform the data into json +.then(function(resp) { + var keys = [] + for(var k in resp) keys.push(k) + for (var i = 0; i < keys.length; i++){ + friendList.push(keys[i]) + } + createConvoList() +}) \ No newline at end of file diff --git a/onionr/static-data/www/private/index.html b/onionr/static-data/www/private/index.html index 7b1aa1e5..0d27d2a5 100644 --- a/onionr/static-data/www/private/index.html +++ b/onionr/static-data/www/private/index.html @@ -26,7 +26,8 @@

    Onionr Services


    -

    Mail - Friend Manager - Boards +

    Mail - Friend Manager - Boards - + Clandestine


    Edit Configuration