Giter Club home page Giter Club logo

cryptikchaos's People

Contributors

vaizguy avatar

Stargazers

 avatar

Watchers

 avatar  avatar

cryptikchaos's Issues

test server doesn't load peer file.

Test server unable to load previously added peer files. This issue is further masked by the run_test_env.sh script as
db is emptied before running test, if

rm -rf ../db/*

is removed after adding the test server then the 2nd time the test env is run it leads to capsule unauthenticated at the test server side.

Peer key retrieval for token generation fails if peer re-enters swarm.

If a peer leaves and re-enters the swarm then stream token generation fails because peer store information is lost on peer exit and unavailable for token generation.

Ways to proceed could be:

  1. Delete peer and then change client protocol from protocol.ReconnectingClientFactory to protocol.Factory
  2. Save peer state information so it can be retrieved for stream token challenge.

add_peer_to_swarm/addpeer command functionality is currently not working.

The addpeer command is currently in test phase, testserver is used to test this command by adding the testserver manually,

here port is fixed to 8888 (testserver port)

    def add_peer_to_swarm(self, pid, host):
        "Adds a new user through auth request chain"

        # Check if peer is present
        if self.get_peer(pid):
            self._print(self.peerid, "Peer already in list.")
            return False

        # Start a connection with peer
        conn = self.start_connection(pid, host, 8888)

        # Save the connection
        self.add_peer_connection(pid, conn)

        Logger.debug("Sending auth.")

        # Pack data into capsule
        stream = self.pack_capsule(
            "AUTH",
            str(self.peerid),
            host,
            self.host)

        print dir(conn)
        # Send message using send data API
        return self._write_into_connection(conn, stream)

The following will have too be commented in peermanager.py in order to test this
command. Also make sure you delete the db peer database.

        ## Add test server
        self.add_peer(pid=constants.LOCAL_TEST_PEER_ID, 
                      key=constants.LOCAL_TEST_SERVER_KEY,
                      host=constants.LOCAL_TEST_HOST,
                      port=constants.LOCAL_TEST_PORT
                      )

syntax: addpeer 888 localhost
Connection is started on command entry but testserver does not acknowledge capsule stream.

The connection is started successfully and connection is registered on both ends but data written onto transport is not received by the test server, somehow the _sendLine is not working for the abruptly started connection.

    def _sendLine(self, conn, line):
        "Implementing sendLine method locally."

        return conn.transport.write(line + '\r\n')

The first phase of this test was to see if data is received on the other side. This does not seem to be working as expected.

broke kivy visual elements.

Scroll view Y-Axis scroll broken on introduction of consolewin module.

        # Scroll view label
        scroll_view = ScrollView()
        # Y-axis scroll # TODO not working
        scroll_view.do_scroll_y = True
        # Add label to scroll view
        scroll_view.add_widget(self.label)

Unshuffling stream content before HMAC challenge always results in HMAC mismatch.

The content of the stream needs to be unshuffled only after HMAC check is performed otherwise it will lead to HMAC mismatch as the original HMAC was generated using the shuffled string and not the original.

This was not caught earlier as the stream HMAC was not used for validating integrity of content. This change has sice made this bug visible but only when constants.ENABLE_SHUFFLE=True.

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.