Anonymous avatar Anonymous committed c69f1e6

Added the homepages.

Comments (0)

Files changed (941)

+cd h:
+ls
+exit
+cd h:
+ls
+ls --color
+ls --color -l
+ls -l --color
+ls -l --color
+ls
+ls --color
+ls
+less c:/Shlomi/Download/send.bat 
+cd c:
+cd .,
+cd ..
+cd cgi-bin
+ls
+ls *.exe
+cp temp.exe h:
+temp
+./temp
+h:
+cd h:
+cp c:/msdev/Projects/stl/Debug/stl.exe .
+ls
+./stl.exe 
+./stl.exe 
+ls
+rm -fr temp.exe 
+rm temp.exe 
+exit

t2/DeCSS/JavaScript/decss_js.html

+<html>
+<body bgcolor="#FFFFFF">
+
+<h1>DeCSS for JavaScript</h1>
+
+<h3>A hack of Hackers-IL's</h3>
+
+
+<h2>Congratulations!</h2>
+
+<p>
+You have violated the DMCA and have a working DeCSS code inside your 
+computer's memory. To run it (and <b>really</b> violate the DMCA) follow the
+following instructions:
+</p>
+
+<ol>
+<li>
+Make sure your browser has JavaScript enabled.
+</li>
+
+<li>
+Fill Something in the "Input" input box. It should be longer than 128 bytes because CSS
+does not encrypts the first 128 bytes in every 2048 block. However, only the first
+2048 bytes will be encoded by this implementation.
+</li>
+
+<li>
+Place a key in the key entry box. It can be any string.
+</li>
+
+<li>
+Press the "DeCSS!" button.
+</li>
+
+<li>
+Copy the information from the "Output" input box.
+</li>
+
+<li>
+All the information is encoded and decoded with C-style escape sequences
+(e.g: \n, \000, \a) because it may be binary.
+</li>
+</ol>
+
+
+<table border="1">
+<tr>
+<td>
+
+<h3>A DeCSS for JavaScript Form By Hackers-IL</h3>
+<form name="decss_js_form">
+
+<script language="JavaScript" src="decss_js.js">
+</script>
+
+<script language="JavaScript">
+<!--
+
+function performDescramble()
+{
+    var the_string = document.decss_js_form.myinput.value;
+    var key = document.decss_js_form.mykey.value;
+
+    var key_decoded = decode_a_string_with_escape_sequences(key);
+
+    var the_string_extracted = the_string.substring(0,2048);
+    var the_string_decoded = decode_a_string_with_escape_sequences(the_string_extracted);
+    var the_string_scrambled = CSSdescramble(the_string_decoded, key_decoded);
+    
+    
+    document.decss_js_form.myoutput.value = 
+        encode_string_with_escape_sequences(
+            the_string_scrambled,
+            false
+        );
+}
+// -->
+</script>
+
+Input:<br>
+<textarea name="myinput" cols="50" rows="20">
+</textarea>
+<br>
+<br>
+
+<table>
+<tr>
+<td>
+<input type="button" value="DeCSS!" onClick="performDescramble()">
+</td>
+<td>
+Key: <input name="mykey" value="abcdef">
+</td>
+</table>
+
+<br>
+<br>
+Output:<br>
+<textarea name="myoutput" cols="50" rows="20">
+</textarea>
+
+</form>
+
+</td>
+</tr>
+</table>
+<br>
+<br>
+
+<p>
+Hackers-IL's DeCSS for JavaScript is:
+</p>
+
+<ol>
+<li>
+The next logical step in DeCSS accessibility.
+</li>
+<li>
+Another nail in the DMCA coffin.
+</li>
+<li>
+A hack that allows you to induce innocent web-surfers into violating the 
+DMCA on their home computer.
+</li>
+</ol>
+
+<h2>About Us</h2>
+
+<p>
+<b>Shlomi Fish</b> - Shlomi Fish who did most of the conversion from C to 
+JavaScript, considers himself a professional programmer and a hobbyist 
+mathematician, writer and philosopher. He was born in Israel in 1977, and 
+has lived there for the majority of his life.
+</p>
+
+<p>
+At the moment, he is a student at the Electrical Engineering Department of 
+<a href="http://www.technion.ac.il/">the Technion</a>. 
+</p>
+
+<p>
+<b>Chen Shapira</b> - a renowed Israeli hackeress and the founder of
+Hackers-IL. She came up with the idea for a JavaScript implementation of 
+DeCSS and gave some useful advice about JavaScript.
+
+</p>
+
+<h3>Hackers-IL</h3>
+
+<p>
+Hackers-IL is a mailing-list dedicated to the discussion of various topics
+that are related to computers. (with a very broad definition of "related"). 
+The majority of the members of Hackers-IL are professional IT workers and 
+wannabe philosophers.
+</p>
+
+<p>
+Most of the Hackers-IL are either Israelis, or people who are affiliated with 
+Israel in some way. Please do not join the mailing-list unless you are both of
+the above.
+</p>
+
+<p>
+Even those who are not members may check out the 
+<a href="http://groups.yahoo.com/group/hackers-il/">
+homepage of the mailing-list
+</a> at <a href="http://groups.yahoo.com/">Yahoo! Groups</a> and enjoy the 
+nonsense that we discuss.
+</p>
+
+<h3>DeCSS for JavaScript</h3>
+
+<p>
+DeCSS for JavaScript was a hack that came up in the Hackers-IL's discussions.
+The source code itself was never posted to the mailing-list (and should not be),
+but some of the coordination took place there.
+</p>
+
+<p>
+DeCSS was the topic of discussion in some threads before, and in 
+<a href="http://groups.yahoo.com/group/hackers-il/message/910">one message</a>,
+it was Chen's suggestion that it should be written in JavaScript. 
+It was relatively ignored until Shlomi Fish realized it could actually be 
+a good idea<sup>TM</sup> to do so and he started working on this hack.
+</p>
+
+</body>
+</html>

