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

21
LINES

< > BotCompany Repo | #1001146 // Tel bot (list running bots on console, allow to connect to one)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (1138L/8K/27K).

!747

m {
  p {
    if (l(args) != 0 && isInteger(args[0]))
      telnetFromConsoleTo("localhost", parseInt(args[0]));
    else {
      while (true) {
        print();
        for (ProgramScan.Program p : quickBotScan())
          print("Port " + p.port + " - " + p.helloString);
        print("Enter a port number to connect.");
        S s = readLine();
        if (match("bye", s) || match("", s)) break;
        int port = parseInt(s);
        telnetFromConsoleTo("localhost", port);
      }
      print("bye!");
    }
  }
}

Author comment

Began life as a copy of #1001140

download  show line numbers  debug dex  old transpilations   

Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, dhtvkmknsjym, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001146
Snippet name: Tel bot (list running bots on console, allow to connect to one)
Eternal ID of this version: #1001146/1
Text MD5: 6edc32ff0d13b7c406fe74cc022bf405
Transpilation MD5: 3dcc2a53c8fb63a507ee16c19de14b28
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-12-11 01:14:59
Source code size: 548 bytes / 21 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 539 / 1084
Referenced in: [show references]