Hi friends! Am back with my next article following from where I left it the other day. As we discussed, systematic approach to any task gets it simple to complete. I would again suggest you to note down every step as you start your programming in 'C' and further you can leave it as per your personal requirements. I had asked you to try to solve the problem without any third variable. Here comes the solution: Say x=5 & y=9, now if we add x and y such that: x=x+y, i.e. now x is 14 y=x-y, the value of y is now 14-9=5. Again, x=x-y so the value of x will be now 14-5=9, and that's our answer. Hope you could write the same very steps in form of pseudo code(algorithm) now. Let's take another example because examples are better to understand and get the concept. Solving a quadratic equation, we deal with the coefficients of x2, x and the constant value. In 'C' we cant give the quadratic equation directly in its original form say, ax2+bx+c=0, either we could give the input in form of its coefficients i.e. a, b & c. As we know that in a quadratic equation the solution depends on the value of d(discriminant). So, let's start our pseudo coding: 1. START 2. Read a, b, c (we don't use and or '&', '&' has its own meaning in 'C') 3. d=b2-4ac (we will write it as d=b*b-4*a*c for easy implementation in 'C') 4. If d<0, print "The given equation has imaginary roots". GOTO 7 5. If d=0, print "Equal roots with x=-b/2c" (written as b/(2*c)), GOTO 7 6. If d>0, print "Real and unequal roots as x=(-b+sqrt(d))/(2*a) and x=(-b-sqrt(d))/(2*a)" 7. STOP Here you might be thinking about the use of 'GOTO', let me make it clear for you all in solving a quadratic equation the answer comes depending on the value of 'd'. When d<0 the roots are imaginary and our solution ends there so we need to write 'STOP' right after it. Its same when d>0 or d=0, so by not writing stop after every interval we just wrote it once and diverted the program statement to it. On this point I would like to share my personal experience in class. when the teacher asked us to write the algorithm to solve a given quadratic equation, I gave the input as whole equation in its original form and was confused that why are we writing a, b and c only. Similarly I also missed the 'GOTO' statements which means all the three statement lines will be checked before proceeding. Let's take another simple but interesting example. How would you print the largest number among three given numbers? Say a=13, b=7, c=21. Clearly by looking we can see that c is the greatest amongst all with a to follow and then c. But have you thought how the machine will proceed to it? In what sequence will it solve the problem? Let's go on for the algorithm for now you'all must be able to understand it. 1. START 2. Read x, y, z 3. If a>b { If a>c print "a is the greatest" else print "c is the greatest" ` } else { If b>c print "b is the greatest" else print "c is the greatest" ` } 4. STOP Here I used another style for writing it using conditional(If) branching. Hope you'll get to it till next time. You are warmly welcome to comment with your doubts, comments and suggestions. And for you to do, Try writing an algorithm to print the largest number without using branching and also when you don't know the number of variables. You could also try to write it in both the ways which I showed today. Give it a try because you can't succeed until you try. All the very best, believe me its very simple to program when you know the basics, you can't do anything with the rules.
For any previous knowledge refer my last post.
‘C’ Programming Tutorials: Introduction
Hi everyone! I am Nilesh and this is my first article on this blog. Here I am going to give ‘C’ tutorials and gonna teach you to write some programs which would further help you in your hacking stuff!
‘C’ as we all must have heard is a very versatile language and so is highly followed. The major languages in current time is directly and indirectly based on the concepts of ‘C’. Whether its c++, c#, Unix ‘c’,python, java and so on. Please don’t get afraid of the names as we’ll discuss their basic difference latter which you will feel to be quite negotiable.
Mean while am starting with ‘C’ because as I already said if you know ‘C’ then you can deal with all other major programming languages used globally. Continue reading
Disable Keyboard Using a Batch File.
Hello guys, today I am gonna provide you with a simple batch file (.bat extension) which will disable your keyboard after you run it on your system. You can send this to any victim by an email attachment or by means of something else and once he runs the program, his keyboard will not respond to the any keystroke. In one of my previous article I have described few things about batch files/batch viruses so I suggest you to take a look over “How to make a simple batch file virus“ before you start reading this!
As I have promised, I have come up with this article to keep my promise. Basically a batch file is a simple set of commands which you usually type in you command prompt. These files are never treated as a virus hence you can take advantage of them. Even though they are not really any virus they create a devastating damage to your operating system! Continue reading
Website Hacking by SQL Injection – With an example
Hey guys! I have taken such a long time delivering you with some information, so today I thought to teach you some interesting stuff. There are over 30 million of sites available on internet and 16% of them are highly vulnerable to SQL injection attack. In this article I will teach you what exactly is SQL injection, how it works and how to perform. I have already taught you some basics in my last article. I advice you to take a look at my previous article before you continue reading this.
Today we are gonna access the database of a European site http://www.adas-fusion.eu/
Recently I have found a link vulnerable to SQL injection.
Read on…. Continue reading
SQL Injection – Exploiting Filteration Vunerability Using Escape Characters
Hey guys, let’s have a break from Windows Security topic, so today I came up with Web security. That is, I am going to discuss about hacking a website using SQL injection. Here we are going to exploit the filtration vulnerability with the help of the escape characters. Although there are the other type of SQL injection attacks I will discuss them individually and very briefly in my upcoming articles.
Shubro has already discussed two articles on this topic and have given an overview of this vulnerability with working concept. But today I am going to explain the same with an example. Yes!! I am gonna hack a site and bypass the admin panel of the website. You will see me getting through the admin panel bypassing the login prompt!
This trick is quite old and still we find several sites having this vulnerability. Out of every 10 websites 4 are vulnerable to this attack, and these are very easily available through the search engines like Google, Yahoo and Bing! This SQL vulnerability is mostly found on asp governed sites. Continue reading
Security and Authentication Systems in Windows (8)
Quite a long time it took me come up with the name of this article because I was not sure about the content firstly, but then finally I have figured it out.
This is day 2 of my back to back articles task and here we go!
So here every one of us know that Windows 8 is the most recent version of Microsoft Windows OS and most secure too. So today we are gonna study the system architecture running Windows 8. It is advisable to read my previous articles Windows Security Architecture, Breaking LSA – The BIOS Password and Bypassing SRM – Windows Login Password before starting with this. This is just an informative article on Windows 8 Security system. After reading this article you will be able to understand how the security systems in Windows 8 work and sketch some ideas to attack the system. Further after this I will be writing an article on retrieving the clear text passwords of Windows 8 user.
This article is designed keeping beginners in mind and not the professionals. Keep reading…
Bypassing the SRM (Security Reference Monitor) – Windows Login Password
Heya again, this is a back to back post on BHS under the category Windows hacking as since I have written an article a very long time back, I today decided to give away a couple of articles together. This is my second article of this day, hope of you are enjoying!
This tutorial is about bypassing the SRM that is your Windows Login Password to gain the complete access into the victim’s computer.
Before getting started with this you gotta read my previous articles on Windows Security Architecture and Breaking LSA: The BIOS Password.
So coming to the topic, Windows login password I must tell you that there are three concepts to break this. They are Cracking, Hacking and Bypassing. Continue reading
