work on peer blacklisting/profiling\nupdated readme
parent
a4c86630cf
commit
9f4024104a
|
@ -52,7 +52,9 @@ class OnionrBlackList:
|
||||||
def generateDB(self):
|
def generateDB(self):
|
||||||
self._dbExecute('''CREATE TABLE blacklist(
|
self._dbExecute('''CREATE TABLE blacklist(
|
||||||
hash text primary key not null,
|
hash text primary key not null,
|
||||||
type text
|
dataType text,
|
||||||
|
blacklistDate int,
|
||||||
|
expire int
|
||||||
);
|
);
|
||||||
''')
|
''')
|
||||||
return
|
return
|
||||||
|
@ -67,11 +69,20 @@ class OnionrBlackList:
|
||||||
myList.append(i[0])
|
myList.append(i[0])
|
||||||
return myList
|
return myList
|
||||||
|
|
||||||
def addToDB(self, data):
|
def addToDB(self, data, dataType=0, expire=0):
|
||||||
'''Add to the blacklist. Intended to be block hash, block data, peers, or transport addresses'''
|
'''Add to the blacklist. Intended to be block hash, block data, peers, or transport addresses'''
|
||||||
# we hash the data so we can remove data entirely from our node's disk
|
# we hash the data so we can remove data entirely from our node's disk
|
||||||
hashed = self._core._utils.bytesToStr(self._core._crypto.sha3Hash(data))
|
hashed = self._core._utils.bytesToStr(self._core._crypto.sha3Hash(data))
|
||||||
if not hashed.isalnum():
|
if not hashed.isalnum():
|
||||||
raise Exception("Hashed data is not alpha numeric")
|
raise Exception("Hashed data is not alpha numeric")
|
||||||
|
try:
|
||||||
|
int(dataType)
|
||||||
|
except ValueError:
|
||||||
|
raise Exception("dataType is not int")
|
||||||
|
try:
|
||||||
|
int(expire)
|
||||||
|
except ValueError:
|
||||||
|
raise Exception("expire is not int")
|
||||||
|
#TODO check for length sanity
|
||||||
insert = (hashed,)
|
insert = (hashed,)
|
||||||
self._dbExecute("insert into blacklist (hash) VALUES('%s');" % (hashed,))
|
self._dbExecute("insert into blacklist (hash, dataType, expire) VALUES('%s', %s, %s);" % (hashed, dataType, expire))
|
||||||
|
|
|
@ -126,7 +126,8 @@ class OnionrUtils:
|
||||||
retVal = False
|
retVal = False
|
||||||
if newAdderList != False:
|
if newAdderList != False:
|
||||||
for adder in newAdderList.split(','):
|
for adder in newAdderList.split(','):
|
||||||
if not adder in self._core.listAdders(randomOrder = False) and adder.strip() != self.getMyAddress():
|
adder = adder.strip()
|
||||||
|
if not adder in self._core.listAdders(randomOrder = False) and adder != self.getMyAddress() and not self._core._blacklist.inBlacklist(adder):
|
||||||
if self._core.addAddress(adder):
|
if self._core.addAddress(adder):
|
||||||
logger.info('Added %s to db.' % adder, timestamp = True)
|
logger.info('Added %s to db.' % adder, timestamp = True)
|
||||||
retVal = True
|
retVal = True
|
||||||
|
|
32
readme.md
32
readme.md
|
@ -5,29 +5,39 @@
|
||||||
|
|
||||||
Anonymous P2P platform, using Tor & I2P.
|
Anonymous P2P platform, using Tor & I2P.
|
||||||
|
|
||||||
Major work in progress.
|
***Experimental, not safe or easy to use yet***
|
||||||
|
|
||||||
***THIS SOFTWARE IS NOT USABLE OR SECURE YET.***
|
<hr>
|
||||||
|
|
||||||
**The main repo for this software is at https://gitlab.com/beardog/Onionr/**
|
**The main repo for this software is at https://gitlab.com/beardog/Onionr/**
|
||||||
|
|
||||||
**Roadmap/features:**
|
|
||||||
|
# Summary
|
||||||
|
|
||||||
|
Onionr is a decentralized, peer-to-peer data storage network, designed to be anonymous and resistant to (meta)data analysis and spam.
|
||||||
|
|
||||||
|
Onionr can be used for mail, as a social network, instant messenger, file sharing software, or for encrypted group discussion.
|
||||||
|
|
||||||
|
# Roadmap/features
|
||||||
|
|
||||||
Check the [Gitlab Project](https://gitlab.com/beardog/Onionr/milestones/1) to see progress towards the alpha release.
|
Check the [Gitlab Project](https://gitlab.com/beardog/Onionr/milestones/1) to see progress towards the alpha release.
|
||||||
|
|
||||||
|
## Core internal features
|
||||||
|
|
||||||
* [X] Fully p2p/decentralized, no trackers or other single points of failure
|
* [X] Fully p2p/decentralized, no trackers or other single points of failure
|
||||||
* [X] High level of anonymity
|
* [X] End to end encryption of user data
|
||||||
* [ ] End to end encryption where applicable
|
|
||||||
* [X] Optional non-encrypted blocks, useful for blog posts or public file sharing
|
* [X] Optional non-encrypted blocks, useful for blog posts or public file sharing
|
||||||
* [ ] Easy API system for integration to websites
|
* [X] Easy API system for integration to websites
|
||||||
|
* [ ] Metadata analysis resistance (being improved)
|
||||||
|
|
||||||
# Development
|
|
||||||
|
|
||||||
This software is in heavy development. If for some reason you want to get involved, get in touch first.
|
## Other features
|
||||||
|
|
||||||
**Onionr API and functionality is subject to non-backwards compatible change during development**
|
**Onionr API and functionality is subject to non-backwards compatible change during pre-alpha development**
|
||||||
|
|
||||||
# Donate
|
## Help out
|
||||||
|
|
||||||
|
Everyone is welcome to help out. Please get in touch first if you are making non-trivial changes. If you can't help with programming, you can write documentation or guides.
|
||||||
|
|
||||||
Bitcoin/Bitcoin Cash: 1onion55FXzm6h8KQw3zFw2igpHcV7LPq
|
Bitcoin/Bitcoin Cash: 1onion55FXzm6h8KQw3zFw2igpHcV7LPq
|
||||||
|
|
||||||
|
@ -36,5 +46,3 @@ Bitcoin/Bitcoin Cash: 1onion55FXzm6h8KQw3zFw2igpHcV7LPq
|
||||||
The Tor Project, I2P developers, and anyone else do not own, create, or endorse this project, and are not otherwise involved.
|
The Tor Project, I2P developers, and anyone else do not own, create, or endorse this project, and are not otherwise involved.
|
||||||
|
|
||||||
The badges (besides travis-ci build) are by Maik Ellerbrock is licensed under a Creative Commons Attribution 4.0 International License.
|
The badges (besides travis-ci build) are by Maik Ellerbrock is licensed under a Creative Commons Attribution 4.0 International License.
|
||||||
|
|
||||||
The onion in the Onionr logo is adapted from [this](https://commons.wikimedia.org/wiki/File:Red_Onion_on_White.JPG) image by Colin on Wikimedia under a Creative Commons Attribution-Share Alike 3.0 Unported license. The Onionr logo is under the same license.
|
|
||||||
|
|
Loading…
Reference in New Issue