Compare commits

...

6 Commits

13 changed files with 96 additions and 31 deletions

View File

@ -22,13 +22,13 @@ The following exploits are of particular interest:
* Cryptography/protocol issues
* Denying nodes access to the network by segmenting them out with Sybil nodes
We do not consider non-network based same-machine attacks to be very significant, but we are still willing to listen.
We do not consider OS user-level side channel attacks on a shared machine to be very significant, but we are still willing to listen.
# Rewards
Onionr is a student-owned hobby project, resources are not available for large rewards.
Onionr is a hobbyist project, resources are not available for monetary rewards.
Stickers or other small rewards are available. We reserve the right to refuse rewards for any reason.
Shirts/stickers or other small rewards are available. We reserve the right to refuse rewards for any reason.
Public recognition can be given upon request.
@ -36,4 +36,4 @@ Public recognition can be given upon request.
Email: beardog [ at ] mailbox.org
PGP (optional): F61A 4DBB 0B3D F172 1F65 0EDF 0D41 4D0F E405 B63B
Keybase: beardog

View File

@ -4,10 +4,12 @@ Setup config from onboarding choices
"""
from pathlib import Path
from typing import Union
from threading import Thread
from time import sleep
from filepaths import onboarding_mark_file
from onionrtypes import JSONSerializable
from onionrtypes import OnboardingConfig
import config
"""
This program is free software: you can redistribute it and/or modify
@ -69,11 +71,3 @@ def set_config_from_onboarding(config_settings: OnboardingConfig):
config.set('onboarding.done', True, savefile=True)
def set_onboarding_finished():
"""Create the onboarding completed setting file"""
Path(onboarding_mark_file).touch()
def is_onboarding_finished() -> bool:
return True

View File

@ -24,6 +24,15 @@ from coredb import keydb
friends = Blueprint('friends', __name__)
@friends.route('/friends/listall')
def list_all():
pubkey_list = {}
friend_list = contactmanager.ContactManager.list_friends(0)
for friend in friend_list:
pubkey_list[friend.publicKey] = {'name': friend.get_info('name')}
return json.dumps(pubkey_list)
@friends.route('/friends/list')
def list_friends():
pubkey_list = {}

View File

@ -16,18 +16,18 @@ import onionrcrypto
from onionrcrypto import getourkeypair
from etc.onionrvalues import DATABASE_LOCK_TIMEOUT
"""
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
@ -252,8 +252,8 @@ class OnionrUser:
return True
@classmethod
def list_friends(cls):
def list_friends(cls, trust_level=1):
friendList = []
for x in keydb.listkeys.list_peers(trust=1):
for x in keydb.listkeys.list_peers(trust=trust_level):
friendList.append(cls(x))
return list(friendList)

View File

@ -1,5 +1,5 @@
{
"name" : "pms",
"version" : "0.1.2",
"version" : "0.1.3",
"author" : "onionr"
}

View File

@ -31,7 +31,7 @@ import notifier
locale.setlocale(locale.LC_ALL, '')
plugin_name = 'pms'
PLUGIN_VERSION = '0.1.2'
PLUGIN_VERSION = '0.1.3'
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
import sentboxdb, mailapi, loadinbox # import after path insert

View File

@ -240,7 +240,7 @@
<div id="sendMessage">
<div class="container">
<div class="field">
<label><i class="fas fa-user"></i> Select friend: <select id="friendSelect"></select></label>
<label><i class="fas fa-user"></i> Select contact: <select id="friendSelect"></select></label>
</div>
<form method="post" action="" id="sendForm" enctype="application/x-www-form-urlencoded">
<div class="field">

View File

@ -415,7 +415,7 @@ for (var i = 0; i < document.getElementsByClassName('refresh').length; i++){
document.getElementsByClassName('refresh')[i].style.float = 'right'
}
fetch('/friends/list', {
fetch('/friends/listall', {
headers: {
"token": webpass
}})

View File

@ -0,0 +1,5 @@
{
"name" : "usernames",
"version" : "0.0.1",
"author" : "onionr"
}

View File

@ -0,0 +1,53 @@
"""
Onionr - Private P2P Communication.
Preset Onionr usernames
"""
import locale
locale.setlocale(locale.LC_ALL, '')
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
import logger
from onionrusers import contactmanager
from utils import identifyhome
import config
"""
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
plugin_name = 'usernames'
PLUGIN_VERSION = '0.0.1'
def on_init(api, data = None):
config.reload()
if config.get('onboarding.done', True):
return
username_file = identifyhome.identify_home() + 'plugins/usernames/usernames.dat'
with open(username_file, 'r') as usernames:
username_and_keys = usernames.readlines()
logger.info("Setting preset usernames", terminal=True)
for entry in username_and_keys:
username, key = entry.split(',')
username = username.strip()
if not username:
continue
key = key.strip()
user = contactmanager.ContactManager(key, saveUser=True)
user.set_info('name', username)

View File

@ -0,0 +1,3 @@
Kevin Froman,GM3E4VCUNLF5F7Y64STD2HEURG45U3NYPLBZBT3Z6YWOALJHZPPQ
Supernova,OXDRJS7YC7GQCQX7AAAJWN7LFI34AB2BE4VBYGEEUWGB3TSDB5FQ
Cartr,DWQ4CGQGUAVBTXZKFABS63W6KK4JSXK6HTEOXDATOADJNBE4C62A

View File

@ -230,7 +230,7 @@
<nav class="level">
<div class="level-left">
<div class="level-item">
<i class="icon fas fa-microchip" for="optimize"></i> <input type="checkbox" name="optimize"> <label for="optimize">Optimize CPU</label>
<i class="icon fas fa-microchip" for="optimize"></i> <input type="checkbox" name="optimize" checked> <label for="optimize">Optimize CPU</label>
</div>
</div>
</nav>

View File

@ -52,10 +52,11 @@ document.getElementById('onboardingForm').onsubmit = function(e){
submitInfo.networkContrib = getCheckValue('networkContribution')
submitInfo.plainContrib = getCheckValue('networkContributionPlain')
submitInfo.donate = getCheckValue('donate')
//submitInfo.deterministic = getCheckValue('useDeterministic')
submitInfo.mail = getCheckValue('useMail')
submitInfo.circles = getCheckValue('useCircles')
submitInfo.useDark = getCheckValue('useDarkTheme')
submitInfo.optimize = getCheckValue('optimize')
if (submitInfo.donate){
openDonateModal(submitInfo)