Skip to content

Instantly share code, notes, and snippets.

@evilkost
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evilkost/8d5592edcaf2fd15eedc to your computer and use it in GitHub Desktop.
Save evilkost/8d5592edcaf2fd15eedc to your computer and use it in GitHub Desktop.

Usage

default port: 5617

protocol: TCP binary ((

connect with local port [1..1024]

Encoding

first two cells:

($arg, $user)

perl format: "nn"

python format: "!HH"

$arg==0, $user>0 ==> new protocol

next cell :: offset 4 $narg (also perl "n") - ?number of arguments

next cells :: offset 6 @argl (also perl "n" * $narg) -? length of argumens array with lengths of arguments in argv

next cell :: offset 6 + sum(2*x for x in @argl) @argv perl format: for each i-th argument "a"*argl[i]

@cmd ping

@cmd pubkey: 1 argument -> user?

@cmd keygen:

@cmd "privsign"

$arg=0, $user=0 -- ping, old protocol return: ?nothing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment