fun __nameRefused(title,mess)= nameRefused title mess ; _closechannel ; 0 ;; /* Modified BLG - Using and adapting DirReg entries */ /* Some original functions, like __nameRefused were */ /* kept */ /* New defcoms */ defcom CgetKeys=getKeys;; defcom Ccard=card S S S S S S S S S I I S;; defcom CaddBitmap=addBitmap S I;; /* Entry point for Script */ fun letsGo() = _fooS "LETS GO"; 0;; /* Classic cli/srv connections */ fun _connected() = _fooS ">>> CONNECTED"; _on _channel CgetKeys []; 0;; fun _closed() = _closechannel;; /* Functions needed to run following Defcom callbacks */ fun BigSizebis(n,b,i)= if (BigCmp b n) >0 then i else BigSizebis n BigAdd b b i+1;; fun BigSize(n)= BigSizebis n BigFromAsc "1" 0;; fun CRPcryptone(l,p,g,y,k,i1)= if l==nil then nil else let l->[m nxt] in (BigToStringn (BigExpn g k p) i1):: (BigToStringn (BigMuln (BigExpn y k p) m p) i1)::CRPcryptone nxt p g y k i1;; fun CRPfindK(p)= let BigFromAsc "1" -> un in let BigMod BigRand p -> k in if (BigCmp BigPgcd BigSub p un k un)==0 then k else CRPfindK p;; fun CRPcrypt(s,pub)= let pub->[p g y] in let ((BigSize p)-1)>>3 -> nbyte in let CRPfindK p -> k in strcatn CRPcryptone (BigListFromString s nbyte) p g y k nbyte+1;; fun crypt(s,k)= if s==nil then nil else let hd strextr k->[p [g [y _]]] in CRPcrypt s [BigFromString p BigFromString g BigFromString y];; /* Defcom callbacks */ fun __getBitmap(x)= let _getpack _checkpack bitmapS -> bmp in if bmp==nil then nil else let strlen bmp -> len in let 0->i in while i bitmap in _on _channel Ccard [authorS DMSname emailS (crypt passS k) bitmap messageS _hostIP "scol://www.blgprod.com:CryonicsBLG" "" 65536 (sizelist DMSclients) "FR"];;