equal
deleted
inserted
replaced
79 innocently looking regular expression <code>a?{28}a{28}</code> and match it, say, against the string |
79 innocently looking regular expression <code>a?{28}a{28}</code> and match it, say, against the string |
80 <code>aaaaaaaaaaaaaaaaaaaaaaaaaaaa</code> (that is 28 <code>a</code>s), you will soon notice that your CPU usage goes to 100%. In fact, |
80 <code>aaaaaaaaaaaaaaaaaaaaaaaaaaaa</code> (that is 28 <code>a</code>s), you will soon notice that your CPU usage goes to 100%. In fact, |
81 Python and Ruby need approximately 30 seconds of hard work for matching this string. You can try it for yourself: |
81 Python and Ruby need approximately 30 seconds of hard work for matching this string. You can try it for yourself: |
82 <A HREF="http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.py">catastrophic.py</A> (Python version) and |
82 <A HREF="http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.py">catastrophic.py</A> (Python version) and |
83 <A HREF="http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.rb">catastrophic.rb</A> |
83 <A HREF="http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.rb">catastrophic.rb</A> |
84 (Ruby version). Here is a similar problem in Java: <A HREF="http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.rb">catastrophic.java</A> |
84 (Ruby version). Here is a similar problem in Java: <A HREF="http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.java">catastrophic.java</A> |
85 </p> |
85 </p> |
86 |
86 |
87 <p> |
87 <p> |
88 You can imagine an attacker |
88 You can imagine an attacker |
89 mounting a nice <A HREF="http://en.wikipedia.org/wiki/Denial-of-service_attack">DoS attack</A> against |
89 mounting a nice <A HREF="http://en.wikipedia.org/wiki/Denial-of-service_attack">DoS attack</A> against |