Tuesday, September 25, 2007

SQL injection - all you need is a syringe

SQL injection is the art of modifying possible queries accepted by database programs employed in security settings either for a website or a network.
Instead of talking about it in length it would be better to show you the way to another blog which talks about it in great detail.

FR3DC3RV Online Security Blog

Wikipedia article tells some basic techniques:

http://en.wikipedia.org/wiki/SQL_injection

An article on an indian website with the SQL injection flaw:
(www.incredibleindia.org) discovered by susam pal

#references : en.wikipedia.org

Saturday, September 1, 2007

Another online judge: PKU Judge Online

SPOJ (Sphere Online Judge) isn't very friendly to newbie programmers. It has mostly tough problems which take a lot of time. PKU (Peking University) Judge is more newbie friendly and at the same time has extreme difficulty problems. It has over 7000 problems which promise to never end.
For programmers who have just stepped into this wonderful world of algorithms and programs it would be great if they start from PKU online judge. Is as interactive as sphere in terms of submitting code online and checking the result.
The scoring system is a little tough because your rank would also depend on how many wrong submissions you made which is not the case of sphere. So it would be wise to correctly check everything including even the smallest extra whitespace which is not needed.
It also has more types of error definitions. Example if your solution is correct but your presentation is wrong then it would say so (not in the case of sphere).
Here is the link:
http://acm.pku.edu.cn/JudgeOnline/
Just register and start solving.

Thursday, August 30, 2007

Using arrays for passing by reference

A very common thing you learn when learning a new language specifically C or C++; passing an array name as an argument leads to passing by reference.
What you can do with it:
Supposedly you want to pass a large amount of similar data ( eg. lots of variables concerning a rocket's trajectory) then you can store all data in an array and send it off. Obviously all data must be of same data-type.

Wednesday, August 29, 2007

Can't open registry editor or task manager?

If you aren't able to open your registry editor or task manager even though you are the administrator then you have got a problem.
Probably you have a virus or a malware attack. Now better to scan and find the infected files and stuff.
But even after doing a check up you still can't solve the problem then following are some registry solutions.

If you can't open the registry editor then go to START->RUN and paste the following command:

REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t REG_DWORD /d 0 /f

Hopefully this should solve the problem.

For enabling the task manager:

REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableTaskMgr /t REG_DWORD /d 0 /f

Hope this solves your problem.

Tuesday, August 7, 2007

Handling big numbers in c or c++

When i say big numbers i mean very big numbers. Numbers with digits near or in excess of 100.
We know that the greatest number you can enter is by using long double.
But there is a way to handle the biggest numbers : lets say the factorial of 100.
The solution is strings. You can use strings to input numbers and even create functions to perform operations on them just like on normal numbers. I am in the process of creating theses functions. Will post them as soon as they are ready.

Saturday, August 4, 2007

www.spoj.pl

www.spoj.pl
A fantastic site for all budding programmers.
Has a huge collection of problems to solve and the solutions can be submitted in your choice of language. Is an online judge which tells you whether the solution you submitted was correct or not.

Every problem asks for a specific format for input and output and your program should adhere to it. It should also be run within the specified time and memory limit.
Once you have submitted your program, just go to the status option and check your program's status. If its still running then wait for a while and reload the page. once it has been compiled it will either accept it or give and error. Errors range from time limit/memory limit exceeded to compilation errors to runtime errors.

Some errors which i encountered in programs written in C:

1.Compilation error
Do not include conio.h and call getch(). When testing on your own computer you can call check but when submitting do not call them.
2.Runtime error(NZEC)
your main() should return int and at the end of main be sure to include return 0.
NZEC = non zero exit code. it comes when a program doesn't have any exit code like return 0 or exit(0).

The easiest program to start from is life,universe and everything.
So sharpen your skills. They are the only things you can count on.

Why this blog is on the net

I learn something everyday and i want to share it with anyone interested in it.
I have spent a lot of time on Google searching for some information which later on i came to find on an obscure site.
I want to make a blog which works something like that obscure site. It gives that specific information to that specific guy who was specifically looking for that specific something. o_0

I would be posting anything that i learn and which i am able to remember to post.
This space will be multi-topic.