[rohrpost] "walser.php" --> "walser.pl" Patch
Luther Blissett
cantsin@neoism.net
Wed, 26 Jun 2002 15:56:04 +0200
Mit dem beigefügten Patch kann walser.php in ein Perl-Skript walser.pl
(derzeit allerdings noch ohne "makewalser"-Code) konvertiert werden.
Dazu sind folgende Arbeitsschritte nötig:
1. Diese E-Mail in eine ASCII-Datei "walser.patch" sichern.
2. "walser.php.txt" von textz.com herunterladen.
3. Auf der Kommandozeile (unter Unix, GNU/Linux, BSD, bzw. unter der
freien Cygwin-Umgebung in Windows oder Terminal.app in MacOS X)
folgendes tippen:
patch -p0 < walser.patch
(Für Windows und Macintosh sind direkte Portierungen von "patch" auch
unter der Adresse
<http://www.squirrel.nl/people/jvromans/tpj0403-0016b.html>
erhältlich.)
4. Die Datei "walser.php.txt" in "walser.pl" umbenennen.
Die Perl-Version benötigt im Gegensatz zum originalen PHP-Skript keinen
Webserver und kann deshalb auf Standard-PCs unter Unix bzw. GNU/Linux
oder BSD, Windows oder MacOS benutzt werden. Einzige Voraussetzung ist
eine Installation der Skriptsprache Perl, die als freie Software
kostenlos erhältlich ist. (Downloadadressen für alle gängigen
Betriebssysteme unter
<http://www.perl.com/pub/a/language/info/software.html>)
LB
*** walser.php.txt Mon Jun 24 14:31:24 2002
--- walser.pl Wed Jun 26 15:45:53 2002
***************
*** 1,21 ****
! <?
! /*
! walser.php v1.01 (includes makewalser.php)
! this script generates the plain ascii version
! of "tod eines kritikers" by martin walser.
! it can be redistributed and/or modified under
! the terms of the gnu general public license
! as published by the free software foundation,
! but may not be run without written permission
! by suhrkamp verlag, frankfurt am main, germany.
! source code: http://textz.com/trash/walser.php.txt
! release notes: http://textz.com/trash/readme.txt
! bug reports: http://heise.de/newsticker/foren/go.shtml?list=1&forum_id=30648
! no copyright 2002 textz.com
! */
- set_time_limit(0);
$z .= "64000a20212728292c2d2e2f303132333435363738393a3b3f4142434445464748494a4b4c4d4e4f";
$z .= "505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a849293";
--- 1,20 ----
! #!/usr/bin/perl
! # walser.pl v1.0 (includes makewalser.pl)
! # this script generates the plain ascii version
! # of "tod eines kritikers" by martin walser.
! # it can be redistributed and/or modified under
! # the terms of the gnu general public license
! # as published by the free software foundation,
! # but may not be run without written permission
! # by suhrkamp verlag, frankfurt am main, germany.
!
! # based on walser.php v.1.01 by textz.com
! # source code: http://textz.com/trash/walser.php.txt
! # release notes: http://textz.com/trash/readme.txt
! # bug reports: http://heise.de/newsticker/foren/go.shtml?list=1&forum_id=30648
! # no copyright 2002 luther blissett
$z .= "64000a20212728292c2d2e2f303132333435363738393a3b3f4142434445464748494a4b4c4d4e4f";
$z .= "505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a849293";
***************
*** 9520,9621 ****
$z .= "653e373c423a0722414747444f4046544e481256474d555519795051515b625b59545a245b5a646c";
$z .= "5f2a6160736c7063656f337d7936796c71773b7e6f7573787e854a42";
! $n = hexdec(substr($z, 0, 2));
! for ($i = 0; $i < $n; $i++)
! $c[$i] = chr(hexdec(substr($z, ($i + 1) * 2, 2)));
! header("content-type: text/plain");
! for ($i = 0; $i < (strlen($z) - $n - 1) / 2; $i++)
! echo $c[hexdec(substr($z, ($i + $n + 1) * 2, 2)) - $i % $n];
! // <?
! //
! // /*
! // makewalser.php v1.01
! // this script generates a walser.php for any given walser.txt
! // no copyright 2002 textz.com
! // */
! //
! //
! // set_time_limit(0);
! //
! // // these seven variables can be modified or passed to the script
! // $text = "walser.txt";
! // $author = "martin walser";
! // $title = "tod eines kritikers";
! // $owner = "suhrkamp verlag, frankfurt am main, germany";
! // $source = "http://textz.com/trash/walser.php.txt";
! // $notes = "http://textz.com/trash/readme.txt";
! // $bugs = "http://heise.de/newsticker/foren/go.shtml?list=1&forum_id=30648";
! //
! // $self = str_replace(".txt", ".php", $text);
! //
! // $f = fopen($text, 'r');
! // while (!feof($f)) {
! // $c = fgetc($f);
! // $x = str_repeat('0', strlen(dechex(ord($c))) == 1) . dechex(ord($c));
! // $string .= $x;
! // if (!$flag[ord($c)])
! // $flag[ord($c)] = true;
! // }
! // fclose($f);
! //
! // $z = str_repeat('0', strlen(dechex(count($flag))) == 1) . dechex(count($flag));
! // $i = 0;
! // ksort($flag);
! // while (list($k, $v) = each($flag)) {
! // $x = str_repeat('0', strlen(dechex($k)) == 1) . dechex($k);
! // $z .= $x;
! // $pos[$x] = $i;
! // $i++;
! // }
! // for ($i = 0; $i < strlen($string) / 2; $i++) {
! // $c = substr($string, $i * 2, 2);
! // $z .= str_repeat('0', strlen(dechex($pos[$c] + $i % count($flag))) == 1) . dechex($pos[$c] + $i % count($flag));
! // }
! //
! // header("content-type: text/plain");
! //
! // echo "<?\n\n";
! // echo "/*\n";
! // echo " $self v1.01 (includes make$self)\n";
! // echo " this script generates the plain ascii version\n";
! // echo " of \"$title\" by $author.\n";
! // echo " it can be redistributed and/or modified under\n";
! // echo " the terms of the gnu general public license\n";
! // echo " as published by the free software foundation,\n";
! // echo " but may not be run without written permission\n";
! // echo " by $owner.\n";
! // echo " source code: $source\n";
! // echo " release notes: $notes\n";
! // echo " bug reports: $bugs\n";
! // echo " no copyright 2002 textz.com\n";
! // echo "*/\n\n";
! // echo "set_time_limit(0);\n\n";
! // for ($i = 0; $i < strlen($z); $i++) {
! // if ($i % 80 == 0)
! // echo '$z .= "';
! // echo $z[$i];
! // if ($i % 80 == 79 || $i == strlen($z) - 1)
! // echo '";' . "\n";
! // }
! // echo "\n";
! // echo '$n = hexdec(substr($z, 0, 2));' . "\n";
! // echo 'for ($i = 0; $i < $n; $i++)' . "\n";
! // echo ' $c[$i] = chr(hexdec(substr($z, ($i + 1) * 2, 2)));' . "\n";
! // echo 'header("content-type: text/plain");' . "\n";
! // echo 'for ($i = 0; $i < (strlen($z) - $n - 1) / 2; $i++)' . "\n";
! // echo ' echo $c[hexdec(substr($z, ($i + $n + 1) * 2, 2)) - $i % $n];' . "\n\n";
! //
! // echo "// <?\n";
! // echo "// \n";
! // echo "// /*\n";
! // echo "// make$self v1.01\n";
! // echo "// this script generates a $self for any given $text\n";
! // echo "// no copyright 2002 textz.com\n";
! // echo "// */\n";
! // echo "// \n";
! // $file = file("make$self");
! // for ($i = 8; $i < count($file); $i++)
! // echo "// $file[$i]";
! //
! // ?>
\ No newline at end of file
--- 9519,9530 ----
$z .= "653e373c423a0722414747444f4046544e481256474d555519795051515b625b59545a245b5a646c";
$z .= "5f2a6160736c7063656f337d7936796c71773b7e6f7573787e854a42";
! $n = hex(substr($z, 0, 2));
! for ($i = 0; $i < $n; $i++) {
! $c[$i] = chr(hex(substr($z, ($i + 1) * 2, 2)));
! }
! for ($i = 0; $i < (length($z) - $n - 1) / 2; $i++) {
! print $c[hex(substr($z, ($i + $n + 1) * 2, 2)) - $i % $n];
! }
! # EOF