Author: gpanther

  • Optimizing regular expressions with PHP

    I was intrigued by the following text in the PHP reference, especially because there is considerable regex use in the wehoneypot project: S When a pattern is going to be used several times, it is worth spending more time analyzing it in order to speed up the time taken for matching. If this modifier is…

  • Learning is never done

    I’ve been using PHP for a while now and thought that I knew the available functions (at least the generic ones) pretty well, but recently I got surprised: a recent entry on the Me and My Database blog pointed me towards http_build_query and in the same category I found parse_url. This is significant to me,…

  • License your work!

    This post was inspired by the “I’m a creative commoner” post of the dammit.lt blog. Disclaimer: IANAL – I Am Not A Lawyer. Why should you license your work? because it makes clear under what conditions can it be reused / quoted / etc because it is more probably that others will use it and…

  • NoCOUG SQL challenge

    NoCOUG (which stands for Northen California Oracle Users Group) published an SQL challenge [PDF]: using SQL determine the probability of achieving a given number by throwing a non-balanced dice N times. Being a PostgreSQL fanboy that I am, I’ve given a try with PG. Here are the results: To create the table and populate it…

  • Getting testing right

    Product testing and review is a very important step in convincing people to buy, not to buy a certain product (it is viewed by customers as more credible than marketing aimed directly at them, because the perception is that they are not “bought”, even though vendors pay for many tests!). If the organization / individual…

  • Mixed links

    From a recent linkfest on The Old New Thing blog come the following links: Some C++ Gotchas – yes, C++ is hard, and if you can keep all the rules in your head, you are a genius (or at least somebody working in C++ for 10+ years). On a related note: Java is also hard…

  • Small programming tips

    A quickpost inspired by issues I encountered recently. How to concatenate (aggregate) strings with PostgreSQL? In MySQL you can write: SELECT concat(name) FROM test_table Because concat also works as an aggregate function (like MIN, MAX, SUM, COUNT, etc). To get the equivalent result in PostgreSQL, you can use the following query (based on ideas from…

  • Adding a world clock to your blog

    Quite some time ago I’ve written a post about how to create a clock which shows the blog author’s time zone. The intention was to make relative temporal references (like “tomorrow”, “yesterday”, “within the last hour”, etc) more relevant to readers from different timezones. While the method worked perfectly, it did require you to have…

  • The state of web security

    If you are a busy (wo)man, I save you the time it would take to read this blogpost: it is deplorable. Now to elaborate on it: Yesterday I was putting together some new templates for the webhoneypot project with a focus on PHP shells. Things like r57, c99 and their derivatives. Then I looked at…

  • Updates for Webhoneypot

    The development of the webhoneypot is back in swing again. We are aiming for the date of May the 15th as the release date for a beta version. A cool new feature which got committed recently is the possibility to “emulate” RFI vulnerabilities. How does it work (idea taken from the glastopf project): When a…