t2/DeCSS/JavaScript/decss_js.js

+//
+// Fake DeCSS for JavaScript - A hack of Hackers-IL
+// version 0.2.2
+// 
+// This code descrypts according to Julius Caesar's method of adding 3
+// to the character code.
+// 
+
+
+//
+//    sec and key are both strings
+//
+function CSSdescramble(sec, key)
+{
+    var a;
+    var ret = "";
+    var c_code
+    
+    for (a = 0; a < sec.length ; a++)
+    {
+    	c_code = sec.charCodeAt(a);
+    	ret += String.fromCharCode((c_code-3)%256);
+    }
+    
+    return ret;
+}
+
+function encode_string_with_escape_sequences(str, on_one_line)
+{
+    var a;
+    var len = str.length;
+    var ret = "";
+    var c, c_code;
+   
+    for( a = 0; a < len ; a++ )
+    {
+        c = str.charAt(a);
+        if (c == "\n")
+        {
+            ret += "\\n";
+        }
+        else if (c == "\"")
+        {
+            ret += "\\\"";
+        }
+        else if (c == "\r")
+        {
+            ret += "\\r";
+        }
+        else if (c == "\f")
+        {
+            ret += "\\f";
+        }
+        else if (c == "\f")
+        {
+            ret += "\\f";
+        }
+        else if (c == "\t")
+        {
+            ret += "\\t";
+        }
+        else if (c == "\b")
+        {
+            ret += "\\b";
+        }
+        else if (c == "\\")
+        {
+            ret += "\\\\";
+        }
+        else
+        {
+            c_code = c.charCodeAt(0);
+            if ((c_code < 32) || (c_code > 127))
+            {
+                // I'm using Octal notation even though I hate it because
+                // it's easier than hex.
+                ret += "\\" + Math.floor(c_code/64) + (Math.floor(c_code/8)%8) + (c_code % 8);
+            }
+            else
+            {
+                ret += c;
+            }
+        }
+        
+        if (! on_one_line)
+        {
+            // Add a newline every 20 characters
+            if ((a % 20 == 0) && (a > 0))
+            {
+                ret += "\n";
+            }
+        }
+    }
+
+    return ret;
+}
+
+function char_to_digit(str)
+{
+    var my0 = "0";
+    return str.charCodeAt(0) - my0.charCodeAt(0);
+}
+
+function decode_a_string_with_escape_sequences(str)
+{
+    var a;
+    var c;
+    var c_code;
+    var ret = "";
+
+    for(a=0;a<str.length;a++)
+    {
+        c = str.charAt(a);
+        if ((c == "\n") || (c == "\r"))
+        {
+            // We ignore newlines so skip to the next character
+            continue;
+        }
+
+        if (c != "\\")
+        {
+            ret += c;        
+        }
+        else
+        {
+            a++;
+            c = str.charAt(a);
+            c_code = char_to_digit(c);
+            if (c == "n")
+            {
+                ret += "\n";
+            }
+            else if (c == "r")
+            {
+                ret += "\r";
+            }
+            else if (c == "a")
+            {
+                ret += "\a";
+            }
+            else if (c == "t")
+            {
+                ret += "\t";
+            }
+            else if (c == "b")
+            {
+                ret += "\b";
+            }
+            else if (c == "f")
+            {
+                ret += "\f";
+            }
+            else if ((c_code >= 0) && (c_code <= 9))
+            {
+                var total;
+                var num;
+
+                total = 0;
+                num = 1;
+
+                while (((c_code >= 0) && (c_code <= 9)) && (num < 3))
+                {
+                    total = total*10 + c_code;
+
+                    a++;
+                    num++;
+                    c = str.charAt(a);
+                    c_code = c.charCodeAt(0);
+                }
+
+                ret += fromCharCode(total);
+            }
+            else
+            {
+                ret += c;
+            }
+        }
+    }
+
+    return ret;
+}
+

