Package: r0c
r0ctelnet serverretr0chat, irc-like chat service for superthin clients(on PyPI)MIT-Licensed, 2018-01-07, ed @ irc.rizon.netwindows telnet 360 noscope<- good videoseeinstallationor grab the latest release:r0c.pysummaryimagine being stuck on ancient gear, in the middle of nowhere, on a slow connection between machines that are even more archaic than the toaster you're trying to keep from falling apartretr0chat is the lightweight, no-dependencies, runs-anywhere solution for when life gives you lemonstries to be irssizero dependencies on python 2.6, 2.7, 3.xsupports telnet, netcat, /dev/tcp, TLS clientsmodem-aware; comfortable at 1200 bpsfallbacks for inhumane conditionslinemodeno vt100 / ansi escape codesendorsementsthe german federal office for information securitydoes not approvefeaturesirc-like:public channels with persistent history (pgup/pgdn)private messages (/msg acidburn hey)nick completion withTab ↹notifications (bell/visual) on hilights and PMscommand subset (/nick,/join,/part,/names,/topic,/me)inline message coloring, see/helptechnical:client behavior detection (echo, colors, charset, newline)message input with readline-like editing (arrow-left/right, home/end, backspace)history of sent messages (arrow-up/down)bandwidth-conservative (push/pop lines instead of full redraws; scroll-regions)fast enough; 600 clients @ 750 msgs/sec, or 1'000 cli @ 350 msg/swindows clientsuseputtyin telnet modeorthe powershell clientor enableTelnet Clientin control panel->programs->programs and features->turn windows features on or off, then press WIN+R and runtelnet r0c.intputty is the best option;the powershell client is OK and no longer spammy as of windows 10.0.15063 (win10 1703 / LTSC)windows-telnet has a bug (since win7) wherenon-ascii letters occasionally render but usually dontthis is due to a buffer overflow intelnet.exe, so r0c will apply a rate-limit to avoid itlooks like messages larger than 512 bytes end up messing with the unicode glyphs area? or somethinglinux clientsmost to least recommendedclientexampletelnettelnet r0c.intsocatsocat -,raw,echo=0 tcp:r0c.int:531bashmostly internalsnetcatnc r0c.int 531you can evenexec 147<>/dev/tcp/r0c.int/531;cat<&147&while IFS= read -rn1 x;do [ -z "$x" ]&&x=$'\n';printf %s "$x">&147;done(disconnect usingexec 147<&-; killall cat #sorry)tls clientsif you enable TLS with-tpt 2424(telnet) and/or-tpn 1515(netcat) you can connect to r0c with TLS encryption using any of the following:telnet-ssl -zssl -zsecure -zcacert=r0c.crt r0c.int 2424socat -,raw,echo=0 openssl:r0c.int:1515,cafile=cert.crtsocat -,raw,echo=0 openssl:127.0.0.1:1515,verify=0stty -icanon; ncat --ssl --ssl-trustfile r0c.crt -v r0c.int 1515stty -icanon; openssl s_client -CAfile ~/.r0c/cert.crt -nbio -connect r0c.int:1515windows:powershell clientwith port+1515(the+enables TLS)powershell does not verify certificate; the other clients dothe powershell client and bash client comes bundled with the server; seeprotipsconnecting from a web browseroh you betcha! see thewebtty readmeinstallationjust runr0c.pyand that's it (usually)or install through pypi (python3 only):python3 -m pip install --user -U r0cyou can run it as a service so it autostarts on boot:on most linux distros:systemd service(automatically does port-forwarding)on alpine / gentoo:openrc serviceon windows:nssmprobablyfirewall rulesskip this section if:you are using the systemd serviceor you are running as root and do not have a firewallor you're on windowsif you're using firewalld, and just want to open up the high ports (not 23 and 531) then this is probably enough:firewall-cmd--permanent--add-port={23,531,2323,1531,2424,1515,8023}/tcp
firewall-cmd--reloadbut having to specify the port when connecting is lame so consider the folllowing --telnet uses port 23 by default, so on the server you'll want to port-forward23to2323(and531to1531for plaintext):iptables-AINPUT-ptcp--dport23-mstate--stateNEW-jACCEPT
iptables-AINPUT-ptcp--dport531-mstate--stateNEW-jACCEPT
iptables-AINPUT-ptcp--dport2323-mstate--stateNEW-jACCEPT
iptables-AINPUT-ptcp--dport1531-mstate--stateNEW-jACCEPT
iptables-AINPUT-ptcp--dport2424-mstate--stateNEW-jACCEPT# tls telnetiptables-AINPUT-ptcp--dport1515-mstate--stateNEW-jACCEPT# tls netcatiptables-AINPUT-ptcp--dport8023-mstate--stateNEW-jACCEPT# http/ttydiptables-tnat-APREROUTING-ieth0-ptcp--dport23-jREDIRECT--to-port2323iptables-tnat-APREROUTING-ieth0-ptcp--dport531-jREDIRECT--to-port1531(you'll have to do this on every reboot)documentationnot really but there is alist of commandsand alist of hotkeys, and alsoUI demystifiedprotipstry the following commands and hotkeys after connecting:/cyenables colored nicknames/b3(max cowbell) beeps on every message/vorctrl-nhides names and makes wordwrap more obvious; good for viewing a wall of text that somebody pastedother surpriseswhen runningr0c.pyit will extract a few bundled clients for your convenience (powershell and bash); look for the[SFX] sfxdir: /tmp/pe-r0c.1000message during startup, they'll be in aclientssubfolder over thereif you installed r0c throughpipinstead then the clients will be somewhere crazy likeC:\Users\ed\AppData\Roaming\Python\share\doc\r0c\clients\powershell.ps1or/home/ed/.local/share/doc/r0c/clients/powershell.ps1, good luck!