Analyze your network traffic
Project description
Network Analyzer
Installation
Clone the repository and go to its root folder and run:
sudo pip install -e .
Run Server
Using PM2
To run JSON-RPC server over HTTP as well as Websocket:
pm2 start pm2.json
Using shell script
To run JSON-RPC server over http on port 5000:
sh scripts/serve_rpc.sh
To run RPC server over web socket (socket.io) on port 5050:
sh scripts/serve_socket.sh
Client
Python (2.7)
- Install JSON-RPC client
tinyrpc
by running:
sudo pip install tinyrpc
- Sample Python 2.7 client code to access JSON-RPC API
from tinyrpc.protocols.jsonrpc import JSONRPCProtocol
from tinyrpc.transports.http import HttpPostClientTransport
from tinyrpc import RPCClient
rpc_client = RPCClient(
JSONRPCProtocol(),
HttpPostClientTransport('http://localhost:5000/v1/jsonrpc')
)
rpc_server = rpc_client.get_proxy()
print "pinging..."
pong = rpc_server.ping()
print "ping response: " + pong
resp = rpc_server.hello("John")
print "hello world response: " + resp
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
network-analyzer-0.0.1.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for network_analyzer-0.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a0fbed310f2b1d394c5894dacaa1f06333b4d3ca50d23a97ac241da93dae021 |
|
MD5 | db86e67139f77336b25566e3cb6e18d1 |
|
BLAKE2b-256 | 738c1c6990dcb7f47b18f7fca1a91c4e6bccb204a7da029972086a2e195f94f2 |