t2/DeCSS/JavaScript/index.html

+<html>
+<head>
+<title>There's nothing here. Go to decss_js.html</title>
+</head>
+<body bgcolor="#FFFFFF">
+
+<h1>DeCSS for JavaScript Embedding HTML</h1>
+
+<p>
+On this page: <a href="decss_js.html">"decss_js.html"</a> you can find an
+HTML file that powers the DeCSS for JavaScript source code. Note that its
+decryption backend is _not_ DeCSS.
+</p>
+
+<p>
+It is in fact a fake decryption code that decrypts according to Julius
+Caesar's method of rotating a letter by 3 places to encrypt it. If Julius
+Caesar had been alive he could have sued me according to the DMCA, but since
+he is not and I'm not aware of anyone who would use this trivial method for
+his encryption we are safe.
+</p>
+
+<p>
+To activate the HTML with the real DeCSS backend place both it and the 
+<b>real</b> "decss_js.js" file in the same directory, assuming you know what
+you are doing. I am not responsible for the results.
+</p>
+
+<p>
+DeCSS for JavaScript opens a world of possibilities from DeCSS web-boxes,
+to Distributed DeCSS (I'm not saying it's a practical way of doing it, just
+that it is possible). Or one could generate random sequences and instruct
+the client computer to DeCSS them for him over and over again. As innocent
+web-surfers now have the potential to become active violators of the DMCA -
+it is time to question whether they or the DMCA are the irrational one.
+</p>
+
+
+
+</body>
+</html>
+

t2/DeCSS/index.html

