Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

24
LINES

< > BotCompany Repo | #1003176 // remotePriv - send privileged command to remote public comm bot

JavaX fragment (include)

1  
static S remotePriv_masterKey;
2  
3  
static S remotePriv(S text, O... data) {
4  
  if (remotePriv_masterKey == null)
5  
    remotePriv_masterKey = loadSnippet("#1001582");
6  
7  
  text = format(text, data);
8  
  S signed = signWithComputerID(text);
9  
  print(signed);
10  
  print("OK? " + isSignedWithKey(signed, remotePriv_masterKey));
11  
    
12  
  DialogIO io = talkTo("second.tinybrain.de", 4999);
13  
  try {
14  
    S greeting = io.readLine();
15  
    S line = format3("signed: *", signed);
16  
    print (">> " + line);
17  
    io.sendLine(line);
18  
    S answer = io.readLine();
19  
    print ("<< " + answer);
20  
    ret answer;
21  
  } finally {
22  
    io.close();
23  
  }
24  
}

Author comment

Began life as a copy of #1001589

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003176
Snippet name: remotePriv - send privileged command to remote public comm bot
Eternal ID of this version: #1003176/1
Text MD5: 00b4dfb44e9cde0db3f2e8dbde994d51
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-05-21 03:57:55
Source code size: 634 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 545 / 509
Referenced in: [show references]