Tuesday, December 8, 2009

First chance exception

First chance exception is an exception that is handled somewhere in the code. it means that the programmer was able to recover the situation or handle it gracefully. Second chance exception is an exception that was not caught.

Monday, October 26, 2009

erlang snippet (on windows) - anonymous functions

in erlang you can define an anonymous function the following way:


FUNCNAME = fun(X) -> 10*X end.

and you can use it like this:

FUNCNAME(11).

erlang snippets (on windows) - change directory and compile

change directory:

cd ("c:/erlang/2/").

compile:

c("C:\\Erlang\\1\\helloworld.erl").

or you can change directory and comiple:

cd ("c:/erlang/1/").

c(helloworld).

Tuesday, June 23, 2009

Sunday, April 5, 2009

Microsoft's ie8 InPrivate browsing & google chrome "Incognito" - not as private as you think...


I was thrilled to find out about the new "InPrivate" feature latly introducted in internet explorer 8. This feature is very usefull when you want to buy flowers to your wife or when you accidently roam into transexual midget snuff p0rn. People suppose that when using this feature no one can know where they surfed (nor the sites themselves or other users on the PC).
















Actually, google already had this on Chrome with a feature called "incognito"...

however, something poped into my mind - every site can save (without asking anything) a nice file with extention ".SOL" on your machine. these files are located on -> C:\Documents and Settings\{user-name}\Application Data\Macromedia\Flash Player\#SharedObjects\{some-hash-code}\{ site domain name}\{SOL file}

These ".SOL" files are used by macromedia flash movies for user traking and configuration storage. in this folder you can actually see all sites that has this feature (for example "youtube.com" or "dailymotion.com".

I though that the "InPrivate" thingy or "Incognito" takes care of this but I was surprised to see it doesn't. when browsing in "InPrivate" mode I went to both youtube and dailymotion and found that both sites happily written their SOL files on my machine. So, sites can track my actions even on so called private modes and my wife can find where I was buying her flowers...
so, next time you are "buying flowers to the wife" make sure to cover your tracks (Microsft and google only covers some of them).

Saturday, September 13, 2008

97 Things Every Software Architect Should Know

It seems that software architects love to write articles. I found this link and must say that some of the articles there gave me some good ideas and nice observations. One of the short but very good articles is about "Continuously Integrate"

Saturday, August 16, 2008

protobuf for .net - protocol buffering allows communication between all languages

Protocol Buffers are a way of encoding structured data in an efficient yet extensible format. Google uses Protocol Buffers for almost all of its internal RPC protocols and file formats
http://code.google.com/p/protobuf-net/
this is related to the larger project:
http://code.google.com/p/protobuf/

Wednesday, May 14, 2008

How to change data on the metabase of IIS 6

First you'll need to enable the metabase editing. You can do it like this
Then you'll need to install the metabase editor

Once you can change metabase data you can do stuff like enabling gzip compression, removing/changing the IIS banner.

Tuesday, April 1, 2008

How to find security vulnerabilities in your web site

It is often said that one should build it site as secure as possible. It is also said that one should prepare a good software design before he starts writing code... Since we all know that there are glitches in every aspect of most applications in some level we should find tools to help us find the problems we created. This is a small list of free tools that will allow you to review your website from the eyes of an attacker:

HTTPrint - this tool gives a close estimation about the web server running the site. This can give you a good idea about how hard/easy it is to find out with great probability what web server are you using. If the results indicate that your web server is obvious you should start disguising some of the marks your web server leaves. For starters get read of the "powered by: " in the http headers...

Metasploit - Once you gained the data on the platform you want to analyze (such as webserver type, os, service packs....) you can find which exploits can be used to attack the platform.

Wikto - this tool searches for well known directories and files (which is known as dictionary attack). It will try to find all of the .old or .bak you left behind, all of your "install" folder you never deleted. This tool is most important for those who use open source products and for those that are managing both deployment/operations and development (typical for small sites/companies).

Paros - a semi-automatic site scraper that works as a proxy which allows you to scan your site to find out how easy it is to find pages you are trying to hide. You can use its manual option to find out so called sophisticated links that are created dynamically using JavaScript.

Fiddler - also used for performance analysis. a simple proxy for the client. enables catching requests and responses and tampering them. You can also use Tamper Data firefox add-on to do most of the things fidller lets you. Other tools that can help you analyze the web pages themselves are firebug or web developer helper if you want to use it with MS-CMS or MOSS 2007.

If you are helping another person to find out the vulnerabilities in his site you can also use a port scanner to find out his "secure" BackOffice ports and so on. A good one to start with is NMAP

If worse comes to worse and you are trying to secure a huge enterprise project with much money to spend and sloppy programmers consider using an application firewall.

Thursday, March 27, 2008

Tools for debugging/analyzing web sites

I've found out a couple of weeks ago a nice Firefox add-on, "tamper data", that allows tampering with out coming http requests (POST, GET). The add-on captures even captures requests coming out of Flash which I honestly did not expect.

This little tool can help debugging web pages on development/production and help testing web sites for security issues.

https://addons.mozilla.org/en-US/firefox/addon/966

I can also recommend great tool called HttpWatch which helps analyze the way your web pages load. This is usually the tool for finding out performance related issues. This is much like the freeware "fiddler" only much faster and intuitive imho.


http://www.httpwatch.com
http://www.fiddlertool.com/fiddler/