+
+<head>
+<title>Shlomi Fish' Opinion on DeCSS</title>
+</head>
+
+<body bgcolor="#FFFFFF">
+
+<h1>Shlomi Fish' Opinion on DeCSS</h1>
+
+<h2>Note</h2>
+
+<p>
+I removed the offending files from here. The reason for that is that
+I don't want to drag the Technion's undergraduate students' server into the
+MPAA witch-hunt. 
+</p>
+
+<p>
+What I did prepare is a port of DeCSS to JavaScript. You can't find it here,
+but it can be found in the 
+<a href="http://www.cs.cmu.edu/~dst/DeCSS/Gallery/">
+DeCSS Gallery</a>.
+
+<h2>Comments</h2>
+
+<p>
+Well, to show my empathy with the DeCSS side of the MPAA vs. DeCSS hackers
+fiasco that is going on, I decided to set up this page which will explain my
+take on this subject.  No, I am not an anarchist or a nihilist or anything like 
+that. I am a  <a href="http://www.neo-tech.com/">Neo-Tech</a> Objectivist. 
+Still, I believe that objective ethics is not on the side of the MPAA in this
+regards. And following are my reasons:
+</p>
+
+<p>1. <b>Code is Speech</b> - computer source code can do many things that 
+speach alone previously could not do, but it still speaeh and is protected
+by the First Ammendment of the American Constitution and objective ethics in
+general. And the "Digital Millenium Copyright Act" or any other law that
+jumps from the head of the American Government cannot change that fact.</p>
+
+<p>2. <b>No code is illigitimate</b> - whether it was acquired by reverse 
+engineering or not, code cannot be made illigitimate or illegal.</p>
+
+<p>3. <b>Links are speech</b> - the fact that links are convenient does not
+categorize them as weapons or anything like that. They are speech because
+they are made of ASCII characters and that all there is to it. Assuming 
+the DMCA, now my homepage as well as everything in it, becomes something
+you are not allowed to link to. So if you are scared of the "Big Brother",
+don't. ;-)</p>
+
+<p>4. <b>The MPAA should find better ways to protect their intellectual
+property.</b> Protecting your data in a (very weak) encryption is not the
+solution. Neither, is trying to illigitimate the code that decyphers it.
+In a couple of years, DVD copiers will become commonplace, so people will be
+able to copy them without opening the encryption.</p>
+
+<p>Perhaps the point of the fiasco is to charge a fee for those players 
+which can play it. But that has nothing to do with protecting intellectual
+property rights. (!)</p>
+
+<p>Another option is that the MPAA is afraid that people will decode the
+movies, reduce their size and distribute them on-line, in a similar manner
+in what happens today with mp3s. But this will probably become meaningless
+too, because of DVD copiers.</p>
+
+<p>
+5. <b>Decrypting such methods is possible and easy, &nbsp;so it cannot and must
+not be enforced.</b> Cryptology proves that it is impossible that a digital
+data be decryptable by someone and not decryptable by another (assuming the
+other has enough information).
+</p>
+
+<p>
+While software vendors can try and take precauations to prevent such things,
+they cannot decree them as illegal. The reason for that is that making
+something like that illegal only makes it worse. For instance, illegal drugs
+are undoubtedly harmful, but their prohibition only creates trouble.
+Likewise, for gambling, free development and distribution of medication,
+etc.
+</p>
+
+<p>
+The DeCSS case is just another irrationality of this kind.
+</p>
+
+<p>
+6. <b>People who live in glass houses should not throw stones</b> - the
+MPAA-related companies has been attacked and are attacked for their film
+containing too much violence or pornography, or because they simply make
+certain people angry.
+</p>
+
+<p>
+I believe it is perfectly ligitimate to film such motion pictures. However,
+they should understand that if they call for the government's help to censor 
+code, web-sites and links, they in a fact giving it the power and legitimacy
+to censor them. IMO, they above all should hold the liberty of speech and
+it's a shame they don't.
+</p>
+
+<h2>Links</h2>
+
+<a href="http://decss.cyberspace.cz/">A DeCSS mirror</a>.<br>
+<a href="http://www.google.com/search?q=decss">Google search for DeCSS.</a><br>
+<a href="http://www.cs.cmu.edu/~dst/DeCSS/Gallery/">DeCSS Gallery - lots of
+"legal" forms to distribute the DeCSS source code.</a><br>
+<a href="http://decss.zoy.org/">42 Ways to distribute the DeCSS code</a><br>
+<a href="http://www.2600.com/news/1227-help.html">2600's list of DeCSS
+mirrors</a><br>
+
+<br>
+<br>
+
+<a href="../">
+<img src="../images/bk2hp.gif" alt="Back to my homepage" border="0">
+</a>
+
+</body>
Add a comment to this file

t2/Laptop_Announcement.pdf

Binary file added.

Binary file added.

t2/MathVentures/3d_outof_4d.html

