/* PHP & MySQL Journal */
Posted in: javascript, php, tools | Add comment
8 Dec 2009With the recent surge of malicious JavaScript injections on web, it has become necessary to regularly check for malicious code injections on your web sites. I created a small php script that checks a list of urls for malicious Javascript code. This can come handy if you have many client websites under your control.
The PHP script reads two text files - ‘malicious.txt and ‘urls.txt’ : the first containing a list of web pages to be scanned and the other containing malicious script signatures. The script scans the urls for malicious scripts and if any infections are found it saves the result in the ‘infected.txt’ file. The script needs to be run from the command line as you can easily see the progress of the scan if you are scanning a large number of urls.
Posted in: pear | Add comment
7 Dec 2009I recently had a small task to scan some MP3 files on a server to check whether the files had any metadata in them, and add them if necessary. All MP3’s have a metadata section that allows information such as the title, artist, album, track number etc. to be stored in the MP3 file itself. The metadata is stored in the ID3 format. Of course I could have used a desktop tag editor, but the files where on the server, which frequently kept changing. So a server solution was the only way to go.
Posted in: html | ( 1 ) Comment
1 Dec 2009HTML tables have received a lot of unnecessary bad press over the years. The problem lies in the fact that tables were never intended as a layout tool. So during the initial years of web design when people started using tables to format their web pages – adding 1 pixel spacers, padding cells to align content, nesting tables n levels deep and more, it was time something had to be done. CSS was the answer. CSS rescued developers from the awful practice of using table for content layouts. It was all very fine until word started going around that tables were an absolute no no in any html design. Even if you had to display some kind of tabular data, you had to do it using CSS. Creating a tableless design had become the hallmark of an expert web designer. That was the last straw, and the myth persisted.
Posted in: testing | ( 3 ) Comments
23 Nov 2009By default Selenium TestRunner executes the test blindingly fast. You can however slow down the execution by using the speed controller slider in the right pane, which adds a maximum delay of 1 second after every command execution. But you have to do that manually for every test, and the maximum delay you get is 1 second. You can however increase the delay and also set the default delay rate by editing the selenium-testrunner.js file.
Posted in: software, testing | ( 1 ) Comment
16 Nov 2009This is the second time this week that I encountered a annoying bug, introduced just by a small change in the code. Just when you think you can get away with minor changes without testing, you are in for a surprise.
The most common sense thing you can do is to test your code even for small changes; whether you are testing it yourself or sending it to the testing team. Seems simple, but how many times have you really done that. Its not that we are stupid, rather software was never so simple. Maybe we are careless sometimes. The moral is plain - treat even small changes important, and move it through a test before committing it to a version control.
Recent Comments