[jump to content][No Software Patents]Tools (new) : ptybuffer [ Home | Scylla+Charybdis old home | Tools (old) | Tools (new) | FAQ | Downloads ]

Moving to GitHub, slowly

The software on this pages will slowly be moved to GitHub https://github.com/hilbix/. The CVS repository will be migrated to GIT as well, so the history will be preserved, a bit. See FAQ.

Scylla and Charybdis, ptybuffer - Tools

The tools are developed under Linux with ESR's paradigm release early, release often in mind.
So you can consider this beta software, or alpha, or pre-alpha, or even worse ;)

Have a look in the download directory for all downloads.
As always here, all you get is the source. No binaries here.

ptybuffer 0.6.4-20071020-171424

daemonize interactive tty line driven programs with output history


⇒ ⇒ ⇒ The development shifted to another location. All future versions will be published at https://github.com/hilbix/ptybuffer   ⇐ ⇐ ⇐


ptybuffer was designed to get rid of screen/expect constructs to improve stability. It deamonizes programs which need a tty/pty to operate. Unix domain sockets then can connect, send lines to the program and receive the output (with history) of the program in real time.

It's (again) in the alpha phase. NWNadm has been removed and will show up as an idependent package.

Example how to fork off a web based emergency shell with ptybuffer (this is a extreme security risk if you don't protect it!):
mkdir -p $HOME/public_html/shell/
cp -rp php/. $HOME/public_html/shell/
$HOME/public_html/startshell.sh
Start your browser with http://127.0.0.1/~$USER/shell/
If you don't understand this, don't even try it. It's too dangerous!

Note: You can use ptybufferconnect to connect to the ptybuffer socket, but you can also use a tool like socat.

Implementation note: ptybuffer is not able to send lines longer than BUFSIZ to the terminal. This is not true if option -i is used.

History:

version 0.6.4-20071020-171424

download (227232 bytes) sig

CygWin compile fixes.

It shall now compile under CygWin again.

version 0.6.3-20070921-135245

download (219758 bytes)

Minor resource leakage fixed. Scripts placed under the CLL.

With option -c ptybuffer previously kept one socket fd open which was not needed.

For more information about the CLL see http://permalink.de/tino/cll

version 0.6.2-20070918-224216

download (217271 bytes)

Important bugfix and minor change in bin/autostart.sh for better logging control

I found a serious bug in my sock_select function in case of foced poll operation. It is unknown if ptybuffer was affected, however I think some unreliablilities might be present in former version.

However there was (as always) many changes on other places in my lib, so I am not sure (yet) if this version is more stable than before.

version 0.6.1-20070830-002352

download (213598 bytes)

Usage corrected

Before the usage was distorted (several typos).

version 0.6.0-20070829-235605

download (213690 bytes)

64 bit bugfix, option -i and -k, ptybufferconnect now sends to stdout

After some searching I found where the presentation bug hid. Also the last bugfix disabled option -t (which did not work correctly before I think). This version here shall fix all that now. With option -i and -k this can be considered a 0.6.0. However ptybufferconnect is not yet as complete as I would like to see it.

Also ptybufferconnect now writes data to stdout (before it was stdin, oops).

version 0.5.12-20070829-223019

(213352 bytes archive)

Longstanding BUG fixed:

When a ptybuffer runs so long that more than 2 billion read operations were done, output to the socket would starve and ptybuffer will eat up 100% CPU when a socket is connected. This is due to an 32 bit to 64 bit signed overrun. I am not completely sure if this really happens, but there is the possibility.

YOU SHOULD NOT USE OLDER VERSIONS OF PTYBUFFER! However, I do not know if this version here is as stable as the old ones. So I did not renmove the downloads.

Note that there still might be a bug left if ptybuffer runs over 2^63 read operations from the started program. As this is unlikely to happen (at 1 billion reads per second this needs 272 years) ever, I better tell it here ;)

Also ptybufferconnect now, by default, sends a LF, as ptybuffer currently ignores incomplete lines (which is a bug. Incomplete lines shall be sent to the program when a socket disconnects, to be able to just send a CTRL-C or similar without an LF). If you want no LF, use the option -i (which corresponds to the option -i of ptybuffer which not yet is present).

version 0.5.11-20070825-123201

(212258 bytes archive)

Ptybufferconnect a little bit more usable, new options plus minor update release. Added the php/ subdirectory for web based shell demo.

The tool ptybufferconnect now starts to do something reasonable. It is far from beeing read yet, though. Interactive mode is still missing.

This version uses the latest internal changes in my library, so it is - again - somewhat experimental. Use 0.5.10 if you have trouble, this version is considered stable.

Option -p was added for timestamping in the output logfile (-o). Also option -q was added so that ptybuffer now by default prints some info.

version 0.5.10-20070601-135749

download (197102 bytes)

Bufix and minor improvement release.

DO NOT USE VERSION 0.5.9! Use 0.5.8 or 0.5.10 instead.

I moved SIGPIPE out of main and just ignored it in the part which goes away for daemonizing. Apparently SIGPIPE must be ignored in the resident part, too, as it sometimes shows up. Dunno why. Also dunno why the program just goes away (SIG_DFL?). Now SIGPIPE shall no more make trouble.

A second bug was, when it came to logging. The argument '-' (log/out to stderr/out) was no more correctly processed for logfiles. Also another change now is, that logging by default is turned off completely, so you must enable it and use '-' if you want the old (intermediate, I think it wasn't there from the beginning) behavior.

The minor improvement is, that ptybuffer now hands out the number of skipped bytes at the beginning, to ease script development to re-attach to ptybuffer. Still not perfect though, there shall be some better way to negotiate content positions.

Also some minor changes to reflect the new library routine names.

This version is released even more early to fix the bug, so it's nearly untested.

version 0.5.9-20070429-233215

(191920 bytes archive)

Minor changes

version 0.5.8-20070419-192416

download (191364 bytes)

Minor changes

version 0.5.7-20070407-133320

download (176671 bytes)

Better cron support for script/autostart.sh

version 0.5.6-20070331-231941

download (173740 bytes)

Bugfix for script/autostart.sh

version 0.5.5-20070326-200028

download (173678 bytes)

Bugfix release for CygWin

version 0.5.4-20070326-014053

download (173582 bytes)

Bugfix release (do not use 0.5.3!)

logfile and outfile are now working again. script/autostart.sh now shall work as expected, too.

version 0.5.3-20070304-035306

(170667 bytes archive)

logfile and outfile are now using realpath, so you no more need to give absolute paths on daemonizing.

Also logging made more clear and an example cron script script/autostart.sh added.

Current version of tinolib has Ubuntu 64 bit fixes and some minor changes.

[view more history][view complete history]

License and Disclaimer

All you can see here is free software according to the GNU GPL.
Copyright (C)2000-2011 by Valentin Hilbig
Note that the software comes with absolutely no warranty of any kind.
You use the software at your own risk.
Valentin Hilbig cannot be hold responsible for any unintended damage,
lost data or malfunction of the software you can find here.

[FSFE contributor 2007]

[end of page - jump back to content][hacker culture]
Last modified: 2011-09-12 by Valentin Hilbig [ Imprint / Impressum ]