+<HTML>
+<TITLE>Math-Ventures: Combinatorics and the art of Dungeons and Dragons</TITLE>
+<BODY BGCOLOR="#FFFFFF">
+
+<CENTER><H2>Combinatorics and the art of Dungeons and Dragons</H2></CENTER>
+
+I used to play "Advanced Dungeons & Dragons" in the 8th and 9th grades. I
+quit, though, but many of my friends continued to play a long time
+afterwards. In AD&D (that's the commonly used acronym for the game's name),
+the amount a character is skilled in certain abilities is determined by a
+number ranging from 3 to 18. This number is normally generated by rolling 3
+dice and summing up the numbers on their sides. That way, high or low
+numbers are considerably less frequent then mid-range ones.<P>
+
+Yet, this method, which is highly random, often results that the scores are
+insuitable for what the player planned the character to be or simply too
+low. Therefore, there are several alternative methods to generate scores
+which are better as far as the player is concerened. One of the common ones,
+which is described in the game's manual goes like that: instead of three
+dice, four dice are rolled. Then, the three highest die-scores are summed
+and together add up to the ability number.<P>
+
+One day, my friend who was a game-master at that time called and asked me if
+I could tell him what was the average result which is generated by this
+method. I couldn't tell him right away, but he said that he wrote a computer
+program to check it, and it ended up around 12.24 . He went on to say that in
+his opinion this average was not too high, so he will probably allow the
+members of the new team he was going to lead to use that method. <P>
+
+Anyway, he still wondered if anyone could think of a mathematical way to calculate
+it. I didn't know or heard of any at that time so I told him that I didn't
+know. He also said that he asked another acquaintant of us, who already
+began his math studies at the university if he could tell him, but he didn't
+know either.<P>
+
+In any case, I thought about it for a while and after a month or so came to a
+solution. I presented this problem to other people who seemed interested at
+solving math riddles at various times since. Some of them managed to solve
+it, but I didn't find a more elegant way than what I thought of. <P>
+
+Before you see my answer, here is a summary of the problem. You may try to
+figure it yourself, before looking at my solution:
+<TABLE BORDER=1>
+<TR><TD>
+<B>1.</B> Throw 4 dice, sum the numbers they generated and substract the
+lowest value from the sum. (if there is more than one die with the lowest
+value, substract it only once). What is the average number of such throws?
+<P>
+
+More generally, one can ask:
+<B>2.</B> Throw n dice, each evenly generating values in the range 1 .. m,
+sum them, and substract the number of the lowest die. What is the average of
+the solutions of this throw? (the expression is dependant on n and m.)<P>
+
+And yet more generally:
+<B>3.</B> Throw n dice each in the range 1..m, sum them and substract the p
+lowest dice (p < n). What is the average outcome of this throw?
+
+</TR></TD>
+</TABLE>
+
+The solution can be found some space below:
+<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
+<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
+<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
+<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
+
+<H3>Solution:</H3>
+
+Like I said, it did not come to be right away and I had to think about it
+for a while. I pondered various methods, and then came to think about the
+question this way:<P>
+
+In each throw the numbers 1..6 can be substracted. I first realized that I
+could immidiately substract 1 from all 6^4 of the possible throws, because
+one always substract <B>at least</B> 1. Furthermore, when is another 1 point
+substracted from the final sum? Obviously this is the case when 2 or more
+points are substracted. When does it happen? It happens when all the dice
+are bigger than 1. (or else 1 would have been substracted.) Since all the
+dice are in the range 2-6 there are 5^4 different possibilities for this
+case.<P>
+
+The next point is substracted when all the dice are in the range 3-6, hence
+4^4 possibilities and so on. Now, to calculate the total, let's start from
+the sum of all possible throws of 4 dice, without the minimal die removed.
+This sum is equal to 6^4 * 14 = 18144. Then, let's remove 6^4 = 1296 because
+of the first point removed, 5^4 because of the second point etc. Eventually
+we get:<P>
+
+6^4 * 14 - 6^4 - 5^4 - 4^4 - 3^4 - 2^4 - 1^4 = 15869<P>
+
+To find the average, all one has to do is divide it by 6^4, which is number
+of individual throws. 15869/(6^4) = 12.24, which is also the number that my
+friend's program returned.<P>
+
+To generalize it for n dice each having the numbers 1..m on its side (AD&D
+also involves using dice with 4, 8, 10,12, 20 and sometimes 100 sides. :-))
+all one has to do is replace 6 with n and 4 with m where appropriate. One
+should remember that the average throw for an individual die of 1..m is
+(1+m)/m and for n such dice n*(1+m)/m. We eventually get to:<P>
+<PRE>
+( m^n * n * (1+m) / m ) - m^n - (m-1)^n - (m-2)^n - (m-3)^n ... - 1^n
+---------------------------------------------------------------------
+                              m ^ n
+</PRE>
+
+Eliminating the next smallest die, and the other dice in order, is a bit
+more tricky. As a matter of fact, it took me two more years to finally come
+up with a solution. (not that I spent all my time thinking about it)<P>
+
+The basic idea is this: regarding the first point of the second least die,
+it's obvious that we still have to remove 6^4 from the total. About the
+second point: it is removed only if all the dice, except maybe one has a
+face value of 2 or more. Phrased in a different way it is removed:<P>
+
+1. If there are 4 dice in the range 2..6   OR<BR>
+2. If there are 3 dice in the range 2..6 and one die whose value is 1.<P>
+
+The conditions for the other 4 cases are similiar: if the additional point
+is the Kth than there could be either 4 dice in the range K..6 or 3 dice in
+the range K..6 and one die in the range 1..(K-1). To evaluate it
+mathematically, I'll use the standard formulas and eventually get to:<P>
+
+<PRE>
+(6-K+1)^4  +  ( (6-K+1)^3 * (K-1) ) * 4
+</PRE>
+
+If we substract 6^4 and those 5 sums from the total sum that was acquired in 
+the previous stage, we'd get to the new total with the two least dice
+removed on each throw. Divide it by the number of throws - 6^4 - and we get
+the new average. The grand formula, then, is:
+<PRE>
+          6            6
+6^4*14 - SIGMA(i^4) - SIGMA [(6-i+1)^4 + ( (6-i+1)^3 * (i-1)) * 4 ] 
+         i=1          i=1
+-----------------------------------------------------------------------
+                    6^4              
+</PRE>
+
+From the 3rd least dice onward, this method gets more and more complicated
+because we have to consider 3 different cases for every point we
+substract, 4 cases for the fourth die, and so on. If anyone has an idea
+on how to improve this method, or can suggest an alternative method
+which is simpler as more and more dice are removed by order, please let
+me know and I'll post it here. <P>
+
+I, for my part, am no longer interested in this problem, and do not deal
+with it, at least not until I extend my knowldege in Combinatorics and the
+Theory of Probability.
+
+A final note: you can find a C program, not unlike the one my friend used,
+that calculates the average of such throws 
+<A HREF="calc_dice_average.c">here</A>. It can do that for any number of
+dice with any number of sides, and while eliminating any number of minimal
+dice. <P>
+
+The program is quite stupid and merely iterates over all the
+different throws, and adds the sum of every throw to the total. It
+becomes less efficient as the number of sides and/or the number of dice
+increases.<P>
+
+Writing a program that implements my method <B>for any number of removed
+dice</B> is a bit complicated because the formula itself gets more and more
+complicated. Maybe I'll get to it one day.
+
+
+<HR>
+
+<A HREF="./"><H3>Back to the Math-Ventures Web page</H3></A><P>
+<A HREF="../"><H3>Back to Shlomi Fish' Homepage</H3></A>
+
+
+</BODY>
+</HTML>

t2/MathVentures/Footer

+
+<HR>
+
+<A HREF="./"><H3>Back to the Math-Ventures Web page</H3></A><P>
+<A HREF="../"><H3>Back to Shlomi Fish' Homepage</H3></A>
+
+</BODY>
+</HTML>

t2/MathVentures/bug_square.html

+<HTML>
+<TITLE>Math-Ventures: Bugs in a square</TITLE>
+<BODY BGCOLOR="#FFFFFF">
+
+<CENTER><H2>Bugs in a square</H2></CENTER>