Code Monkey home page Code Monkey logo

python-p2p's People

Contributors

gianistsol avatar henryruss3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

python-p2p's Issues

Cryptographic API Misuse Vulnerability: Do not use Inadequate key length

Description:

I have identified a security vulnerability in the python-p2p v 1.7.1 project by our cryptographic api misuse detection tool.The issue pertains to the use of a default RSA key length of 1024 bits, which is considered insecure due to advances in computing power and cryptographic weaknesses associated with shorter key lengths.

References:

CWE-326: Inadequate Encryption Strength
NIST SP 800-131A r2

Location:

https://github.com/GianisTsol/python-p2p/blob/master/pythonp2p/crypto_funcs.py#L10

Recommendations:

I recommend the following actions to mitigate the vulnerability:
Upgrade the RSA key length to a more secure option, such as 2048 bits.

Port Forwarding bug - Value Error in __main__.py

Discovering routers... Traceback (most recent call last): File "C:\Users\benin\OneDrive\Documenti\GitHub\python-p2p\pythonp2p\__main__.py", line 4, in <module> new = Node("", PORT, FILE_PORT) # start the node File "C:\Users\benin\OneDrive\Documenti\GitHub\python-p2p\pythonp2p\node.py", line 152, in __init__ portforwardlib.forwardPort(port, port, None, None, False, "TCP", 0, "", True) File "C:\Users\benin\OneDrive\Documenti\GitHub\python-p2p\pythonp2p\portforwardlib.py", line 240, in forwardPort status, message = open_port( File "C:\Users\benin\OneDrive\Documenti\GitHub\python-p2p\pythonp2p\portforwardlib.py", line 177, in open_port conn = http.client.HTTPConnection(parsedurl.hostname, parsedurl.port) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\urllib\parse.py", line 178, in port raise ValueError(message) from None ValueError: Port could not be cast to integer value as '57970None'

unable to connect

Here's my server:

>>> from pythonp2p import Node
>>> class Mynode(Node):
...   def on_message(message, sender, private):
...     print('MESSAGE:', message)
...
>>>
>>> node = Mynode()
Discovering routers...
Discovering routers...
[debug] Initialisation of the Node on port: 65432
>>> node.start()
Pinger Started
>>> File Server Started

Here's my client:

>>> from pythonp2p import Node
>>> node = Node()
Discovering routers...
Discovering routers...
[debug] Initialisation of the Node on port: 65432
>>> node.connect_to('97.117.28.178')
[debug] connecting to 97.117.28.178 port 65432
[debug] connect_to: Could not connect with node. ([WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond)
>>>

the ip address I'm using is the ip address I get from doing a "what's my ip" search on the server machine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.